xml question

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.
Post Reply
User avatar
captainwalrus
Posts: 1018
Joined: Sun Nov 11, 2007 3:19 pm
Location: Finnmark

xml question

Post by captainwalrus »

Is there an easy way to make it so that:

Given 5 territories A-E, where if A is held and either B, C or D is held a bonus is received (we will say it is worth one troop for this example), but if you hold A and both B and C or B and D or any combination of the 3 territories doesn't get any extra, so that holding A and B would get you +1 and holding A and C would get you +1, But holding A and B and C would just get you +1?

Now, if that is possible it is possible to make it so that if you hold territory E then you can get +1 for each, so that A and B and C would be +2 and A plus B and C and D would be +3?
~ CaptainWalrus
User avatar
yeti_c
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am
Gender: Male

Re: xml question

Post by yeti_c »

captainwalrus wrote:Is there an easy way to make it so that:

Given 5 territories A-E, where if A is held and either B, C or D is held a bonus is received (we will say it is worth one troop for this example), but if you hold A and both B and C or B and D or any combination of the 3 territories doesn't get any extra, so that holding A and B would get you +1 and holding A and C would get you +1, But holding A and B and C would just get you +1?
Yes

Something like this...

Code: Select all


<continent>
  <name>BCD1</name>
  <bonus>0</bonus>
  <components>
    <territory>B</territory>
    <territory>C</territory>
    <territory>D</territory>
  </components>
  <required>1</required>
</continent>

<continent>
  <name>A plus BCD1</name>
  <bonus>1</bonus>
  <components>
    <continent>BCD1</continent>
    <territory>A</territory>
  </components>
  <overrides>
    <override>BCD1</override>
  </overrides>
</continent>
captainwalrus wrote:Now, if that is possible it is possible to make it so that if you hold territory E then you can get +1 for each, so that A and B and C would be +2 and A plus B and C and D would be +3?
Yes...

Code: Select all


<continent>
  <name>BCD1</name>
  <bonus>0</bonus>
  <components>
    <territory>B</territory>
    <territory>C</territory>
    <territory>D</territory>
  </components>
  <required>1</required>
</continent>

<continent>
  <name>BCD2</name>
  <bonus>0</bonus>
  <components>
    <territory>B</territory>
    <territory>C</territory>
    <territory>D</territory>
  </components>
  <required>2</required>
</continent>

<continent>
  <name>BCD</name>
  <bonus>0</bonus>
  <components>
    <territory>B</territory>
    <territory>C</territory>
    <territory>D</territory>
  </components>
</continent>

<continent>
  <name>A plus BCD1</name>
  <bonus>1</bonus>
  <components>
    <continent>BCD1</continent>
    <territory>A</territory>
  </components>
  <overrides>
    <override>BCD1</override>
    <override>BCD2</override>
    <override>BCD</override>
  </overrides>
</continent>

<continent>
  <name>E plus A plus BCD2</name>
  <bonus>2</bonus>
  <components>
    <continent>BCD2</continent>
    <territory>A</territory>
    <territory>E</territory>
  </components>
  <overrides>
    <override>A plus BCD1</override>
  </overrides>
</continent>

<continent>
  <name>E plus A plus BCD</name>
  <bonus>3</bonus>
  <components>
    <continent>BCD</continent>
    <territory>A</territory>
    <territory>E</territory>
  </components>
  <overrides>
    <override>E plus A plus BCD2</override>
  </overrides>
</continent>
C.
Image
Highest score : 2297
User avatar
natty dread
Posts: 12876
Joined: Fri Feb 08, 2008 8:58 pm
Location: just plain fucked

Re: xml question

Post by natty dread »

Why not leave that BCD continent out and just make the last bonus like this:

Code: Select all

<continent>
  <name>ABCDE</name>
  <bonus>3</bonus>
  <components>
    <territory>A</territory>
    <territory>B</territory>
    <territory>C</territory>
    <territory>D</territory>  
    <territory>E</territory>
  </components>
  <overrides>
    <override>E plus A plus BCD2</override>
  </overrides>
</continent>

Would seem more logical to me.
Image
User avatar
yeti_c
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am
Gender: Male

Re: xml question

Post by yeti_c »

natty_dread wrote:Why not leave that BCD continent out and just make the last bonus like this:

Code: Select all

<continent>
  <name>ABCDE</name>
  <bonus>3</bonus>
  <components>
    <territory>A</territory>
    <territory>B</territory>
    <territory>C</territory>
    <territory>D</territory>  
    <territory>E</territory>
  </components>
  <overrides>
    <override>E plus A plus BCD2</override>
  </overrides>
</continent>

Would seem more logical to me.
Yes that would work as well... - I guess it depends on whether anything else is to be built on top!!
(Note that you would also have to remove the BCD override in A plus BCD1)

C.
Image
Highest score : 2297
Post Reply

Return to “Foundry Discussions”