Page 1 of 1

Units Have Passive Resource Cost Mod

Posted: 27 Jun 2021, 17:08
by PaulStretch
I'm wanting to mod the game where units can be assigned an attribute of idle resource gather rate that's a negative number. The idea being there is a running cost to everything you build. Citizens consume food. Armies cost money, (more so when they're outside friendly territory). Is there a way to do that either though the db files or the header files of the game? I've tried changing things like gather rate for citizens to negative numbers just to test out the idea, but it seems like the game is programed to ignore negative numbers.

Re: Units Have Passive Resource Cost Mod

Posted: 27 Jun 2021, 21:43
by Dr.MonaLisa
I don't think it would be possible in EE2.

The only thing I can think of is checking available area effects in file: zips\hdrs.zip\DbHdrs\DbAreaEffectDefs.h

But I don't see anything that would consume resources every X period of time there.

That would however be possible in custom scenarios, using .IES scripting, like counting the specified unit type / attribute and removing X resources as a "punishment" for each unit present.

Re: Units Have Passive Resource Cost Mod

Posted: 01 Jul 2021, 22:16
by PaulStretch
I found and easy workaround. Every unit and building with have a global_unit area effect that reduces resource gatherrate on specific resources. For example, every heavy tank you have reduces oil gather rate by 5% or every barracks reduces gold production by 5% (the effect stacks). To offset this effect you either gather more, or build structures that add a gather bonus to the specified resource. Ex. Oil storage tanks increase oil gather rate by 10%. This will ensure players work to balance their economy, and prevent rushing. I'll have to toy with the AI to make sure it works with the changes.

Re: Units Have Passive Resource Cost Mod

Posted: 01 Jul 2021, 22:34
by Dr.MonaLisa
So area effects did the trick once again :)

I personally don't like such gather ratio tweaks but it's cool if someone finds such settings enjoyable.

Re: Units Have Passive Resource Cost Mod

Posted: 02 Jul 2021, 14:47
by PaulStretch
Thanks for the help