[XML Request] Meaningful Prereq Types

At present the game XML has just a handful of Prereq XML types, but they aren't really consistent.

Code: xml
  1. <Prereq>
  2.     <Type>Tech|Allegiance|BuildingRequirement|Race</Type>
  3.     <Attribute>...</Attribute>
  4. </Prereq>

The Tech attribute is straight forward to use.

The Allegiance attribute is either Empire or Kingdom.

The BuildingRequirement attribute is varied but also looks straight forward.

But the Race attribute is currently either Fallen, Men or Kraxis (although the last one doesn't seem to be active because the current Kraxis racial type is down as Fallen in its file).

The question is, why bother using Race for either Fallen or Men when you already have the same delineation between the two Allegiance types?

Surely any Race type prerequisite that is currently Fallen or Men should be changed to the equivalent Allegiance type. Then the actual name of the race (eg Kraxis) should be coded into the races so we can actually use the Race type prerequesite to make real and easy racial differentiation. For example, allowing us to allow unique buildings, items, units, techs etc on a per race basis where we want to.

This simple change would add heaps of power to modders and make everyone's life much easier.

Please implement this. I found all iterations easily using Regular Expressions and a grep program in about 5 minutes. The Regex I used to isolate the Race types was

<Prereq>[\s]*<Type>Race</Type>[\s]*<Attribute>[\w_-]*

if that helps. There are only 44 matches in the current XML so it shouldn't take too long.

3,233 views 1 replies
Reply #1 Top

Another idea.

It would be nice to be able to specify OR and NOT as well as the default AND.

So as an example:

Code: xml
  1. &lt;Prereq&gt;
  2.     &lt;Type&gt;Allegiance&lt;/Type&gt;
  3.     &lt;Attribute&gt;Kingdon&lt;/Attribute&gt;
  4. &lt;/Prereq&gt;
  5. &lt;Prereq&gt;
  6.     &lt;NotType&gt;Race&lt;/Type&gt;
  7.     &lt;Attribute&gt;Amarian&lt;/Attribute&gt;
  8. &lt;/Prereq&gt;
  9. &lt;Prereq&gt;
  10.     &lt;OrType&gt;Race&lt;/Type&gt;
  11.     &lt;Attribute&gt;Kraxis&lt;/Attribute&gt;
  12. &lt;/Prereq&gt;

So in this instance an item would be available to all the Kingdom races except Amarians, but would also be available to Kraxis.

This way we wouldn't have to keep building copies of things.