Hey, I've been recently trying to figure out a dodge ability and I have one working that uses a buff with the Combat- Damage Response set to a % chance to reduce incoming damage to 0.
I was wondering how to then change this from a hardcoded % value to a scaling value that is based off of an attribute using the Data Editor as much as possible.
It seems like doing this with triggers is an easier solution, but one I would like to try to avoid, simply because it seems like it is a messier shortcut.
The only way I can think of is creating a single stackable buff that is a 1% chance and stacking it based on the amount of attributes. Are there any other ways?
Think he means the attributes heroes use (behavior).
Only way around I can think of is to modify the raw data value to add a text in that sets it based on the attribute. My knowledge of the editor is not good enough to tell you exactly what to put especially if it is a function of the attribute, but it can work.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Another fairly easy option would be to make it scale in steps: just make several buffs with different %dodge and activate/deactivate them via Validators. This has the advantage of allowing you to decide how the %dodge scales with the attribute (plus only awarding 100% evasion at 1000+ points if needed), and the obvious disadvantage of only having a finite number of levels.
I also don't know whether multiple stacks of 1 buff stack via addition or multiplication. You can test it fairly easily: 100 stacks will leave you entirely impervious with additive stacking, but you'll have a 36% chance of still being hit if multiplicative stacking is applied. The former means evasion grows linearily with the attribute, but allows 100 different levels at most. The latter will mean each additional stack of the buff gives less of a boost than the previous one, and allows much higher stacking (like the WC3 armor system) - 450 stacks will still leave you with a 1% chance of being hit!
Hey, thanks a lot. I was definitely thinking about that too. Is there a way to add the buffs via the data editor, as attributes are gained, or do they need to be added via triggers. Also, I thought I read somewhere about there being a limit to 60ish behaviors per unit. Is that true? And are buffs stackable by default or is there a flag that needs to be set?
You might be able to add the buffs via the Veterancy Behavior, or you can use a peridic Apply Buff effect, or just put them all on the unit by default.
If there really is a stacking limit the second option would be the best: Periodically attempt to apply all buff levels, but add Validators so only one of them actually is applied. Also add the same Validators to the buffs in their "remove" field so they expire the moment the next level is reached.
To make buffs stackable you have to set the "maximum stack count" and "maximum stacks per caster" on the buff. I think -1 means infinite, but I encountered some weird bugs with that so I just set both to 100k for my attributes. You can definitely have more than 60 stacks of 1 Behavior, but for different Behaviors I have no idea.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hey, I've been recently trying to figure out a dodge ability and I have one working that uses a buff with the Combat- Damage Response set to a % chance to reduce incoming damage to 0.
I was wondering how to then change this from a hardcoded % value to a scaling value that is based off of an attribute using the Data Editor as much as possible.
It seems like doing this with triggers is an easier solution, but one I would like to try to avoid, simply because it seems like it is a messier shortcut.
The only way I can think of is creating a single stackable buff that is a 1% chance and stacking it based on the amount of attributes. Are there any other ways?
@ConsensusOfChaos: Go
when you say "attribute".... what kinda attribute are you talking about.
@SouLCarveRR: Go
Think he means the attributes heroes use (behavior).
Only way around I can think of is to modify the raw data value to add a text in that sets it based on the attribute. My knowledge of the editor is not good enough to tell you exactly what to put especially if it is a function of the attribute, but it can work.
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
Another fairly easy option would be to make it scale in steps: just make several buffs with different %dodge and activate/deactivate them via Validators. This has the advantage of allowing you to decide how the %dodge scales with the attribute (plus only awarding 100% evasion at 1000+ points if needed), and the obvious disadvantage of only having a finite number of levels.
I also don't know whether multiple stacks of 1 buff stack via addition or multiplication. You can test it fairly easily: 100 stacks will leave you entirely impervious with additive stacking, but you'll have a 36% chance of still being hit if multiplicative stacking is applied. The former means evasion grows linearily with the attribute, but allows 100 different levels at most. The latter will mean each additional stack of the buff gives less of a boost than the previous one, and allows much higher stacking (like the WC3 armor system) - 450 stacks will still leave you with a 1% chance of being hit!
Thanks for the replies.
@SouLCarveRR: Go
I mean behavior attributes, such as strength, agility, etc.
@Photoloss: Go
Hey, thanks a lot. I was definitely thinking about that too. Is there a way to add the buffs via the data editor, as attributes are gained, or do they need to be added via triggers. Also, I thought I read somewhere about there being a limit to 60ish behaviors per unit. Is that true? And are buffs stackable by default or is there a flag that needs to be set?
You might be able to add the buffs via the Veterancy Behavior, or you can use a peridic Apply Buff effect, or just put them all on the unit by default.
If there really is a stacking limit the second option would be the best: Periodically attempt to apply all buff levels, but add Validators so only one of them actually is applied. Also add the same Validators to the buffs in their "remove" field so they expire the moment the next level is reached.
To make buffs stackable you have to set the "maximum stack count" and "maximum stacks per caster" on the buff. I think -1 means infinite, but I encountered some weird bugs with that so I just set both to 100k for my attributes. You can definitely have more than 60 stacks of 1 Behavior, but for different Behaviors I have no idea.