HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

HP Increament (TW Units)

05-10-2004, 01:58 PM#1
Mighty3k
Hi!

I am doing another TW (Towe Wars) along all others. But I am kinda stuck, or well, not really.. though I could use some help.

I need a nice formula to increase HP on the units sold to attack the other players. There are 44 creeps divided to 4 shrines. So what I need is something that helps me calculate a balanced HP increament. I am doing the tower-related stuff after the creeps so I can balance the towers better.

What I need:
A nice formula to calculate the units HP after level (11 levels for each shrine) and shrine. I have tried alot, but either the increament get too big or too small. I don't seem smart enough... :\
something like: shrine * level + 100 * 0.70 = HP
well, I guess you know what I mean.
05-10-2004, 02:10 PM#2
Narwanza
You are just going to have to work with this yourself and try to find a way to make it work for you. Here is one that I think would work.

(shrine*100)+(level*100)*.7
05-10-2004, 03:41 PM#3
Mighty3k
Well, I thought that maybe someone already had a smart one or something ;)

I however can't use yours 'cus the increament is too small...
the last unit will have 1050 and the first 140.. I have to work on it.. Also, I have to relate the HP to the cost in some way.. ^_^

*goes away to think*
05-10-2004, 10:51 PM#4
Narwanza
How about

(shrine*1000)+(level*100)*(.1*level)
05-11-2004, 01:33 AM#5
The Gearhead
Use this:

(Note the [Shrine Level - 1], that means level 1 uses a 0 in the equation)

Integer ( Integer ( 100 * 1.125 ^ [Shrine Level - 1] ) + Absolute ( ( 100 * 1.125 ^ [Shrine Level - 1]) * Sin([Shrine Level - 1]) ) )

If you want level 11 to have say, around 16,000 hp and level 1 to have 100 you use...

Integer ( Integer ( 100 * 1.65 ^ [Shrine Level - 1] ) + Absolute ( ( 100 * 1.45 ^ [Shrine Level - 1]) * Sin([Shrine Level - 1]) ) )

Now, notice that there is a Sine in there. That means you will get a graph like this:



The Sine, or if you want Cosine or Modulo or any other system you want to use to create a repeating change, can modify the chart. Making it more or less linear as you choose.
05-12-2004, 02:54 PM#6
Mighty3k
Thanks I will try that.

Edit: By the way... hmm that calculation can only be made with the editor, if you don't know what all those functions do, and I don't^^ I was thinking of a "manual" way to calculate it to apply to the unit while editing it... But maybe it is possible to set a units max health with JASS or something? having all units with max hp and then set it to whatever that formula calculates could make that annoying "you-have-to-much-hp-so-I-won't-let-it-show-bug" appear...

Edit2: Or, you could explain that ;)
05-12-2004, 08:50 PM#7
The Gearhead
Well, I believe using WEU advanced upgrades, or hell, I think basic world editor, you can set a unit's max life. Simply do it so that:

Event - Unit is trained

If ( Triggering Unit is (Shrine Level 1) ) then set unit Max Life to [equation] else do nothing

Repeat as needed.
05-13-2004, 03:37 PM#8
Mighty3k
Quote:
Originally Posted by The Gearhead
Well, I believe using WEU advanced upgrades, or hell, I think basic world editor, you can set a unit's max life. Simply do it so that:

Event - Unit is trained

If ( Triggering Unit is (Shrine Level 1) ) then set unit Max Life to [equation] else do nothing

Repeat as needed.

Thanks alot! I'll try and come back if it doesn't work ;) Or if there is something I don't understand.

EDIT: humm.. well actually I appreciate your help, though it would help like 7342856238576 times more if you could paste that formula in "WE style"^^ I will try for myself. but just in case you know ;)

EDIT2: I know I must be a pain in the ass. But.. 1. would it completly lag wc3 if that formula is run every time a creep is purchased, and 2. In that formula there is no constant for the level of the creep, right? It must be.. I think^^ Or myabe you have taken that in consideration..
05-13-2004, 08:44 PM#9
The Gearhead
If you do it that way, you dont need a formula. You can set the life yourself.
05-14-2004, 12:46 PM#10
Mighty3k
oh well. I will try it. Thanks anyway.