Number of cities maintenance

fodazd

Chieftain
Joined
Mar 5, 2013
Messages
75
Hello.

I would like to make a mod that introduces a system for number of cities maintenance (like in Civ4).

So far, the only modding I have done is changing static values in the database. For this, I would need something more than that, because the cost per city should not be a fixed value but increase with the number of cities. I would probably need to evaluate some arithmetic expression each turn, or at least each time the number of cities of a player changes, and then apply it to the gold income of the player.

Is there an easy and simple way of doing something like that? How should I go about doing it?
 
No Requirement in game that checks number of cities so it would require a little workaround:

P.S. Doable also with LUA but this is not "easy and simple way of doing something like that", sadly. And usualy cause of incompabilities.
 
Wouldn't the effect of this just be that each city always has +1 Maintenance? That's not what I want to do.

I want each City to have Maintenance costs that scale with the number of cities.
 
Right, didn't noticed your intentions.
So my simple proposition is off.

Modifiers.
EFFECT_ADJUST_CITY_YIELD_MODIFIER or EFFECT_ADJUST_CITY_YIELD_CHANGE could be used along with COLLECTION_ALL_DISTRICTS or COLLECTION_ALL_CITIES if game will allow for negative yield value. Attached to the dummy building I wrote about in previous post.
Very complicated.
 
The game can handle negative yields in many contexts, including flat yields and %-based yields for, say, districts and buildings. It'd be tricky but it should be doable using those modifiers and collections. These requirements might be of use: REQUIREMENT_COLLECTION_COUNT_ATLEAST, REQUIREMENT_COLLECTION_COUNT_EQUALS, and REQUIREMENT_COLLECTION_COUNT_GREATERTHAN, when combined with COLLECTION_PLAYER_CITIES.

Really, I think it'd be easier to just attach this stuff to the city center district itself rather than use a dummy building. Unless you want to use the dummy building for other stuff.
 
Back
Top Bottom