View Full Version : Short Civilization 5 file structure overview


Afforess
Sep 13, 2010, 07:50 PM
Now that Steam has Preloaded Civ5, we can see the folder structure, but not the contents of the files. The files seem to be cyphered, to be unlocked in roughly 1 week, but we can learn a lot from the setup.

XML.
There is a lot of recognizable xml files. In
"C:\Program Files (x86)\Steam\steamapps\common\sid meier's civilization v\Assets\Gameplay\XML"

XML Folders:

AI - New Appearance

CIV5AICityStrategies.xml
CIV5AIEconomicStrategies.xml
CIV5AIGrandStrategies.xml
CIV5AIMilitaryStrategies.xml
CIV5CitySpecializations.xml
CIV5TacticalMoves.xml
GlobalAIDefines.xml
GlobalDiplomacyAIDefines.xml



BasicInfos - Was in Civ4

CIV5Attitudes.xml
CIV5Calendars.xml
CIV5CitySizes.xml
CIV5Concepts.xml
CIV5Contacts.xml
CIV5DenialInfos.xml
CIV5Domains.xml
CIV5InvisibleInfos.xml
CIV5MajorCivApproachTypes.xml
CIV5MemoryInfos.xml
CIV5MinorCivApproachTypes.xml
CIV5MinorCivTraits.xml
CIV5Months.xml
CIV5Seasons.xml
CIV5UnitAIInfos.xml
CIV5UnitCombatInfos.xml



Buildings - Was in Civ4

CIV5BuildingClasses.xml
CIV5Buildings.xml



Civilizations - Was in Civ4

CIV5Civilizations.xml
CIV5MinorCivilizations.xml
CIV5Regions.xml
CIV5Traits.xml



Diplomacy - New Appearance

Civ5Diplomacy_Responses.xml



GameInfo - Was in Civ4

CIV5ArtStyleTypes.xml
CIV5Climates.xml
CIV5CultureLevels.xml
CIV5Cursors.xml
CIV5EmphasizeInfos.xml
CIV5Eras.xml
CIV5Flavors.xml
CIV5ForceControlInfos.xml
CIV5GameOptions.xml
CIV5GameSpeeds.xml
CIV5GoodyHuts.xml
CIV5HandicapInfos.xml
CIV5HurryInfos.xml
CIV5IconFontMapping.xml
CIV5IconTextureAtlases.xml
CIV5MultiplayerOptions.xml
CIV5PlayerOptions.xml
CIV5Policies.xml
CIV5PolicyBranchTypes.xml
CIV5Processes.xml
CIV5Projects.xml
CIV5SeaLevels.xml
CIV5SmallAwards.xml
CIV5Specialists.xml
CIV5Trades.xml
CIV5TurnTimers.xml
CIV5Victories.xml
CIV5Votes.xml
CIV5VoteSources.xml
CIV5Worlds.xml



Interface - Was in Civ4

CIV5Colors.xml
CIV5InterfaceModes.xml
CIV5PlayerColors.xml



Leaders - New Appearance

CIV5Leader_Alexander.xml
CIV5Leader_Askia.xml
CIV5Leader_Augustus.xml
CIV5Leader_Barbarian.xml
CIV5Leader_Bismark.xml
CIV5Leader_Catherine.xml
CIV5Leader_Darius.xml
CIV5Leader_Elizabeth.xml
CIV5Leader_Gandhi.xml
CIV5Leader_HarunAlRashid.xml
CIV5Leader_Hiawatha.xml
CIV5Leader_Montezuma.xml
CIV5Leader_Napoleon.xml
CIV5Leader_OdaNobunaga.xml
CIV5Leader_Ramesses.xml
CIV5Leader_Ramkhamhaeng.xml
CIV5Leader_Suleiman.xml
CIV5Leader_Washington.xml
CIV5Leader_WuZetian.xml
CIV5LeaderTables.xml



Misc - Was in Civ4

CIV5Routes.xml
Notifications.xml



NewText - Possible Renaming of Old Civ "Text" folder

English.xml
CIV5Credits_en_US.txt
EN_US

LeaderDialog

