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

Free Tile Population Scaling

Discussion in 'CivBE - Modding Help & Mod Creation' started by GenEngineer, Mar 14, 2016.

  1. GenEngineer

    GenEngineer Prince

    Joined:
    Aug 24, 2014
    Messages:
    456
    Hey everyone,

    Bit of a weird question here that I would like to see vetted before deciding on whether to want it in my mod. Can everyone think of a way to make it so that you can have the number of free tiles worked by the city (a la by Drone Command) scales with something else? Specifically population? In short, would it be possible to have a building grant a size 1 city have 1 free worked tile, a size 5 5 free tiles, 10 granted 10, etc...?

    Thanks in advance for all of the help.
     
  2. Machiavelli24

    Machiavelli24 Mod creator

    Joined:
    May 9, 2012
    Messages:
    818
    You can probably do it by adding or removing a dummy building that has 1, 2, 3 etc Free-tile-worked-by-city.

    The hard part will be detecting when a city changes population. Back in the Civ5 days there was an Event (not GameEvent) that despite being UI related actually fired for AIs and could be used to detect when a city population changed. Sadly the Event no longer exists in RT and I never found an alternative method.
     
  3. Ryika

    Ryika Lazy Wannabe Artista

    Joined:
    Aug 30, 2013
    Messages:
    9,395
    Maybe I'm missing something but I think you could simply check every turn and remove the dummy-building that is there if it doesn't match the one that should be there at the population size, then replace it with the correct one. Not very clean for Pop that is gained during a turn (from excavations for example) but still.

    Of course replacing those buildings will constantly reset the citizen-management, so that's probably not a good idea (unless you're fine with angering people who want to manually manage their citizens). An alternative would be to create a building for each pop (with 1 workable tile each), then you could just add buildings whenever it's required.

    That however would run into different problems, such as giving very much health with that "health per building"-virtue. And of course spamming the city view if you don't update the UI to hide those buildings.

    I assume you were asking for a way to add that functionality that does not require to add buildings in the first place but no that possibility does not seem to exist.
     
  4. GenEngineer

    GenEngineer Prince

    Joined:
    Aug 24, 2014
    Messages:
    456
    While I'm sure there might be some complaints regarding micromanagement, I think an invisible building might be the best way then. Thanks for the advice!
     
  5. Ryika

    Ryika Lazy Wannabe Artista

    Joined:
    Aug 30, 2013
    Messages:
    9,395
    Well, for me personally a mod that screws with my city management would be blacklisted immediately. ^^ I assume that's pretty much true for anyone who's not willing to let the AI control Citizen Management.

    But I guess it's overall the best solution if that mechanic is core to your mod.
     
  6. GenEngineer

    GenEngineer Prince

    Joined:
    Aug 24, 2014
    Messages:
    456
    Less mod as a whole and more single building in a mod. Will look into how big of a hassle it is, might see if there is any way to bin the tiles being worked before switching so they're still worked afterwards. Also, for simplicity, might just limited it to a few breakpoints (1-4 gets you 1 tile, 5-9 gets you 2, 10+ 3) so it doesn't require too much messing with
     

Share This Page