1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Short Civilization 5 file structure overview

Discussion in 'Civ5 - Modding Tutorials & Reference' started by Afforess, Sep 13, 2010.

  1. Afforess

    Afforess The White Wizard

    Jul 31, 2007
    Austin, Texas
    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.

    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

    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.

    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"


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

    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. ;)
  2. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Oct 22, 2008
    Germany / Netherlands
    Moderator Action: 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?
  3. Jaythekiller

    Jaythekiller Chieftain

    Sep 15, 2006
    Ajaccio,Corsica,france (Europe)
    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

    what i understand with my poor knowledge from xml files,is that shema have been moved to the top of each file
  4. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Oct 22, 2008
    Germany / Netherlands
    This has been posted before the release ;).
  5. Jaythekiller

    Jaythekiller Chieftain

    Sep 15, 2006
    Ajaccio,Corsica,france (Europe)
    Oops,I did it again :D
  6. xienwolf

    xienwolf Chieftain

    Oct 4, 2007
    Location! Location!
    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).
  7. Civ Fuehrer

    Civ Fuehrer Eat, Sleep, Mod

    May 8, 2008
    CA, USA
    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.
  8. Dale

    Dale Chieftain

    Mar 14, 2002
    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).
  9. Civ Fuehrer

    Civ Fuehrer Eat, Sleep, Mod

    May 8, 2008
    CA, USA
    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:
  10. strategyonly

    strategyonly C2C Supreme Commander

    Mar 13, 2006
    Were are the ArtDefines for the units located, i cant stand have more than three units in a formation.
  11. City Builder

    City Builder Complicated Complication

    Sep 25, 2006
    In your moms basement
    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.

  12. Civ Fuehrer

    Civ Fuehrer Eat, Sleep, Mod

    May 8, 2008
    CA, USA
    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.
  13. xienwolf

    xienwolf Chieftain

    Oct 4, 2007
    Location! Location!
  14. Pazyryk

    Pazyryk Chieftain

    Jun 13, 2008
    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).
  15. xienwolf

    xienwolf Chieftain

    Oct 4, 2007
    Location! Location!
    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.
  16. Kruelgor

    Kruelgor Chieftain

    May 12, 2010
    The United States
    Very nice work to categorize all that, Afforess.
  17. Pazyryk

    Pazyryk Chieftain

    Jun 13, 2008
    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.)
  18. xienwolf

    xienwolf Chieftain

    Oct 4, 2007
    Location! Location!
  19. Pazyryk

    Pazyryk Chieftain

    Jun 13, 2008
    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.
  20. lichen8566

    lichen8566 Chieftain

    Dec 4, 2009
    Beijing, China
    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.

Share This Page