Bring back old City States

stebobibo

Chieftain
Joined
Jul 19, 2014
Messages
55
So I'm wondering if there is a way to play with any of the city states that are no longer playable. Ex. Vienna, Warsaw, Seoul. These City States were removed with expansions I think. I've counted 13 such City States; I might be a little off.

I'm wondering if there is a City State limit in the game as well. There are 58 in the game now. Would bringing back these old City States overwrite some of the other ones? Is there a way to exceed 58?

I'm thinking this should be an easy task since the data for these CSs is already there (right?). I just have no clue of how to do it; I am not a modder. So if you could either explain how to do this or create a mod yourself and share it, it would be much appreciated! Thanks! :D
 
These are 14 removed CSs: Copenhagen, Dublin, Edinburgh, Helsinki, Jakarta, Lisbon, Marrakech, Oslo, Rio de Janeiro, Seoul, Stockholm, Venice, Vienna, Warsaw.

Firaxis hasn't been entirely consistent with their method of removal over the years, and I'm not in front of my modding PC so I'm not sure at the moment that all of them still retain vestiges in the game and Localization database. I'm pretty sure 3 of them are gone completely. However, I know many of them are still there in one form or another, though, and yes, it wouldn't be that hard to collect it up and put it back in.

There's no problem with adding tens or hundreds (to a point, I'm not sure exactly where) of more CSs; see such mods as City States Expansion and More City States.

The big issue is that you're going to have conflicting city names from major civs. There isn't an easy way to only use the overlapping CS where the associated major civ is not in play.
 
