Conquer Club

XML bonuses question - overrides

Topics that are not maps. Discuss general map making concepts, techniques, contests, etc, here.

Moderator: Cartographers

Forum rules
Please read the Community Guidelines before posting.

XML bonuses question - overrides

Postby Industrial Helix on Wed Oct 07, 2009 11:01 am

Ok, for my 13 American Colonies map I have run into a bit of a dilemma.

Basically, in order for the bonuses to work on a number of colonies basis I've found that I have to write the continent as it is and then have it override all other possible bonuses in the same number of colonies category as well as in every lesser number of colonies category.

For Example:

Continent is Georgia and South Carolina, therefore it must override all other 2 colony bonuses.

Continent is Georgia, South Carolina, North Carolina and Virginia, therefore it must override all 2 colony, 3 colony and 4 colony bonuses.

I'm at 200 microsoft word pages already and I've only finished the 2 colony bonus overrides. I've got a long way to go and I'm wondering if there is a more efficient way of writing this XML.

Is there a code for Any two of the following continents equals a bonus of x code or something?

Thanks!
Last edited by MrBenn on Tue Dec 15, 2009 6:10 pm, edited 1 time in total.
Reason: edited title
Sketchblog [Update 07/25/11]: http://indyhelixsketch.blogspot.com/
Living in Japan [Update 07/17/11]: http://mirrorcountryih.blogspot.com/
Russian Revolution map for ConquerClub [07/20/11]: viewtopic.php?f=241&t=116575
User avatar
Cook Industrial Helix
 
Posts: 3462
Joined: Mon Jul 14, 2008 6:49 pm
Location: Ohio

Re: XML bonuses question

Postby AndrewB on Wed Oct 07, 2009 1:09 pm

I think this way should work:

For example:

Conceptual model:

Continent 1
Colony A
Colony B
Colony C
Colony D

Required = 2 bonus = 1

Continent 2
Colony A
Colony B
Colony C
Colony D

Required = 3 bonus = 1 (on top of the Continent 1 bonus to the total bonus of 2)

Continent 3
Colony A
Colony B
Colony C
Colony D

Required = 4 bonus = 2 (on top of the Continent 1 and 2 bonus to the total bonus of 4)


There is another way as well, but it is not suited for every bonus structure:
Create a pairs combinations (as it is done in USApocalipse xml).

For example:
Bonus 1
Colony A
Colony B
Bonus = 1

Bonus 2
Colony A
Colony C
Bonus = 1

Bonus 3
Colony B
Colony C
Bonus = 1

In this case, if the player will hold all 3 colonies he will get 1+1+1 bonus.
Image
User avatar
Lieutenant AndrewB
 
Posts: 1814
Joined: Mon Jun 12, 2006 5:02 pm
Location: Edmonton, Canada, MST

Re: XML bonuses question

Postby yeti_c on Thu Oct 08, 2009 3:29 am

AndrewB wrote:I think this way should work:

For example:

Conceptual model:

Continent 1
Colony A
Colony B
Colony C
Colony D

Required = 2 bonus = 1

Continent 2
Colony A
Colony B
Colony C
Colony D

Required = 3 bonus = 1 (on top of the Continent 1 bonus to the total bonus of 2)

Continent 3
Colony A
Colony B
Colony C
Colony D

Required = 4 bonus = 2 (on top of the Continent 1 and 2 bonus to the total bonus of 4)


This looks good...

But I would actually set the bonuses to their correct values - then override the previous ones up the chain - that way the log looks cleaner and the code is easier to understand.

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am

Re: XML bonuses question

Postby AndrewB on Thu Oct 08, 2009 11:32 am

Actually if you name the continents in that example all the same, then they all will be combined. And it will be even cleaner probably?

Not
Continent 1
Continent 2
Continent 3

But just
Continent
Image
User avatar
Lieutenant AndrewB
 
Posts: 1814
Joined: Mon Jun 12, 2006 5:02 pm
Location: Edmonton, Canada, MST

Re: XML bonuses question

Postby Industrial Helix on Thu Oct 08, 2009 1:24 pm

AndrewB wrote:I think this way should work:

For example:

Conceptual model:

