• 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.

Is there a way to edit the Data field for increase Damage on Claws of Attack through trigger?

Status
Not open for further replies.
Level 5
Joined
Mar 18, 2023
Messages
52
Hello. I basically have this passive that increases the ATK damage of the hero by 2% of the total gold being held (it checks every 0.6s). I did it through a simple method of setting base damage. However, I want to change it to be based on something like Claws of Attack because I want to have the bonus amount being shown in green. It's just for fun visual clarity. If can't do, then all good. I don't mind leaving it as is. Thank you ahead of time if someone can help me!
 
Level 29
Joined
Sep 26, 2009
Messages
2,596
I based my ability on the 'Item damage bonus' ability and got this working:
  • Test
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Set VariableSet u = Paladin 0001 <gen>
      • Set VariableSet dmgBonus = (Random integer number between 1 and 30)
      • Ability - Set Ability: (Unit: u's Ability with Ability Code: Bonus Dmg Abil )'s Integer Level Field: Attack Bonus ('Iatt') of Level: 0 to dmgBonus
      • Unit - Increase level of Bonus Dmg Abil for u
      • Unit - Decrease level of Bonus Dmg Abil for u
You will need Reforged to be able to use the 'Ability - Set Ability' action
 
Level 5
Joined
Mar 18, 2023
Messages
52
I based my ability on the 'Item damage bonus' ability and got this working:
  • Test
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Set VariableSet u = Paladin 0001 <gen>
      • Set VariableSet dmgBonus = (Random integer number between 1 and 30)
      • Ability - Set Ability: (Unit: u's Ability with Ability Code: Bonus Dmg Abil )'s Integer Level Field: Attack Bonus ('Iatt') of Level: 0 to dmgBonus
      • Unit - Increase level of Bonus Dmg Abil for u
      • Unit - Decrease level of Bonus Dmg Abil for u
You will need Reforged to be able to use the 'Ability - Set Ability' action
Ah big thanks on showing where the needed action is! I was unaware that it was hiding in there. Now the only thing left is making it work haha. I tried using it real quick but didn't do anything for me. I'm using the right item/adjusting the right field since the ID for Item Attack Bonus ('Iatt') (in screenshot) matches Attack Bonus ID for the trigger. Also ignore the "Unit - Set Base Damage of CapitalU to (CapitalInt[0] + CapitalInt[1]) for weapon index: 0" as I have that part disabled

Capital DMG
Events
Time - Every 0.60 seconds of game time
Conditions
Actions
-------- 100 = 1.0% / 50 = 2.0% / 40 = 2.5% --------
Set VariableSet CapitalInt[1] = (((Owner of CapitalU) Current gold) / 50)
Unit - Set Base Damage of CapitalU to (CapitalInt[0] + CapitalInt[1]) for weapon index: 0
Ability - Set Ability: (Unit: CapitalU's Ability with Ability Code: CAPITALIST )'s Integer Level Field: Attack Bonus ('Iatt') of Level: 1 to CapitalInt[1]
 

Attachments

  • asdf.png
    asdf.png
    12.7 KB · Views: 9
Level 5
Joined
Mar 18, 2023
Messages
52
The 'ability - set ability' action is using zero-based index for levels.
So like in my example, the modified damage field for level '0' will impact level 1 in game. Level 1 in action will impact level 2 in game.
It's kind of a blizz inconsistency
I set the Level to 0 and it didn't work still :(. If possible, can you post a test map for me? I'll just copy and paste the same item/trigger over and edit it with my variable to see if that works
 
Last edited:
Level 5
Joined
Mar 18, 2023
Messages
52
Yes, for passive abilities you need to change their level in order for the game to recognize the changes you made. Hence the increase and decrease of ability level.
I've attached the map, you can see there is nothing else going on :)
Ah I was unaware you have to forcefully use those actions. I personally always try to use the lowest amounts of actions possible since I want to maximize optimization. Big thanks.
 
Status
Not open for further replies.
Top