Mod help, Changing yields

Chiyochan

King
Joined
Jul 28, 2007
Messages
710
Location
Chiyochan's Country
I read through the moddersguide.pdf file and it seems youre expected to change mod files now by updating them wth bits of programming like logic that tells it to look for a bit of file and update it in game. while this makes files much more compatible, It looks like alot of work compared to scrolling down through the old XML files and changing a single number, is there an easier way to do this?
 
bumped
 
again.
bump
why does everyone always ignore only my questions.
 
I'm not sure what you mean. It depends on what you want to do.

Like say I want to change the base yield for a coastal plot from 1 food, 1 gold to 1 food, 2 gold. I could either copy the entire Civ5Terrains.xml into a new .xml file in the mod and change the values, or I could make a new .xml file and just write in the following:

Code:
<GameData>
<Terrain_Yields>
   <Update>
      <Set Yield="2"/>
      <Where TerrainType="TERRAIN_COAST" AND YieldType="YIELD_GOLD/>
   </Update>
</Terrain_Yields>
</GameData>

Then add that new file to the actions list with UpdateDatabase. If you copy the entire file over and change it you don't have to do this step.

Either way will work, although using the update method is probably better because it'll be more compatible with other mods.
 
I just want to know if theres a way to do the latter that is as EASY as modding terrain with xml, or do I have to open every XML by hand and compare the xml to the commands every time i want to change something.
 
Well, it's not really hard to do things the proper way. It's a trivial amount of extra work for massive savings in headaches later on down the road. I'm sure you can just open up the XML, change the numbers to what you want, and overwrite the core game files. But nobody would recommend that as a credible solution. It really is just plain better all round to take the time to do things right.

And if you want an answer to the question of why people always ignore only your questions, perhaps it's because implying unfriendly implications about people makes them less inclined to want to help? Or perhaps it's because, believe it or not, sometimes people don't actually have an answer.
 
@Cope I've tried using the AND operator for updating leader flavors but I get an error "Missing attribute value on attribute 'AND'"

Is there some other way to do this, or is this the sort of error I can just ignore? Sadly I can't check if it actually works since it's editing the AI under the hood ..
 
Well, it's not really hard to do things the proper way. It's a trivial amount of extra work for massive savings in headaches later on down the road. I'm sure you can just open up the XML, change the numbers to what you want, and overwrite the core game files. But nobody would recommend that as a credible solution. It really is just plain better all round to take the time to do things right.

And if you want an answer to the question of why people always ignore only your questions, perhaps it's because implying unfriendly implications about people makes them less inclined to want to help? Or perhaps it's because, believe it or not, sometimes people don't actually have an answer.
except that such 'unfriendly implications' as you put it only occur after the page is knocked off the front page twice ignored.

anyway looks like the answer is no, this is going to be fun I suppose then.
 
@Cope I've tried using the AND operator for updating leader flavors but I get an error "Missing attribute value on attribute 'AND'"

Is there some other way to do this, or is this the sort of error I can just ignore? Sadly I can't check if it actually works since it's editing the AI under the hood ..
Oh.. good question. I haven't used it yet for anything, I just assumed it would work that way since it's such a basic part of SQL. Maybe you have to put each condition in separate <where> tags.
 
Back
Top Bottom