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

Are there any gotchas in creating a new City-State in a game?

Discussion in 'Civ5 - Creation & Customization' started by Drawmeus, Dec 4, 2012.

  1. Drawmeus

    Drawmeus Emperor

    Joined:
    Jul 25, 2007
    Messages:
    1,213
    I am planning to implement a feature that will allow players to 'liberate' their own cities as a new city-state. Don't ask why, it's complicated.

    Has anyone attempted this before? If so, are there any gotchas in adding a new City-State player to a game in progress through lua or the dll? I'm thinking of the 22 major civ limit where even if you expand the limit in the dll, you can't initialize leaderheads.

    I'm betting I'll be figuring this out on my own, but it can't hurt to ask, right?
     
  2. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,458
    Location:
    France
    Load all CS with the game, "kill" some at start, "resurrect" them when you need them.
     
  3. Pazyryk

    Pazyryk Deity

    Joined:
    Jun 13, 2008
    Messages:
    3,584
    When you say "load", do you just mean setting number of CS's in the Worlds.xml? Or are you doing that in AssignStartingPlots.lua?

    I'm a little bit ignorant about how/where/when the game actually places the civ starting units (regular and CS). Is it in AssignStartingPlots.lua or is it done by dll after AssignStartingPlots.lua? (I guess it must be the latter. Otherwise you would stop the unit placement rather than kill after placement.)
     
  4. Drawmeus

    Drawmeus Emperor

    Joined:
    Jul 25, 2007
    Messages:
    1,213
    Sounds like a plan. Thanks for the response.
     
  5. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,458
    Location:
    France
    In setup screen, before launching a new game , that why "Revolutions" need a custom setup screen.

    the Lua line to "load" all CS during setup being

    Code:
    PreGame.SetNumMinorCivs(#GameInfo.MinorCivilizations)
     

Share This Page