Modders Guide to Civilization V

Kael's guide has been terrific for me, and I've done a lot using it so far.

My one problem has been the Civilization icon section. In general, I'm not very skilled with Photoshop or art editing programs, so that may be part of it, but I'm having a lot of trouble understanding what I'm doing with the .psd files and such.

I'm just not real clear on how I'm editing them, or what would be a good way to edit them. I found the blank .psd's he alluded to and such, I'm just sort of stuck on this step.
I can't help with photoshop, but I'm working on a quick guide to doing this with GIMP, including some GIMP versions of the templates (because they don't work straightforwardly out-of-the-box in the GIMP). Once I've got it up, it may be useful from photoshop as well (I have no idea to what extent the photoshop interface is different from that of the GIMP)
 
It seems that my version of Steam does not have a "Tools" nor "Library" section. Any search on my computer also reveals that there is no Mod Buddy. What do I do?
 
It seems that my version of Steam does not have a "Tools" nor "Library" section. Any search on my computer also reveals that there is no Mod Buddy. What do I do?

Well, you can either try to get your Steam working and download the SDK, or find an alternative download using your Google skills.

I personally would recommend the latter option.
 
Could you please make a video demo "How to Create a Mod" for ModBuddy, like you did for Civ4. Just a small one, to get started with this new program. Please!
 
Not that I dont appreciate the guide but can anyone post something for thoes of us who are brand new to modding and really need an idiots guide? I followed it as well as I could but its still not working for me. Rather then making a new Civ Id like to see how to do something really simple, like changing a units combat power or move rate. I saw the samurai example and understand it somewhat but I need to see a full out complete example like with the engineer specialist.

Its a very nice guide but I think its written for people who may have modded Civ 4 of have some knowlege, I'd like one just showing just how to do the most basic mods like your teaching your grand parents, so we can get a start and then move on to more advanced stuff later.

CrazyAce posted this:

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

Kael said it looked good, so I copy and pasted it into my xml, I went to action, did OnModActivate, UpDateDatabase, and then where the file is located... loaded the mod, and it doesn't work.. I just don't get what to do.
For those of you who, like myself, were trying the basic change the warrior's move to 1 or some such number and weren't getting anywhere, after much consternation I figured out what I was doing wrong...or what I wasn't doing. In the Mod Info screen of your mod in ModBuddy there are two options in Systems: Reload Landmark System and Reload Unit System. Well not knowing any better and not being aware enough that Reload Unit System plays a role in modding units (at least in my mind) I left these unchecked. Once I checked "Reload Unit System", my mod finally worked and was able to change the Warrior's move from 2 to 5.

And BTW the where statement above should be <Where Type="UNIT_WARRIOR"/> not <Where UnitType="UNIT_WARRIOR"/> ... well at least as far as I can tell.

Now I'm going to go on a rambling tangent...because I'm too old to stay up this late and post things

I'm sure someone else has covered this elsewhere since the XML is in effect being transformed into a database. Each line in the XML file that falls between <ROW></ROW> is the equivelant to a field in a database and the corresponding data assigned to that particular record for that field. So, in the exmaple above where it says <Where Type="UNIT_WARRIOR"/> "TYPE" is the equivelant of a field (or column if you lke. The SQL (don't beat me up to bad for my rusty SQL) equivelant would be "UPDATE UNITS SET MOVES = "1" WHERE TYPE = "UNIT_WARRIOR"

UPDATE table_name
SET column1=value, column2=value2,...
WHERE some_column=some_value

As you can see the the above SQL update statement encompasses the XML statement above
UNITS = table_name
<Set Moves = "1"/> = SET Column1=value
<Where Type="UNIT WARRIOR"/> = some_column=some_value

I say all this to illustrate the importance of spelling and referring to the right "column/field" and table (look into any of the core XML files and you will see a statement similar to this one "Table name = "Units">) as these are all explicit references.

Now, its 4 in the morning and I'm not sure why I said all that...but I'm happy cause I got the darn unit moves to change....
 
I have a snippet of LUA (a function I want to add as an event handler). Right now it's in its own file but I don't know how to cause it to be executed.

As I understand it, OnModActivated->UpdateDatabase won't work because it would need to replace an existing LUA file. Should I use a different action type? Or can I add it to the content tab? If so, what content type should I use? the UI ones and the others in Kael's tutorial don't seem right...
 
Hello, I feel a bit silly asking this, but I'm having a problem finding where the actual install directory for my Civilization 5 is so I can't find any of the XML files; where could it be?
I bought a physical copy of the game if that info helps at all.


Under the C drive in program files I have a 2K games folder... but it only has my Civ4 and colonization directories.

And then the "My Documents" section doesn't have an "assets" folder.

I right clicked my desktop shortcut for Civ5 to check the properties for a file path, but it says that it's only an internet shortcut.


Any advice? I tried doing a search on my computer, but it only turned up the files in the "My documents" section and my Civ4 Folders.

My apologies if this is a newb question.. ^^;
 
Okomakiako, the XML files should be in:

C:\Program Files\Steam\Steam Apps\common\sid meier's civilization v\Assets\Gameplay\XML
 
When I'm adding new files to Contents, it would sure be nice if I could load all files in a particular directory rather than list every single file (I'm working with >100 small .dds 2d art files). I don't suppose this is possible or anyone knows how to do it?

Alternatively, does anyone have any shortcuts for filling out these tables? Drag&drop doesn't work. copy/paste is kind of unreliable. It seems like I'm forced to type out each line, which just adds time and errors to the process.
 
