Can we get a beginner's guide?

Daddicus

Chieftain
Joined
Aug 28, 2010
Messages
47
All of the information on this forum (that I can find) assumes you already know what you are doing. As a beginner, I need some very basic documentation. There are tons of information on what to change, including exact text.

But, how does one actually make the changes? We're not supposed to edit the game files, so where DO we make changes?

Don't tell me to read Kael's guide. It seems quite good, but doesn't cover the very basic stuff at all.
 
Don't tell me to read Kael's guide. It seems quite good, but doesn't cover the very basic stuff at all.

Go read Kael's guide again. It DOES cover the very basic stuff, assuming your definition of "very basic" is a bit more than "how to turn on a computer". The only headache is that the things in there aren't really in an easy-to-understand order, but it's all there.

Start with the XML modding section, specifically the following points:
> Set/Where/Delete syntax
> The OnModActivated command
With that, you can do all of the XML modding you need, and his guide lays it out well. It's only when you go to the advanced Lua modding that you'll need to go beyond that guide.

If you can't handle the basics in that guide, then modding probably just isn't for you.
 
Sorry, I'm probably not explaining myself well. Perhaps if I explain myself better:

I know how to program. I've been doing it for over 30 years and in somewhere around 25 languages (XML, unfortunately, is not one of them). That's not the problem.

The problem is that the tool's interface isn't obvious. I'll use some steps that I DO know to show what I mean (these are in the Guide, in fact, in a slightly different form):

To create a new project (assumes Mod Buddy is already open):

1) Click the "File | New | Project ..." menu.
2) Choose a mod type (i.e. click "Empty Mod", in this case, I think)
3) Click OK

Nearly the same steps can be used to create an empty file within the project. But, where do I put the XML code? I can't find anything telling me where to start typing. I've tried double-clicking, right-clicking, all menu items I could find that even remotely might be related, but I can't find how to open a code window. Nor can I figure out how to modify existing information (except by editing a copy of the original files).

Thanks for any help you can offer.

------------------

Once I figure those basics out, I'll have another question. This came up when I tried copying the original file into the mod's folder. I was able to get into the code for that file. But, I couldn't figure out whether I needed to add or delete lines, and which lines. My example is that I want to remove "map" from the list of possible goody hut values. Here's the settler/goody hut lines from the handicap file:

Spoiler :
<HandicapInfo_Goodies>
<Row>
<HandicapType>HANDICAP_SETTLER</HandicapType>
<GoodyType>GOODY_POPULATION</GoodyType>
</Row>
<Row>
<HandicapType>HANDICAP_SETTLER</HandicapType>
<GoodyType>GOODY_CULTURE</GoodyType>
</Row>
<Row>
<HandicapType>HANDICAP_SETTLER</HandicapType>
<GoodyType>GOODY_GOLD</GoodyType>
</Row>
<Row>
<HandicapType>HANDICAP_SETTLER</HandicapType>
<GoodyType>GOODY_MAP</GoodyType>
</Row>

<Row>
<HandicapType>HANDICAP_SETTLER</HandicapType>
<GoodyType>GOODY_TECH</GoodyType>
</Row>
<Row>
<HandicapType>HANDICAP_SETTLER</HandicapType>
<GoodyType>GOODY_REVEAL_NEARBY_BARBS</GoodyType>
</Row>
<Row>
<HandicapType>HANDICAP_SETTLER</HandicapType>
<GoodyType>GOODY_UPGRADE_UNIT</GoodyType>
</Row>
<Row>
<HandicapType>HANDICAP_SETTLER</HandicapType>
<GoodyType>GOODY_WORKER</GoodyType>
</Row>
<Row>
<HandicapType>HANDICAP_SETTLER</HandicapType>
<GoodyType>GOODY_SETTLER</GoodyType>
</Row>


I think what I need to do is remove the entries in red. But, again, we're told not to modify the original files. How do I tell the game the equivalent of "remove the red lines from existing file xyz"?
 
I know how to program. I've been doing it for over 30 years and in somewhere around 25 languages (XML, unfortunately, is not one of them).

This is understandable, because XML is not a programming language ;)


1) Click the "File | New | Project ..." menu.
2) Choose a mod type (i.e. click "Empty Mod", in this case, I think)
3) Click OK

Nearly the same steps can be used to create an empty file within the project. But, where do I put the XML code? I can't find anything telling me where to start typing.

In the solution explorer (the tab on the right of your screen) right-click on the name of your mod and then click "add" and "new file". A window will open, from there you choose "Game Rules (XML)".



