XML Objectives

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
MrBenn
Posts: 6880
Joined: Wed Nov 21, 2007 9:32 am
Location: Off Duty

XML Objectives

Post by MrBenn »

The new XML adjustment to the objectives will allow for much more versatility when setting victory conditions for a map. The new code allows <territory> and <continent> tags to be embedded within the objective components. Any continents can be embedded within the objective, which means that complex victory conditions can be compiled utilising <required> tags and/or nested continents.

Off the top of my head, the adjustment can be used to replace the 16 objectives of the Third Crusade as follows:

Code: Select all

...
   <!-- Objectives Begin-->
   <objective>
      <name>Victory Condition</name>
      <components>
         <continent>Any Starting Territory</continent>
         <territory>Jerusalem</territory>
         <territory>Antioch</territory>
         <continent>The Vatican or Granada</continent>
      </components>
   </objective>
   <!—Objective Continents-->
   <continent>
      <name>Any Starting Territory</name>
      <bonus>0</bonus>
      <components>
         <territory>London</territory>
         <territory>Paris</territory>
         <territory>Ratisbon</territory>
         <territory>Castile</territory>
         <territory>Thessalonica</territory>
         <territory>Tunis</territory>
         <territory>Cairo</territory>
         <territory>Amasia</territory>
      </components>
      <required>1</required>
   </continent>
   <continent>
      <name>The Vatican or Granada</name>
      <bonus>0</bonus>
      <components>
         <territory>The Vatican</territory>
         <territory>Granada</territory>
      </components>
      <required>1</required>
   </continent>
   <!-- Continents Begin-->
...
Original Third Crusade Map Objective XML

Code: Select all

...
   <!-- Objectives Begin-->
   <objective>
      <name>Objective 1</name>
      <components>
         <territory>London</territory>
         <territory>Jerusalem</territory>
         <territory>Antioch</territory>
         <territory>The Vatican</territory>
      </components>
   </objective>
   <objective>
      <name>Objective 2</name>
      <components>
         <territory>Paris</territory>
         <territory>Jerusalem</territory>
         <territory>Antioch</territory>
         <territory>The Vatican</territory>
      </components>
   </objective>
   <objective>
      <name>Objective 3</name>
      <components>
         <territory>Ratisbon</territory>
         <territory>Jerusalem</territory>
         <territory>Antioch</territory>
         <territory>The Vatican</territory>
      </components>
   </objective>
   <objective>
      <name>Objective 4</name>
      <components>
         <territory>Castile</territory>
         <territory>Jerusalem</territory>
         <territory>Antioch</territory>
         <territory>The Vatican</territory>
      </components>
   </objective>
   <objective>
      <name>Objective 5</name>
      <components>
         <territory>Thessalonica</territory>
         <territory>Jerusalem</territory>
         <territory>Antioch</territory>
         <territory>The Vatican</territory>
      </components>
   </objective>
   <objective>
      <name>Objective 6</name>
      <components>
         <territory>Tunis</territory>
         <territory>Jerusalem</territory>
         <territory>Antioch</territory>
         <territory>The Vatican</territory>
      </components>
   </objective>
   <objective>
      <name>Objective 7</name>
      <components>
         <territory>Cairo</territory>
         <territory>Jerusalem</territory>
         <territory>Antioch</territory>
         <territory>The Vatican</territory>
      </components>
   </objective>
   <objective>
      <name>Objective 8</name>
      <components>
         <territory>Amasia</territory>
         <territory>Jerusalem</territory>
         <territory>Antioch</territory>
         <territory>The Vatican</territory>
      </components>
   </objective>
   <objective>
      <name>Objective 9</name>
      <components>
         <territory>London</territory>
         <territory>Jerusalem</territory>
         <territory>Antioch</territory>
         <territory>Granada</territory>
      </components>
   </objective>
   <objective>
      <name>Objective 10</name>
      <components>
         <territory>Paris</territory>
         <territory>Jerusalem</territory>
         <territory>Antioch</territory>
         <territory>Granada</territory>
      </components>
   </objective>
   <objective>
      <name>Objective 11</name>
      <components>
         <territory>Ratisbon</territory>
         <territory>Jerusalem</territory>
         <territory>Antioch</territory>
         <territory>Granada</territory>
      </components>
   </objective>
   <objective>
      <name>Objective 12</name>
      <components>
         <territory>Castile</territory>
         <territory>Jerusalem</territory>
         <territory>Antioch</territory>
         <territory>Granada</territory>
      </components>
   </objective>
   <objective>
      <name>Objective 13</name>
      <components>
         <territory>Thessalonica</territory>
         <territory>Jerusalem</territory>
         <territory>Antioch</territory>
         <territory>Granada</territory>
      </components>
   </objective>
   <objective>
      <name>Objective 14</name>
      <components>
         <territory>Tunis</territory>
         <territory>Jerusalem</territory>
         <territory>Antioch</territory>
         <territory>Granada</territory>
      </components>
   </objective>
   <objective>
      <name>Objective 15</name>
      <components>
         <territory>Cairo</territory>
         <territory>Jerusalem</territory>
         <territory>Antioch</territory>
         <territory>Granada</territory>
      </components>
   </objective>
   <objective>
      <name>Objective 16</name>
      <components>
         <territory>Amasia</territory>
         <territory>Jerusalem</territory>
         <territory>Antioch</territory>
         <territory>Granada</territory>
      </components>
   </objective>
   <!-- Continents Begin-->