Civ5_Dialog__GENERIC.xml
Civ5_Dialog_Alexander.xml
Civ5_Dialog_Askia.xml
Civ5_Dialog_Augustus.xml
Civ5_Dialog_Bismarck.xml
Civ5_Dialog_Catherine.xml
Civ5_Dialog_Darius.xml
Civ5_Dialog_Elizabeth.xml
Civ5_Dialog_Gandhi.xml
Civ5_Dialog_Harun.xml
Civ5_Dialog_Hiawatha.xml
Civ5_Dialog_Montezuma.xml
Civ5_Dialog_Napoleon.xml
Civ5_Dialog_Oda.xml
Civ5_Dialog_Ramesses.xml
Civ5_Dialog_Ramkhamhaeng.xml
Civ5_Dialog_Suleiman.xml
Civ5_Dialog_Washington.xml
Civ5_Dialog_WuZetian.xml

Modding

CIV5ModdingText.xml

Victory

CIV5_Victory.xml

CIV5GameText_Cities.xml
CIV5GameTextInfos.xml
CIV5GameTextInfos_Advisors.xml
CIV5GameTextInfos_Buildings.xml
CIV5GameTextInfos_CityStates.xml
CIV5GameTextInfos_Civilizations.xml
CIV5GameTextInfos_Civilopedia.xml
CIV5GameTextInfos_Credits.xml
CIV5GameTextInfos_FrontEndScreens.xml
CIV5GameTextInfos_InGameScreens.xml
CIV5GameTextInfos_Jon.xml
CIV5GameTextInfos_Leaders.xml
CIV5GameTextInfos_MapAmer.xml
CIV5GameTextInfos_MapAsia.xml
CIV5GameTextInfos_MapMed.xml
CIV5GameTextInfos_MapMeso.xml
CIV5GameTextInfos_Objects.xml
CIV5GameTextInfos_Techs.xml
CIV5GameTextInfos_Units.xml
CIV5GameTextInfos_WorldView.xml
CIV5GameTextInfos2.xml
CIV5HintText.xml




Technologies - Was in Civ4

CIV5Technologies.xml



Terrain - Was in Civ4

CIV5Features.xml
CIV5Improvements.xml
CIV5ResourceClasses.xml
CIV5Resources.xml
CIV5Terrains.xml
CIV5Yields.xml



Units - Was in Civ4

Civ5AnimationCategories.xml
Civ5AnimationPaths.xml
CIV5Automates.xml
CIV5Builds.xml
CIV5Commands.xml
CIV5Controls.xml
Civ5EntityEvents.xml
CIV5Missions.xml
CIV5MultiUnitFormations.xml
CIV5SpecialUnits.xml
CIV5UnitClasses.xml
CIV5UnitMovementRates.xml
CIV5UnitPromotions.xml
CIV5Units.xml



Probably should also mention the Art Defines XML files which are inside the FPK files:

civ5artdefines_citybuildings.xml
civ5artdefines_eventeffects.xml
civ5artdefines_improvements.xml
civ5artdefines_landmarks.xml
civ5artdefines_landmarktypes.xml
civ5artdefines_overlay.xml
civ5artdefines_sv_features.xml
civ5artdefines_sv_improvements.xml
civ5artdefines_sv_resources.xml
civ5artdefines_sv_terrain.xml
civ5artdefines_sv_units.xml (*)
civ5artdefines_unitmembers.xml (*)
civ5artdefines_unitmembertemplates.xml
civ5artdefines_units.xml (*)
civ5artdefines_viseffectmodels.xml
civ5artdefines_viseffectparticles.xml
civ5artdefines_viseffects.xml
civ5artdefines_wonders.xml

* - Dealt with in Kael's modding guide (http://forums.civfanatics.com/showthread.php?t=385009)

Some of these have XSD schema definitions:

civ5artdefineschemas_unitmembers.xsd
civ5artdefineschemas_units.xsd
civ5artdefineschemas_wonders.xsd
civ5artdefines_viseffects.xsd

For added consistency, the fog color and terrain textures seem to be defined by these CSV files:
fogcolor.csv
terraindef.csv


is your XML folder breakdown, just like Civ4. Many of the files are the same. Units, UnitClasses, Buildings, BuildingClasses are all there. Techs are there. Leaders seem to be split into a file for each one. There is a new AI Folder. BasicInfos is full of new and old files. GameInfo holds a lot of older files, but a lot of new ones too.

One thing modders should note is that leaders are broken down by file, instead of in one large file like in Civ4. Also, Barbarians seem to be a player, just like in Civ4 (albeit a hidden, unplayable player).

One mystery I have noticed is that there don't seem to be any Schema files anymore.

Lua.
Modders will also notice the absence of python, and the introduction of lua files. The lua is split into two folders,:
"C:\Program Files (x86)\Steam\steamapps\common\sid meier's civilization v\Assets\Gameplay\Lua"

