1. Firaxis celebrates the "Asian American and Pacific Islander Heritage Month", and offers a give-away of a Civ6 anthology copy (5 in total)! For all the details, please check the thread here. .
    Dismiss Notice
  2. We have selected the winners of the Old World random draw and competition. For the winning entries, please check this thread.
    Dismiss Notice

Experienced player... dumb question... maintenance

Discussion in 'Civ4 - General Discussions' started by kochman, Sep 28, 2009.

  1. kochman

    kochman Deity

    Joined:
    Jun 8, 2009
    Messages:
    10,818
    I am a bit embarassed about this question... but...
    OK, what exactly makes maintenance add up?

    I know distance from capital did for some civs? number of cities (the higher the number in chronological order, the higher the maintenance)? buildings? units?
    More importantly, how is it calculated...
    I apologize if this is already out there... which I am sure it is.

    I have just been assuming that all of the above increase maintenance.
     
  2. Iranon

    Iranon Deity Whipping Boy

    Joined:
    Nov 14, 2007
    Messages:
    3,214
    Location:
    Germany
    I have been looking for that as well; unfortunately I don't have a formula either.

    It seems affected mostly by size, distance and number of cities; I'm fairly sure buildings and units don't matter.
     
  3. kochman

    kochman Deity

    Joined:
    Jun 8, 2009
    Messages:
    10,818
    OK, glad to see I am not the only one!
    I think units must be in the math... I mean, certain civics allow X number of "free" units... implying that the others are not free.

    Buildings though... I know in previous civs they did count... but in IV? I think they don't...

    Someone should know the facts here... hopefully! :crazyeye:
     
  4. Silu

    Silu Deity

    Joined:
    Jul 13, 2009
    Messages:
    2,964
    Location:
    Finland
    Do you mean maintenance or civic upkeep? The cost distribution of city maintenance can be seen in the financial advisor (f2, mouse over 'city maintenance') if you just want to know how much SP would help, for example.

    Not sure what you mean by "chronological city order". The mainteinance of each city goes up every time you settle a new city, settling order has nothing to do with this.

    EDIT: buildings, with the exception of the likes of courthouse, ikhanda and forbidden palace, have no effect.
     
  5. kochman

    kochman Deity

    Joined:
    Jun 8, 2009
    Messages:
    10,818
    So, mousing over to city maintenance will show you the factors involved? Or just the final cost?
     
  6. Silu

    Silu Deity

    Joined:
    Jul 13, 2009
    Messages:
    2,964
    Location:
    Finland
    It shows how much of it the 4 different components take, namely:
    1) Distance from capital maintenance
    2) Number of cities maintenance
    3) Colony maintenance
    4) Corporation maintenance
     
  7. kochman

    kochman Deity

    Joined:
    Jun 8, 2009
    Messages:
    10,818
    So, units only cost you during Pacifism then?
     
  8. Iranon

    Iranon Deity Whipping Boy

    Joined:
    Nov 14, 2007
    Messages:
    3,214
    Location:
    Germany
    Removed junk already covered.

    No. You pay normal upkeep (reduced by a bit for each citizen you have), then additional upkeep on top of that if you run Pacifism.

    *

    This is something completely different from city maintenance though. Civic upkeep and unit upkeep are well-documented in the war academy. AFAIK, corporation maintenance is the only part of city maintenance that is though; unsure about the rest.
     
  9. Silu

    Silu Deity

    Joined:
    Jul 13, 2009
    Messages:
    2,964
    Location:
    Finland
    They're not city maintenance, they're unit maintenance. Units cost 1 each, except there's a certain number of free units granted (based on the number of cities among other things), and 2 under pacifism (a different amount of free units for the pacifism cost).

    Seriously, go to the financial advisor screen :p Units and pacifism-units have their own entry under "unit maintenance".
     
  10. kochman

    kochman Deity

    Joined:
    Jun 8, 2009
    Messages:
    10,818
    Yeah, it would be nice to see the formula... not that they would stop me from crushing my enemy, seeing him driven before, and hearing the lamentation of his women as I capture his cities.
     
  11. mechaerik

    mechaerik Tuturuu!

    Joined:
    Oct 28, 2008
    Messages:
    7,064
    Location:
    Los Angeles
    No, what you do is sell them whiskey, take their gold, enslave their young and destroy their old.
     
  12. kochman

    kochman Deity

    Joined:
    Jun 8, 2009
    Messages:
    10,818
    Ah, the corporation approach used by McDonald's (other than the whiskey part).
     
  13. Silu

    Silu Deity

    Joined:
    Jul 13, 2009
    Messages:
    2,964
    Location:
    Finland
    Okay I got interested and did a rudimentary source dive. Here's what I got, which is probably way wrong but I'll let DanF or someone else (or myself, later) correct me, as I probably farked up somewhere :) The setting-dependant constants are given as examples.

    These are calculated independently for each city.

    Distance to capital maintenance:

    either:
    MAX_DISTANCE_CITY_MAINTENANCE * DISTANCE_TO_NEAREST_CAPITAL * ((CITY_POPULATION + 7) / 10) * WORLD_MODIFIER * DIFFICULTY_MODIFIER * CIVIC_MODIFIER / MAX_DISTANCE
    or:
    MAX_DISTANCE_CITY_MAINTENANCE * DISTANCE_TO_FARTHEST_CITY * ((CITY_POPULATION + 7) / 10) * WORLD_MODIFIER * DIFFICULTY_MODIFIER * CIVIC_MODIFIER / MAX_DISTANCE

    Whichever is smaller. No idea about the lower one - maybe for Civs with no capital, like the barbarians?

    MAX_DISTANCE_CITY_MAINTENANCE: 25
    DISTANCE somewhere: I think just 1.5 per diagonal plot and 1 per cardinal plot
    WORLD_MODIFIER: Standard=0.80, Huge=1.00
    DIFFICULTY_MODIFIER: Noble=0.75, Immortal=1.00
    CIVIC_MODIFIER: 0 for State Property, 1 for rest
    MAX_DISTANCE: I guess the longest possible distance on a given map

    Number of cities maintenance:

    (NUMBER_OF_CITIES + (NUMBER_OF_VASSAL_CITIES / NUMBER_OF_TEAM_MEMBERS)) * ((CITY_POPULATION + 17) / 18) * WORLD_MODIFIER * DIFFICULTY_MODIFIER * CIVIC_MODIFIER

    WORLD_MODIFIER: Standard=0.30, Huge=0.20
    DIFFICULTY_MODIFIER: Noble=0.70, Immortal=0.95
    CIVIC_MODIFIER: 1
    Maximum value for this type of maintenance: Noble=5, Immortal=7

    Colony maintenance:

    ((NUMBER_OF_CITIES_ON_LANDMASS - 1) * ((CITY_POPULATION + 17) / 18) * WORLD_MODIFIER * DIFFICULTY_MODIFIER)^2
    0 if capital on landmass
    0 if No Vassals enabled

    WORLD_MODIFIER: Standard=0.45, Huge=0.30
    DIFFICULTY_MODIFIER: Noble=1.00, Immortal=1.50

    This is capped as well at:
    Noble=2*DISTANCE_MAINTENANCE
    Immortal=2*DISTANCE_MAINTENANCE
     
  14. kochman

    kochman Deity

    Joined:
    Jun 8, 2009
    Messages:
    10,818
    Thank you, this helps.
     
  15. jmas

    jmas I Can Has Imperium?

    Joined:
    Sep 22, 2007
    Messages:
    417
    Location:
    US
    If anyone wants to check out an old thread on this, here is one (this link is to page 5 of the thread; the thread started with an experiment which revealed a "cheesy circle" within which one could settle with relatively lower maintenance, however later posters said that it did not reveal all of the relevant factors, so it could not be so easily reproduced on other maps/settings)

    http://forums.civfanatics.com/showthread.php?t=138473&page=5

    Posts #89 and further on are particularly relevant.

    Maybe the code has changed though. "City Rank"--the order your cities show up in on your F1 screen, which AFAIK is the order you settled or conquered them, seems to play somewhat of a role according to post 89 in that thread, but I don't see that reflected in what Silu found.
     
  16. Silu

    Silu Deity

    Joined:
    Jul 13, 2009
    Messages:
    2,964
    Location:
    Finland
    I did not found any references to city rank in the BtS algorithm. I found it in the vanilla one though. The algorithms changed somewhat because vassals and colony mainteinance (which I didn't dig the formula for) were introduced.
     
  17. jmas

    jmas I Can Has Imperium?

    Joined:
    Sep 22, 2007
    Messages:
    417
    Location:
    US
    That makes sense, thank you for sharing that..
     
  18. Willem

    Willem Deity

    Joined:
    Feb 12, 2002
    Messages:
    7,313
    Location:
    Canada
    That's only for units within your cultural borders. As soon as you leave them your unit maintenance goes up, then again if your troops are in enemy territory. This is to simulate the use of supply lines to maintain your forces while in the field.
     
  19. Silu

    Silu Deity

    Joined:
    Jul 13, 2009
    Messages:
    2,964
    Location:
    Finland
    Yeah, I didn't bother to mentally copypaste the whole financial advisor screen :p

    Anyway, I edited colony mainteinance in the post above as well, if someone happens to be interested. Quite interesting how it's almost like the number of cities one, except it's squared. Though the cap is relatively low as well and doesn't get higher on higher difficulties.
     
  20. Bushface

    Bushface Deity

    Joined:
    Nov 28, 2005
    Messages:
    2,550
    Location:
    Torquay, England
    There's a nice easy cheat for eliminating city maintenance (and allowing lots of other swindles, for you and the AI). Before you start a game, open BeyondtheSword/Assets/XML/GlobalDefines.XML. using WordPad; search for CITY_MAX_NUM_BUILDINGS and in the next line change the 1 to a 2, then save. Now two of each building can be built in every city, and with two courthouses the city maintenance becomes zero, even for a vast city far from your capital and with two corporations in it.
     

Share This Page