Continent 1
Colony A
Colony B
Colony C
Colony D

Required = 2 bonus = 1

Continent 2
Colony A
Colony B
Colony C
Colony D

Required = 3 bonus = 1 (on top of the Continent 1 bonus to the total bonus of 2)

Continent 3
Colony A
Colony B
Colony C
Colony D

Required = 4 bonus = 2 (on top of the Continent 1 and 2 bonus to the total bonus of 4)


There is another way as well, but it is not suited for every bonus structure:
Create a pairs combinations (as it is done in USApocalipse xml).

For example:
Bonus 1
Colony A
Colony B
Bonus = 1

Bonus 2
Colony A
Colony C
Bonus = 1

Bonus 3
Colony B
Colony C
Bonus = 1

In this case, if the player will hold all 3 colonies he will get 1+1+1 bonus.


Ok, But the colony's break down into smaller territories. Is there a way to group them territory x,y and z = colony and then colony 1, colony 2, colony 3 and coloney 4, hold two for a bonus of 3?
Sketchblog [Update 07/25/11]: http://indyhelixsketch.blogspot.com/
Living in Japan [Update 07/17/11]: http://mirrorcountryih.blogspot.com/
Russian Revolution map for ConquerClub [07/20/11]: viewtopic.php?f=241&t=116575
User avatar
Cook Industrial Helix
 
Posts: 3462
Joined: Mon Jul 14, 2008 6:49 pm
Location: Ohio

Re: XML bonuses question

Postby thenobodies80 on Thu Oct 08, 2009 1:45 pm

