Hey everybody. I'm working on giving a unit some simple Movement Speed Buff and Debuff abilities, and while I have gotten the abilities to work fine, the Buff and Debuff are not interacting quite how I want them to.
The Buff is for 25%, and the Debuff is for 50%. The initial Movement Speed is 2.75.
With only the Debuff applied, the Movement Speed is reduced by 1.375, or 50% of 2.75, exactly how I want it.
However, with the Debuff and the Buff applied at the same time, the Movement Speed is reduced by 1.08. I'm not sure how the game calculates the combination of the Buff and the Debuff, but....
What I want is essentially for the Buff and the Debuff to affect Movement Speed in the following way: (2.75) + ((2.75)x(0.25 + -0.50))
Or, in other words, the Buff and the Debuff should interact so that a 50% debuff - a 25% buff is a 25% debuff.
I would be really appreciative if somebody could give me any ideas how to make this happen. :D
What's going on is that speed buffs are multiplicative. That is to say, you're not adding 25% and reducing 50%, you're multiplying by 1.25 and then multiplying it by 0.5 (or the other way around, order is irrelevant). 2.75 * 1.25 * 0.5 = 1.71, and which is 1.04 lower. The discrepancy is probably due to rounding somewhere, or maybe you have the number remembered slightly off. To my knowledge, there's no way to change the way that this is calculated.
If you want your two buffs to interact with each other, you'll probably want them to work on the same stack counter, and use validators to determine the actual buff.
So, for example, let's give your unit 4 stacks of a behavior - buff called "Speed."
Now, create an effect that applies 2 stacks of the behavior, and create an effect that removes 2 stacks of the behavior. Create a new behavior called "Slow" with the initial effect set to the remove 2 stacks behavior, and the expire effect set to the add 2 stacks.
You can now create an additional two effects for applying and removing 1 stack. Say your 25% movement speed increase is being granted by an item - the item will add a behavior called, say, "Haste." This behavior will behave in the opposite fashion of slow. The initial effect is the add 1 stack effect, and the expire effect is the remove 1 stack effect.
Now you'll want to create validators for 2, 3, 4, and 5 stacks. At 4 stacks the movement speed will be normal. At 5 stacks the movement speed will have a 1.25 multiplier. At 3 stacks movement speed will have a .75 multiplier. At 2 stacks your movement speed will have a .5 multiplier.
Of course you can use a different stack count if you have more variants. For instance, if you have items that are +20% and items that are +25%, you'll want to make the default 20 stack counts, with each stack count being worth 5%.
This is the first idea to come to my mind if you want the behaviors to interact directly with each other. Hopefully this'll help you find a good solution.
What's going on is that speed buffs are multiplicative. That is to say, you're not adding 25% and reducing 50%, you're multiplying by 1.25 and then multiplying it by 0.5 (or the other way around, order is irrelevant). 2.75 * 1.25 * 0.5 = 1.71, and which is 1.04 lower. The discrepancy is probably due to rounding somewhere, or maybe you have the number remembered slightly off. To my knowledge, there's no way to change the way that this is calculated.
If you want your two buffs to interact with each other, you'll probably want them to work on the same stack counter, and use validators to determine the actual buff.
So, for example, let's give your unit 4 stacks of a behavior - buff called "Speed."
Now, create an effect that applies 2 stacks of the behavior, and create an effect that removes 2 stacks of the behavior. Create a new behavior called "Slow" with the initial effect set to the remove 2 stacks behavior, and the expire effect set to the add 2 stacks.
You can now create an additional two effects for applying and removing 1 stack. Say your 25% movement speed increase is being granted by an item - the item will add a behavior called, say, "Haste." This behavior will behave in the opposite fashion of slow. The initial effect is the add 1 stack effect, and the expire effect is the remove 1 stack effect.
Now you'll want to create validators for 2, 3, 4, and 5 stacks. At 4 stacks the movement speed will be normal. At 5 stacks the movement speed will have a 1.25 multiplier. At 3 stacks movement speed will have a .75 multiplier. At 2 stacks your movement speed will have a .5 multiplier.
Of course you can use a different stack count if you have more variants. For instance, if you have items that are +20% and items that are +25%, you'll want to make the default 20 stack counts, with each stack count being worth 5%.
This is the first idea to come to my mind if you want the behaviors to interact directly with each other. Hopefully this'll help you find a good solution.
Soma, you are some sort of mad scientist. I haven't tried it yet, but this makes so much sense that I'm sure it will work. I'll post when I have some results.
Haha... I'm actually still a rank newbie as far as the editor goes. I have a hard time getting stuff to work myself most of the time. But I'm glad it makes sense. Good luck!
I need a behavior with a maximum amount of stacks, but no stat changes. I need my unit to started with a given amount of stacks of this behavior. I have a validator for every amount of stacks, and each validator has a different effect that applies a different behavior with a movement modification of my choosing.
Then, in order to slow my unit, I have an ability with an effect that temporarily removes stacks of the initial behavior. This will make my unit receive a different validator, and that validator will apply the appropriate effect that applies the behavior with the appropriate movement modification?
._.
Edit: Actually, I'm fairly lost. Where do I plug the Validators into the stacking Buff? The only place I see to do it disables the Buff if any of the Validators return false, and unless I'm mistaken, all of them except one at a time are supposed to return false.
Edit2:
I have quite a few problems. I don't know where to plug the validators in, I don't know what kind of validators to use, and I don't know how to make them apply the movement speed changes. Also, my apply behavior effect to remove counts of the behavior cannot have more than -1 count.
You don't need to have an effect that applies the movement modifying behavior. You could simply give the unit a behavior and attach the validator to the behavior. So the unit could have a behavior that has a .50 movement modifier with a validator of 2 stacks, another behavior that has a 0.75 movement modifier with a validator of 3 stacks, and a third behavior that has a 1.25 validator of 5 stacks. Give the unit all 3 of them. The validator should be a validator - disable, so when the validator isn't met that modifier will be disabled.
EDIT: The validator is not on the stacking buff. The validator is on the speed buff. It's a behavior count validator that counts the stacks of the stacking buff.
Behavior Buff "Speed" - has no modifier, max stack of whatever you think is ideal.
Validator Unit Compare Behavior Count "3 Speed" - set the value to 3, leave compare on equal to
Behavior Buff "-25% Speed" - movement speed set to 0.75, validator disable set to validator "3 speed"
In your example you'd also want a version for 2 stacks, and a version for 5 stacks. 4 stacks will have no effect and would be the normal effect.
Once that's done, give the unit 4 stacks of the behavior speed, and every one of the +/-x% speed behaviors.
You don't need to have an effect that applies the movement modifying behavior. You could simply give the unit a behavior and attach the validator to the behavior. So the unit could have a behavior that has a .50 movement modifier with a validator of 2 stacks, another behavior that has a 0.75 movement modifier with a validator of 3 stacks, and a third behavior that has a 1.25 validator of 5 stacks. Give the unit all 3 of them. The validator should be a validator - disable, so when the validator isn't met that modifier will be disabled.
EDIT: The validator is not on the stacking buff. The validator is on the speed buff. It's a behavior count validator that counts the stacks of the stacking buff.
Behavior Buff "Speed" - has no modifier, max stack of whatever you think is ideal.
Validator Unit Compare Behavior Count "3 Speed" - set the value to 3, leave compare on equal to
Behavior Buff "-25% Speed" - movement speed set to 0.75, validator disable set to validator "3 speed"
In your example you'd also want a version for 2 stacks, and a version for 5 stacks. 4 stacks will have no effect and would be the normal effect.
Once that's done, give the unit 4 stacks of the behavior speed, and every one of the +/-x% speed behaviors.
Ohhh! The validator is on the modifying behavior but links to the stacking behavior. This makes so much sense now.
I'm still having one problem; I can't seem to find a way to remove more than one stack of the stacking behavior using a single effect.
Edit: WOOOOOT! I tested a 25% buff, and it worked! It doesn't go away though, because I still can't figure out how to remove more than one stack of the behavior.
But amazing! This makes it so I can perfectly control how Movement Speed stacks. I'm definitely going to apply this to damage scaling stuff as well. I could kiss you, but I won't.
Try an Effect (type: Remove Behavior). I haven't played around with it before but it should be the Behavior: Count field. By default it is set to 0 - my guess is the default value removes ALL stacks of the behavior. So set it to 2 or 1 (depending on which effect it's for).
Then go to the behavior that's conferring the speed behavior. Going back to the example I used, say you're using the behavior haste to give 1 stack, which is worth 25%. Effect: Effect - Initial should be set to "Add 1 stack of speed" effect. Effect: Effect - Final should be set to "Remove 1 stack of speed" effect.
Depending how you set everything up a flat bonus can be equivalent to a percentage. Just be aware some percentages multiply with stack count instead of being additional.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Hey everybody. I'm working on giving a unit some simple Movement Speed Buff and Debuff abilities, and while I have gotten the abilities to work fine, the Buff and Debuff are not interacting quite how I want them to.
The Buff is for 25%, and the Debuff is for 50%. The initial Movement Speed is 2.75.
With only the Debuff applied, the Movement Speed is reduced by 1.375, or 50% of 2.75, exactly how I want it.
However, with the Debuff and the Buff applied at the same time, the Movement Speed is reduced by 1.08. I'm not sure how the game calculates the combination of the Buff and the Debuff, but....
What I want is essentially for the Buff and the Debuff to affect Movement Speed in the following way: (2.75) + ((2.75)x(0.25 + -0.50)) Or, in other words, the Buff and the Debuff should interact so that a 50% debuff - a 25% buff is a 25% debuff.
I would be really appreciative if somebody could give me any ideas how to make this happen. :D
@deleted_7920358: Go
What's going on is that speed buffs are multiplicative. That is to say, you're not adding 25% and reducing 50%, you're multiplying by 1.25 and then multiplying it by 0.5 (or the other way around, order is irrelevant). 2.75 * 1.25 * 0.5 = 1.71, and which is 1.04 lower. The discrepancy is probably due to rounding somewhere, or maybe you have the number remembered slightly off. To my knowledge, there's no way to change the way that this is calculated.
If you want your two buffs to interact with each other, you'll probably want them to work on the same stack counter, and use validators to determine the actual buff.
So, for example, let's give your unit 4 stacks of a behavior - buff called "Speed."
Now, create an effect that applies 2 stacks of the behavior, and create an effect that removes 2 stacks of the behavior. Create a new behavior called "Slow" with the initial effect set to the remove 2 stacks behavior, and the expire effect set to the add 2 stacks.
You can now create an additional two effects for applying and removing 1 stack. Say your 25% movement speed increase is being granted by an item - the item will add a behavior called, say, "Haste." This behavior will behave in the opposite fashion of slow. The initial effect is the add 1 stack effect, and the expire effect is the remove 1 stack effect.
Now you'll want to create validators for 2, 3, 4, and 5 stacks. At 4 stacks the movement speed will be normal. At 5 stacks the movement speed will have a 1.25 multiplier. At 3 stacks movement speed will have a .75 multiplier. At 2 stacks your movement speed will have a .5 multiplier.
Of course you can use a different stack count if you have more variants. For instance, if you have items that are +20% and items that are +25%, you'll want to make the default 20 stack counts, with each stack count being worth 5%.
This is the first idea to come to my mind if you want the behaviors to interact directly with each other. Hopefully this'll help you find a good solution.
Soma, you are some sort of mad scientist. I haven't tried it yet, but this makes so much sense that I'm sure it will work. I'll post when I have some results.
@deleted_7920358: Go
Haha... I'm actually still a rank newbie as far as the editor goes. I have a hard time getting stuff to work myself most of the time. But I'm glad it makes sense. Good luck!
@Soma2035: Go
Uhmm... So, for clarification...
I need a behavior with a maximum amount of stacks, but no stat changes. I need my unit to started with a given amount of stacks of this behavior. I have a validator for every amount of stacks, and each validator has a different effect that applies a different behavior with a movement modification of my choosing.
Then, in order to slow my unit, I have an ability with an effect that temporarily removes stacks of the initial behavior. This will make my unit receive a different validator, and that validator will apply the appropriate effect that applies the behavior with the appropriate movement modification?
._.
Edit: Actually, I'm fairly lost. Where do I plug the Validators into the stacking Buff? The only place I see to do it disables the Buff if any of the Validators return false, and unless I'm mistaken, all of them except one at a time are supposed to return false.
Edit2:
I have quite a few problems. I don't know where to plug the validators in, I don't know what kind of validators to use, and I don't know how to make them apply the movement speed changes. Also, my apply behavior effect to remove counts of the behavior cannot have more than -1 count.
@deleted_7920358: Go
You don't need to have an effect that applies the movement modifying behavior. You could simply give the unit a behavior and attach the validator to the behavior. So the unit could have a behavior that has a .50 movement modifier with a validator of 2 stacks, another behavior that has a 0.75 movement modifier with a validator of 3 stacks, and a third behavior that has a 1.25 validator of 5 stacks. Give the unit all 3 of them. The validator should be a validator - disable, so when the validator isn't met that modifier will be disabled.
EDIT: The validator is not on the stacking buff. The validator is on the speed buff. It's a behavior count validator that counts the stacks of the stacking buff.
Behavior Buff "Speed" - has no modifier, max stack of whatever you think is ideal.
Validator Unit Compare Behavior Count "3 Speed" - set the value to 3, leave compare on equal to
Behavior Buff "-25% Speed" - movement speed set to 0.75, validator disable set to validator "3 speed"
In your example you'd also want a version for 2 stacks, and a version for 5 stacks. 4 stacks will have no effect and would be the normal effect.
Once that's done, give the unit 4 stacks of the behavior speed, and every one of the +/-x% speed behaviors.
Ohhh! The validator is on the modifying behavior but links to the stacking behavior. This makes so much sense now.
I'm still having one problem; I can't seem to find a way to remove more than one stack of the stacking behavior using a single effect.
Edit: WOOOOOT! I tested a 25% buff, and it worked! It doesn't go away though, because I still can't figure out how to remove more than one stack of the behavior.
But amazing! This makes it so I can perfectly control how Movement Speed stacks. I'm definitely going to apply this to damage scaling stuff as well. I could kiss you, but I won't.
@deleted_7920358: Go
Try an Effect (type: Remove Behavior). I haven't played around with it before but it should be the Behavior: Count field. By default it is set to 0 - my guess is the default value removes ALL stacks of the behavior. So set it to 2 or 1 (depending on which effect it's for).
Then go to the behavior that's conferring the speed behavior. Going back to the example I used, say you're using the behavior haste to give 1 stack, which is worth 25%. Effect: Effect - Initial should be set to "Add 1 stack of speed" effect. Effect: Effect - Final should be set to "Remove 1 stack of speed" effect.
Ever tried using the Movement Modification - Movement Speed Bonus field and not the Movement Modification - Movement Speed Modification field?
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
@Soma2035: Go
Dude, thank you so much! It works perfectly. Tested it with buffs and debuffs separately and combined.
@DrSuperEvil: Go
I do want the movement speed to be affected by a percentage, though. The bonus field is a flat bonus, right?
Depending how you set everything up a flat bonus can be equivalent to a percentage. Just be aware some percentages multiply with stack count instead of being additional.
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