I suppose you can go back to Civ5 Vanilla by deselecting both expansions in the DLC-menu of Civ5 ...
If you check your installation folder, you find Civ5 Vanilla, DLCs, G&K (Expansion), BNW (Expansion2) ... in the Vanilla folder all the info for the CS is still there (file Steam\steamapps\common\sid meier's civilization v\Assets\Gameplay\XML\Civilizations\CIV5MinorCivilizations.xml)
 
Thanks to both of you for the great information! Now I just need to know how to make a city state mod. Do any of you know of a tutorial for that? I quickly searched the forums and google, but couldn't find anything.
 
In general, nearly all mods are just text files (XML, SQL, and/or Lua; only a few have a DLL that isn't human-readable), and one of the better ways to learn is to examine what Firaxis or other modders have done.

There's no tutorial since it's very simple. Just grab e.g., "More City States" (which is XML only) and take a look.
 
In general, nearly all mods are just text files (XML, SQL, and/or Lua; only a few have a DLL that isn't human-readable), and one of the better ways to learn is to examine what Firaxis or other modders have done.

There's no tutorial since it's very simple. Just grab e.g., "More City States" (which is XML only) and take a look.


Thanks for the advice! Do I have to change it at the top where it says:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 8/12/2012 2:10:55 PM -->

There was also a .modinfo file in the mod folder. Do I have to make one of these, too? And if I do, how? Do I have to use modbuddy?
 
Thanks for the advice! Do I have to change it at the top...
No, the first line is what kind of a file it is, the second is just a comment (You also need to keep the <GameData> near the beginning and </GameData> at the end).

There was also a .modinfo file in the mod folder. Do I have to make one of these, too? And if I do, how? Do I have to use modbuddy?
The .modinfo is just another XML file with the name and description of the mod, some special properties, all the files in it and the actions to perform with those files. You'll want to change the mod ID (all those letters and numbers near the top). It's random, so just change a few of the characters (either 0-9 or A-F). If you rename the other files, you'll need to change the names in the .modinfo as well.
 
Hey Nutty,
So I finally got it to work...kinda. All except 3 of the 14 old city states appear in the game. The three that don't are the three that were replaced (instead of removed) by others in DLC patches. Those are
  1. Copenhagen replaced with Sydney. Danish DLC
  2. Oslo replaced with Quebec City. Danish DLC
  3. Seoul replaced with Kathmandu. Korean DLC
The World Builder reflects this. IF you go to add city states, you will see in the list the correct number of them, but those three will show up as their replcaments. So there are 2 Sydneys, 2 Quebec Cities, and 2 Kathmandus. Each Quebec City is considered a different City State.

What I want to do now is fix this problem with those 3 City States, but I have no idea how. I did track down a file called:
CIV5GameTextInfos_CityStates_Expansion2
It is located here:
C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V\Assets\DLC\Expansion2\Gameplay\XML\Text\en_US

There is a similar file (same name without "2") located in the counterpart location for the first expansion. It says the same thing (as far as I can see) as the other one in regards to those 3 CSs.

I would really appreciate your help on this! Thanks again!
 
The GameTextInfos provide entries in the localization database. Without the entries in that table everything would work but you'd see a lot of TXT_KEY_BLAHBLAH instead of the names and descriptions in question.

IIRC, in vanilla civ, they patched those cities out of the game when the DLCs were released by keeping all the internal references the same and only changing the Localization database. Then they went back and deleted and recreated them properly when they did Gods+Kings. So, when you did your copy and paste you didn't carry the deletes over (or you're deleting before adding them in the first place). So the question is... Do you want to remove those 3 city states, or add appropriate text for them?
 
Yeah, looking at the localization database, the names of the city states are still there, but the Civilopedia entries were replaced, so if you're OK with no Civilopedia entry, you just need to make sure your entries for those 3 are pointed to the right tags in the <MinorCivilizations> table, i.e.:
Code:
...
    <Type>MINOR_CIV_COPENHAGEN</Type>
    <Description>TXT_KEY_CITYSTATE_COPENHAGEN</Description>
    <Civilopedia>TXT_KEY_CITYSTATE_COPENHAGEN</Civilopedia>
    <ShortDescription>TXT_KEY_CITYSTATE_COPENHAGEN</ShortDescription>
    <Adjective>TXT_KEY_CITYSTATE_COPENHAGEN_ADJ</Adjective>
...
    <Type>MINOR_CIV_OSLO</Type>
    <Description>TXT_KEY_CITYSTATE_OSLO</Description>
    <Civilopedia>TXT_KEY_CITYSTATE_OSLO</Civilopedia>
    <ShortDescription>TXT_KEY_CITYSTATE_OSLO</ShortDescription>
    <Adjective>TXT_KEY_CITYSTATE_OSLO_ADJ</Adjective>
...
    <Type>MINOR_CIV_SEOUL</Type>
    <Description>TXT_KEY_CITYSTATE_SEOUL</Description>
    <Civilopedia>TXT_KEY_CITYSTATE_SEOUL</Civilopedia>
    <ShortDescription>TXT_KEY_CITYSTATE_SEOUL</ShortDescription>
    <Adjective>TXT_KEY_CITYSTATE_SEOUL_ADJ</Adjective>
...
 
you just need to make sure your entries for those 3 are pointed to the right tags in the <MinorCivilizations> table

So I replaced those lines of text that you gave me. By the way, where did u find these? And where can I find the Localizaion database you speak of (as you can see, I'm a noob at modding, sorry! :crazyeye:).

My results were good, but not perfect. The only problem I have now is that the names of the cities themselves are not what they should be. They are their replacement CS names. Eg. Oslo is Quebec City. But the name in the diplomacy screen and the talking screen are correct. It's just the name on the map that is wrong. Thanks again for the help! Much appreciated! :D
 
By the way, where did u find these? And where can I find the Localizaion database you speak of
To see the game database in its final state rather than searching all of the XML files, I look at the database files with a SQLite browser like SQLiteStudio (or SQLite Manager for Firefox or SQLiteSpy). This also lets me test out SQL statements without needing to open the game.

The files are in:
%userprofile%\Documents\My Games\Sid Meier's Civilization 5\cache

The game database is:
Civ5DebugDatabase.db

The text database is:
Localization-Merged.db
(the latter is where you'll find Language_en_US -- but you're looking for the View rather than a table).

The only problem I have now is that the names of the cities themselves are not what they should be.
Easy fix. You need to update the table, MinorCivilization_CityNames.
 
Could you tell me how to do that please?
Search through your mod and find instances of <MinorCivilization_CityNames>. Then look below that for references to those 3 city states in the <MinorCivType> field (e.g., MINOR_CIV_COPENHAGEN). Make sure the adjoining <CityName> field doesn't reference the replacement city state name (e.g., TXT_KEY_CITYSTATE_SYDNEY).
 
That worked! Looks like I'm finally done with this mod. Thanks so much, Nutty. I wouldn't of been able to do it without you!

Can I ask you a somewhat unrelated question while I'm at it? In the .modinfo file for this mod it references the files it uses (the xml files). Looks like this:
Code:
<File md5="4de01ea141316ad94ba3dc060437691b" import="0">New City States.xml</File>
My question is about the MD5 checksum. The number always changes when I edit the file. So I am required to manually check the sum then enter the new value every time I change something in the xml. Is there a better way to do this? Like an automatic way? It would save a lot of time. Perhaps Modbuddy has something, I'm thinking.
 
ModBuddy automatically calculates the checksum as it builds the mod. BUT, the checksum is only needed if you are uploading to Steam (which you can only do with ModBuddy anyway), if the mod is for private use, or you intend to upload it here, you don't need to update it

TL;DR; you can safely ignore the MD5 value
 
Looks like I'm finally done with this mod. Thanks so much, Nutty.
Congratulations! Now you can learn to use ModBuddy, share your mod with the world on the Steam Workshop, and bask in the well-deserved adulation of the masses (whilst wading through complaints, spam, unrelated requests, and unhelpful bug reports that likely will turn out to have nothing to do with your mod)!

No, really, that's great. Let us know if you have anything else with which you'd like help.
 
Top Bottom