HOW TO: add/remove custom civs and city states from an existing map using WB

Gedemon

Modder
Super Moderator
Joined
Oct 4, 2004
Messages
11,505
Location
France
There are more and more new civs and city states out there, here's a small tutorial on how to edit an existing custom map to add them using the World Builder.

Prerequisite: working mods in standard game ! :D

I'll take Yet Another Giant Earth Map, Scotland civ and Not Another City States Mod as examples here.

One of Yagem maps will be used as a base, we will replace Edinburgh by Scotland and add the Pygmy Nation city state.

First thing to do when you load the World Builder is to check the mods the map will use :

Spoiler :



In fact, it may be a good idea to check ONLY the needed mods.

Once done, the WB will take a few seconds to load the mods, and you can click on "load map".

The defaut path is set to the map folder, the map we want to change is in a mod, so we must navigate to the mod folder:

Spoiler :



The map is now loaded, you can scroll using the keyboard arrows or the mouse (with right button pressed).

Notice the grey circles, that's the start positions already set.

Spoiler :


Now open the scenario editor. While here, you can change the game options as it's not possible to use a scenario and the advanced setup at the same time...

Back to the point, we want to replace Edinburgh with the Scotland civ, we'll begin by removing the Edinburgh CS.

Click the City States tab, select Edinburgh, then click the minus button.

Spoiler :


Now that Edinburgh has been removed, you can notice if you go back on the map that the grey circle at the city starting position had also be removed.

To add Scotland, click the Players tab, the add button and select the new civ then use the civilization menu to set it to Scotland Kingdom.

Spoiler :


Now, we'll add the Pygmy CS in the game the same way but in the City State tab

Spoiler :


Back to the map, let's set those starting location !

We must be in the edit plot tab of the map editor tools, select a plot by left clicking on it, then go to the start location menu and select the civilization to add (Scotland here)

Spoiler :


Please note that if we had just added Scotland and changed the start location of Edinburgh by Scotland, then Edinburgh will be spawn randomly on the map. All civs and CS set in the scenario editor are spawn on the map when you load a scenario, even if their starting location is not set !

that's why we've removed it first ;)

Now, let's find a good starting location for our Pygmy Nation

Spoiler :


We're almost done.

At this point, you can save, quit and load you map and enjoy the changes.

But to prevent strange bugs, I now use another step...

Here's an example from one of Yahem map, where some case of sharing vision happened at start, even if each civs / CS was set as a separate team.

In the scenario editor, be sure to set team in order, for example :

Spoiler :



Here we have US set as team 39, that should not be a problem, no other civs / CS use this team number, but still US shared vision with a City state from across the map..

So after removing/added a few civs and city states, I renum all team from 1 to last civ, then I renum CS from last civ +1 to last cs

Spoiler :




Now you can save and have a good game !
 
but how do I save it? when i click on save, it allows me only to save it as map. i want to save a scenario.
 
