Page 1 of 1

New xml questions.

PostPosted: Tue Aug 23, 2011 12:42 am
by koontz1973
A couple of xml questions.

Now that I have got the map into the final forge, xml needs to get done. I am going to use chipv online xml maker.

1.On the map in each region/iButho (I believe that these need to be programmed as continents), I have a chieftain that needs to be held to get the bonus. The bonus is hold 2 territs in the region and get +2, hold 4=+4, so on and so on. Using the above, how do I get this into the xml?

2.The territs inside the 150 yard line lose 1 territ per round. How does this get programmed in as well?

If this cannot be done in the above program, can you point me towards an xml that has been written with these in so I can study it.

Thanks.

Re: xml time (help questions)

PostPosted: Tue Aug 23, 2011 12:49 am
by natty dread
What time is it? XML time!

koontz1973 wrote:1.On the map in each region/iButho (I believe that these need to be programmed as continents), I have a chieftain that needs to be held to get the bonus. The bonus is hold 2 territs in the region and get +2, hold 4=+4, so on and so on. Using the above, how do I get this into the xml?


You need somewhat complicated continents to accomplish this.

I suggest you take a look at my Korea map's XML. Load it in the XML Wizard maybe. There's a pretty analoguous bonus scheme there with the capitals (you need to hold a capital to get a bonus for each kingdom's territories) so when you figure that out, you should be able to do the same for your map.

http://www.fileden.com/files/2010/2/7/2 ... korea7.xml

Basically, you have the continents with each having "1 x territory", "2 x territories" and each giving a 0 bonus. Each contain all the territories of a kingdom, and a <required>-tag corresponding to the number of territories. Then you have continents "1 x territory & y", "2 x territories & y" which give a bonus. These also have <override> tags so that each incremental bonus overrides the last one. "1 x territory & y" contains the continent "1 x territory" and the territory "y", with no required tags...

koontz1973 wrote:2.The territs inside the 150 yard line lose 1 territ per round. How does this get programmed in as well?


Autodeploy with negative value.

For example, look at pretty much any territory on my Antarctica map... here's the XML:

download/file.php?id=142

Re: xml time (help questions)

PostPosted: Tue Aug 23, 2011 1:28 am
by koontz1973
Thanks natty.

The Antartica map looks pretty straight forward. Figured out the most things but how the hell did you come up with the 3 Kingdoms xml. That is going to take a while to study.

Re: xml time (help questions)

PostPosted: Tue Aug 23, 2011 1:46 am
by natty dread
koontz1973 wrote:The Antartica map looks pretty straight forward. Figured out the most things but how the hell did you come up with the 3 Kingdoms xml. That is going to take a while to study.


I created the first continents of each series with the XML wizard, then loaded the XML to notepad and duplicated each continent as needed and just edited the numbers for each. Then checked for errors in the wizard.

Re: xml time (help questions)

PostPosted: Tue Aug 23, 2011 2:50 am
by koontz1973
From what I gather with with the 3 kingdoms xml, I need to,

1. Set up the chieftains as there own continent with there auto deploy of 2.
2. Set up the each region with its own bonus of 0, structure of required 2, 4, 6, 8 .......
<continent>
3. Then set up the bonus requiring both.

So it should look like this.

<continent>
<name>Mpande</name>
<bonus>2</bonus> (this is the chieftains auto deploy bonus)
<components>
<territory>Mpande</territory>
</components>
</continent>
<continent>
<name>Mpande2</name>
<bonus>0</bonus>
<components>
<territory>Siphelele</territory>
<territory>Sifso</territory>
<territory>Kuhlek</territory>
<territory>Nkosin</territory>
</components>
<required>2</required>
</continent>
<continent>
<name>Mpande4</name>
<bonus>0</bonus>
<components>
<territory>Siphelele</territory>
<territory>Sifso</territory>
<territory>Kuhlek</territory>
<territory>Nkosin</territory>
</components>
<required>4</required>
</continent>
<continent>
<name>2 Mpande Territories & Mpande</name>
<bonus>2</bonus>
<components>
<territory>Mpande</territory>
<continent>Mpande2</continent>
</components>
</continent>
<continent>
<name>4 Mpande Territories & Mpande</name>
<bonus>4</bonus>
<components>
<territory>Mpande</territory>
<continent>Mpande4</continent>
</components>
<overrides>
<override>Mpande2</override>
</overrides>
</continent>

Re: xml time (help questions)

PostPosted: Tue Aug 23, 2011 3:03 am
by natty dread
#1 is incorrect. You don't define autodeploys in continents, you do it in the territory tags. Refer to documentation...

So you don't need a continent for the chieftain. You have the chieftain territory, in which you have the <bonus> tag for autodeploy. It's a bit confusing since the <continent>s also use the <bonus> tag, however if you create a continent for only the chieftain and define a bonus there, it won't be an autodeploy, it will be a regularly deployed bonus.

#2 and #3 are correct.

Re: xml time (help questions)

PostPosted: Tue Aug 23, 2011 4:24 am
by koontz1973
natty_dread wrote:#1 is incorrect. You don't define autodeploys in continents, you do it in the territory tags. Refer to documentation...

So you don't need a continent for the chieftain. You have the chieftain territory, in which you have the <bonus> tag for autodeploy. It's a bit confusing since the <continent>s also use the <bonus> tag, however if you create a continent for only the chieftain and define a bonus there, it won't be an autodeploy, it will be a regularly deployed bonus.


So I just remove the continent part for the chieftain and that should work.
show: remove this

The territory tags are very close to the end of the xml so do I need to do something before the continent tags for it to be recognised as part of the bonus structure.

Re: xml time (help questions)

PostPosted: Thu Aug 25, 2011 8:07 am
by koontz1973
New question. Is it possible to programme in 3 different sets of positions.

1. for the territs surrounding my chieftains. Max of 5.
2. for the river warriors so no one starts with a bonus. Max of 3
3. for the 150 yard troops, so all players start with an equal amount losing 1 territ.

This is the last thing I need to solve before running it through the xml checker.

Re: New xml questions.

PostPosted: Thu Aug 25, 2011 9:19 am
by koontz1973
xmlParseEntityRef: no name

THis came up when I checked the xml. What does it mean?

Re: xml time (help questions)

PostPosted: Thu Aug 25, 2011 3:49 pm
by Victor Sullivan
koontz1973 wrote:New question. Is it possible to programme in 3 different sets of positions.

1. for the territs surrounding my chieftains. Max of 5.
2. for the river warriors so no one starts with a bonus. Max of 3
3. for the 150 yard troops, so all players start with an equal amount losing 1 territ.

This is the last thing I need to solve before running it through the xml checker.

No, you'll have to group things... Hm, I'll ponder on some good groupings.

-Sully

Re: New xml questions.

PostPosted: Thu Aug 25, 2011 3:51 pm
by Victor Sullivan
koontz1973 wrote:xmlParseEntityRef: no name

THis came up when I checked the xml. What does it mean?

I'd guess something's not named. Could you perhaps PM me what you have so far? I'd be interested in checking your work.

-Sully

Re: New xml questions.

PostPosted: Thu Aug 25, 2011 4:00 pm
by cairnswk
Victor Sullivan wrote:
koontz1973 wrote:xmlParseEntityRef: no name

THis came up when I checked the xml. What does it mean?

I'd guess something's not named. Could you perhaps PM me what you have so far? I'd be interested in checking your work.

-Sully

Sully, i sorted this one for koontz1973....the XML Wizard does not like ampersands.

Re: New xml questions.

PostPosted: Thu Aug 25, 2011 8:00 pm
by Victor Sullivan
cairnswk wrote:
Victor Sullivan wrote:
koontz1973 wrote:xmlParseEntityRef: no name

THis came up when I checked the xml. What does it mean?

I'd guess something's not named. Could you perhaps PM me what you have so far? I'd be interested in checking your work.

-Sully

Sully, i sorted this one for koontz1973....the XML Wizard does not like ampersands.

Ah, I see.

-Sully

Re: New xml questions.

PostPosted: Thu Aug 25, 2011 11:30 pm
by ender516
XML in general is very particular about ampersands. I did think, though, that the Wizard had been punched up to cope with ampersands typed into names.

Re: New xml questions.

PostPosted: Fri Aug 26, 2011 1:32 am
by koontz1973
All finished now and up in the correct place for inspection. Thanks to everyone for the help especially cairnswk who took a look at it and natty_dread for allowing me to copy his bonus formula. =D> What a b***h that was to do. Next map, simpler. :D