Page 1 of 1

Hero Rules

Posted: Tue Mar 14, 2006 12:08 am
by OOM-9
Hey, just wondering if anyone has figured out where the hero rules are stored if anywhere...

I want to remove the slow health loss for the heros because in ARC the heros are basically improved troopers and they can't go flying around the map hacking droids apart for health...

Also, I want the hero to be able to command AI units... in Hero Assault heros act like normal units... they can pick up powerups and such.... is it possible to have heros act normally like that in conquest intead of the lightsabre health and bacta gain when killing enemies?

Just wondering if people have fooled with this yet, and where, if anywhere I can find and edit these rules...


~OOM-9

RE: Hero Rules

Posted: Tue Mar 14, 2006 2:59 am
by PAN-Fnord
Heroes lose health in the code, there's nothing you can do to stop the health loss or gain. But a unit is only a hero if you set them up as a hero class in your mission lua - in hero assault, they're just added to the teams as sniper/officer/etc., and the extras are added with AddUnitClass.
Note though, that if you don't set up a unit as a hero, they don't earn Hero-type points in the stats, they earn normal unit points and medals. That's why in Hero Assault they get medal bonuses and things.

Since the hero-unlock code is Lua (I think), you might be able to rework the hero logic so that it spawns a regular unit. Then just set that unit up so no AI spawns as it, and the player can't (make it a million points to unlock, or something)...

I'll see if I can get some more information, but the point of heros was limited time for use. You could just give them a health-regen for a small amount, so in effect they'd lose health slower....

Mike Z

Posted: Tue Mar 14, 2006 9:34 am
by OOM-9
Thanx PAN-Ford...

Well, I could just make them another unit I guess, but for now they will just have to follow normal hero rules... I'll give them a bit of regen to counteract the health loss.





~OOM-9

Posted: Tue Mar 14, 2006 11:47 am
by TAWArtemis
why not make them a normal unit? just replace the sniper, rifleman, engineer, etc with the hero? I do it all the time in testinf of new heros so i can spawn right away and they have no timelimit.

Posted: Tue Mar 14, 2006 12:10 pm
by Kyross
I was going to look into the loss for hero health. For one hero I am making I was going to hav an AddHealth to counteract the automatic health loss so he doesn't just die f nobody shoots him. However, I don't know what the exact value of the loss is so matching the addhealth value could take a long time in guesswork.

Posted: Tue Mar 14, 2006 3:15 pm
by PAN-Fnord
Kyross - you could have printed a message each second that told you what their health was. (^.^)

I just looked: they lose 10 health/sec., regardless of max health or anything - so Grievous lives longer than Luke.
If you add health, that fixes that problem, but they still get health back for killing enemies. If you want to make a workaround in your mission Lua for fixing that as well (check to see when they kill someone, and add a callback that hurts them appropriately):
They get 150 health for the first 15 kills, 100 for the next 15, and 50 from there on.

Mike Z

Posted: Thu Mar 16, 2006 8:05 pm
by Kyross
Thanks lots Pan. My intention for this hero was to simply negate the constant health decrease so they could still refill health by killing, but as a hero wouldn't have the constant decrease even if he wasn't attacked. A way of making this unit unique amongst heroes.