Code: Select all
<continent>
<name>2 colonies</name>
<bonus>3</bonus>
<components>
<territory>colony 1</territory>
<territory>colony 2</territory>
<territory>colony 3</territory>
<territory>colony 4</territory>
<territory>colony 5</territory>
<territory>colony 6</territory>
<territory>colony 7</territory>
<territory>colony 8</territory>
<territory>colony 9</territory>
<territory>colony 10</territory>
<territory>colony 11</territory>
<territory>colony 12</territory>
<territory>colony 13</territory>
</components>
<required>2</required>
</continet>
<continent>
<name>3 colonies</name>
<bonus>4</bonus>
<components>
<territory>colony 1</territory>
<territory>colony 2</territory>
<territory>colony 3</territory>
<territory>colony 4</territory>
<territory>colony 5</territory>
<territory>colony 6</territory>
<territory>colony 7</territory>
<territory>colony 8</territory>
<territory>colony 9</territory>
<territory>colony 10</territory>
<territory>colony 11</territory>
<territory>colony 12</territory>
<territory>colony 13</territory>
</components>
<required>3</required>
<overrides>
<override>2 colonies</override>
</overrides>
</continet>
<continent>
<name>4 colonies</name>
<bonus>5</bonus>
<components>
<territory>colony 1</territory>
<territory>colony 2</territory>
<territory>colony 3</territory>
<territory>colony 4</territory>
<territory>colony 5</territory>
<territory>colony 6</territory>
<territory>colony 7</territory>
<territory>colony 8</territory>
<territory>colony 9</territory>
<territory>colony 10</territory>
<territory>colony 11</territory>
<territory>colony 12</territory>
<territory>colony 13</territory>
</components>
<required>4</required>
<overrides>
<override>2 colonies</override>
<override>3 colonies</override>
</overrides>
</continet>
<continent>
<name>5 colonies</name>
<bonus>6</bonus>
<components>
<territory>colony 1</territory>
<territory>colony 2</territory>
<territory>colony 3</territory>
<territory>colony 4</territory>
<territory>colony 5</territory>
<territory>colony 6</territory>
<territory>colony 7</territory>
<territory>colony 8</territory>
<territory>colony 9</territory>
<territory>colony 10</territory>
<territory>colony 11</territory>
<territory>colony 12</territory>
<territory>colony 13</territory>
</components>
<required>5</required>
<overrides>
<override>2 colonies</override>
<override>3 colonies</override>
<override>4 colonies</override>
</overrides>
</continet>
<continent>
<name>6 colonies</name>
<bonus>7</bonus>
<components>
<territory>colony 1</territory>
<territory>colony 2</territory>
<territory>colony 3</territory>
<territory>colony 4</territory>
<territory>colony 5</territory>
<territory>colony 6</territory>
<territory>colony 7</territory>
<territory>colony 8</territory>
<territory>colony 9</territory>
<territory>colony 10</territory>
<territory>colony 11</territory>
<territory>colony 12</territory>
<territory>colony 13</territory>
</components>
<required>6</required>
<overrides>
<override>2 colonies</override>
<override>3 colonies</override>
<override>4 colonies</override>
<override>5 colonies</override>
</overrides>
</continet>
<continent>
<name>7 colonies</name>
<bonus>8</bonus>
<components>
<territory>colony 1</territory>
<territory>colony 2</territory>
<territory>colony 3</territory>
<territory>colony 4</territory>
<territory>colony 5</territory>
<territory>colony 6</territory>
<territory>colony 7</territory>
<territory>colony 8</territory>
<territory>colony 9</territory>
<territory>colony 10</territory>
<territory>colony 11</territory>
<territory>colony 12</territory>
<territory>colony 13</territory>
</components>
<required>7</required>
<overrides>
<override>2 colonies</override>
<override>3 colonies</override>
<override>4 colonies</override>
<override>5 colonies</override>
<override>6 colonies</override>
</overrides>
</continet>
<continent>
<name>8 colonies</name>
<bonus>9</bonus>
<components>
<territory>colony 1</territory>
<territory>colony 2</territory>
<territory>colony 3</territory>
<territory>colony 4</territory>
<territory>colony 5</territory>
<territory>colony 6</territory>
<territory>colony 7</territory>
<territory>colony 8</territory>
<territory>colony 9</territory>
<territory>colony 10</territory>
<territory>colony 11</territory>
<territory>colony 12</territory>
<territory>colony 13</territory>
</components>
<required>8</required>
<overrides>
<override>2 colonies</override>
<override>3 colonies</override>
<override>4 colonies</override>
<override>5 colonies</override>
<override>6 colonies</override>
<override>7 colonies</override>
</overrides>
</continet>
<continent>
<name>colony 1</name>
<bonus>0</bonus>
<components>
<territory>region 1</territory>
<territory>region 2</territory>
<territory>region 3</territory>
</components>
</continet>
<continent>
<name>colony 2</name>
<bonus>0</bonus>
<components>
<territory>region 4</territory>
<territory>region 5</territory>
<territory>region 6</territory>
</components>
</continet>
<continent>
<name>colony 3</name>
<bonus>0</bonus>
<components>
<territory>region 7</territory>
<territory>region 8</territory>
<territory>region 9</territory>
<territory>region 10</territory>
</components>
</continet>
<continent>
<name>colony 4</name>
<bonus>0</bonus>
<components>
<territory>region 11</territory>
<territory>region 12</territory>
<territory>region 13</territory>
</components>
</continet>

etc etc
User avatar
Sergeant 1st Class thenobodies80
 
Posts: 5400
Joined: Wed Sep 05, 2007 4:30 am
Location: Milan

Re: XML bonuses question

Postby Industrial Helix on Thu Oct 08, 2009 2:06 pm

Ok, so essentially I'm creating two types of continents. 1) The colonies made up of their territories worth nothing. 2) The combination of colony continents previously defined worth x amount of armies.

Did not know I could do that.
Sketchblog [Update 07/25/11]: http://indyhelixsketch.blogspot.com/
Living in Japan [Update 07/17/11]: http://mirrorcountryih.blogspot.com/
Russian Revolution map for ConquerClub [07/20/11]: viewtopic.php?f=241&t=116575
User avatar
Cook Industrial Helix
 
Posts: 3462
Joined: Mon Jul 14, 2008 6:49 pm
Location: Ohio

Re: XML bonuses question

Postby AndrewB on Thu Oct 08, 2009 2:09 pm

Industrial Helix wrote:Ok, so essentially I'm creating two types of continents. 1) The colonies made up of their territories worth nothing. 2) The combination of colony continents previously defined worth x amount of armies.

Did not know I could do that.


No, you cannot do that Helix. Shoot me a PM and I can help you with an XML, if u want me too.
Image
User avatar
Lieutenant AndrewB
 
