• Civilization 7 has been announced. For more info please check the forum here .

Simple Creation a New civ?

Dr_Laxative

Chieftain
Joined
Oct 26, 2005
Messages
30
I'm trying to create a new civ but easily... As in using the pre-existing leaders and stuff.

This is what I tried to make a new one....yet it doesn't work

I edited 3 files...
Civ4civilizationinfos.xml and Civ4LeaderHeadInfos.xml from the civilization directory
and
Civ4PlayerColorInfos.xml from Interface Directory

In Civ4PlayerColorInfos.xml I copied everything from a current color (blue) and renamed it (Blue2) and change the secondary color from white to black.


In Civ4CivilizationInfos..xml I copied everything from CIVILIZATION_AMERICA
Pasted in the appropriate place and changed :
<Type>CIVILIZATION_AMERICA</Type>
<Description>TXT_KEY_CIV_AMERICA_DESC</Description>
<ShortDescription>TXT_KEY_CIV_AMERICA_SHORT_DESC</ShortDescription>
<Adjective>TXT_KEY_CIV_AMERICA_ADJECTIVE</Adjective>
<Civilopedia>TXT_KEY_CIV_AMERICA_PEDIA</Civilopedia>
<DefaultPlayerColor>PLAYERCOLOR_BLUE</DefaultPlayerColor>

To:

<Type>CIVILIZATION_CANADA</Type>
<Description>TXT_KEY_CIV_CANADA_DESC</Description>
<ShortDescription>TXT_KEY_CIV_CANADA_SHORT_DESC</ShortDescription>
<Adjective>TXT_KEY_CIV_CANADA_ADJECTIVE</Adjective>
<Civilopedia>TXT_KEY_CIV_CANADA_PEDIA</Civilopedia>
<DefaultPlayerColor>PLAYERCOLOR_BLUE2</DefaultPlayerColor>

I also changed the 2 leaders of america to:

<Leaders>
<Leader>
<LeaderName>LEADER_SOMEGUY</LeaderName>
<bLeaderAvailability>1</bLeaderAvailability>
</Leader>
</Leaders>

And I changed all the City names... that's it.

For Civ4LeaerHeadInfos.xml I copied everything from Roosevelt I changed the name appropriatly and only changed the traits to what I wanted.

AND THAT'S IT..... When I started a new game I clicked on it and it crashed.

Shouldn't that theoretically work? what am I missing?

Any help here would be great...
 
Dr_Laxative said:
<Type>CIVILIZATION_CANADA</Type>
<Description>TXT_KEY_CIV_CANADA_DESC</Description>
<ShortDescription>TXT_KEY_CIV_CANADA_SHORT_DESC</ShortDescription>
<Adjective>TXT_KEY_CIV_CANADA_ADJECTIVE</Adjective>
<Civilopedia>TXT_KEY_CIV_CANADA_PEDIA</Civilopedia>
It crashed because none of that exists. You have to find where all of those things are defined and add them.
 
Dr_Laxative said:
Any clue where?

They are in a couple places

<Description>TXT_KEY_CIV_AMERICA_DESC</Description>
<ShortDescription>TXT_KEY_CIV_AMERICA_SHORT_DESC </ShortDescription>
<Adjective>TXT_KEY_CIV_AMERICA_ADJECTIVE</Adjective>

These are in
Assets\XML\Text\CIV4GameTextInfos_Objects.xml

For:
<Civilopedia>TXT_KEY_CIV_AMERICA_PEDIA</Civilopedia>

Look in
Assets\XML\Text\CIV4GameText_Civilopedia_CivLeaders.xml

Other interesting ones

<Type>ART_DEF_CIVILIZATION_AMERICA</Type>

But it looks like the art files are in dds (directx surface format) packed in art0.fpk

When you get around to changing cities you need to add them to
Assets\XML\Text\CIV4GameTextInfos_Cities.xml

and define your UU in
Assets\XML\Units\CIV4UnitInfos.xml

and after that:
Assets\XML\Text\CIV4GameText_Civilopedia_Units.xml
Assets\XML\Text\CIV4GameTextInfos_Objects.xml
Assets\XML\Text\CIV4GameText_Strategy.xml


