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

[General] how to modify the stats of non-hero unit?

Status
Not open for further replies.
So, If I want to make some bonus system that increases some of a unit's stats what how do I do it? Like, you make some points and spent them for some bonus stat that only increases with each game if you buy more and the number of the upgrades you can have is limitless!. Shall I use items or add abilities to that unit or is there some trigger to increase stats? Also the stats are actually saved so when you revive of pick a new hero the upgrades remain.
The stats i want to be able to increase are stamina(health), attack power(bonus to attack damage) and Agility(attack speed bonus).
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
Your title says non-hero unit, but then you mention picking a new hero unit... so which is it? Hero or non-hero?

Either way, the basis for improving these stats would be to use item abilities with multiple levels.

e.g. Claws of Attack has the ability Item Attack Damage Bonus, so make a copy of that ability with multiple levels, and give that ability to the unit. It won't display an icon.
 
Your title says non-hero unit, but then you mention picking a new hero unit... so which is it? Hero or non-hero?

Either way, the basis for improving these stats would be to use item abilities with multiple levels.

e.g. Claws of Attack has the ability Item Attack Damage Bonus, so make a copy of that ability with multiple levels, and give that ability to the unit. It won't display an icon.

it's non hero unit but i call it hero because you theoretically(not practically) play with hero :D
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
For a harder, but more scalable solution you could use a bonusmod.

Essentially a bonusmod works by adding together multiple invisible abilities to get the bonus.

For instance, the abilities for damage give:
-1
-2
-4
-8
-16
-32
-64
-128
-256
-512
+1024

Combining those allows a range of bonuses from -1023 to +1024. Yet, it only takes 10 abilities, while the previous posted solution would require an ability with at least 2047 levels, which is much more expensive.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
Note that loading times is mostly increased by text in tooltips. Numbers don't cost almost anything, so if you don't make 2047 abilities with separate names, then loading time shouldn't matter.

However, there are other advantages for bonusmods:
1. Way less abilities needed.
2. Stat management can be done centrally, which makes things easier after some point.
3. You don't have to mess around with ability levels, but can just call a single function.
 
You'll have to make dummy armor/attack speed abilities however for damage there is an item ability that modifies damage and you can put that onto a tome/power up and bam, you got a tome of damage which in turn can use to add/subtract permanent damage to any unit.

Oh, and this tutorial http://www.hiveworkshop.com/forums/...hout-needing-glitch-through-abilities-254190/ will teach you how to do life without having to make dummy abilities for it.
 
It says you can only change with percentage.
BTW, the ability for health is not working. I picked health bonus(greater) (all2) and made every level to increase health +10. However there is no increasement though I increase the level of that ability with trigger... :/ The others are working for haste and attack power, but health...?
 
Health is a bit harder to mess with, it doesn't exactly level up. What's wrong with percentages? It's a lot easier to work with and pull out a calculator then making lots of dummy abilities... =P

Edit: Here's how you do health with abilities.

You need two levels for the ability, first level being 0 health gained and the second level would be 10 in your case.

[trigger=Example of Health Increasing]
Events
A unit is attacked
Conditions
Actions
Trigger - Turn off (This trigger)
Set TempUnit = (Triggering unit)
Unit - Add Life Reduction to TempUnit
Unit - Increase level of Life Reduction for TempUnit
Unit - Remove Life Reduction from TempUnit
Trigger - Turn on (This trigger)
[/trigger]
 
You have two levels on the item ability with level one being the amount and level two being 0?

[trigger=]
events
conditions
Actions
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Loop - Actions
Unit - Add Item Life Bonus (Greater) to (Picked unit)
Unit - Increase level of Item Life Bonus (Greater) for (Picked unit)
Unit - Remove Item Life Bonus (Greater) from (Picked unit)
[/trigger]
 
Status
Not open for further replies.
Top