Posts: 1814
Joined: Mon Jun 12, 2006 5:02 pm
Location: Edmonton, Canada, MST

Re: XML bonuses question

Postby thenobodies80 on Thu Oct 08, 2009 3:07 pm

AndrewB wrote:
Industrial Helix wrote:Ok, so essentially I'm creating two types of continents. 1) The colonies made up of their territories worth nothing. 2) The combination of colony continents previously defined worth x amount of armies.

Did not know I could do that.


No, you cannot do that Helix.Shoot me a PM and I can help you with an XML, if u want me too.


You right,bad typo (i used the territory tag instead of the continent tag) :oops: #-o
But it can be done...

Code: Select all
<continent>
<name>2 colonies</name>
<bonus>3</bonus>
<components>
<continent>colony 1</continent>
<continent>colony 2</continent>
<continent>colony 3</continent>
<continent>colony 4</continent>
<continent>colony 5</continent>
<continent>colony 6</continent>
<continent>colony 7</continent>
<continent>colony 8</continent>
<continent>colony 9</continent>
<continent>colony 10</continent>
<continent>colony 11</continent>
<continent>colony 12</continent>
<continent>colony 13</continent>
</components>
<required>2</required>
</continet>
<continent>
<name>3 colonies</name>
<bonus>4</bonus>
<components>
<continent>colony 1</continent>
<continent>colony 2</continent>
<continent>colony 3</continent>
<continent>colony 4</continent>
<continent>colony 5</continent>
<continent>colony 6</continent>
<continent>colony 7</continent>
<continent>colony 8</continent>
<continent>colony 9</continent>
<continent>colony 10</continent>
<continent>colony 11</continent>
<continent>colony 12</continent>
<continent>colony 13</continent>
</components>
<required>3</required>
<overrides>
<override>2 colonies</override>
</overrides>
</continet>
<continent>
<name>4 colonies</name>
<bonus>5</bonus>
<components>
<continent>colony 1</continent>
<continent>colony 2</continent>
<continent>colony 3</continent>
<continent>colony 4</continent>
<continent>colony 5</continent>
<continent>colony 6</continent>
<continent>colony 7</continent>
<continent>colony 8</continent>
<continent>colony 9</continent>
<continent>colony 10</continent>
<continent>colony 11</continent>
<continent>colony 12</continent>
<continent>colony 13</continent>
</components>
<required>4</required>
<overrides>
<override>2 colonies</override>
<override>3 colonies</override>
</overrides>
</continet>
<continent>
<name>5 colonies</name>
<bonus>6</bonus>
<components>
<continent>colony 1</continent>
<continent>colony 2</continent>
<continent>colony 3</continent>
<continent>colony 4</continent>
<continent>colony 5</continent>
<continent>colony 6</continent>
<continent>colony 7</continent>
<continent>colony 8</continent>
<continent>colony 9</continent>
<continent>colony 10</continent>
<continent>colony 11</continent>
<continent>colony 12</continent>
<continent>colony 13</continent>
</components>
<required>5</required>
<overrides>
<override>2 colonies</override>
<override>3 colonies</override>
<override>4 colonies</override>
</overrides>
</continet>
<continent>
<name>6 colonies</name>
<bonus>7</bonus>
<components>
<continent>colony 1</continent>
<continent>colony 2</continent>
<continent>colony 3</continent>
<continent>colony 4</continent>
<continent>colony 5</continent>
<continent>colony 6</continent>
<continent>colony 7</continent>
<continent>colony 8</continent>
<continent>colony 9</continent>
<continent>colony 10</continent>
<continent>colony 11</continent>
<continent>colony 12</continent>
<continent>colony 13</continent>
</components>
<required>6</required>
<overrides>
<override>2 colonies</override>
<override>3 colonies</override>
<override>4 colonies</override>
<override>5 colonies</override>
</overrides>
</continet>
<continent>
<name>7 colonies</name>
<bonus>8</bonus>
<components>
<continent>colony 1</continent>
<continent>colony 2</continent>
<continent>colony 3</continent>
<continent>colony 4</continent>
<continent>colony 5</continent>
<continent>colony 6</continent>
<continent>colony 7</continent>
<continent>colony 8</continent>
<continent>colony 9</continent>
<continent>colony 10</continent>
<continent>colony 11</continent>
<continent>colony 12</continent>
<continent>colony 13</continent>
</components>
<required>7</required>
<overrides>
<override>2 colonies</override>
<override>3 colonies</override>
<override>4 colonies</override>
<override>5 colonies</override>
<override>6 colonies</override>
</overrides>
</continet>
<continent>
<name>8 colonies</name>
<bonus>9</bonus>
<components>
<continent>colony 1</continent>
<continent>colony 2</continent>
<continent>colony 3</continent>
<continent>colony 4</continent>
<continent>colony 5</continent>
<continent>colony 6</continent>
<continent>colony 7</continent>
<continent>colony 8</continent>
<continent>colony 9</continent>
<continent>colony 10</continent>
<continent>colony 11</continent>
<continent>colony 12</continent>
<continent>colony 13</continent>
</components>
<required>8</required>
<overrides>
<override>2 colonies</override>
<override>3 colonies</override>
<override>4 colonies</override>
<override>5 colonies</override>
<override>6 colonies</override>
<override>7 colonies</override>
</overrides>
</continet>
<continent>
<name>colony 1</name>
<bonus>0</bonus>
<components>
<territory>region 1</territory>
<territory>region 2</territory>
<territory>region 3</territory>
</components>
</continet>
<continent>
<name>colony 2</name>
<bonus>0</bonus>
<components>
<territory>region 4</territory>
<territory>region 5</territory>
<territory>region 6</territory>
</components>
</continet>
<continent>
<name>colony 3</name>
<bonus>0</bonus>
<components>
<territory>region 7</territory>
<territory>region 8</territory>
<territory>region 9</territory>
<territory>region 10</territory>
</components>
</continet>
<continent>
<name>colony 4</name>
<bonus>0</bonus>
<components>
<territory>region 11</territory>
<territory>region 12</territory>
<territory>region 13</territory>
</components>
</continet>

