Modders Guide to Civilization V

I figured out whats the problem. I was editing vanilla game files. I should have edited expansion2 files. Its fixed now.
 
Even though I'm not a fan of directly-editing the game's original files:

If you are directly editing the game's files then just directly edit them. If a file says
Code:
<Row Name="NAVAL_PLOT_BLOCKADE_RANGE">
	<Value>2</Value>
</Row>
And you want to change it to '3', then just change it to '3', as in
Code:
<Row Name="NAVAL_PLOT_BLOCKADE_RANGE">
	<Value>3</Value>
</Row>

But you also need to make sure you are editing the files for the correct expansion that you have. If you are editing the GlobalDefines.xml file for the Vanilla version of the game, but you have Gods & Kings, your edit won't have an effect when running Gods & Kings.

  1. Vanilla files are at:
    C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V\assets\Gameplay\XML
  2. G&K files are at:
    C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V\assets\DLC\Expansion\Gameplay\XML
  3. BNW files are at:
    C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V\assets\DLC\Expansion2\Gameplay\XML
The beginning portion of your file path might be slightly different depending on whether you have Win7, Win10, etc. (I have Win8.1)
 
Even though I'm not a fan of directly-editing the game's original files:

If you are directly editing the game's files then just directly edit them. If a file says
Code:
<Row Name="NAVAL_PLOT_BLOCKADE_RANGE">
	<Value>2</Value>
</Row>
And you want to change it to '3', then just change it to '3', as in
Code:
<Row Name="NAVAL_PLOT_BLOCKADE_RANGE">
	<Value>3</Value>
</Row>

But you also need to make sure you are editing the files for the correct expansion that you have. If you are editing the GlobalDefines.xml file for the Vanilla version of the game, but you have Gods & Kings, your edit won't have an effect when running Gods & Kings.

  1. Vanilla files are at:
    C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V\assets\Gameplay\XML
  2. G&K files are at:
    C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V\assets\DLC\Expansion\Gameplay\XML
  3. BNW files are at:
    C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V\assets\DLC\Expansion2\Gameplay\XML
The beginning portion of your file path might be slightly different depending on whether you have Win7, Win10, etc. (I have Win8.1)


Yes thank you again. I was editing wrong files. Only edited some happiness values. I don't want to change too much value either. I will try to create a mod and change everything I want without changing original files.
 
Is there a guide to debug with the minidumps? (I can't find one).

Since Gazebo asked for proper bug reports on GitHub there's been about a hundred posts of users with issues and I don't mind seeing if I can help debug these. I prolly only need a few screen shots...

EDIT: nevermind, found one: http://forums.civfanatics.com/showthread.php?t=506328
 
One more question... How can I edit resource yields? For example I want to have 8 units of coal from a single coal mine. Original yield is 4.
Which xml I should edit? I looked every xml but I couldn't found original yield value about coal.
 
Vanilla game has so many stupid attacking type stuff.
For example:
Even horse archers or frigates can attack stealth bombers and damage them. Stealth bomber flies thousands of feet above them in real life. Only jet fighters should be able to attack them.
Modern army tanks and other armored units can be damaged even by bows...
Helicopters shouldn't attack aircraft and aircraft bombers shouldn't bomb helicopters.
Any armored unit can only be damaged by a specific attacking type, not by bows or swords.

I want to change these kind of attacking and defending types. Can I do that through modding in game's xml or lua files?
 
  1. You should really ask your questions in the main Creation & Customization forum rather than on this thread. Very few people actually monitor what is being asked on this thread.
  2. Resource amounts are listed in folder C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V\assets\DLC\Expansion2\Gameplay\XML\Terrain (for BNW) under table <Resource_QuantityTypes> that are found in files CIV5Resources.xml, CIV5Resources_Inherited_Expansion2.xml, CIV5Resources_Expansion2.xml, but these amounts are actually also generally hard-coded into the various map-generating lua files such as AssignStartingPlots.lua, so these resource-amount settings within the xml-files are pretty much ignored by the game-code that actually places resources on the map.
  3. Detecting combat is nearly impossible in any reliable way without C++/DLL level modding.
    • You can't change the game's damage-dealing behavior with xml
    • There's nothing reliable provided to lua that can catch combat except for when a unit is killed.
 
I am doing some simple XML changes, but I built the mod and moved it to the folder Documents/My Games/Civ...V/MODS/[MyMod], but it doesn't seem to load according to the Civilopedia. And yes I hit "Mods" in the main screen, green check my mod, and load the game so I can access the supposedly modded game and it's Civilopedia. Anything I'm doing wrong? Thanks
 
Anything I'm doing wrong? Thanks

Without the actual mod it's impossible to tell.

Start a thread in the main Creation & Customization forum, attach your mod (see the second link in my sig) and ask your questions
 
It's a massive document so it may take a while to load. I would highly recommend you save it local.

Moderator Action: ATTENTION, this guide is not anymore up to date, many parts are outdated. Not all is outdated, many things are still worthwile to read, but not everything. So if you have problems following the guide, then this might not be because you don't see the problem, but because this part might just be wrong now. If you encounter problems within this guide, then please create a thread in the main modding forum to ask for help.
Download: Modders Guide to Civilization V

If the Modder's Guide is helpful to you please think about providing a little documentation of your own. Start a thread here and document the process you figured out to make something cool happen. The temptation is to keep our cool little tricks to ourselves, so that our mods are more unique, this is a mistake. The mods we can make alone are time consuming and limited. The mods we can create together are incredible.

Have Fun!


Disclaimer:
My PM box flowth over. There are lots of great people trying to create mods right now and I know you may be stuck and want help (trust me I feel your pain, imagine when Dale and I were first doing it and trying to teach ourselves). But I can't keep up with the requests. I do want to help, which is why I spent so much time writing this guide.

But I would recommend rather than PMing me that you post your questions publically in the Civ5 - Creation & Customization forum. Chances are other people are wondering what you are, and that someone will be able to answer a lot faster than I can.​

Other tools:

Hello, dear Kael, I have read your Modders Guide recently, I want to translate this English Guide into Chinese. Also, during my moding, I did found several mistakes ( I konw that they might work well ever but now out of date ), So I will add comment behind my translation.

Is that OK?
 
Top Bottom