Hope that helps and isn't too overwelming.
 
I doubt that that's the reason it crashed. I created a custom game speed with its own name, and it similarly has description and even civilopedia tags. I know for a fact from doing this that the 'type' flag IS the definition for a new object. This also involved adding lines referencing my custom speed to the cultureinfo file, which worked fine as well.

Edit: Hemi beat me to the things I was looking up.
 
tofof is right, so just to clarify:

<Description>TXT_KEY_CIV_CANADA_DESC</Description>
<ShortDescription>TXT_KEY_CIV_CANADA_SHORT_DESC< /ShortDescription>
<Adjective>TXT_KEY_CIV_CANADA_ADJECTIVE</Adjective>
<Civilopedia>TXT_KEY_CIV_CANADA_PEDIA</Civilopedia>

None of these elements will make the game crash, regardless of what is entered in them.

What is the error when you try to load? If there's an error in the XML files, you should get a popup pointing to the exact file and line in which the error occurs.
 
Potentially fatal errors:

Typos in the code (obviously).

Trying to access a [blank] that doesn't exist (or is done incorrectly):

Civ
Leader
PlayerColor
Tech
Trait

As Isak said, having access to the logs is important in pinpointing errors - Civ can be quite fickle and it's easy to make mistakes that are hard to find.
 
does anyone know how many colors are there available? Just the initial 18 or any extras as well?
 
OK, What I want to do is replace the French with the Scotts.

What files need to be editied other than

Assets\XML\Civilizations\CIV4GameTextInfos_Cities.xml

Assets\XML\Civilizations\CIV4LeaderHeadInfos.xml

Assets\XML\Text\CIV4GameTextInfos_Cities.xml

????

thanks
 
Tunch Khan said:
does anyone know how many colors are there available? Just the initial 18 or any extras as well?
You can add new colors by modifying CIV4ColorVals.xml in the Assets\XML\Interface folder.
 
WaxonWaxov said:
OK, What I want to do is replace the French with the Scotts.

What files need to be editied other than

Assets\XML\Civilizations\CIV4GameTextInfos_Cities.xml

Assets\XML\Civilizations\CIV4LeaderHeadInfos.xml

Assets\XML\Text\CIV4GameTextInfos_Cities.xml

????

thanks
You also need to change the CivilizationInfos XML to change things like starting techs, unique units and so on. You can simply replace everything that refers to France in the TEXT XML but it's probably better to add a new civ rather than replace one since adding new ones is easy and has no negative effects.
 
Trip said:
You can add new colors by modifying CIV4ColorVals.xml in the Assets\XML\Interface folder.

Trip, for something like adding a civ, could you list all the files that need to be modified (assuming no leaderhead additions, no additions of graphics, techs, or UUs)?
 
Trip said:
...but it's probably better to add a new civ rather than replace one since adding new ones is easy and has no negative effects.

OK,

I'm a Visual Basic programmer, I know nothing about xml.

How would one go about adding a new Civ? I was just going to do some sort of find/replace in the .txt editor.
 
Wyz_sub10 said:
Trip, for something like adding a civ, could you list all the files that need to be modified (assuming no leaderhead additions, no additions of graphics, techs, or UUs)?

If you're not adding Artwork, nor Leaders (but just reusing existing leaders) you'd only need to modify CivilizationInfos.xml, as far as I can tell.


To add a civ, just copy an existing <CivilizationInfo> element, like this