Yes, you save it as a map, and to use it in game as a scenario you must go in "mods", then "single player", "setup game", select your map (and don't go to advanced setup), check "load scenario", select you civ, and click "start scenario".


And yes, they could have made it more user friendly imho :D
 
Does anyone here know how to rename city states? I have no problem working with the worldbuilder, but I'm still struggling with the XML editor... Is it OK to simply change the names in the minorcivs file? I guess not :confused:

I've made some adjustments on a real world map but I'd like to have some new city states / minor civs (like carthage, inca, aztec, maya etc). But I haven't figured out how to do that. I'm an experienced civ user, but unfortunately I have no programming education whatsoever.
 
Does anyone here know how to rename city states? I have no problem working with the worldbuilder, but I'm still struggling with the XML editor... Is it OK to simply change the names in the minorcivs file? I guess not :confused:

I've made some adjustments on a real world map but I'd like to have some new city states / minor civs (like carthage, inca, aztec, maya etc). But I haven't figured out how to do that. I'm an experienced civ user, but unfortunately I have no programming education whatsoever.

you should install a working CS mod and start editing the XML files of the mod, the tags are explicit, then see the change in game.

you'll learn a lot by looking at the existing mods ;)

first step if you really don't know where to start is to read Kael's guide at the top of this forum section.
 
you should install a working CS mod and start editing the XML files of the mod, the tags are explicit, then see the change in game.

you'll learn a lot by looking at the existing mods ;)

first step if you really don't know where to start is to read Kael's guide at the top of this forum section.

Do you know any good CS mods? Any suggestions? thx already

I already have Kael's guide (printed the entire pdf) but I'm still struggling to get into it. I considered simply changing the names with wordpad but I guess it would corrupt the files... I'll try your instructions on top of this thread and see where I get.
 
well, you can find some easily in the mod browser, and in the first post both "Yagem" and "Not Another City States Mod" contains some CS.

I'll describe the ones in Yagem, as I now it better ;)

Once installed, in the "..\My Documents\My Games\Sid Meier's Civilization 5\MODS\Y.A.G.E.M. (v 1)\XML\" folder you'll find a file called "CityStates.xml"

Open it with any text editor (wordpad is okay I think) and start modding...

let's explain what this file does... it's was set in modbuddy to update the database after the mod is activated, cf Kael's guide about this part, here you won't have to do it, it's already set, you're editing an existing mod, not building one for start (once you've familiarised yourself with that part, you can go to step 2 : making your own mod)...

the first tags are <Gamedata> and <MinorCivilizations>, telling the game engine that we want to update the Minorcivilization table.

then there are <Row> tags, each is an entry for a new minor civilization.

let's detail the row with carthage :

Spoiler :
Code:
		<Row>
			<Type>MINOR_CIV_CARTHAGE</Type>
			<Description>Carthage</Description>
			<ShortDescription>Carthage</ShortDescription>
			<Adjective>Carthaginian</Adjective>
			<Civilopedia>
				carthage was founded in 814 BCE by Phoenician, blablaba (from wikipedia)
			</Civilopedia>
			<DefaultPlayerColor>PLAYERCOLOR_MINOR_LIGHT_ORANGE</DefaultPlayerColor>
			<ArtDefineTag>ART_DEF_CIVILIZATION_MINOR</ArtDefineTag>
			<ArtStyleType>ARTSTYLE_GRECO_ROMAN</ArtStyleType>
			<ArtStyleSuffix>_AFRI</ArtStyleSuffix>
			<ArtStylePrefix>AFRICAN </ArtStylePrefix>
			<MinorCivTrait>MINOR_TRAIT_MILITARISTIC</MinorCivTrait>
		</Row>
the text in capital letters are key refering/used to/by other table...

first is the type "MINOR_CIV_CARTHAGE", we use it to refer to that minor civs in other part of the file, I'll explain later.

then <Description> and <ShortDescription> are text that appears in game in the CS menu for example. note that in the file have directly entered the text, which is a bad thing for multilingal mods. Normally I should have entered a key text like "TEXT_MINOR_CIV_CARTHAGE_DESCRIPTION" and set the text value in another table with the translation like

Spoiler :
Code:
<GameData>
	<Language_en_US>
		<Row Tag="TEXT_MINOR_CIV_CARTHAGE_DESCRIPTION">
			<Text>Carthage</Text>
		</Row>
	</Language_en_US>
</GameData>

the <Adjective> tag is used to refer to this civ units or territory on the map (ie : "Carthaginian warrior"), <Civilopedia> is the text used in the... civilopedia, yes !

same note as above about translation and bad usage from laziness when making mods :o

The <DefaultPlayerColor> tag refers to the color of the civ in game, the complete list is in one of the assets XML files, cant remember the name, but here are the possible value :

Spoiler :
PLAYERCOLOR_MINOR_WHITE
PLAYERCOLOR_MINOR_GRAY
PLAYERCOLOR_MINOR_BLUE
PLAYERCOLOR_MINOR_MIDDLE_BLUE
PLAYERCOLOR_MINOR_CYAN
PLAYERCOLOR_MINOR_MIDDLE_CYAN
PLAYERCOLOR_MINOR_PEACH
PLAYERCOLOR_MINOR_GREEN
PLAYERCOLOR_MINOR_LIGHT_GREEN
PLAYERCOLOR_MINOR_LIGHT_BLUE
PLAYERCOLOR_MINOR_PURPLE
PLAYERCOLOR_MINOR_MIDDLE_PURPLE
PLAYERCOLOR_MINOR_LIGHT_PURPLE
PLAYERCOLOR_MINOR_LIGHT_ORANGE
PLAYERCOLOR_MINOR_YELLOW
PLAYERCOLOR_MINOR_LIGHT_YELLOW
PLAYERCOLOR_MINOR_GOLDENROD
PLAYERCOLOR_MINOR_DARK_LEMON


more are available, more could be added, but let's stay in topic :D

the <ArtDefineTag>, I don't know, and I hadn't bothered to know yet...
<ArtStyleType>, <ArtStyleSuffix> and <ArtStylePrefix> refer to various art set (units, building, city, etc...) for this CS
the <MinorCivTrait> is the type of the CS: maritime, cultural or militaristic

we're not done yet. we've set some info about the Carthage CS, but the game need more.

if you scroll down the CityStates.xml file, you'll find another reference to Carthage in others table... (remember the type "MINOR_CIV_CARTHAGE" ?)

the first is <MinorCivilization_CityNames>, here you'll found a row setting he city name of your CS.
for Carthage, well it's Carthage, but a few line under you can see that I've defined a civ called "MINOR_CIV_MAYA" and it's city is "Tikal"
In this case, the CS menu will refer to the description of "MINOR_CIV_MAYA" (="Maya"), and the city name on the map will be "Tikal"

still there ? almost done !

last needed table edit to define a new CS is <MinorCivilization_Flavors>
basically, the rows here will set what the CS will build. example : FLAVOR_EXPANSION should always be set to 0 else the CS will build settlers that it can't use after...

hope that has helped...
 
Thx for a very well written guide!

But I've bumped into a little problem. When I load a map I dont see any start locations at all. I created one for swedens civ and that were the only visible. I tested at both "Yet not Another Earth Maps Pack (v 5)" and "True Start Location Earth Maps (v 1)".

For example i loaded "TSL_Earth_Huge" but no start locations visible. Do you know what I'm doing wrong? :(

It's like the maps uses a different scenario where the start locations are, feels like i loaded the map before it got modded if you know what i mean.

Appreciate all help i can get!!

//South
 
you mean you don't have the grey circles showed in the Worldbuilder ?
 
you may try to deselect all the mods and load the map again to test if the problem is mod related.
 
Sry for this late answer. Been away for a while..

Thx for replying! Continued to test this night again, this time with YNAEMP v6. The only mod checked but when i load it with world builder, sadly there are no start locations on the map.

But isn't the start locations written in the file "CivilizationsStartPos.xml"? I'm just opening the file "Earth_Giant_blank.CIV5Map". Feels like the startlocations are stored somewhere else, like when you have to use "load scenario" to get them in the game.

Still appreciate all help I can get :)

//South
 
Sry for this late answer. Been away for a while..

Thx for replying! Continued to test this night again, this time with YNAEMP v6. The only mod checked but when i load it with world builder, sadly there are no start locations on the map.

But isn't the start locations written in the file "CivilizationsStartPos.xml"? I'm just opening the file "Earth_Giant_blank.CIV5Map". Feels like the startlocations are stored somewhere else, like when you have to use "load scenario" to get them in the game.

Still appreciate all help I can get :)

