Question about editing existing Civs

TheManFromMars

Warlord
Joined
Oct 25, 2010
Messages
102
Hello all,
I was wondering if someone could answer a question i have about modding an existing Civ.

I can make new civs just fine but I've never edited an existed one, thought it'd be easy and thought again. I've found next to no material on it and the info in the modders guide on updating and deleting elements seems convoluted at best.

Is there a "replace" function in the XML?

Basically I want to do the following:
Change the trait to a custom one I've made
Replace the Ship-of-the-Line with a unique building
Tweak the stats of the Longbowman slightly

It's pretty basic stuff but for some reason I can't figure it out. I want to modify it so I keep all it's speech, music and Dawn of Man sound etc and because it should be much less work. Plus I don't want two English Civs running around.

Hopefully it's clear and any help would be greatly appreciated as always.

EDIT: To clarify I'm looking for information on how to replace things in XML, perhaps a test sample of code for say replacing a trait. I'll work the rest out, I'm just stuck on the starting line right now.
- Mars
 
Give England America's trait

Code:
<GameData>
  <Leader_Traits>
    <Update>
      <Where LeaderType="LEADER_ELIZABETH"/>
      <Set TraitType="TRAIT_RIVER_EXPANSION"/>
    </Update>
  </Leader_Traits>
</GameData>

or in SQL
Code:
UPDATE Leader_Traits SET TraitType='TRAIT_RIVER_EXPANSION' WHERE LeaderType='LEADER_ELIZABETH';
 
Thanks for the quick reply WHoward.
I'll give it a go, hopefully the replacing of the unit is just as easy.

EDIT: By the way, is there any advantage or disadvantage to using SQL instead of XML or vice versa?

Cheers, Mars
 
Hey WHoward,

Somewhat ressurrecting this post - but rather than PM you I thought it might be helpful for anyone to see the thread and get this answer (hopefully) to the question I have.

I replaced the Trait just fine, but what I was unable to do was replace the unit with the building. You kindly linked to a mod where this had been done before - however all those mods seem to be in .civ5mod format and I've not a clue how to open them - I could just be being a little bit thick but there you go.

I thought that file was something the game read, not something I could open in mod buddy or dissect externally to see the code. So I've been unable to learn from the file you pointed to.

Would it be possible to show me some sample code in XML or SQL for replacing an existing Civs Unique Unit with a new Unique Building? Or point to a file that i am able to read, or even explain how to open said file? The first is my preference but any help would be appreciated.

Thanks again for your continued help,
Mars
 
Would it be possible to show me some sample code in XML or SQL for replacing an existing Civs Unique Unit with a new Unique Building? Or point to a file that i am able to read, or even explain how to open said file? The first is my preference but any help would be appreciated.

I know there's a few mods on Steam (or at least, there used to be? I haven't checked lately) that replaced some of the UUs in civs that had two with UBs. (For example, replacing the American B-17 with a Ranch.) So you could potentially look for those for an example.

I suspect adding the new UB would be easy, as by default XML just adds the new elements to the tables. The trickier part would likely be deleting the existing UUs.
 
Back
Top Bottom