So i use a buff to grant a % resistance against melee and range damage, however it never seems to work correctly when Stacking is factored in from other items that also grant Resistance.
the buff looks something like this [Combat response 1, damage types enabled melee and range, and modify faction set to .75 for a 25% resistance]
Now for instance, i have 2 items, that should grant 20% resistance, and another 25% resistance, so it should be 45% resistance combined right.
Well this is not the case, i think it just goes of the highest value and completely ignores stacking.
Is this intentional or am i doing something wrong here?
I've been trying something similar, but I don't know where to set up the damage reduction in the first place.
But for your problem I think that in order for it to stack, the two separate items have to add on to the same behavior instead of two separate behaviors. You would have an attribute (or maybe something else idk) that increases resistance by a % for each point in the fraction scaler, say 5% for 1 point, and have each of your items add 5 and 4 points to the attribute to come up with 45% resistance.
The math may be different from that, but I think the idea that you need to consolidate the effects into one behavior for them to stack is right.
An alternative would be to have the item behavior add a counter behavior. The unit then has a behavior that constantly adds resistance stacks and removes them with the stack adder being faster than the remover and having a requirement that the counter stacks have a weighted total equal to or less than the number of resistance stacks.
So i use a buff to grant a % resistance against melee and range damage, however it never seems to work correctly when Stacking is factored in from other items that also grant Resistance.
the buff looks something like this [Combat response 1, damage types enabled melee and range, and modify faction set to .75 for a 25% resistance]
Now for instance, i have 2 items, that should grant 20% resistance, and another 25% resistance, so it should be 45% resistance combined right. Well this is not the case, i think it just goes of the highest value and completely ignores stacking. Is this intentional or am i doing something wrong here?
@Jinxxx123: Go
I've been trying something similar, but I don't know where to set up the damage reduction in the first place.
But for your problem I think that in order for it to stack, the two separate items have to add on to the same behavior instead of two separate behaviors. You would have an attribute (or maybe something else idk) that increases resistance by a % for each point in the fraction scaler, say 5% for 1 point, and have each of your items add 5 and 4 points to the attribute to come up with 45% resistance.
The math may be different from that, but I think the idea that you need to consolidate the effects into one behavior for them to stack is right.
a problem with your suggestion is attributes are missing the damage response fields to handle this sort of stuff :P
An alternative would be to have the item behavior add a counter behavior. The unit then has a behavior that constantly adds resistance stacks and removes them with the stack adder being faster than the remover and having a requirement that the counter stacks have a weighted total equal to or less than the number of resistance stacks.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg