Need for an XML guide!

K.F. Huszár

Warlord
Joined
Jan 26, 2004
Messages
267
Location
Budapest, Hungary
Please, dear CivFans,

I would like to change some values in the XML-s (e.g. increase the likelihood of a tsunami, weaken the overpowred Cristo Redento etc.)

Is there any guide how to understand XML files?

Thanks in advance!!!
 
on "how to understand"? Yikes. If you can't open the XML and get an idea of what's going on just by looking at it, that's kind of beyond the scope of a guide...possibly look in the creation/customization forum ---> might find what you want already, but also how to do it perhaps.

I just look at them and change them (in custom assets) on the off chance I want to modify the game, but if that's not easy for you you'll have to learn how to interpret that kind of stuff...I did it without formal training of any kind whatsoever though so you can probably figure it out if you try.
 
This page might help you, although it's incomplete.

Additionally, you may want to take a look at this post. Is there a file in particular that you want to work with?

Moderator Action: Moved to the Creation & Customization forum.
 
Thanks for hints. I am going to look thru them.

Otherwise, I CAN open xml files and I AM councious of what's inside - only for I am not an IT expert and get confused of the values there - e.g. I can see which value covers the likelihood of a random event, but I do not understand it, the meaning of it - what is 1? what is 2? And of course, I do not understand it as a whole.

So... it's good that all IT guys understand game mechanisms for the first look... we, the others (i hope there are some others beyond me :) ) ask kindly for your help :)
 
Didn't seen any post of you for a long time (did I only missed them?), so welcome back. Hope you have taken a look at the Magyar Mod, it has changed a lot.

I'd also suggest to look at the file Ginger posted first, it tells enough about which entry changes what.

but I do not understand it, the meaning of it - what is 1? what is 2?
That depends. A one could be a count value or simply mean yes. For example if you want to change a building to make it giving +1 on moral, then it is a count value. The 1 simply represents the +1. If you would change it to 2, then the building would give +2 Happiness. Such a count value is called an integer by professionals. Integer can also represent a percentage, which may be of interest for you since you want to change a likelihood.
There are also cases where 1 means yes, as I said before. Then it is a boolean and 2 would be illegal as value. 0 (=no) would be the only other value allowed. For example you could control whether a unit is able to found cities or not.
You can recognize if an entry awaits a boolean or an integer by taking a look at the first letter of that entry. If it is an i, like iHappiness, the value is an integer, if it is a b, like bFound, it is a boolean.
There are also other types. A string could symbolize a path to an artwork or an internal name of a tech, unit, building etc. Float (or real) values (0.1 for example) could also realize likelihood. A likelihood of 45% can be represented by an integer of 45 or a float of 0.45. But I actually don't know if floats occur in civ4's xmls.
In most cases it is okay to study other examples to get an idea about what could be a good value. To find out what an entry is about you may look at the file Ginger posted or compare with what civilopedia says about that particular object (the second way won't work if you are changing events, don't think their likelihood is mentioned in the civilopedia). If nothing helps you can ask here again, but try to be as most specific as you can be to make it as easy as possible to help you.
 
I learned just poking around the tutorial forum. There is a huge amount of good information shared in there.
 
Back
Top Bottom