Dale's Mod Blog: Civ5 Modding Explained
by, 19-09-10 at 12:48 (363279 Views)
2K have released the Civ5 manual (you can find links to the manual in this site's Civ5 content or forum). With the release of the manual, came the game's credits. So it's no longer a secret that I've been involved with Civ5's development as part of the Frankenstein group. I have been helping the Firaxis team members who are creating all the modding components of Civ5.
To answer your PM's, yes that meant I've been playing Civ5, and NO I will not get you in (that's up to Firaxis to personally select and invite members of Frankenstein).
Now that's out of the way, let's get down to business. We've had little pieces of information at various times about Civ5 modding. Due to the nature of the tiny pieces being given out in such a big spread, there is a lot of confusion as to HOW Civ5 modding all fits together. I will explain the whole picture for you, in one simple blog post, so that you will have the entire picture of how Civ5 modding all fits together. (And let's hope I don't overstep my NDA by doing this ).
Disclaimer: I will not be posting screenshots of the tools yet (not till they're released) but I will show you a picture which shows how all the tools fit into modding and how modding fits in with Civ5 and other players.
For those who have read all the interviews, previews and reviews, there has actually been quite a bit of information about modding released. It's just not all in one place, nor is it apparent how it all ties in together. There are five main modding tools that every modder will be able to use.
The ModBuddy truly will become your modding buddy. The MB will allow you to generate a mod template, it is the actual IDE that you can use to edit XML, LUA and any other files you add to the mod (except images, explained later). The MB also packages mods for you and will allow you to upload them to the Mod Hub ready for other players. Versioning of your mod is all controlled by MB and all mod parameters are set within MB (for instance, setting other mod dependencies and exceptions). Yes, you can set in your mod what other mods it depends on and what other mods it doesn't work with (so the player will not be able to activate those mods if yours is activated in Civ5).
The much talked about external World Builder. The WB is a totally external application. The WB is similar to the Civ4 WB in that you can create maps and scenarios completely and save them out. But it's MUCH MORE! The new WB is a lot deeper in content and power. You can even tell WB to load a mod so that you can create a scenario based on a particular mod. I will go into much depth in my blog and will post a number of tutorials on how you can get the most out of this very powerful tool after release.
The Tuner is a very interesting mod tool, and let me just say it plays the part of mod debugging fantastically! The tuner is a real-time database manipulator and console of Civ5. It is an external program, but connects to the Civ5 database to allow you to edit the game in progress. However, the modder will find it's power in debugging. In your Lua scripts you can tell it to print to the Tuner console at any time. This allows you to check how variables are being manipulated by your scripts, plus also just to tag that certain parts of your code are reached in certain circumstances. Tuner also allows you to drill into the game database and set any XML field on-the-fly. Let me just say, that whilst you are testing your mod, you will have Tuner running in the background helping with the debugging. And with on-the-fly Lua editing you can check the Tuner's console for your debug info, edit the Lua on-the-fly then watch the changes inside Tuner.
The Nexis is Civ5's image import application. I myself haven't played much with this tool, but what I have seen it will become a powerful addition. With Nexis you will be able to import your graphics from typical applications and export them ready for Civ5. NOTE: There is a propriety DDS compressor in Civ5, so the rules for DDS images have changed. They MUST be uncompressed RGB images with alpha channel. Anything else will fail. The game automatically applies the relevant compression for the type of image that it is so you do not need to worry about it.
The Mod Hub is the central repository for Civ5 mods. The MH is hosted by GameSpy and yes, modders will have to have a GameSpy login to upload to the MH (the security to stop anyone from editing your mods). The MH is the link between the modder and the players. The modder will use MB to upload mods to the MH, and players in-game will use the Mod Browser to download those mods. The player can rate and comment (I believe) on mods too. The modder will be able to have a full description of the mod and attach a couple of screenshots to the mod as well to show off the best features of their mod. When a new version of the mod is uploaded to the MH then any player who has that mod installed will receive the new version. The modder can also set if the new version breaks saves, which will notify the player that their old saves are no longer applicable. One of the best things about the mod browser, is that during testing the modder can publish a mod to their system only, so when they go in-game the mod will be able to be activated as if they were a player who had downloaded their mod. This gives them 100% other player experience, from start to finish. The MH also eliminates all those pesky installation questions and problems as it is all automatic when the player enters the mod browser.
Bringing it all Together:
So how does the entire modding picture look for Civ5? Take a look at the picture below.
The modder will use Mod Buddy to create and edit XML and Lua files. This is done in MB's IDE. C++ coding will still have to be done in Visual Studio, but you can import the resultant file into Mod Buddy. Images are created in various applications and imported into Civ5 format through Nexis. These Civ5 ready images are then brought into Mod Buddy.
So the Mod Buddy is the central component to creating a mod. You create a new mod, bring all your files together and package and publish your mod through Mod Buddy. I told you it would be your new best friend.
During testing the modder will use Tuner to assist in debugging their mod. Using the Lua console and logging from your files, as will as on-the-fly database checking and editing, the modder will be able to debug their mod much faster using the Tuner than we ever could in Civ4.
After the modder is satisfied with the state of their mod (NOTE: you can set the state of your mod in Mod Buddy too so in the Mod Hub it shows as Alpha, Beta or Stable, as well as the version number!!!!), the modder then uses Mod Buddy to package and publish their mod to the Mod Hub. The player of Civ5 then uses Mod Browser to find and download the mod, which installs it automatically for them. The player then activates the mod and hey presto, the player is now playing your mod.
I could go into much more depth on each of the tools, but the purpose of this blog post was to give you the overall picture of how modding in Civ5 will work. I will eventually expand on each of the tools later in this blog, but that won't be till after release. I will also be posting tutorials on how to use these tools as well, so hopefully you'll drop by later to find out how to become a Civ5 modder too.