Once I figure those basics out, I'll have another question. This came up when I tried copying the original file into the mod's folder. I was able to get into the code for that file. But, I couldn't figure out whether I needed to add or delete lines, and which lines. My example is that I want to remove "map" from the list of possible goody hut values. Here's the settler/goody hut lines from the handicap file:

Spoiler :
<HandicapInfo_Goodies>
<Row>
<HandicapType>HANDICAP_SETTLER</HandicapType>
<GoodyType>GOODY_POPULATION</GoodyType>
</Row>
<Row>
<HandicapType>HANDICAP_SETTLER</HandicapType>
<GoodyType>GOODY_CULTURE</GoodyType>
</Row>
<Row>
<HandicapType>HANDICAP_SETTLER</HandicapType>
<GoodyType>GOODY_GOLD</GoodyType>
</Row>
<Row>
<HandicapType>HANDICAP_SETTLER</HandicapType>
<GoodyType>GOODY_MAP</GoodyType>
</Row>

<Row>
<HandicapType>HANDICAP_SETTLER</HandicapType>
<GoodyType>GOODY_TECH</GoodyType>
</Row>
<Row>
<HandicapType>HANDICAP_SETTLER</HandicapType>
<GoodyType>GOODY_REVEAL_NEARBY_BARBS</GoodyType>
</Row>
<Row>
<HandicapType>HANDICAP_SETTLER</HandicapType>
<GoodyType>GOODY_UPGRADE_UNIT</GoodyType>
</Row>
<Row>
<HandicapType>HANDICAP_SETTLER</HandicapType>
<GoodyType>GOODY_WORKER</GoodyType>
</Row>
<Row>
<HandicapType>HANDICAP_SETTLER</HandicapType>
<GoodyType>GOODY_SETTLER</GoodyType>
</Row>


I think what I need to do is remove the entries in red. But, again, we're told not to modify the original files. How do I tell the game the equivalent of "remove the red lines from existing file xyz"?

This is well described in Kael's guide, Page 23
 
This is understandable, because XML is not a programming language ;)

True, but "language" is the closest word I can think of for it. In a way, it is a language. It's just not a PROGRAMMING language. :) Correction accepted!

In the solution explorer (the tab on the right of your screen) right-click on the name of your mod and then click "add" and "new file". A window will open, from there you choose "Game Rules (XML)".

THIS is what I was looking for. Thanks!!!
This is well described in Kael's guide, Page 23

Not precisely, but using the step you gave me above, I'll try a few things from this section in Kael's guide. I'm sure I'll eventually stumble upon it. :) Thanks!
 
OK, one MORE question: How do I get it to run on my installation? It doesn't show up in the list of mods available (although, someone else created one almost exactly the same as mine 3 days ago -- that one doesn't work).

I've done the "Build" step as per Kael's guide. But, I can't find any way to "publish" the mod to myself.
 
once build, the mod should be in "..\Users\YourUserName)\Documents\My Games\Sid Meier's Civilization 5\MODS\YourModName" and available in game in the "installed" panel of the mod section.
 
OK, figured that out. But, it doesn't work. So, now to debug ...

Thanks for your help!
 
I dunno about beginners guides but I have a tip from when I first started.

Kael says you should use file names similar to the originals, however I use lots of small files but knowing what each one does.

Say
xml/house.xml
xml/factory.xml
xml/granary.xml

Doing it this way means when you load your mod and something isn't working you'll know where the broken code is.

I initially started kaels way but massive parts of othe mod wern't working and I had no idea where to start to look, by putting everything in bite sized parts, Civ5 will load up the functioning files and not load the broken files. This way it'll be easier ot find the broken file when something you've just added doesn't start up.
 
If you enable logging in the settings file then most XML errors will pop up in the database.log file after you close the game. That's made it much easier for me to find missing/incomplete references and typos. It tells you which file has gone wrong and what key isn't working, so it's usually fairly simple from there.
 
If you enable logging in the settings file then most XML errors will pop up in the database.log file after you close the game. That's made it much easier for me to find missing/incomplete references and typos. It tells you which file has gone wrong and what key isn't working, so it's usually fairly simple from there.

Can you explain what you mean here? What settings file? (one of the INI files?) Also, where is the database.log file located?

Thanks!
 
Yeah, it's the config.ini file in ...Documents/My Games/Sid Meier's Civilization 5. Database.log is in ...Documents/My Games/Sid Meier's Civilization 5/Logs. (But it will only be there after you run the game at least once with logging enabled.) There are a whole load of logging settings in the config.ini file but I just set 'EnableLogging' and 'MessageLog'.
 
Back
Top Bottom