//South

sorry, I misread your previous post.

for YnAEMP, it's a totally different thing, yes, you need the world builder to locate the plot, then edit the XML. I still need to update the first post of ynaemp thread to add those instruction, but it's mostly copy/pasting in the right section...

but you were also talking of Dale's map, on those you should see the grey circles.

same for the old version of my giant map.
 
Okay!

Will try and edit the XML myself. :) But please tell me when the instructions are posted.

Tried your old version of the giant map and there are, as you said it should be, start locations visible! :)
 
Edit: Ok here we go, i replaced the Arabia Civ with Sweden in "CivilizationsStartPos.xml"

"<Row>
<Type>CIVILIZATION_SWEDEN</Type>
<X>25</X>
<Y>78</Y>
</Row>"

And then I deleted Sweden from "MinorCivStartPos.xml"

Figured that wouldn't work, I mean i'd still have to implement the Sweden-mod right? (http://forums.civfanatics.com/showthread.php?t=393501)

But I tried to play and surprisingly the Sweden Civ show up in the Civ selection. So i choosed them and they are at the right Start location! :D

Have I done it right? :O
 
Edit: Ok here we go, i replaced the Arabia Civ with Sweden in "CivilizationsStartPos.xml"

"<Row>
<Type>CIVILIZATION_SWEDEN</Type>
<X>25</X>
<Y>78</Y>
</Row>"

And then I deleted Sweden from "MinorCivStartPos.xml"

Figured that wouldn't work, I mean i'd still have to implement the Sweden-mod right? (http://forums.civfanatics.com/showthread.php?t=393501)

But I tried to play and surprisingly the Sweden Civ show up in the Civ selection. So i choosed them and they are at the right Start location! :D

Have I done it right? :O

yep, once you've done the xml editing you don't have to "implement" the new civ mod, just have it selected on the mod panel...

and you don't have to replace, you can simply add a new row.

see this post : http://forums.civfanatics.com/showpost.php?p=10119448&postcount=171

(and I've edited the first post in YnAEMP thread to add a "customize" section, please use the YnAEMP thread for any question about it)
 
Okay, awesome! :)

Great map btw, love it so far!

Just one more question from me, in the post you linked you said that "you're limited to 22 major civs in game atm,". Doesn't that mean that it's better to replace a major civ instead of adding a new row?

And do I have to add a minor civ if i delete one?

//South
 
I have a problem. I am trying to add a couple custom civilization to the ''PLAY THE EARTH EXTENDED VANILLA'' map (it's a scenario).
I added them by the scenario editor, but when i get in game => mods => single player and i set up the map, the 2 civilizations that i added are not there......What did i do wrong/did i forget? Thanks for the help!
 
Top Bottom