Slowpoke
Nov 14, 2010, 02:07 AM
It doesn't seem possible at the moment, but any time someone says something's impossible smelly mummy points out it isn't :/
So... can you make rates of healing be dependent on difficulty?
E.g., can you have the neutral territory heal when fortified set to 0, but only for immortal and deity.
elistor
Nov 14, 2010, 03:30 AM
It could be done with just XML. Pretty sloppy but it could be done. First set the global define for healing to 0. Then
<Unit_FreePromotions>
<UnitType />
<PromotionType>Heal_Rate_DIETY</PromotionType>
</Unit_FreePromotions>
<Unit_FreePromotions>
<UnitType />
<PromotionType>Heal_Rate_IMORTAL</PromotionType>
</Unit_FreePromotions>
<Unit_FreePromotions>
<UnitType />
<PromotionType>Heal_Rate_ETC</PromotionType>
</Unit_FreePromotions>
You would have to make one for each difficulty that you wanted to have different, then one for all the rest. Slap a different <TechPrereq> on each promotion. Have each of those techs assigned a <Technology_PrereqTechs> that is self referential(it's own tech name) so it can't be researched. Then assign the corresponding tech to the handicap you want.
Recap:
Clear the global defines so healing is set to 0
create promotions with the heal rates you want
use <Unit_FreePromotions> to give them all to every unit in the game
use <TechPrereq> to limit which promotions actually apply
create new techs that require themselves so they can't be researched
use <HandicapInfo_FreeTechs> to give the appropriate tech to every civ for that difficulty.
Like I said at the top, sloppy, but it should work. Now caveat on all this is I have NOT tried it and honestly have no wish to write up something that convoluted. I'm also fairly certian someone will chime in with a "Lua can do that with three lines of code" or something else that's ridiculously easy for someone who knows Lua, which is sadly not me. ;-/
smellymummy
Nov 14, 2010, 10:26 AM
using promotions like that is probably easier than doing it with lua. doesnt look like there's a function available to change a unit's heal rate, so a script would have to do a lot of checks to determine the heal amount, and then apply it after the healing is done, which wouldnt look right in game anyway