edited June 21 in ORK Scripting
Hi, I'm trying to set the target settings (status value) of an ability for my custom tooltip, it gives me the correct name, but only returns 0 as the value. Am I doing something wrong here? Getting the value in User Settings works perfectly with "shortcut.GetUseCostText(combatant)".
target-Change
Post edited by MM7565 on
  • Is the output of the string builder also 0 or just the convertion to number (whatever you do in that function)?
    Also, this function is used for use costs, i.e. in target changes it'll still use only the user and not the target, so the calculations will be wrong most likely.

    You could instead e.g. use the GetChangeInfo function to get status change information.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited June 22
    With OrkHUDStatusTextContent "targetchanges" for items and abilities works perfectly, but I would have liked to adjust the output myself a bit. So I tried to get the value and converted the string builder text into only numbers. I also decided to only use one tooltip for all items and abilities and set the values ​​accordingly. For GetChangeInfo I don't know how or if I'm trying the right GetChangeInfo because for me it's a bool and needs a Combatant target (dummy Target?). I actually just want to get the value from the settings of the item (Abilities). Items, for the reason that I declared a spell as an item for one-time use, that can trigger an ability.
    custom-Tooltip1
    P.S. Maybe it would be possible to add a pure value "targetchangesvalue" and "userchangesvalue" to OrkHudStatusText in order to custom UI elements to own preferences. Otherwise, I have to say that the longer I work with Ork Framework, the more I love it. It's unbelievable how many functions and possibilities it offers.

    Kind regards!
    Post edited by MM7565 on
  • edited June 22
    Get-Change-Info

    I just tried out GetChangeInfo function,but I get the following error message.
    I'm still doing something wrong here.

    NullReferenceException: Object reference not set to an instance of an object
    GamingIsLove.ORKFramework.StatusValueStatusChangeType.GetChangeInfo (GamingIsLove.ORKFramework.StatusChangeInformation+Changes info, GamingIsLove.ORKFramework.Combatant user, GamingIsLove.ORKFramework.Combatant target, System.Single damageMultiplier, GamingIsLove.Makinom.VariableHandler localVariables, GamingIsLove.Makinom.SelectedDataHandler selectedData) (at <2ca14f2e2c324523bd81397ccbc951ae>:0)
    Post edited by MM7565 on
  • Yeah, you're using just an empty combatant that's not initialized to anything, that'll cause errors. Check out the documentation on combatant scripting for details on how to create a new instance.

    A different approach for this kind of information would be using ability variables. They can either be just for display or also used as part of your damage calculations.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • works very well with variables. I didn't even know that I could set this separately for different levels. This is very helpful, thank you for your help.
Sign In or Register to comment.