• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Chaos Morph

Status
Not open for further replies.
Level 4
Joined
Sep 21, 2009
Messages
32
Hi all and sorry for my rude english.

I need a real help.
There is a problem: i have a some heroes(5 or 6 for example with different range and attack), and i change them by chaos ability ('Srtt' in humans). That's work correctly. Then i give to hero an ability which increase max MP ('Almv') - hero increase his max MP - that's work correctly too. But then, when i want to change a hero by Chaos ability - i've got double MP. And that don't stop - every changing a hero makes max MP double!

For example:
1) started MP = 10/10
2) Given increase ability and max MP becomes 15/15
3) Use Chaos ability and max MP becomes 30/30.
4) Do step 3 again and max MP becomes 90/90 etc.

How do it to work correctly????

PS: i can't use another morph ability, i need only 'Srtt'.

Thx)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Chaos re-applies all stat modifications for health, mana and damage. This includes tomes as well. This is a bug with Chaos and there is no known fix next to manually correcting the values with a negative application of the amount gained.

If possible, avoid using Chaos and instead use abilities like metomorphisis.
 
Chaos re-applies all stat modifications for health, mana and damage. This includes tomes as well. This is a bug with Chaos and there is no known fix next to manually correcting the values with a negative application of the amount gained.

If possible, avoid using Chaos and instead use abilities like metomorphisis.
Metamorphosis has other drawbacks, though.

As Dr Super Good suggests: Best solution is keeping track of all stats and then manually adjust them after morphing. This works for health and mana just fine, as you can directly get them. For damage, it's a little bit trickier. You need to decrease the damage by adding an item ability first (so that it applies a red number) and then morph the unit. You should calculate how much you need to subtract first, but you'll figure it out.
 
Level 2
Joined
Apr 15, 2009
Messages
25
You can use some sort of universal hp and mp systems, I've seen some around on hive. What you really should worry about is armor, as every bonus before switch will apply to switched unit (eg. item armor bonus or even devotion aura). Also, chaos won't let your hero switch his main attribute. As for damage, I found it pretty consistent on heroes since I don't remember it bugging once and I'm using it all the time.
 
Level 4
Joined
Sep 21, 2009
Messages
32
Best solution is keeping track of all stats and then manually adjust them after morphing. This works for health and mana just fine, as you can directly get them
well. But there is another problem.
For example hero takes 5 books, which increases his max MP by 10. (as result we have +50 maxMP.) We write count of getting book in variable of integer 'int_books'.
Then we use Chaos on hero. So there is a problem - how i can return his maxMP to default???? Cause if I do that, i can give them manabook*int_books and get needed maxMP to moprhed hero.
 
You don't really need to keep track of what has been added and what not. All you need to do is getting the units max health/mana before applying the chaos and then after morphing, set the units max health/mana to that value.

Search for the "SetUnitMaxState" snippet here on hive, as you can't set the health and mana of a unit via triggers by default.

Armor and damage, however, is a little bit more complicated. There's a script available on hive to get the armor of a unit by having a dummy unit attack the unit and calculate the armor based on the damage dealt. Not the most elegant solution, but it works.

For damage, wow, this is a tough one! I guess there's no way to get a units attack damage without keeping track of all bonuses added.
 
Status
Not open for further replies.
Top