Help with ModInfofile

Optional

Deity
Joined
May 22, 2007
Messages
2,935
Location
It Dockumer Lokaeltsje
I made a simple mod and would like to know how to get this in the game as a mod.
It is only a single XML file that is adjusted. I see where the mods are, and every mod consists of one or more files, but there's always a ModInfofile as well that tells the game to use these files and how.
I'm assuming that I need to make a ModInfofile for my mod to make it work. I looked at what is in these files, and some things seem simple, but there are also some long codes in there. This, for example, is the ModInfofile for the Treegrowth mod:
Spoiler :
<?xml version="1.0" encoding="utf-8"?>
<Mod id="1dd9a71f-8b9c-4e37-8dbd-298437091757" version="3">
<Properties>
<Name>TreeGrowth</Name>
<Stability>Beta</Stability>
<Description>Forests can now grow out into adjacent, suitable tiles. The rate of expansion is tied to the map speed and map size, although speed is the more significant factor. On a Marathon, Huge map, the chance of an appropriate tile growing a forest is roughly 0.05%, or 1/1950. On a Quick, Duel map, the chance is roughly 0.3%, or 1/335.</Description>
<Authors>Bhruic</Authors>
<AffectsSavedGames>1</AffectsSavedGames>
<MinCompatibleSaveVersion>0</MinCompatibleSaveVersion>
<SupportsSinglePlayer>1</SupportsSinglePlayer>
<SupportsMultiplayer>0</SupportsMultiplayer>
<SupportsMac>1</SupportsMac>
<ReloadLandmarkSystem>0</ReloadLandmarkSystem>
<ReloadUnitSystem>0</ReloadUnitSystem>
</Properties>
<Dependencies />
<References />
<Blocks />
<Files>
<File md5="28C7D3AEC1EA9754D3F0D8AB2D4EBF18">InGame.xml</File>
<File md5="D82364B06C76551BE7AD316245CAA91D">NotificationPanel.lua</File>
<File md5="DB16BFE8D0CF607A9122511F6E1A5E9D">NotificationPanel.xml</File>
<File md5="2B96CDBA2C6CA7FAA1AFB1105F3B6290">TreeGrowth.lua</File>
</Files>
<Actions>
<OnModActivated>
<UpdateDatabase>InGame.xml</UpdateDatabase>
<UpdateDatabase>Notifications.xml</UpdateDatabase>
<UpdateDatabase>NotificationPanel.xml</UpdateDatabase>
</OnModActivated>
</Actions>
<EntryPoints>
<EntryPoint type="Game Rules" file="">
<Name>TreeGrowth</Name>
<Description>Forests spread naturally</Description>
</EntryPoint>
</EntryPoints>
</Mod>
Most of this I understand, but where do these codes come from? Codes like for Mod id and the files that are referenced. How do I get those for my mod?

I scanned the modding guide and did a search for 'ModInfofile', but had problems finding what I was looking for.
 
you can use a custom Mod ID as long as it's unique, and the hash next to the file listed can be generated by any MD5 checksum generator.
 
I'm not getting on too well. I downloaded ModBuddy and I read Kael's modding guide.
I'm trying to do something simple, but it doesn't work. I wonder if someone could look at my effort to see what's wrong.

This mod is a simple adjustment to an XML file to get more barb camps. This can be done by changing the integers for "FogTilesPerBarbarianCamp" in the CIV5Worlds.xml. Each map size has its own integer. Lower an integer and you'll get more barb camps on that map type, it works, I've adjusted original files and noticed the effect in-game. But now I don't want to change the original files anymore, I like to have it as a mod. That's what the attached file is supposed to be.

It doesn't do anything, though. Testing is a little bit difficult, as the adjustments are slight. When I was testing I was changing the figures in my file drastically, so that I would notice the effect. Except there was never anything to notice; my files obviously don't do anything.
So could someone with more experience have a look at them to see what I've missed?
 
A few things I noticed:

1. It's better not to use the same names for your files as the original files.
2. Capitalization is (probably) important, so use "Update" and "Worlds" instead of "update" and "worlds".
 
One more thing I haven't noticed earlier: don't set VFS to true for files that update the database (like the one in your mod).
 
Import into VFS, in the file properties window (right side of the screen). According to your modinfo file, you set it to true for your XML file. It should be done only for files that replace the original files, not for those that update the database.
 
Changed it, it now works! I had little clue about that VFS setting, I just changed it to see if that made any difference - it had been on 'false' by default. I think the lack of capitalization was my original problem.
I've seen mods with file names that are similar to the original ones, so I don't think that was the problem.
Not sticking to the right case probably was. In Civ III it wasn't case sensitive, and that's where my only bit of modding experience is coming from. I didn't come across a warning in any of the guides. I think they're written by Civ 4 modders, and perhaps the files there were already case sensitive.
 
Back
Top Bottom