I'm using 'Status Conditions' that are applied by 'Status Effects' to alter certain 'Status Values' when an item is equipped, but this doesn't seem to be working correctly.To begin, let me explain my setup.

-I've created a Status Effect set to auto-apply when an item is equipped to any one of my combatant's non-weapon equipment slots, and to auto-remove when nothing is equipped.

-The effect uses Status Conditions linked to a formula that first selects all of the combatant's equipment and then sets the value to that of an Item Variable which all of the equipped item's share, such as, "Amr_Weight," or "Amr_Bulk." The selected 'Value' node uses 'Add' for 'Multi Value Use,' and rounding is done inside the formula as a final step.

To begin with, the value of any Status Condition that's set to a formula goes bat @^#% crazy upon launching a game inside the Unity editor. Stats are altered many, many times beyond what they should be. For instance, a stat that should be altered to a total value of 132 instead becomes 42,482. Stacking is turned off, so it's not just applying the same effect over and over, and even if that were the case it should never reach such an outlandish number merely by tacking on the additional sum multiple times. Also, when I set the same Status Condition to a basic value (something like one, for instance) it adds that value correctly to the original upon starting a new game. The formula itself also works properly when I plug it directly into another used for altering the value of a stat.

Another issue is that I can't force an effect to automatically re-apply once it's been removed. If I uncheck the auto-apply feature, then remove the effect by going to 'Effect End Settings' and setting 'End After' to 'Time' and zero seconds, then set it back to 'None' and re-apply the auto-apply conditions, the effect will never reapply even if I move to a new scene.
  • Auto apply is only used if the effect isn't yet applied, so I doubt the high value comes from applying it again and again. I'd need more details on the formula, as this is most likely the culprit here :)

    Also, auto apply/remove set up in the status effects are only used when the checked condition changes, i.e. the effect can still be removed. If you want to have real auto effects or effect immunities (i.e. you can't remove or add the effect), you need to set them up in the equipment (or e.g. passive abilities).
    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!
  • "Auto apply is only used if the effect isn't yet applied, so I doubt the high value comes from applying it again and again. I'd need more details on the formula, as this is most likely the culprit here :)"

    -The formula starts by checking its own value (0, 1, 2 etc.), then selects all equipment and sets the value to that of a variable shared by certain types of equipment. Armor variables normally begin with, 'Amr_', and weapons begin with 'Wpn_', and I have a formula for each going down a list.

    -After each number, all of a combatant's equipment is selected and a single variable assigned as the value. 'Multi Value Use' is set to add.

    -All of my equipment is set up to share certain variables with values that differ depending on various factors. Everything, for instance, has a variable sitting near its end called 'Item_Weight' so that I can tally the weight of everything in a combatants inventory + all of their equipment and add this number to a stat representing their total weight. I wanted to do this via Status Effect rather than plugging the variable values directly into status formulas so that I might be able to more easily differentiate base status values from those altered by equipment in the UI. Plugging these equipment formulas directly into a status formula, though, does seem to work perfectly fine as long as I set up those formulas to start with the status value of their dependent Status Value. Incidentally, this also doubles the value shown when calculating inside the formula, though the value is correct everywhere else. Not sure I'd call that a bug, but it is a tad annoying.

    -A single status effect, using multiple 'Status Conditions', assigns each 'Change Value' section to the formula for armor, weapon or inventory with an initial value representing the value their meant to alter. Then chaos ensues.

    -For future consideration, it would be awesome to be able to set our status bonuses, both custom and pre-defined, to use formulas to assign their values and also have status checks see whether their changes should apply. This would make them much more versatile, and people could cherry pick which Ability or Status Bonus a combatant would receive based on whether they had 'X' Defense Attribute, or a certain minimal status requirement, or what have you.


    "Also, auto apply/remove set up in the status effects are only used when the checked condition changes, i.e. the effect can still be removed..."

    -Unless I'm mistaking something, the effect should be removed by setting it to "time out" as it were. The instance of the status effect disappears from the object's Combatant Component. Shouldn't that make it viable to re-apply the effect--if all the auto-apply criteria are met and the effect isn't currently applied--or is auto-apply somehow a one shot deal.


    "...If you want to have real auto effects or effect immunities (i.e. you can't remove or add the effect), you need to set them up in the equipment (or e.g. passive abilities)."

    -This was my original preference, but I can't set passive ability bonuses to formulas, or make them dependent on meeting certain conditions. Although, if Status Bonuses could assign formula values, the conditional checks could easily enough be made inside of said formulas.
  • Are the effect's status conditions all changing the same status value or different status values?
    I guess it'd be easiest if you could send me your ORK project asset (usually found here: Assets/ORK Framework/ORKProject.asset) to contact@orkframework.com - that way I can figure it out with some debugging :)
    ThreeNippledWanda said: -Unless I'm mistaking something, the effect should be removed by setting it to "time out" as it were. The instance of the status effect disappears from the object's Combatant Component. Shouldn't that make it viable to re-apply the effect--if all the auto-apply criteria are met and the effect isn't currently applied--or is auto-apply somehow a one shot deal.
    The auto apply/remove conditions are only checked upon changes to their defined status requirement. E.g. if your auto apply condition is checking equipment, it'd only be caused by changing the combatant's equipment. Removing the effect doesn't cause an additional check.
    ThreeNippledWanda said: -This was my original preference, but I can't set passive ability bonuses to formulas, or make them dependent on meeting certain conditions. Although, if Status Bonuses could assign formula values, the conditional checks could easily enough be made inside of said formulas.
    Having the bonus in the status effect would still be your setup, only the auto apply/remove would be handled by the effect being added to the equipment.
    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!
Sign In or Register to comment.