XML Objectives
Posted: Fri Apr 02, 2010 2:11 pm
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:
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-->
...