Modders Guide to Civilization V

If you're changing actual in-game setup screens, that won't work as a mod.

As I'm reading through this pdf file (very nice by the way) and I create a new XML file with code reading as an example:

<GameData>
<Units>
<Update>
<Set Moves="1"/>
<Where UnitType="UNIT_WARRIOR"/>
</Update>
</Units>
</GameData>

Warrior moves 2 steps. Am I doing something wrong again? :)



Nice work.

No does anyone know if there is a place like MSDN to view the posible XML tags and other standard definitions or is back to the (good) old try and fail?

heh, I second that.
 
Nice work.

No does anyone know if there is a place like MSDN to view the posible XML tags and other standard definitions or is back to the (good) old try and fail?

I haven't found anything yet, so I've been using a combination of digging through the Table Browser in Tuner while debugging and grepping the Assets directory with keywords to try finding what I want to know.

After I've had some time to acquaint myself with the infrastructure I will probably start putting together some documentation for myself, maybe doxygen style, that I would be more than happy to put up the results of on the Civ 5 Wiki if no one beats me to it.
 
Well if no one know maybe someone should anoy Firaxi enough to give it to us... after all they must have it somewhere... *Heads for official Civ V forum to anoy someone with a 2k name*
 
Thanks for the guide! I've used it to publish a mod already, so really, a big thanks (it would have taken me MUCH longer to figure it all out on my own).

Few questions though. Dale, you said

If you're changing actual in-game setup screens, that won't work as a mod.

So, I made a mod that added a new gamespeed, and I could get it to add it if you go into advanced setup, but are you saying that there is no way to add it in the basic game setup screen?

And, any plans to make a Tuner guide? I understand that you can use it to make changes as the game is playing, but it seems very incomprehensible to me currently (I couldn't even get it to connect).
 
So, I made a mod that added a new gamespeed, and I could get it to add it if you go into advanced setup, but are you saying that there is no way to add it in the basic game setup screen?

If you're adding stuff to existing menu parts, such as a gamespeed, it should just show up (in advanced yes, not sure about the easy menu). But if you want to add a new part to the menu screens, such as "Choose Planet" with a list of planets to choose from, then you can't add that via a mod.

And, any plans to make a Tuner guide? I understand that you can use it to make changes as the game is playing, but it seems very incomprehensible to me currently (I couldn't even get it to connect).

I'll write a tutorial in blog soon. Just so much on my plate it may take me a month to catch up. :D
 
This is excellent! I didn't buy Civ5 for what Firaxis brought to the table, but what this mod community would eventually put out. I'm really glad to see Kael in the thick of things again. Thanks for the .pdf! Will go through it and the tutorial blogs mentioned in thread after work...
 
If you're adding stuff to existing menu parts, such as a gamespeed, it should just show up (in advanced yes, not sure about the easy menu). But if you want to add a new part to the menu screens, such as "Choose Planet" with a list of planets to choose from, then you can't add that via a mod.



I'll write a tutorial in blog soon. Just so much on my plate it may take me a month to catch up. :D

So, does that mean that all of the cool overhaul mods for Civ IV that changed all of the menu screens and what-not can't exist anymore? No more having weird (awesome) music play with a strange demon background when loading up FFH?
 
Nice work.

No does anyone know if there is a place like MSDN to view the posible XML tags and other standard definitions or is back to the (good) old try and fail?

The best place to view the XML tags is at the beginning of the files (for everything except for leaders, leaders have a separate file for it). The schema listed at the beginning of each XML file lists all the possible attributes for that object type.

I also started an XML reference here: http://wiki.2kgames.com/civ5/index.php/XML_Reference. But besides some base file definition stuff the only XML I've gone through in detail is the leaders files. Other people should be able to update this and add their own information so there is a more complete XML reference.

As I'm reading through this pdf file (very nice by the way) and I create a new XML file with code reading as an example:

<GameData>
<Units>
<Update>
<Set Moves="1"/>
<Where UnitType="UNIT_WARRIOR"/>
</Update>
</Units>
</GameData>

Warrior moves 2 steps. Am I doing something wrong again? :)

That looks pretty good to me. Did you add an UpdateDatabase definition for your new file on the Actions tab of your mod's properties?
 
Nice work, this is a very nice reference :). I was slightly saddened to see you weren't going to cover source modding though, as that's one aspect I was interested in. Is the source code for the main game engine that the Lua scripts hook into available, and if so, where is it?

EDIT: Just looked through the wiki and I think I've found the answer in the Known Limitations section:
DLL Modding
DLL modding is currently not supported. A future patch will be coming later this year or early next year which will remove this limitation.
 
very nice guide
 
That looks pretty good to me. Did you add an UpdateDatabase definition for your new file on the Actions tab of your mod's properties?

I did, and I'm at work at the moment; Steam is blocked :( I think I typed the correct path it was looking for, but to be on the safe side what is the correct file path header to put in?
 
I did, and I'm at work at the moment; Steam is blocked :( I think I typed the correct path it was looking for, but to be on the safe side what is the correct file path header to put in?

That depends on the name and location of the XML file you created. If you created an XML folder in your mod and created a new file in that folder called Warrior.xml then your actions tab should have:

OnModInitialized UpdateDatabase XML/Warrior.xml
 
I did, and I'm at work at the moment; Steam is blocked :( I think I typed the correct path it was looking for, but to be on the safe side what is the correct file path header to put in?

I know, right? I'd be learning how to mod at work if Steam wasn't blocked...
 
Top Bottom