Mod buddy: So... we can't:

Dearmad

Dead weight
Joined
Aug 18, 2001
Messages
1,527
Take the units/xml, modify a bunch of numbers in it. Load it into modbuddy, and the build that as a mod?

I have to actually use the "replace" method? Which means crafting an entirely new XML?

Importing the XML's already from the game and modifying them is so much faster than this method. Especially when replacing lots and lots of numbers all over the place- :crazyeye:
 
Unless I'm mistaken, the 'replace' method of taking the existing XML and tweaking their numbers will work, you just need to duplicate the file in your mod. However, even when changing lots of numbers all over the place, it seems as though the Update tag will prove faster, since you can pretty quickly copy and paste the Update block and make a couple tweaks for each change you want to make. Doing so has the added bonus of making it easier to see what changes you made without scanning the entirety of the original file.

Have you read Kael's guide? It is a great asset for modding. The forum thread for it is: http://forums.civfanatics.com/showthread.php?p=9682679
 
Yes I did read it. And he goes over the update method thoroughly. But when I tried to use, for example, the gamespeed.xml and updated it wit ha new line (for a new gamespeed). There is no change in the game once I activate the mod. Also for the globaldefines.xml. simply changing the start date.

I wonder can anyone verify that you can use the original files and modify them?

I see your points, but to balance my mod quickly it's easier for me to work of the original files.

Anyone successfully done this?
 
edit nm, misread the OP
 
You can't use the original XML files and modify them.

The reason for this is to make mods modular. If we want 5 mods to run together we can't have them all provide their own copies of the units file and expect the game to sort it out. Instead each mod says exactly what it changes and those changes can be merged to work together.
 
I'm not going to help on your problem (I don't know really) but after reading Kael's guide and some other docs/posts maybe it should be good to highlight the need to use the update method above the others.

If I understood it right Civ 5 made the most to allow the inter-compatibility between various mods through the update method, so if you update something you're dealing with that and only that property, giving room to other mods live together updating other ones - while copying the xml would overwrite everything, each time a mod is applied on that node.

Am I mistaken? Just started on Civ script modding and that was I understood so far, sorry if I'm saying bull***t.

edit: ops, I was too slow writing - Kael already said it xD
 
Do we have to do a where for each set (set where, set where) of can we stack several changes on to one where (set set set set where)?
 
Do we have to do a where for each set (set where, set where) of can we stack several changes on to one where (set set set set where)?

You can stack them. So you can call Where Type="UNIT_WARRIOR" and the use Set any number of times. But the sets will only edit the record/s which match the where.
 
But when I tried to use, for example, the gamespeed.xml and updated it wit ha new line (for a new gamespeed). There is no change in the game once I activate the mod.

When adding a new element (like a new game speed, or unit, or civ) you must use ROW. When changing an existing element (like changing warrior strength, or America's starting tech) then use UPDATE.

Rule:
- Element Exists? Use UPDATE
- New element? Use ROW
 
What about if you're adding a new element to an existing element, such as a new <Culture> element to castles, for example. Perhaps it's just the use of the word 'element' that's slightly ambiguous for me...

I noticed in the database there's default values of 0, so simply use update and set?
 
What about if you're adding a new element to an existing element, such as a new <Culture> element to castles, for example. Perhaps it's just the use of the word 'element' that's slightly ambiguous...

I noticed in the database there's default values of 0, so simply use update and set?

Yeap, you got it. You can set attributes on objects even if they aren't specified int he base object description as long as that is a valid attribute in schema (in which case, just as you you suggested the attribute would be set to the default).
 
Top Bottom