Code:
<CivilizationInfo>
			<Type>CIVILIZATION_AMERICA</Type>
			<Description>TXT_KEY_CIV_AMERICA_DESC</Description>
			<ShortDescription>TXT_KEY_CIV_AMERICA_SHORT_DESC</ShortDescription>
			<Adjective>TXT_KEY_CIV_AMERICA_ADJECTIVE</Adjective>
			<Civilopedia>TXT_KEY_CIV_AMERICA_PEDIA</Civilopedia>
			<DefaultPlayerColor>PLAYERCOLOR_BLUE</DefaultPlayerColor>
			<ArtDefineTag>ART_DEF_CIVILIZATION_AMERICA</ArtDefineTag>
			<ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>
			<bPlayable>1</bPlayable>
			<bAIPlayable>1</bAIPlayable>
			<Cities>
				<City>TXT_KEY_CITY_NAME_WASHINGTON</City>
				<City>TXT_KEY_CITY_NAME_NEW_YORK</City>
				<City>TXT_KEY_CITY_NAME_BOSTON</City>
				<City>TXT_KEY_CITY_NAME_PHILADELPHIA</City>
				<City>TXT_KEY_CITY_NAME_ATLANTA</City>
				<City>TXT_KEY_CITY_NAME_CHICAGO</City>
				<City>TXT_KEY_CITY_NAME_SEATTLE</City>
				<City>TXT_KEY_CITY_NAME_SAN_FRANCISCO</City>
				<City>TXT_KEY_CITY_NAME_LOS_ANGELES</City>
				<City>TXT_KEY_CITY_NAME_HOUSTON</City>
				<City>TXT_KEY_CITY_NAME_PORTLAND</City>
				<City>TXT_KEY_CITY_NAME_ST_LOUIS</City>
				<City>TXT_KEY_CITY_NAME_MIAMI</City>
				<City>TXT_KEY_CITY_NAME_BUFFALO</City>
				<City>TXT_KEY_CITY_NAME_DETROIT</City>
				<City>TXT_KEY_CITY_NAME_NEW_ORLEANS</City>
				<City>TXT_KEY_CITY_NAME_BALTIMORE</City>
				<City>TXT_KEY_CITY_NAME_DENVER</City>
				<City>TXT_KEY_CITY_NAME_CINCINNATI</City>
				<City>TXT_KEY_CITY_NAME_DALLAS</City>
				<City>TXT_KEY_CITY_NAME_MEMPHIS</City>
				<City>TXT_KEY_CITY_NAME_CLEVELAN</City>
				<City>TXT_KEY_CITY_NAME_KANSAS_CITY</City>
				<City>TXT_KEY_CITY_NAME_SAN_DIEGO</City>
				<City>TXT_KEY_CITY_NAME_RICHMOND</City>
				<City>TXT_KEY_CITY_NAME_LAS_VEGAS</City>
				<City>TXT_KEY_CITY_NAME_PHOENIX</City>
				<City>TXT_KEY_CITY_NAME_ALBUQUERQUE</City>
				<City>TXT_KEY_CITY_NAME_MINNEAPOLIS</City>
				<City>TXT_KEY_CITY_NAME_PITTSBURGH</City>
				<City>TXT_KEY_CITY_NAME_OAKLAND</City>
				<City>TXT_KEY_CITY_NAME_TAMPA_BAY</City>
				<City>TXT_KEY_CITY_NAME_ORLANDO</City>
				<City>TXT_KEY_CITY_NAME_TACOMA</City>
				<City>TXT_KEY_CITY_NAME_SANTA_FE</City>
				<City>TXT_KEY_CITY_NAME_OLYMPIA</City>
				<City>TXT_KEY_CITY_NAME_HUNT_VALLEY</City>
				<City>TXT_KEY_CITY_NAME_SPRINGFIELD</City>
				<City>TXT_KEY_CITY_NAME_PALO_ALTO</City>
				<City>TXT_KEY_CITY_NAME_CENTRALIA</City>
				<City>TXT_KEY_CITY_NAME_SPOKANE</City>
				<City>TXT_KEY_CITY_NAME_JACKSONVILLE</City>
				<City>TXT_KEY_CITY_NAME_SAVANNAH</City>
				<City>TXT_KEY_CITY_NAME_CHARLESTON</City>
				<City>TXT_KEY_CITY_NAME_SAN_ANTONIO</City>
				<City>TXT_KEY_CITY_NAME_OMAHA</City>
				<City>TXT_KEY_CITY_NAME_BIRMINGHAM</City>
				<City>TXT_KEY_CITY_NAME_HONOLULU</City>
				<City>TXT_KEY_CITY_NAME_ANCHORAGE</City>
				<City>TXT_KEY_CITY_NAME_SACRAMENTO</City>
				<City>TXT_KEY_CITY_NAME_SALT_LAKE_CITY</City>
				<City>TXT_KEY_CITY_NAME_RENO</City>
				<City>TXT_KEY_CITY_NAME_BOISE</City>
				<City>TXT_KEY_CITY_NAME_MILWAUKEE</City>
				<City>TXT_KEY_CITY_NAME_SANTA_CRUZ</City>
				<City>TXT_KEY_CITY_NAME_MONTEREY</City>
				<City>TXT_KEY_CITY_NAME_SANTA_MONICA</City>
				<City>TXT_KEY_CITY_NAME_LITTLE_ROCK</City>
				<City>TXT_KEY_CITY_NAME_COLUMBUS</City>
				<City>TXT_KEY_CITY_NAME_LE_BAM</City>
			</Cities>
			<Buildings/>
			<Units>
				<Unit>
					<UnitClassType>UNITCLASS_MARINE</UnitClassType>
					<UnitType>UNIT_AMERICAN_NAVY_SEAL</UnitType>
				</Unit>
			</Units>
			<FreeUnitClasses>
				<FreeUnitClass>
					<UnitClassType>UNITCLASS_SETTLER</UnitClassType>
					<iFreeUnits>1</iFreeUnits>
				</FreeUnitClass>
			</FreeUnitClasses>
			<FreeBuildingClasses>
				<FreeBuildingClass>
					<BuildingClassType>BUILDINGCLASS_PALACE</BuildingClassType>
					<bFreeBuildingClass>1</bFreeBuildingClass>
				</FreeBuildingClass>
			</FreeBuildingClasses>
			<FreeTechs>
				<FreeTech>
					<TechType>TECH_FISHING</TechType>
					<bFreeTech>1</bFreeTech>
				</FreeTech>
				<FreeTech>
					<TechType>TECH_AGRICULTURE</TechType>
					<bFreeTech>1</bFreeTech>
				</FreeTech>
			</FreeTechs>
			<DisableTechs/>
			<InitialCivics>
				<CivicType>CIVIC_DESPOTISM</CivicType>
				<CivicType>CIVIC_BARBARISM</CivicType>
				<CivicType>CIVIC_TRIBALISM</CivicType>
				<CivicType>CIVIC_DECENTRALIZATION</CivicType>
				<CivicType>CIVIC_PAGANISM</CivicType>
			</InitialCivics>
			<AnarchyCivics>
				<CivicType>CIVIC_DESPOTISM</CivicType>
				<CivicType>CIVIC_BARBARISM</CivicType>
				<CivicType>CIVIC_TRIBALISM</CivicType>
				<CivicType>CIVIC_DECENTRALIZATION</CivicType>
				<CivicType>CIVIC_PAGANISM</CivicType>
			</AnarchyCivics>
			<Leaders>
				<Leader>
					<LeaderName>LEADER_WASHINGTON</LeaderName>
					<bLeaderAvailability>1</bLeaderAvailability>
				</Leader>
				<Leader>
					<LeaderName>LEADER_FRANKLIN_ROOSEVELT</LeaderName>
					<bLeaderAvailability>1</bLeaderAvailability>
				</Leader>
			</Leaders>
			<CivilizationSelectionSound>AS3D_AMERICA_SELECT</CivilizationSelectionSound>
			<CivilizationActionSound>AS3D_AMERICA_ORDER</CivilizationActionSound>
		</CivilizationInfo>

