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

City State Selection

Discussion in 'Civ5 - Mod Components' started by Gurra09, Feb 28, 2014.

  1. Gurra09

    Gurra09 First Consul

    Joined:
    Jan 1, 2008
    Messages:
    1,284
    I like playing my Civ games with themes for the world, like for example only Native American civs or only African civs. While choosing what civs to put on a map is built-in to the game already, there is no way to choose city states other than altering the game files.

    So here's a mod that let's you control what city states the game will load, and it is hopefully easier than editing the originial game files. The mod folder contains an XML file that deletes all city-states from the game. A provided readme, found in the mod folder but also in the spoiler below, tells you how to choose what city-states the game should not delete - and these will be your chosen city-states.

    This way you can easily play a game that has not only just specific civs but also specific city-states. I hope someone will enjoy this. :)

    This mod is made for BNW expansion. I could put together G&K and Vanilla versions if people would like that though.

    Readme on how to use the mod:
    Spoiler :
    City State Selection is a mod to allow choosing what city states to play in your game.

    In the folder for this mod you will find the CityStateSelection.xml file which contains Delete entries for all city-states.

    In the top of the XML file you will see a section like this:

    <!-- MOVE ENTRIES FOR CITY-STATES YOU WANT IN-GAME HERE (commented entries won't be deleted)

    -->

    <!-- --> means comment and any entries you put in between these will not be read by the game. This means whatever Delete entries put here will not be read by the game, and thus the game won't delete those City-States. Any Delete entries left outside the comment will be read and the game will delete those city-states for now.

    This way you can choose what city-states to play with. For example, if I wanted to play an all-Native American game I would move the entries for Cahokia and La Venta inside the comment, like this:

    <!-- MOVE ENTRIES FOR CITY-STATES YOU WANT IN-GAME HERE (commented entries won't be deleted)
    <Delete Type="MINOR_CIV_CAHOKIA"/>
    <Delete Type="MINOR_CIV_LA_VENTA"/>
    -->

    ...and the game will delete all other city-states when I activate the mod leaving only these 2 city-states available to spawn in the game.

    When you copy the Delete entries into the comment section, make sure to delete any traces of it in the other list. If you don't, the game will still see a Delete city-state entry and rule out the city-state.

    **THESE CHANGES MUST BE DONE BEFORE LOADING THE MOD IN THE MODS PANEL IN-GAME**


    Download
    from the CivFanatics database: http://forums.civfanatics.com/downloads.php?do=file&id=22391
     
  2. Ekmek

    Ekmek on steam: ekmek_e

    Joined:
    Aug 7, 2002
    Messages:
    6,055
    Location:
    San Diego, California
    Sweet. Run this with the city-states leader picture mod and have a good ol' time.
     
  3. maholisoa

    maholisoa Chieftain

    Joined:
    Aug 26, 2013
    Messages:
    1
    Gurra09, thank you so much for bringing this MOD, I've been looking for a similar one for quite a while now. However I'm experiencing some problems with it. I can enable it from the MODS menu, but unfortunately once I launch the game, with Gedemon's YnAEMP v22, it buggs...could you please give me more tips regarding your MOD? Do I need to delete the all the entries in the second list maybe?
    Thanks so much for your time and help and wish you a great day!
     
  4. mr.mare

    mr.mare Chieftain

    Joined:
    Dec 5, 2012
    Messages:
    73
    I have downloaded this mod and customized to have only 20 City States, and it works great. Only problem is that when I am trying to play with YnAEMP it crashes.
    Do you or anyone know what is the cause of this?
    Here is the customized mod
     

    Attached Files:

  5. mattc

    mattc Chieftain

    Joined:
    Mar 1, 2016
    Messages:
    4
    Hi, first post and all. But avid mod downloader.

    I really liked this idea as in some games I just want to play in a certain map with civs only Asian or Native American and it would be a little more realistic if the city states followed suit. I was looking for a mod that could do something similar to Advanced Setup (Where you can select which civs you want in the game) with City States instead.

    I looked at this and love the idea. Shame you couldn't make some have some cool menu thing with it but, I suppose that's pretty advanced making a UI and all! :)

    The idea of having themed city states already set up though seems like a good idea, so I copied your files, organised it alphabetically and then in themed order and tried to make different mod files to have a preset that allows 'European' or 'Asian' themed city states only. It seemed to be going well until I got to the mod menu in the game where only the custom version (that was left blank for personal preference) was visible. Need some help!!!

    Attached it the zip folder with my version of the mod in, it's basically the same as the original but easier to 'look' at if you will. It's easier if you just looked at it rather than listen to someone with little knowledge deal try to explain it.

    Thanks in advance!!

    P.S. It's still basically the same mod but organised if you want to download it and not work on it. :)
     

    Attached Files:

  6. Nutty

    Nutty Deity

    Joined:
    Mar 9, 2011
    Messages:
    3,178
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    Did you change the mod ID in the modinfo file? The ID is generated randomly, so you can just change any hexadecimal character to another hexadecimal character (0-9 or A-F). Otherwise they're seen as the same mod.
     
  7. mattc

    mattc Chieftain

    Joined:
    Mar 1, 2016
    Messages:
    4
    Hey, thanks for the advice.

    I fiddled around a bit, gave up and finally started again and managed to get it right this time! I cleaned it up and saw that it was good!
    It's all done now, and it seems to work pretty damn well.

    It doesn't really have the whole custom feature that was promised at the beginning, but at least this means you don't have to fiddle around with the mod folder and XML files. And if you reallllly wanted to, I reckon you could just do it anyway.
    It's basically the same as the first iteration but as previously stated, does not require the changing of code.

    I uploaded it on Steam, take a look if you'd rather see that there, which has more information on the mod.

    http://steamcommunity.com/sharedfiles/filedetails/?id=644634937

    I also decided to make it an actual download you can find on this site.
    http://forums.civfanatics.com/downloads.php?do=file&id=24841

    Should be good for some custom games! :)
     

    Attached Files:

  8. Sam the Sage

    Sam the Sage Chieftain

    Joined:
    Mar 21, 2016
    Messages:
    6
    Trying to remove specific city state availability from the game: Is there something wrong with my xml?

    <?xml version="1.0" encoding="utf-8"?>
    <!-- Created by ModBuddy on 3/18/2016 3:04:26 PM -->
    <GameData>
    <!-- Delete Minor Civilization from base game. -->
    <MinorCivilization_CityNames>
    <DELETE Type="MINOR_CIV_ANTANANARIVO"/>
    </MinorCivilization_CityNames>
    <MinorCivilization_Flavors>
    <DELETE Type="MINOR_CIV_ANTANANARIVO"/>
    </MinorCivilization_Flavors>
    <MinorCivilizations>
    <DELETE Type="MINOR_CIV_ANTANANARIVO"/>
    </MinorCivilizations>
    <!-- Delete Minor Civilization text from base game. -->
    <Language_en_US>
    <DELETE Type="TXT_KEY_CITYSTATE_ANTANANARIVO"/>
    <DELETE Type="TXT_KEY_CITYSTATE_ANTANANARIVO_ADJ"/>
    <DELETE Type="TXT_KEY_CIV5_ANTANANARIVO_TEXT"/>
    </Language_en_US>
    </GameData>
     
  9. Nutty

    Nutty Deity

    Joined:
    Mar 9, 2011
    Messages:
    3,178
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
  10. mattc

    mattc Chieftain

    Joined:
    Mar 1, 2016
    Messages:
    4
    Without trying to sell myself here, the mod I (and Gurra09 mostly) made should allow you to delete an individual city state without the need to go and make your own mod (not that I'm trying to stop you of course!).
    If you download my recent version, head into: Documents, Civilization 5, MODS, 'City States - Middle Eastern Only (v 1)' file, open the XML file (same name as folder just without spaces) in either ModBuddy or alternatively Notebook - which is preferable- and just cut and paste all the other city states into the upper section (which should be well-labelled) and then remove any city states you don't want into the lower section.
    It doesn't necessarily have to be the Middle Eastern one, of course.

    If you want to change the name, just as easily, open the other file in the same folder and adjust the name and description!

    Don't mean to step on your work or anything. Just an easier alternative to making your own mod! :)

    Hope I've helped!
     
  11. Sam the Sage

    Sam the Sage Chieftain

    Joined:
    Mar 21, 2016
    Messages:
    6
    Many thanks Nutty, a big lesson learned!

    Thanks for the input mattc however I have a bigger project in mind and need to get the basics right first. :)

    I have a made many attempts at removing the possibility of specific city states spawning in a variety of set up conditions without success. As I don't like deleting game elements if at all possible my preference would be to set a switch for the City States I wish to remove, similar to the way Major Civilizations can be removed from the game.

    <GameData>
    <!-- Make Civilizations not playable by human -->
    <Civilizations>
    <Update>
    <Set Playable="false" />
    <Where Type="CIVILIZATION_AMERICA" />
    </Update>
    </Civilizations>
    <!-- Make Civilizations not playable by AI -->
    <Civilizations>
    <Update>
    <Set AIPlayable="false" />
    <Where Type="CIVILIZATION_AMERICA" />
    </Update>
    </Civilizations>
    </GameData>

    After much research I have concluded that this is not possible, please correct me if I am wrong.

    Therefore I believe that my only choice is to delete the City States in question, via an xml update to the game database when my mod is activated. All attempts at this have failed. So I have returned to first principles in an attempt to understand what I am doing wrong.

    1) Clear contents in my local C:\Users\Sam\Documents\My Games\Sid Meier's Civilization 5 folder.

    Cache
    ModdedSaves

    2) Create a simple mod to test my xml.

    <?xml version="1.0" encoding="utf-8"?>
    <!-- Created by ModBuddy on 3/23/2016 3:12:27 AM -->
    <GameData>
    <!-- Delete Minor Civilization from base game. -->
    <!-- Delete Almaty. -->
    <MinorCivilization_CityNames>
    <Delete Type="MINOR_CIV_ALMATY"/>
    </MinorCivilization_CityNames>
    <MinorCivilization_Flavors>
    <Delete Type="MINOR_CIV_ALMATY"/>
    </MinorCivilization_Flavors>
    <MinorCivilizations>
    <Delete Type="MINOR_CIV_ALMATY"/>
    </MinorCivilizations>
    </GameData>

    3) Set Mod actions to up date database OnModActivated.

    4) Load Civ 5.

    5) Uncheck all DLC.

    6) Load minimum mods.
    Ingame Editor v.39 - to view results.
    Delete City States - Vanilla - containing my xml above.

    7) Start game via Advanced Set Up screen.

    8) View using Ingame Editor.

    Almaty - City state is still present!

    I would really appreciate some help resolving this problem, enabling me to get on with my bigger project.
     
  12. Nutty

    Nutty Deity

    Joined:
    Mar 9, 2011
    Messages:
    3,178
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    @Sam the Sage, it should work as you've described it, so please open a new thread in the main Creation & Customization subforum (this isn't the right place for this conversation). We can best help you if you zip up the built mod (from your mods folder, NOT the ModBuddy project) and attach it to your post.
     
  13. Sam the Sage

    Sam the Sage Chieftain

    Joined:
    Mar 21, 2016
    Messages:
    6
    Much appreciated, will do Nutty.
     

Share This Page