• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Add Stat % Passive

Status
Not open for further replies.
Level 7
Joined
Jun 27, 2014
Messages
227
I am just wondering if it's possible to make an ability like attribute bonus, but working in percentages. So level 1 would add 10% strength as a bonus, level 2 20% etc.

If possible, just point me at whether it's via triggers or via ability and I should be alright with the rest.
 
Something like this:

  • Untitled Trigger 001
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Attribute Bonus
    • Actions
      • Hero - Modify Strength of (Learning Hero): Set to (Integer(((Real((Strength of (Learning Hero) (Exclude bonuses)))) x 1.10)))
      • Hero - Modify Agility of (Learning Hero): Set to (Integer(((Real((Agility of (Learning Hero) (Exclude bonuses)))) x 1.10)))
      • Hero - Modify Intelligence of (Learning Hero): Set to (Integer(((Real((Intelligence of (Learning Hero) (Exclude bonuses)))) x 1.10)))
 
Last edited:
Level 7
Joined
Jun 27, 2014
Messages
227
Something like this:

  • Untitled Trigger 001
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Attribute Bonus
    • Actions
      • Hero - Modify Strength of (Learning Hero): Set to (Integer(((Real((Strength of (Learning Hero) (Exclude bonuses)))) x 1.10)))
      • Hero - Modify Agility of (Learning Hero): Set to (Integer(((Real((Agility of (Learning Hero) (Exclude bonuses)))) x 1.10)))
      • Hero - Modify Intelligence of (Learning Hero): Set to (Integer(((Real((Intelligence of (Learning Hero) (Exclude bonuses)))) x 1.10)))
or as jass:


Just one question - if the unit gets the ability through triggers, such as "Unit - Add Ability", will it work?
 
Level 7
Joined
Jun 27, 2014
Messages
227
Yeah, I saw that I need to alter it a bit, though at least i got the basis for it, and that's more than helpful. I'll try to figure out the rest through the day - Can't ask everything be served on a plate now can I, especially if I want to learn some things. Thanks a lot for showing me this!
 
Level 7
Joined
Jun 27, 2014
Messages
227
It only runs when the hero learns the ability.

You have to run the three actions if you add any other way.

I made the trigger and realized it affects the actual stats. All though that too is something I like and will use later, the trigger I need for now would need be a bonus to the actual stats, just like an attribute bonus would act like.
 
Level 17
Joined
Mar 21, 2011
Messages
1,611
Modify the attribute bonus ability. Give it +1 bonus strength for each level and then set the level of the ability based on % of your strength. You should check and set this periodically, because you also want to apply the bonus if you gain more str afterwards
 
Status
Not open for further replies.
Top