...
Image
PB: 2661 | He's blue... If he were green he would die | No mod would be stupid enough to do that
User avatar
natty dread
Posts: 12876
Joined: Fri Feb 08, 2008 8:58 pm
Location: just plain fucked

Re: XML Objectives

Post by natty dread »

=D>

I'm sure there are some other maps that could benefit from this...

Well, can't think of any already quenched maps, but Conquer National Bank will have shorter XML thanks to this. And Research & Conquer can have the conquer objective that was planned.
Last edited by natty dread on Fri Apr 02, 2010 2:25 pm, edited 1 time in total.
Image
User avatar
MrBenn
Posts: 6880
Joined: Wed Nov 21, 2007 9:32 am
Location: Off Duty

Re: XML Objectives

Post by MrBenn »

natty_dread wrote:=D>

I'm sure there are some other maps that could benefit from this...
Me too - but Third Crusade is the one that jumped to mind. It's also a good example of the type of complex victory condition that can be built-up.
Image
PB: 2661 | He's blue... If he were green he would die | No mod would be stupid enough to do that
User avatar
yeti_c
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am
Gender: Male

Re: XML Objectives

Post by yeti_c »

Yeah - this is definitely a good thing...

C.
Image
Highest score : 2297
User avatar
Evil DIMwit
Posts: 1616
Joined: Thu Mar 22, 2007 1:47 pm
Gender: Male
Location: Philadelphia, NJ

Re: XML Objectives

Post by Evil DIMwit »

I'm thinking of Napoleonic Europe, with the objective of holding any 5 of 8 capitals -- that's 336 possible combinations.
ImageImage
User avatar
jpcloet
Posts: 4317
Joined: Sat Mar 17, 2007 9:18 am
Gender: Male
Location: Greater Toronto Area

Re: XML Objectives

Post by jpcloet »

I think the Objectives should be put back as a game type, essentially the ability to turn it off or on. That would require that all maps have some objective sets.
User avatar
natty dread
Posts: 12876
Joined: Fri Feb 08, 2008 8:58 pm
Location: just plain fucked

Re: XML Objectives

Post by natty dread »

I disagree. Some maps are heavily objective-based and would suck without it. Oasis comes to mind.

If the mapmaker has designed the map to have an objective, we should respect that...
Image
Post Reply

Return to “Foundry Discussions”