PDA

View Full Version : Out-of-combat health regeneration?


ChessyCats
06-30-2013, 06:16 AM
Is there a way to flag bot health to regen when out of combat? Obviously players can do this, but I'm not sure what to do about my bots.

bad_captain
06-30-2013, 05:50 PM
They should, if you have the rule set. The only issue I know with regen is that melee bots won't sit to regen.

ChessyCats
06-30-2013, 07:29 PM
Ohhhh, yeah, that's the issue. Berserkers and warriors aren't going to sit and regen, otherwise the rest state works. Thank you for the reply.

ChessyCats
07-01-2013, 02:46 AM
If anyone else is interested in this, it's a pretty easy change to make your melee bots rest. Open up bot.cpp and search for "GetManaRatio". The first result should take you to a section of code that tells a bot when to meditate. Just change the line containing GetManaRatio to if(GetManaRatio() < 99.0f || GetHPRatio() < 99.0f), then recompile. A bot will rest if it's out of combat and doesn't have full mana or health.

werebat
10-31-2013, 05:28 PM
Thanks, ChessyCats, I made the change and it works great. Any chance it get committed soon?