etc etc


edit: public discussions on threads will help more people than a PM ;)
User avatar
Sergeant 1st Class thenobodies80
 
Posts: 5400
Joined: Wed Sep 05, 2007 4:30 am
Location: Milan

Re: XML bonuses question

Postby yeti_c on Fri Oct 09, 2009 8:54 am

AndrewB wrote:Actually if you name the continents in that example all the same, then they all will be combined. And it will be even cleaner probably?

Not
Continent 1
Continent 2
Continent 3

But just
Continent


Yes that would work - but makes the XML harder to understand and the bonuses harder to equate...

The overrides method makes it easier for the standard player to understand and cleaner in the logs.

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am

maximum bonuses?

Postby Industrial Helix on Thu Oct 29, 2009 10:35 am

For my 13 colonies map, I'm looking at having 7,085 different bonuses based on the various combinations of the 13 colonies. Is this going to crash the game engine or whatever? Can I do this and not have to worry about something going catastrophically wrong?
Sketchblog [Update 07/25/11]: http://indyhelixsketch.blogspot.com/
Living in Japan [Update 07/17/11]: http://mirrorcountryih.blogspot.com/
Russian Revolution map for ConquerClub [07/20/11]: viewtopic.php?f=241&t=116575
User avatar
Cook Industrial Helix
 
Posts: 3462
Joined: Mon Jul 14, 2008 6:49 pm
Location: Ohio

Re: maximum bonuses?

Postby yeti_c on Thu Oct 29, 2009 11:16 am

Industrial Helix wrote:For my 13 colonies map, I'm looking at having 7,085 different bonuses based on the various combinations of the 13 colonies. Is this going to crash the game engine or whatever? Can I do this and not have to worry about something going catastrophically wrong?


You need to code your XML better.

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am

Re: maximum bonuses?

Postby Industrial Helix on Thu Oct 29, 2009 2:23 pm

I've talked to a few other people about it and there doesn't seem to be any other way than to make a boatload of bonuses.
Sketchblog [Update 07/25/11]: http://indyhelixsketch.blogspot.com/
Living in Japan [Update 07/17/11]: http://mirrorcountryih.blogspot.com/
Russian Revolution map for ConquerClub [07/20/11]: viewtopic.php?f=241&t=116575
User avatar
Cook Industrial Helix
 
