Civ 5 Modding Quick Start

Gun Urra

Chieftain
Joined
Aug 21, 2006
Messages
8
A few points about Civ 5 modding that could be useful to old timers, like me, who are more familiar with Makefiles than IDEs. As far as I can tell, these points are not explicitly mentioned in current version of existing documents.

To run Civ5 with mods, after enabling the mods, start "Main Menu -> Mods -> Single Player" not "Main Menu -> Single Player"

Some mods require clicking the "Load Scenario" button found in the "Main Menu -> Mods -> Single Player -> Set Up Game -> Map Type" entry. If you click "Advanced Setup" in the "Set Up Game" menu, you won't be able to "Load Scenario".

ModBuddy is an IDE built upon Visual Studio 2010. As with writing an app in Visual Studio, to start writing a mod, you need to first start a project. For example, to tweak an existing mod, start a new project, then add the files from the existing mod into the project. Read Derek "Kael" Paxton's Modders Guide. Pay attention to Kael's discussion on specifying the "Actions" that actually load the files in your mod into Civ 5's SQL database. The "Actions" tab can be found under a project's "Properties".

Assuming your Civ 5 and ModBuddy are set up to use
C:\Users\<your userd id>\Documents\My Games\Sid Meier Civilization 5\
as the user data directory (<USERDATADIR>):

To test your mod, first "Build" it in ModBuddy. ModBuddy automatically "installs" your mod. For example, if your mod project is called "Mymod," ModBuddy will install it in "<USERDATADIR>\MODS\Mymod (v n)". Then when you "Browse Mods" in Civ 5, "Mymod" will show up as an installed mod, which you need to "Enable" by clicking on the enable button.

The (Firaxis) Tuner (part of the Civ5 SDK) is a "remote" debugger. To use it,
1. modify the file <USERDATADIR>\config.ini to set
EnableTuner = 1
2. start the Tuner (from the Civ5 SDK menu)
(it will say "Disconnected" at the bottom.)
3. start CivV, after awhile the Tuner should say "Connected"
and CivV states will start showing up.
You'll need to tell your network firewall to allow connection between the two processes over the local network.

Hope that's helpful to some.
 
Thank you for this. I'm trying to learn how to mod Civ 5 -- specifically, mod the logic (Lua). A lot of the basics (that you give here) are not given in a lot of the guides available. A lot of this stuff I had to figure out through trial and error, looking around, and so forth. We need a tutorial that shows how to make a basic Lua mod from start to finish, assuming very little about what a person knows (assume they know basic computer operation and the basics of programming in Lua, but assume nothing in regards to Civ5 modding specifics).

One error in your guide, though: you called the user data directory the "game directory". The game directory would be where the game executable and other core files are stored. The user data directory that you gave holds information specific to users -- save files, configuration, mods, and so forth.

You should add your guide to the various modding wikis, since that's what the wikis are there for, though no one has really started to add much of any information to them. I would add information, but I know very little, myself, right now.
 
A few points about Civ 5 modding that could be useful to old timers, like me, who are more familiar with Makefiles than IDEs. As far as I can tell, these points are not explicitly mentioned in current version of existing documents.

You noticed that, too, huh? I was basically told I was stupid for pointing it out.

To test your mod, first "Build" it in ModBuddy. ModBuddy automatically "installs" your mod. For example, if your mod project is called "Mymod," ModBuddy will install it in "<USERDATADIR>\MODS\Mymod (v n)". Then when you "Browse Mods" in Civ 5, "Mymod" will show up as an installed mod, which you need to "Enable" by clicking on the enable button.

This part doesn't work. The "Build" step worked, but it still doesn't show up in my list of available mods. I don't want to publish it to the cloud until I can at least verify that it works. But, I can't figure out how to "publish" it to myself. Any ideas?
 
There are two problems that can appear similar.

The first is that for some of us, don't know which or why, ModBuddy does not copy the build to the installed mods folder, thus requiring that you copy it manually from the ModBuddy build directory. I'm guessing it's a settings issue, but I've never bothered looking into it.

The second is a refresh problem with the mod selection screen such that a copied mod doesn't show up in the list. The link provided by Iceco above can tell you all you want to know about that.
 
There are two problems that can appear similar.

The first is that for some of us, don't know which or why, ModBuddy does not copy the build to the installed mods folder, thus requiring that you copy it manually from the ModBuddy build directory. I'm guessing it's a settings issue, but I've never bothered looking into it.

The second is a refresh problem with the mod selection screen such that a copied mod doesn't show up in the list. The link provided by Iceco above can tell you all you want to know about that.

I figured it out on my own, but I had BOTH of these problems (which made it a tad harder to debug). I had to manually move the mod/build to the main folder, and then I had to manually go "find" it. Interestingly, the second time the build showed up in the list by itself.
 
Interestingly, the second time the build showed up in the list by itself.

It's a 'race condition', which are among the most difficult to debug due to their inherent inconsistency. The afore mentioned link provides more than one solution to the problem, both of which touch on important extensibility features either in game or in tuner. It's worth a read. :)
 
Top Bottom