Battalion: Arena's map editor has a scripting feature built in so a player can add custom scripts. Scripts control everything from the dialogue at the beginning and end of the game, to whether or not the map keeps track of morale, to new units being given at various points of the game, to when the game ends (other then all sides except one being defeated).
All script are made up of one or more event. Each event has one condition (when it happens) and one or more responses (what happens).
Following is a sample script. It has one event which has one condition and one response. All scripts start with <script> and end with </script>
<event> 'opening event tag.
<condition type="startGame"> 'opening condition tag
</condition> 'closing condition tag
<response type="disableMorale"> 'opening response tag
<disable value="true"/> 'response variable
</response type> 'closing response tag
</event> 'closing event tag
All scripts are in XML format. All tags (<tagnamehere>) need to be in properly nested pairs. Opening tags look like this <tagname>. Closing tags look like </tagname>.
Also, a pair of tags with no tags in between can be expressed like </tagname>.
Each event should have one condition and at least one response. Events begin with the <event> tag and end with the </event> tag. To make it so that an event fires more than once, change the opening event tag to look like <event repeats="INTEGER">. Where INTEGER is replaced with the number of times the event can fire. Replace "INTEGER" with "infinite" to make the event fire an unlimited number of times.
Conditions follow the following format:
Here is, as far as I can tell, some errors I’ve encountered in the script editor mean. Error #1085: Your tags (e.g. <event> or </script>) are not in properly nested matched pairs. Error #1090: You haven’t formatted your tags properly. You are probably missing a " < > / or other formatting character.
Often when scripting you get the some of the above errors. The best way to solve these is to use Adobe Dreamweaver, because it has an XML debugger. If you don't have Dreamweaver, you can use substitute like Microsoft XML Notepad, but it´s capacity to debug in correct XML format is weak and don´t work on all times.
The scripting guide is wrong. The order for the colors is actually: Alpha, Red, Green, Blue
Here is how the color codes for the scripts work:
FF=Alpha, AA=Red, BB=Green, CC=Blue
Keep the Alpha at FF for the cleanest colors. As alpha goes to 00, the color becomes grey.
Here are some primary colors.
To produce half-shades replace FF with 80.