Okay, so what's wrong with this?

Jabarto

Emperor
Joined
May 15, 2007
Messages
1,025
Location
Colorado, U.S.
I'm making a mod that replaces the Greek "Hellenic League" trait with a custom one. Thing is, Firaxis seems to have taken great pains to ensure that modders have to claw through hell to make even the most rudimentary mods function. So rather than spend yet another hour staring at my XML files, I'm just going to post them here and see if someone more knowledgeable than I can isolate the problem. I really would appreciate any help.

Spoiler :
Code:
<GameData>
	<Leader_Traits>
		<Update>
			<Set TraitType="TRAIT_GREEK_PHILOSOPHY"/>
			<Where LeaderType="LEADER_ALEXANDER"/>
		</Update>
	</Leader_Traits>
</GameData>

Spoiler :
Code:
<GameData>
	<Traits>
		<Row>
			<Type>TRAIT_GREEK_PHILOSOPHY</Type>
			<Description>TXT_KEY_TRAIT_GREEK_PHILOSOPHY</Description>
			<ShortDescription>TXT_KEY_TRAIT_GREEK_PHILOSOPHY_SHORT</ShortDescription>
			<PolicyCostModifier>-20</PolicyCostModifier>
		</Row>
	</Traits>
</GameData>

Spoiler :
Code:
<GameData>
	<Language_en_US>
		<Row Tag="TXT_KEY_TRAIT_GREEK_PHILOSOPHY">
			<Text>Reduces the culture cost of policies by 20%</Text>
		</Row>
		<Row Tag="TXT_KEY_TRAIT_GREEK_PHILOSOPHY_SHORT">
			<Text>Greek Philosophy</Text>
		</Row>
	</Language_en_US>
</GameData>
 
Let's see... did you, in the mod settings, add the lines that load the file you changed into the database? You need one such line per file. You either know what I'm talking about (yeah it's late here) or you should look it up in Kael's instructional pdf.
 
yea for making simple xml edits, honestly this is much more a pain in the ass then civ4 was.
 
Let's see... did you, in the mod settings, add the lines that load the file you changed into the database? You need one such line per file. You either know what I'm talking about (yeah it's late here) or you should look it up in Kael's instructional pdf.

Yes, but it still isn't working.

yea for making simple xml edits, honestly this is much more a pain in the ass then civ4 was.

It reminds me of the World of Civilization project for Civ 4. It too was obsessed with modular loading to the point that it ruined the very system it sought to improve. A pity that 2kGames took a page from them of all people.
 
Spoiler :
Code:
<GameData>
	<Leader_Traits>
		<Update>
			<Set TraitType="TRAIT_GREEK_PHILOSOPHY"/>
			<Where LeaderType="LEADER_ALEXANDER"/>
		</Update>
	</Leader_Traits>
</GameData>

Perhaps it should be:

Code:
<GameData>
	<Leader_Traits>
		<Update>
			<Where LeaderType="LEADER_ALEXANDER"/>
			<Set TraitType="TRAIT_GREEK_PHILOSOPHY"/>
		</Update>
	</Leader_Traits>
</GameData>
ie. first find the leader you'll be updating and then set the changes.
 
Perhaps it should be:

Code:
<GameData>
	<Leader_Traits>
		<Update>
			<Where LeaderType="LEADER_ALEXANDER"/>
			<Set TraitType="TRAIT_GREEK_PHILOSOPHY"/>
		</Update>
	</Leader_Traits>
</GameData>
ie. first find the leader you'll be updating and then set the changes.

That's actually how I did it the first time, but to be safe I tried it again just now. Still nothing.

For the record, I'm reasonably sure that doesn't make a difference because I've seen different mods do it both ways.
 
Another thing to mind is your own install of Civ5. Maybe the problem is not in your mod, but in the fact you may have changed the original XML leader files in the Steam folder, so your mod won't be able to properly update those files.
 
Screenshot your project (all folders open) with the actions tab on your mod properties and we will check it out.
 
I realized something earlier today. I created my xml document with notepad++, then moved it into the mod buddy/MY MOD/XML folder and even linked it correctly, did all the Action stuff, and it didn't work. Then I tried creating everything from scratch, all within the modbudy, folders, the xml file everything except my map. It had a neat little folder structure, you can guess the names. And boom it all worked perfectly. I swear I had them addressed correctly in the Action menu before, but the changes were not taking effect unless I created basically all the files from within mod buddy.
 
I realized something earlier today. I created my xml document with notepad++, then moved it into the mod buddy/MY MOD/XML folder and even linked it correctly, did all the Action stuff, and it didn't work. Then I tried creating everything from scratch, all within the modbudy, folders, the xml file everything except my map. It had a neat little folder structure, you can guess the names. And boom it all worked perfectly. I swear I had them addressed correctly in the Action menu before, but the changes were not taking effect unless I created basically all the files from within mod buddy.

That's a good observation. Back when I had the problem, I did two things at once: reinstalled civ and then replaced the added xml's all with ones created within ModBuddy (you can delete the comment line that says created by them), pasting my content.

At least one of those things solved my problem, will never know which :)
 
I'm at school right now (in the library, not skipping class ;)) so I can't post my project just yet, but I will in a few hours when I get home.

I realize I may have been a bit crass in my first post. I was in a really bad mood and I"m sorry if I came off as demanding. Thanks for all of the replies so far.
 
You slashes are backwards. It should be:

XML/Alexander.xml
 
You slashes are backwards. It should be:

XML/Alexander.xml

...that was it? Boy do I feel dumb. :blush:

It works now. Let this be a lesson to all prospective modders out there; never underestimate your capacity to mess the little things up.

My thanks to you, Kael, and everyone else. :)
 
indeed. I remember once on a civ4 mod a simple mispelling in an art define gave me a headache for nearly a week. It would just crash if you messed up an art define, never give you any error report or anything, so I just had to go back and look through every little thing I had did recently. It can suck.
 
Back
Top Bottom