When I'm adding new files to Contents, it would sure be nice if I could load all files in a particular directory rather than list every single file (I'm working with >100 small .dds 2d art files). I don't suppose this is possible or anyone knows how to do it?

Alternatively, does anyone have any shortcuts for filling out these tables? Drag&drop doesn't work. copy/paste is kind of unreliable. It seems like I'm forced to type out each line, which just adds time and errors to the process.
In my WIP resource mod, I don't list the DDS file for icons in the the contents at all, and it still works... not sure which files need listing and which don't. It seems the Lua files do, I'm told, although I haven't found what values the fields should be set to!
 
Anything which modifies the database (IE, XML and SQL files) need to be listed. New UI files are listed in a different section (EntryPoints, rather than Actions), but existing UI files (whether xml or lua) do not need to be listed in order to work.

And then new Lua files which add new events (such as Afforess's Active City Defense, where lua is used to damage units near a city with a certain building) also do not need to be listed in the modinfo; However, they must be listed in InGame.xml, one of the interface files. That file may be left unlisted without causing any problems.
 
And then new Lua files which add new events (such as Afforess's Active City Defense, where lua is used to damage units near a city with a certain building) also do not need to be listed in the modinfo; However, they must be listed in InGame.xml, one of the interface files. That file may be left unlisted without causing any problems.
Does this mean that InGame.xml is being replaced each time, or can multiple mods actually add new events?
 
Sadly, it means it's being replaced each time. Which is FAR from optimal.

However, only one new line is needed for any new Lua file... And if you list a file that doesn't happen to exist, it doesn't cause any errors (other than letting you know about it in lua.log).

This means that you can (and eventually will) have mods which do nothing more than allow multiple lua mods to be activated at one time.

IE, Mod A and Mod B both modify InGame.xml, and are thus incompatible. Then Mod C comes along, containing only a merged copy of InGame.xml which has content from both A and B. So long as you activated Mod C after the other two mods, both will be running alongside each other.

It is something I'm doing in v3 of the Economy Mod, to maintain compatibility with several Lua mods. ;)
 
And then new Lua files which add new events (such as Afforess's Active City Defense, where lua is used to damage units near a city with a certain building) also do not need to be listed in the modinfo; However, they must be listed in InGame.xml, one of the interface files. That file may be left unlisted without causing any problems.
And when you say "new events", does this mean ones added through LuaEvents.whatever.add()? That would really hamper the use of LuaEvents to make mods more modular, or even to use LuaEvents at all...
 
And when you say "new events", does this mean ones added through LuaEvents.whatever.add()? That would really hamper the use of LuaEvents to make mods more modular, or even to use LuaEvents at all...

Eh. I meant any non-interface Lua files.

Some example mods off the top of my head:

  1. Active City Defense - Adds a new lua file to damage enemies, or heal allies, near cities with certain buildings.
  2. Tree Growth - Adds a new lua file to enable a %chance for tree growth.
  3. Strategic View Turn Switcher - Uses a bit of lua to switch to strategic view at the end of a turn, which causes the AI turn to process faster (lower graphical requirements)

And yes, it seriously hamstrings modularity.
 
Hi,

I've almost finished my Civ,but one matter still bother me:
I can't get my civ icon onto "New turn" notification
Does anyone know how to do that?
 
There is a big hole in the "How to remove a resource" part of the guide, and the lack of "How to add a resource" is also terribly misleading.
Here's a Bob Thomas quote from this file:
Assets\Gameplay\Lua\AssignStartingPlots.lua
Be warned, there is NO automatic handling of resource balance and appearance for
new or modified resource types. Gone is the Civ4 method of XML-based terrain
permissions. Gone is plug-and-play with new resource types. If you remove any
types from the list, you will need to disable the hard-coded handling of those
types present in the resource distribution. If you modify or add types, you will
not see them in the game until you add them to the hard-coded distribution.
This means removing horses, as per the example, may result in very weird results at the map generation phase. It also means that new resources cannot be used unless you modify the map script.

-- Jon wanted a lot of changes to terrain composition for Civ5. These have
-- had the effect of making different parts of each randomly generated map
-- more distinct, more unique, but it has also necessitated a complete
-- overhaul of where civs are placed on the map and how resources are
-- distributed. The new placements are much more precise, both for civs
-- and resources. As such, any modifications to terrain or resource types
-- will no longer be "plug and play" in the XML. Terrain modders will have
-- to work with this file as well as the XML, to integrate their mods in to
-- the new system.
Again, this means that if you have 2 mods which each add a resource, then they both have to modify the same file and the result is the end user who wants to use both mods plus maybe a specific map script is screwed.
 
There is a big hole in the "How to remove a resource" part of the guide, and the lack of "How to add a resource" is also terribly misleading.
Here's a Bob Thomas quote from this file:
Assets\Gameplay\Lua\AssignStartingPlots.lua

This means removing horses, as per the example, may result in very weird results at the map generation phase. It also means that new resources cannot be used unless you modify the map script.


Again, this means that if you have 2 mods which each add a resource, then they both have to modify the same file and the result is the end user who wants to use both mods plus maybe a specific map script is screwed.
  • As long as your new map script uses AssignStartingPlots in the way the vanilla ones do, there's no worries about covering resource for that map
  • It is true that this forces non-modularity on resource adding mods. I'm working on an infrastructure modcomp that will allow modular adding of resources.
 
I finally installed ModBuddy, but I get the message that it "Cannot find some components. Please reinstall the application." What do I do?
 
Back
Top Bottom