1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Minimum space between cities mod?

Discussion in 'Civ5 - Creation & Customization' started by Hiram, Apr 8, 2012.

  1. Hiram

    Hiram XML Plebian

    Joined:
    Dec 14, 2006
    Messages:
    1,088
    Location:
    Where The Streets Have No Name
    I'm having issues when playing on Earth maps with European civs where there is no room to build new cities because of the 4 hex minimum distance rule for building new cities. How do I change it to 3 hexes?

    EDIT: Change from 3 to 2 hexes, sorry.
     
  2. PawelS

    PawelS Ancient Druid

    Joined:
    Dec 11, 2003
    Messages:
    2,803
    Location:
    Poland
  3. Hiram

    Hiram XML Plebian

    Joined:
    Dec 14, 2006
    Messages:
    1,088
    Location:
    Where The Streets Have No Name
    I've tried to make the mod but it doesn't seem to work. Not sure what's wrong here?

    <GameData>
    <Update>
    <Where Type="MIN_CITY_RANGE"/>
    <Set>
    <Value>2</Value>
    </Set>
    </Update>
    </GameData>
     
  4. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,468
    Location:
    Near Portsmouth, UK
    You're not specifyng which database table to update!

    you need a <Defines> before the <Update> (and a corresponding closing tag in the correct place)
     
  5. Hiram

    Hiram XML Plebian

    Joined:
    Dec 14, 2006
    Messages:
    1,088
    Location:
    Where The Streets Have No Name
    Made that change. Mod still does nothing.

    Edit: This is what I have now:

    <GameData>
    <Defines>
    <Update>
    <Where Type="MIN_CITY_RANGE"/>
    <Set>
    <Value>2</Value>
    </Set>
    </Update>
    </Defines>
    </GameData>

    UpdateDatabase action is set through properties too. I've got no idea why it isn't working.
     
  6. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,468
    Location:
    Near Portsmouth, UK
    <Where Name="MIN_CITY_RANGE"/>
     
  7. Spatzimaus

    Spatzimaus Mad Scientist

    Joined:
    Sep 21, 2005
    Messages:
    3,063
    Location:
    Los Angeles, CA
    This sort of error would show up in your log files, if you turned those on. You might want to do that, for future issues. (To turn them on, go into the config.ini file in your user directory and set the line that says "LoggingEnabled=0" to a 1.)

    But back to the original point, while that change would reduce the distance between cities, you need to be aware of what that'd do in practice. Yes, there are times when you'd want to cram cities in tighter, especially in a Scenario, but in general gameplay this'd kill the AI because of how he weights the desirability of possible city settlement sites. The AI's site-selection method doesn't really take into consideration how much overlap there'd be between cities, which you'd be drastically altering.

    You can adjust this to compensate, by altering this block in Defines:
    Code:
    <Row Name="CITY_RING_1_MULTIPLIER">
        <Value>12</Value>
    </Row>
    
    <Row Name="CITY_RING_2_MULTIPLIER">
        <Value>6</Value>
    </Row>
    
    <Row Name="CITY_RING_3_MULTIPLIER">
        <Value>2</Value>
    </Row>
    
    <Row Name="SETTLER_EVALUATION_DISTANCE">
        <Value>20</Value>
    </Row>
    
    <Row Name="SETTLER_DISTANCE_DROPOFF_MODIFIER">
        <Value>75</Value>
    </Row>
    The first three numbers (12/6/2) are how it weights each of the three rings' hexes. So it takes the values of the six first-ring hexes, adds them, and multiplies by 12. Then it takes the 12 second-ring hexes, adds them, and multiplies by 6 (which makes the second ring total comparable to the first ring in value). Then the 18 third-ring hexes, multiplied by 2 (totaling about half of either earlier ring). In other words, 40% of a city site's value comes from the first ring, 40% from the second, and 20% from the third. With the vanilla game's minimum distance this makes sense, as the first and second rings will pretty much always be used by that city, while the third ring will often be shared with other cities.

    But if you're making it so that cities overlap more, then you need to lower the second- and third-tier ring values, since it becomes far less likely that a city will be able to use whatever hexes are in those rings (as it'll be sharing those hexes with more other cities). So that 12/6/2 might need to be more like 12/3/1 (which translates to 58%, 28%, and 14% for the ring totals).

    The last two values I quoted deal with how far away the AI is willing to look for new sites. It'll consider any site within 20 hexes as a possibility, but it heavily favors those near enough to be easily connected and defended. If you're lowering the minimum city radius, then the AI will be very inclined to settle as close as possible, creating more overlap in worked areas, even if it doesn't really NEED to be that close. So you might want to lower the dropoff modifier and raise the max distance.

    -------------
    Now yes, I know that you're basically just undoing what they did in a recent patch, when they killed ICS by increasing the minimum city distance. Obviously the AI wasn't horrible before that point, but it was definitely having these sorts of issues back then.
     
  8. Pembroke

    Pembroke Tribune

    Joined:
    Jul 1, 2002
    Messages:
    622
    I'd like to do the opposite of the original poster i.e. to spread out the map as calculated by hexes by using a larger map but still keep the number of cities the same as if I was playing a smaller map. I increased the min distance 3 --> 4 and from my POV as a player it works but do you think I should also modify the AI site valuations or is that only an issue when you "shrink" the map i.e. when creating more overlap? If I should modify the AI site values what would you suggest?
     

Share This Page