Units Have Passive Resource Cost Mod

Modding, Map Editor, IES Scripting and Other Questions
Post Reply
PaulStretch
Posts: 112
Joined: 27 Jun 2021, 16:10
Has thanked: 45 times
Been thanked: 13 times

Units Have Passive Resource Cost Mod

Post 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.

User avatar
Dr.MonaLisa
High Representative
Posts: 8697
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: Units Have Passive Resource Cost Mod

Post 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.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
PaulStretch
Posts: 112
Joined: 27 Jun 2021, 16:10
Has thanked: 45 times
Been thanked: 13 times

Re: Units Have Passive Resource Cost Mod

Post 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.
User avatar
Dr.MonaLisa
High Representative
Posts: 8697
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: Units Have Passive Resource Cost Mod

Post 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.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
PaulStretch
Posts: 112
Joined: 27 Jun 2021, 16:10
Has thanked: 45 times
Been thanked: 13 times

Re: Units Have Passive Resource Cost Mod

Post by PaulStretch »

Thanks for the help
Post Reply

Return to “Questions”