and paste that below the last </CivilizationInfo> tag in the file (make sure not to get the indentation messed up).

Then you've added a Civilization. Now just modify the values you want to modify (I know that my XML reference would be a bit handy for that - sorry, still typing it up) and save the file.

Make sure to check out Dale's Modding tutorial before you start though. :)
 
Okay, the easiest way to do it is to simply modify two files: CIV4LeaderHeadInfos and CIV4CivilizationInfos.

The way Civ 4 currently works (and is the best way to do things) is to use TXT_KEYs for all text entries (names, civilopedia entries, strategy entries for units, etc.). You provide a TXT_KEY for these entries and in the Text XML you have associated text for each TXT_KEY in each language. The game determines which text to use based upon the active language - if you're just going to modify things for yourself and don't need to worry about other things you can just enter the text directly. So instead of "TXT_KEY_LEADER_WASHINGTON" you would have "George Washington". If you plan on having translations or use Python it's better to use TXT_KEYs.

In LeaderHeadInfos you copy one of the other leaders and place it at the bottom of the file (I usually choose a leader most similar to whoever I'm trying to make so you don't have to change as much). Each leader entry is rather long and includes things like diplomacy sounds and AI attitudes but there's only a few things that actually need to change. In the new entry you want to change the Civ tag ("LEADER_WASHINGTON" to "LEADER_SOME_GUY", for example) as well as the Description and Civilopedia text entries.