Posts: 3462
Joined: Mon Jul 14, 2008 6:49 pm
Location: Ohio

Re: maximum bonuses?

Postby thenobodies80 on Thu Oct 29, 2009 3:25 pm

Helix if you use the super continents you will have less bonuses. Look my post here http://www.conquerclub.com/forum/viewtopic.php?f=127&t=98509#p2245859.
You don't need to code all the combinations because the <continent> tag can be used instead of the <territory> one in the bonuses.
Code some supercontinents (2 colonies/3 colonies,etc),then use <override>.
You will have 7 bonuses for your groups of colonies (from 2 to 8 ), 13 for your colonies, 2 for ships
Total 22 bonuses.
Your xml will work and it will be smaller

Nobodies
User avatar
Sergeant 1st Class thenobodies80
 
Posts: 5400
Joined: Wed Sep 05, 2007 4:30 am
Location: Milan

Re: maximum bonuses?

Postby Industrial Helix on Thu Oct 29, 2009 3:56 pm

Gotcha... i dunno how I missed that the first time. Thanks for being patient with me!
Sketchblog [Update 07/25/11]: http://indyhelixsketch.blogspot.com/
Living in Japan [Update 07/17/11]: http://mirrorcountryih.blogspot.com/
Russian Revolution map for ConquerClub [07/20/11]: viewtopic.php?f=241&t=116575
User avatar
Cook Industrial Helix
 
Posts: 3462
Joined: Mon Jul 14, 2008 6:49 pm
Location: Ohio

Re: maximum bonuses?

Postby yeti_c on Fri Oct 30, 2009 6:38 am

viewtopic.php?f=127&t=98509

Not sure how you missed it - it was in your own topic?!

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am

Re: XML bonuses question

Postby thenobodies80 on Fri Oct 30, 2009 9:44 am

Merged with your old topic.

[ Merged ]
User avatar
Sergeant 1st Class thenobodies80
 
Posts: 5400
Joined: Wed Sep 05, 2007 4:30 am
Location: Milan

Re: XML bonuses question - overrides

Postby ManBungalow on Fri Apr 16, 2010 6:14 pm

I have a related XML issue. Having had a chat with MrBenn, I've come to the conclusion that there are two solutions to the problem I have. The map looks like this:
Click image to enlarge.
image

I'm trying to create the bonus effect of +1 for every 2 green regions across the whole map. Number one is to use the bonus over-ride rule:
Code: Select all
<continent>
<name>2 Green regions</name>
<bonus>1</bonus>
<components>
<territory>LIST</territory>
<territory>ALL</territory>
<territory>GREEN</territory>
<territory>REGIONS</territory>
<territory>HERE</territory>
</components>
<required>2</required>
</continent>

<continent>
<name>4 Green regions</name>
<bonus>2</bonus>
<components>
<territory>LIST</territory>
<territory>ALL</territory>
<territory>GREEN</territory>
<territory>REGIONS</territory>
<territory>HERE</territory>
</components>
<required>4</required>

<overrides>
<override>2 Green regions</override>
</overrides>
</continent>

This would mean copying the whole continent (112 regions) 56 times over (changing the name, bonus troops and regions required each time) and adding an extra bonus to the over-ride each time. That's fine with me, but it would make for a very long and presumably lag-inducing XML.

--

The alternative seems to be to use a Reinforcement rule of +1 per any 2 regions on the map and add negative bonuses to sets of non-green regions held. I'm not all in favour of this variation due to the questions raised by the negative bonuses.

--

Is there an alternate way of coding this and, if not, which way is "better" ?
Image
Colonel ManBungalow
 
Posts: 3431
Joined: Sun Jan 13, 2008 7:02 am
Location: On a giant rock orbiting a star somewhere

Re: XML bonuses question - overrides

Postby ManBungalow on Sat Apr 17, 2010 8:16 am

Using the override setup I will soon have just over 18,000 lines of XML purely to work out the +1 for 2 greens. This worries me. It seems very inefficient and will surely affect the quality of the system as a whole. Is this a concern for anyone else ?
Image
Colonel ManBungalow
 