and

"C:\Program Files (x86)\Steam\steamapps\common\sid meier's civilization v\Assets\UI"

SDK.
There is no apparent SDK folder, but the CvGameCoreDLLFinal Release.dll seems to be ~2.5mb, which is half the size of the BTS DLL. That makes me suspect that the Civ5 SDK is a lot smaller, and a lot of content was cut (Selectiongroups, I'm looking at you), and it is also possibly more compressed.

I'm curious about what more is revealed in the coming days. The goods news is that your Civ4 XML skills should directly translate over. ;)

The_J
Sep 21, 2010, 03:57 PM
Coppied from the speculation thread.

Which files are missing?
Ekmek said something about that some XMLs are in the .fpk, is this right? Which one?

Jaythekiller
Sep 21, 2010, 04:50 PM
I'm surprised you can't see file content as i can see it all
I only get the demo because i live in France,but IMO it works the same as the actual game

One mystery I have noticed is that there don't seem to be any Schema files anymore
what i understand with my poor knowledge from xml files,is that shema have been moved to the top of each file

The_J
Sep 21, 2010, 05:36 PM
I'm surprised you can't see file content as i can see it all


This has been posted before the release ;).

Jaythekiller
Sep 21, 2010, 05:40 PM
This has been posted before the release ;).
Oops,I did it again :D

xienwolf
Sep 21, 2010, 10:48 PM
Afforess: Not sure if you looked inside of the XML files, but we are in more of what I used to call a "real XML" format now.

Having the Schema files was a HUGE boon to making it easy to pick up the XML and modify things on a whim without really knowing what you were doing. You learn what a specific tag keyword meant, and you fiddled with the numbers to make things happen.


Now, the Schema bits are contained within the same file as the data bits. Pretty sure in all cases they are listed first. This isn't TOO big of a change, as long as you had ever opened a schema before and you know what to ignore now.

The biggest change is that this time around, instead of the XML being read directly to the DLL, the XML is being loaded into SQL tables. So you'll see lots of Table and Column elements which are completely new compared to Civ4. This is something you'll have to learn to work with if you start adding new fields to your mod, how to ensure they are tabled properly and have the right rules on what values are allowed. Pretty sure for most files this comes between the Schema and Data portions.

As I recall things (haven't played with it too much, sadly RL is bumping me for a merry ride), there is no longer any requirement to include EVERY item in a list, as the table is initially populated with basic data. There is no longer a limit of having 1 "chunk" per item. I can specify the warrior's strength at the top of the file, then later in the middle specify his movement, and again at the bottom specify his defense. Each time that it finds a "warrior chunk" of data, it grabs what is there and updates the proper entries in the table. No more bothersome overwriting (ie - it is native perfectly modular).

Civ Fuehrer
Sep 21, 2010, 10:53 PM
After 10 minutes of playing or so I went hunting for the folders.:lol: I eventually found them under steam in the programs folder (I have the demo since Amazon will be delivering it Wednesday or Thursday), then I found all the other XML and Lua files and finally came to the FPK and FXSB compressed folders. I'm curious as to why my PAK program used in Civ 4 is unable to decompress the FPK folders for Civ 5, either I need a new program for Civ 5 or they're protected since they're part of the demo. Nevertheless, I believe the FXSB folders are new and am curious if the compressor/decompressor will be part of the mod tools package arriving at the aforementioned date or will I have to download something else for those? I really want to pry my fingers into the model/XML archives to get a nice jumpstart on figuring out how to go about making models/mods.:mischief:

EDIT: It seems after trying to open a DDS image with Gimp 2.6 I received an error stating that it can not be opened... I may have to get a newer version of Gimp with a newer version of the DDS converter for Gimp.

Dale
Sep 21, 2010, 11:13 PM
The FPK and DDS files use a propriety compression matrix. No available program will be able to open them....... except Nexus (which is in the SDK).

Civ Fuehrer
Sep 21, 2010, 11:15 PM
Thought so... Well in that case might as well go back to playing. I've never felt so sad and happy at the same time like this. :lol:

strategyonly
Sep 21, 2010, 11:50 PM
Were are the ArtDefines for the units located, i cant stand have more than three units in a formation.

City Builder
Sep 22, 2010, 05:19 AM
Hi,
Can somebody tell me where the art assets are located, specifically I'm attempting to find the resource icons, the apples and hammers as I'd like to change them to something else that I have in mind.

I think I've looked through most if not all of the Assets folder of the installation of the game folder but failed to find those two files.

Thanks,

Civ Fuehrer
Sep 22, 2010, 12:06 PM
Were are the ArtDefines for the units located, i cant stand have more than three units in a formation.

Well looking at the Civ5MultiUnitFormations.xml it seems they set up a system of formations that define the number of people meshes within a unit. I'd say the total number defined per unit is either in the FPK folders or the LUA files.

@City Builder
The icons and actual artwork are all contained within the FPK and FXSB folders which cannot be opened by any currently released program. We will need to wait for Firaxis/2K to release the SDK with Nexus to unpack them and change them or you could ask one of the people who were beta players that have access to the tools now to make it.

xienwolf
Sep 22, 2010, 01:33 PM
YieldIconManager.lua/xml ought to contain everything you need to modify the yield icons on the tiles.

Pazyryk
Sep 23, 2010, 10:03 AM
xienwolf, it seems to me that it should be possible to create a whole new table with a single xml file (with it's own "schema" at the top). The dll won't know about it, of course, but your Lua code could interact with it. These values would be reloaded from xml file when game reloads (so any values changed by Lua would be reset to xml file values). Does this sound correct?

Dang it! I'm still stuck on understanding how to remember values between game saves. If I use Lua to create a new column in an existing table, or a whole new table that doesn't have a corresponding xml file, will those new entities be present in the gamesave file? Or will they just evaporate?

It would be nice if there was some sort of tag associated with any table that provided two options: 1) always reload this table from xml at game start/game reload, or 2) save this table in gamesave file (only load from xml file at beginning of a new game).

