The XML specification for transformations does not match the standards for readability and functionality that have been set by rest of the XML. It does not appear that the community had much of a part in defining the system, but I think it should be discussed before maps begin to be made using it.
Here is the existing spec:
And here are my proposed changes:
- Change <type> to <applyeach>round|turn</applyeach>
Whether the transformation is applied each round or turn should not be mixed in with what round it starts and ends. And don’t use cryptic letters that require documentation to understand – spell it out.
- Add <minround>, <maxround> and <everynrounds> to replace <type> parameters RGN and RLN
RGN and RLN, besides being cryptic, don’t allow you to specify a transformation that runs only for rounds 3 to 8, or on rounds 5, 7, 9 and 11.
- Change <applyto> options A,S,N,P,OP, and O
Avoid the cryptic codes. Spell out “self”, “neutral”, and “opponents”. You can either allow multiple tags to make different combinations, or define “players” (self & opponents), “others” (neutral & opponents),”nonopponents” (self & neutral), and “all” (everything).
- Replace <inc>, <amount>, <upper/lower>, and <perc> with <type>add|set|percent</type>, <minamount>, and <maxamount>
This would reduce the number of tags, be more readable and less confusing than the current spec. It makes it clearer what is intended, and you avoid possible confusing code like: <inc>-</inc> <amount>-3</amount>. If both <minamount> and <maxamount> are included, then a random value in that range is generated. If just <minamount> is used, then that value is added, set, or used as a percent, depending on the <type> option. Alternately, there could be an <amount> tag if you want a fixed, rather than a random value.
How this will benefit the site and/or other comments:
- It is very important to get this right before maps are made using it. If it is fixed later, then it will be necessary to either maintain multiple versions of game code, or to go back and fix maps made using the current spec.