Posts: 3431
Joined: Sun Jan 13, 2008 7:02 am
Location: On a giant rock orbiting a star somewhere

Re: XML bonuses question - overrides

Postby natty dread on Sat Apr 17, 2010 9:30 am

I can't see an alternative... Perhaps a gameplay change is in order. Say, a cap at 20 or 30 green territories.
Image
User avatar
Sergeant 1st Class natty dread
 
Posts: 12877
Joined: Fri Feb 08, 2008 8:58 pm
Location: just plain fucked

Re: XML bonuses question - overrides

Postby ender516 on Sat Apr 17, 2010 2:52 pm

I'm quite new at XML editing, but I think perhaps an internal entity would help here. Could we not define one containing the <components>...</components> section (114 lines), and then put that in the 56 continents?
User avatar
Sergeant 1st Class ender516
 
Posts: 4455
Joined: Wed Dec 17, 2008 6:07 pm
Location: Waterloo, Ontario

Re: XML bonuses question - overrides

Postby natty dread on Sat Apr 17, 2010 3:45 pm

ender516 wrote:I'm quite new at XML editing, but I think perhaps an internal entity would help here. Could we not define one containing the <components>...</components> section (114 lines), and then put that in the 56 continents?


No... because you will need different "required" tags for each bonus. You can only define one required tag for one continent.
Image
User avatar
Sergeant 1st Class natty dread
 
Posts: 12877
Joined: Fri Feb 08, 2008 8:58 pm
Location: just plain fucked

Re: XML bonuses question - overrides

Postby chipv on Sat Apr 17, 2010 10:29 pm

If we had an XML update allowing reinforcement tags inside continents, this would do it. (Or even vice versa).
User avatar
Major chipv
Head Tech
Head Tech
 
Posts: 2845
Joined: Mon Apr 28, 2008 5:30 pm

Re: XML bonuses question - overrides

Postby ender516 on Sun Apr 18, 2010 1:15 am

natty_dread wrote:
ender516 wrote:I'm quite new at XML editing, but I think perhaps an internal entity would help here. Could we not define one containing the <components>...</components> section (114 lines), and then put that in the 56 continents?


No... because you will need different "required" tags for each bonus. You can only define one required tag for one continent.

But the <required></required> tag is outside the <components></components> tag, while still being within the <continent></continent>. It might look something like this:

Code: Select all
<continent>
  <name>2 Green regions</name>
  <bonus>1</bonus>
  &GreenRegionComponents;
  <required>2</required>
</continent>

<continent>
  <name>4 Green regions</name>
  <bonus>2</bonus>
  &GreenRegionComponents;
  <required>4</required>
  <overrides>
    <override>2 Green regions</override>
  </overrides>
</continent>

<continent>
  <name>6 Green regions</name>
  <bonus>3</bonus>
  &GreenRegionComponents;
  <required>6</required>
  <overrides>
    <override>2 Green regions</override>
    <override>4 Green regions</override>
  </overrides>
</continent>


I won't attempt the entity definition here, since I'm not exactly sure of the syntax. This doesn't help reduce the number of continents or the increasing number of overrides in each one, but it should help some.

Say, what if each of those 56 continents just gave a bonus of 1 and there were no overrides, wouldn't that add up properly?
User avatar
Sergeant 1st Class ender516
 
Posts: 4455
Joined: Wed Dec 17, 2008 6:07 pm
Location: Waterloo, Ontario

Re: XML bonuses question - overrides

Postby natty dread on Sun Apr 18, 2010 5:33 am

Oh, so that's what you mean. Yeah, it could work, maybe. I'm not sure how the CC XML engine handles internal entities.

Say, what if each of those 56 continents just gave a bonus of 1 and there were no overrides, wouldn't that add up properly?


Yes, but it would look really awful in game log...
Image
User avatar
Sergeant 1st Class natty dread
 
Posts: 12877
Joined: Fri Feb 08, 2008 8:58 pm
Location: just plain fucked

Next

Return to Foundry Discussions

Who is online

Users browsing this forum: No registered users