Starting Units and XML????

Steiner-Davion

Warlord
Joined
Sep 9, 2005
Messages
201
Is there a line in the XML coding that determines how many and which units you start with? If so, where would I find it? Thanks in advance for any help.
 
CivIVCivInfos

Or something like that

It's beneath every civ, and it says <startingunit>1</startingunit> which is a boolean meaning that 1 is yes and 0 is no. Settler and palace are already there.

Or something to that effect.
 
Its in the CivilizationInfos. You can just copy the Settler text (which all civs start with) then paste it underneath and alter it to what you want. :)



The highlighted text is what I've added.
 
Is there a way to change how many of a certain unit you start with? I tried putting in multiple lines of the same unit, thinking that the 1 in the lines of code above was a true/false statement. Is it actually a number of starting units line? I tried to give myself an extra settler, by putting in another line of Free unit settler as described above, but only started with one. I put in a line for a free warrior and got 2 to start (1 free one, not previously listed and the one I put in myself).
 
Is there a way to change how many of a certain unit you start with? I tried putting in multiple lines of the same unit, thinking that the 1 in the lines of code above was a true/false statement. Is it actually a number of starting units line? I tried to give myself an extra settler, by putting in another line of Free unit settler as described above, but only started with one. I put in a line for a free warrior and got 2 to start (1 free one, not previously listed and the one I put in myself).

The 1 is the actual number. So if you want a second Settler, change the number associated to the Settler line to 2.

The Scouts/Warriors that civs start with must be in one of the other moddable files. If you'd put the Warrior line in for a civ that starts with a Scout, you'd have started with a Settler, a Scout and a Warrior. :)
 
Is there a way to change how many of a certain unit you start with? I tried putting in multiple lines of the same unit, thinking that the 1 in the lines of code above was a true/false statement. Is it actually a number of starting units line? I tried to give myself an extra settler, by putting in another line of Free unit settler as described above, but only started with one. I put in a line for a free warrior and got 2 to start (1 free one, not previously listed and the one I put in myself).

If it were yes/no (a Boolean variable) it would start with "b". It starts with "i" because it's an Integer variable.
 
Matty R and Weregamer,

Thanks for the valuable info. I truly appreciate it. I'm not much of a programmer (not one at all really) and this is all new to me. Thanks again. Can you guys recommend a good easy to learn and use xml and python editor?
 
Matty R and Weregamer,

Thanks for the valuable info. I truly appreciate it. I'm not much of a programmer (not one at all really) and this is all new to me. Thanks again. Can you guys recommend a good easy to learn and use xml and python editor?

Its no problem at all. I'm just glad I can help. :)

I only recently learnt about XML modding. I've spent hours and hours customising my XML files.

That image I provided in a previous post is from this. It seems quite simple to use. :)
 
I've tried various XML editors and am not super-happy with any of them. There are several free or free-to-individuals ones with slightly different feature sets and displays; there are threads with recommendations in the modding forum.

For python, you may just want to use Notepad, though a programmer's editor might provide syntax coloring or other niceties. Since I code for a living, I've so far avoided doing any Python modding but if I did I'd probably just use the free version of Visual Studio (if that still exists).

I've heard many people recommend "Notepad++" as a decent shareware editor that you could use for both, but I haven't used it.
 
Get the Python editor from www.Python.org. Its free and comes with the interpreter in case your computer doesn't already have it. Whereas XML would be really easy to edit in notepad Python uses indention to determine when a new statement begins.
 
Wow,. that XML that MAtty R showed was excellent. It led me to add another unit for India to start out with...A TANK!
However, that was in a file copy I created in the event I'm bored and wanna get an easy Conquest.
 
Top Bottom