xienwolf
Sep 24, 2010, 08:42 AM
xienwolf, it seems to me that it should be possible to create a whole new table with a single xml file (with it's own "schema" at the top). The dll won't know about it, of course, but your Lua code could interact with it. These values would be reloaded from xml file when game reloads (so any values changed by Lua would be reset to xml file values). Does this sound correct?

Dang it! I'm still stuck on understanding how to remember values between game saves. If I use Lua to create a new column in an existing table, or a whole new table that doesn't have a corresponding xml file, will those new entities be present in the gamesave file? Or will they just evaporate?

It would be nice if there was some sort of tag associated with any table that provided two options: 1) always reload this table from xml at game start/game reload, or 2) save this table in gamesave file (only load from xml file at beginning of a new game).

You could use XML to create a completely new table, use its data through LUA, and have all data go back to normal when the game reloads from desktop (not when starting a new game from main menu). I actually don't know for CERTAIN that it will reset the data to the values in the XML, it may acknowledge the SQL as a valid cache since the XML hasn't been modified and thus ignore the XML completely. I'd have to play with things to figure out if that is how it works, or if you do get fresh data every load from desktop.

One catch that I think may not quite be mentioned is that you can't use a NEW XML file to do this, as the DLL needs to be told to load the XML file. But you can use any existing XML file to create a new group of SQL data.

You can indeed also create a new SQL data table from only LUA, and nothing will ever change that, short of the SQL database being deleted by the computer owner.


Again, I might not be correct about XML always being loaded fresh into the SQL upon loading Civ from desktop, it could be a cache validation system where only modified XML files are reloaded if the SQL database already exists.

Kruelgor
Sep 24, 2010, 11:21 AM
Very nice work to categorize all that, Afforess.

Pazyryk
Sep 24, 2010, 11:26 AM
Thanks xienwolf! Just one more piece of my question that you didn't address (probably because you don't know yet):

