Can't quite get my mod to work - pls help

LewsFC

Chieftain
Joined
May 24, 2011
Messages
6
This is my first post but I've been lurking and reading a while. I'm trying to put in a simple mod of my own, but it never shows up. I'm probably making a simple stupid mistake.

As a test I'm trying to change the Barb Exp Cap. I can do it by directly modifing the game xml file in the xml root dir, so I know I have the right field. But when I try to mod it with ModBuddy and:

<GameData>
<!-- no limit on barb exp.-->
<Defines>
<Update>
<Set Value="2000"/>
<Where Name="BARBARIAN_MAX_XP_VALUE"/>
</Update>
</Defines>

<!-- honor 2x exp mod -->
<Policies>
-<Update>
<Set ExpModifier="100"/>
<Where Type="POLICY_MILITARY_TRADITION"/>
</Update>
</Policies>
</GameData>

Neither mod shows up. I can see the mod listed, and I check the box to the right and play single player from the mods men, and no changes.

I've clicked "build solution" and "build 'my project name'". Am I missing a local publishing step? Or do I have bad code that is getting rejected? Civ seems to see my mod, since I can select it (if I'm selecting it right). But my mod does nothing.

If anyone can shed some light on this I would appreciate it. I'm so close (I think). Hopefully a mouse click or two away. I've read enough xml files the last 2 days - I didn't look in the root of xml (for GlobalDefines.xml) until I had read about 100 posts. Most of this makes sense, it just doesn't work yet as a mod.

Cheers,
Lews
 
Is there actually a dash before the second <Update> in the xml file? That shouldn't be there.
 
You didn't say whether or not you did it, but from the context, I'm going to guess you didn't do the OnModActivated/UpdateDatabase. If you don't know what I'm talking about, you should go read Kael's beginner's modders guide over in the References section. (It's out of date in a couple areas, but it's still the best starting tool out there.)
 
There was a dash, which I removed and it didn't help.

I did read the mod guide, and I do have the Action OnModActivated, LoadDatabase with my file name. Is there a chance it can't find my file?

I appreciate the ideas. I know I'm close.

Cheers,
Lews
 
Is there a chance it can't find my file?

When you set up the OnModActivated/UpdateDatabase you're supposed to include path in the filename (path relative to the mod's root, that is). If you're not doing that, then it can't find the file.

But forget about conjecture. Zip up your mod file and attach it to your post, and we can look at it without having to guess about things it might be.
 
Thank you.

I was just trying for 3 simple mods to test my ability to make changes: change the barb exp limit, change the honor exp bonus policy, and let scouts buy upgrades to archer. I've tested each one by itself, and never see any changes in game play (but my new description always shows up).

I've zipped up the directory ModBuddy created for my project. At this snapshot I'm only trying to load the 2nd file, since I wasn't sure if a flaw in the XML file would break the whole file. The first file has the other 2 of my 3 attempted mods. I figure the scout one is probably wrong, but expected the other 2 to work.

When I added a 2nd XML file, the build still only saw one file. And when I broke the XML on purpose by changing one side of a tag, it still reported successful build. Both seem weird to me as I try to debug this as a noob.

Where is the text for a policy description stored?

Cheers,
Lews
 

Attachments

I've zipped up the directory ModBuddy created for my project.

First mistake: you zipped up the input directory, not the final mod. But that's okay, I can still work with that.

Second: the file is named "Game Rules2.xml" (note the space), but your OnModActivated command says "GameRules2.xml". This is the one that's killing you.

Where is the text for a policy description stored?

The text keys are all in the assets XML directory, under NewText/en_US/whatever.
 
Thank you very much Spatzimaus. That indeed did the trick. Now I know just enough to be dangerous.

Cheers,
Lews
 
Back
Top Bottom