yeti_c wrote:ender516 wrote: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?
This won't work - the required tag relates to the components in that continent... not the amount of territories in the list of continents added together.
C.
I'm not sure what you are getting at. The entity would be defined as the <components> element, listing all the green territories, so each continent would be working from the same list, but with a different <required> element, so if the first continent requires 2 of the green territories and the second requires 4, and so on, and each gives me one bonus troop, then if I have five of the green territories, shouldn't the first two continents give me one each for a total of two, and the rest of the continents give me nothing for having less than the required amount?