Do any of these info tables go into the gamesave so they are reloaded from game-specific (possibly altered) game values rather than xml file or cache? If not, is there any kind of memory system that can be manipulated by Lua that will be in the gamesave. (In Civ4, I would create an invisible/inaccessible unit and load it up with promotions that acted as gameinfo booleans. It's a pretty nasty solution and I'm hoping I don't have to do this in Civ5.)

xienwolf
Sep 24, 2010, 11:33 AM
Ah, so that it is shareable by distributing the gamesave type of thing.... You are right, I don't think I know the answer to that one. I would imagine it may unfortunately be "no"

Pazyryk
Sep 24, 2010, 12:25 PM
Rats. Well, let's hope it's there and we don't know how yet. It's such a basic need and it makes many things possible: events, quests, more sophisticated AI modding (memory of specific events), better optimized Lua functions (don't have to check every turn for things that are fixed at game start, like location of special map features). I hope that some proficient C++ modder will think about making a generic "gamesave memory" mod early after we get access to dll.

lichen8566
Sep 26, 2010, 05:43 PM
I wish the SDK will come early.

BTW. I'm glad to see that the SDK works with the runtime of VC90/VS2008. It's my current develope environment.

Carl5872
Sep 26, 2010, 08:40 PM
Can someone teach me how to download and play a mod for civ 5?

Civ Fuehrer
Sep 26, 2010, 09:02 PM
Can someone teach me how to download and play a mod for civ 5?

From CFC:
Download the zip and unpack the civ5mod folder to Documents/My Games/Sid Meier's Civilization 5/MODS/

after you put the folder there installation and/or downloading from the game hub here (http://forums.civfanatics.com/showthread.php?t=382525).

Arrorn
Sep 27, 2010, 01:55 PM
Thanks Afforess! Probably took a bit of time. :P

teejing
Sep 28, 2010, 12:10 PM
Hi everyone ,

so i am just starting to learn about c++ and i thought well, cannot be so hard to change some values in civ5.
Well for someone who knows nothing it actually becomes pretty confusing.

So i am asking for a rough guideline on how to create a mod in general.

The actual change i want to try out is just reducing building maintaining cost to 0, so i would just replace this one value for every building. I got notepad++ and could already change the values, but how should i do it? Can i just copy the xml file, change values, rename it "mod" and put it into a "mod" folder?

If you guys could give me some steps that would be nice. The details i can google/learn myself, hopefully

thx in advance , and sorry for posting in the obvouisly wrong thread, but i felt so empty elsewheres.

Dancing Hoskuld
Sep 28, 2010, 04:10 PM
Hi everyone ,

so i am just starting to learn about c++ and i thought well, cannot be so hard to change some values in civ5.
Well for someone who knows nothing it actually becomes pretty confusing.

So i am asking for a rough guideline on how to create a mod in general.

The actual change i want to try out is just reducing building maintaining cost to 0, so i would just replace this one value for every building. I got notepad++ and could already change the values, but how should i do it? Can i just copy the xml file, change values, rename it "mod" and put it into a "mod" folder?

If you guys could give me some steps that would be nice. The details i can google/learn myself, hopefully

thx in advance , and sorry for posting in the obvouisly wrong thread, but i felt so empty elsewheres.

Yes it is the wrong thread, but have you seen this new thread? Modders Guide to Civilization V (http://forums.civfanatics.com/showthread.php?t=385009). It contains a PDF about modding in Civ V.

teejing
Sep 28, 2010, 04:49 PM
Thanks a lot, i wasnt able to find/google it. :goodjob:

Deliverator
Oct 03, 2010, 09:28 AM
Probably should also mention the Art Defines XML files which are inside the FPK files:

civ5artdefines_citybuildings.xml
civ5artdefines_eventeffects.xml
civ5artdefines_improvements.xml
civ5artdefines_landmarks.xml
civ5artdefines_landmarktypes.xml
civ5artdefines_overlay.xml
civ5artdefines_sv_features.xml
civ5artdefines_sv_improvements.xml
civ5artdefines_sv_resources.xml
civ5artdefines_sv_terrain.xml
civ5artdefines_sv_units.xml (*)
civ5artdefines_unitmembers.xml (*)
civ5artdefines_unitmembertemplates.xml
civ5artdefines_units.xml (*)
civ5artdefines_viseffectmodels.xml
civ5artdefines_viseffectparticles.xml
civ5artdefines_viseffects.xml
civ5artdefines_wonders.xml

* - Dealt with in Kael's modding guide (http://forums.civfanatics.com/showthread.php?t=385009)

Some of these have XSD schema definitions:

civ5artdefineschemas_unitmembers.xsd
civ5artdefineschemas_units.xsd
civ5artdefineschemas_wonders.xsd
civ5artdefines_viseffects.xsd

For added consistency, the fog color and terrain textures seem to be defined by these CSV files:
fogcolor.csv
terraindef.csv

ChaK_
Oct 03, 2010, 11:13 AM
Anyone knows what is related to tech tree here?

I've been deleting some futur tech, but as soon as I delete some tech from the modern era everything :):):):)s up, table breaks and tech disapear....

The_J
Oct 08, 2010, 06:18 PM
Probably should also mention the Art Defines XML files which are inside the FPK files:


Thanks, added to the OP.

And sorry for the delay, i don't have much time to look in here (and no clue about it).