In CivilizationInfos you want to do the same thing - copy one of the other ones and place the new entry at the bottom. This file has more that needs to be changed. You need to change the Type tag like with the Leader (e.g. "CIVILIZATION_AMERICA" to "CIVILIZATION_CANADA") Description is the "official" name for a civ (United States of America) while the ShortDesc is the colloquial version (America). Adjective also needs to be changed and Civilopedia also if you care about that. You can also change the color and other stuff but it's not technically necessary.

The cities entry for civs also use TXT_KEYs but again you can simply add the names directly if you wish. Change the Unique Unit below that if you wish, the starting techs further down. Close to the bottom is another necessary entry - you need to change the available leaders for the civ you copied to the leader you've already made. So change it from LEADER_WASHINGTON to LEADER_SOME_GUY (or whatever you named the leader in the other thread).

That should be it. If anyone has any questions let me know.
 
Hello,

Most of this has been quite helpful. Throughout the forums I've found how to edit colors and text. I am, however, having issues creating a new civ utilizing the information above. I've typed everything correctly and changed everything I could think of that links to the new civ. The game starts fine, but when I go to play, it goes through the "generating" screen and just as it would normally pop up the "play" button, it crashes to the desktop. This only happens on my custom civ (the regular civs work fine). If you have any advice or helpful tips to get past this, they would be much appreciated. I hope in the future there will be a full guide on what leads where and what to change where or better yet, an interface (like civ 3 had) for quick and easy input. Custom civs should be the easiest thing in civ (which it has been in the past) but this is extremely tedious.

Thanks!
 
Verkinix said:
Custom civs should be the easiest thing in civ (which it has been in the past) but this is extremely tedious.

I'd have to disagree with it being easy in the past, and I must say I've added quite a few by now. ;) You just need some time to get used to the 'new way', i'm sure.

Can you post your modified files here, using the attachment option when posting a reply? Then maybe I can figure out what's wrong.
 
Thanks for the response. I have compiled the "highlights" of my files. Perhaps they will shed some light on where I am going wrong. I didnt include colors or city names as I've gotten them to work just fine. Let me know if I am missing anything or forgot something. Any help would be appreciated!

As far as ease of previous civ games, I think I just got used to them. I'm sure thats the same with this one. It would be nice to copy/paste all of my custom city names down a list rather then having to type each one individually in 3 locations :)

Thanks again!
 

Attachments

  • Civ 4 Custom Civ.txt
    2.3 KB · Views: 88
Ok, the problem might be this:

In CivilizationInfos.xml you have:
<LeaderName>LEADER_LANDGRAF</LeaderName>

but in LeaderheadInfos.xml you have:
<Type>LEADER_DAVE_LANDGRAF</Type>

You must either add '_DAVE' in CivilizationInfos.xml, or remove '_DAVE' from LeaderheadInfos.xml

Besides that, I don't really see any problems, so if that doesn't fix it, I may need to see the whole files instead.
 
Verkinix said:
Thanks for the response. I have compiled the "highlights" of my files. Perhaps they will shed some light on where I am going wrong. I didnt include colors or city names as I've gotten them to work just fine. Let me know if I am missing anything or forgot something. Any help would be appreciated!

As far as ease of previous civ games, I think I just got used to them. I'm sure thats the same with this one. It would be nice to copy/paste all of my custom city names down a list rather then having to type each one individually in 3 locations :)

Thanks again!

not sure whats wrong with your code...so I can't help you there

but I'm jsut wondering why you said you need to type the city names in 3 locations?
 
Top Bottom