XML/Scenario

Scenarios are special types of battles where the creator can modify the game from its regular style, and even add Lua scripting.

Folders
The scenario XMLs differ slightly based on the engine used. In Glest and MegaGlest, the scenario XML is located in scenarios/[scenario] (where [scenario] is the name of your scenario). In GAE, it is placed in gae/scenarios/[category]/[scenario] (where [category] is a folder of any name to categorize scenarios and [scenario] is the name of the scenario). In both engines, the scenario folder must have the same name as the XML.

difficulty
This is the displayed difficulty, as a number from 0-5. It does not affect the scenario in any way, and is only used to display what YOU think the difficulty should be classified as. The default english difficulties are:
 * 0 = Very Easy
 * 1= Easy
 * 2= Medium
 * 3= Hard
 * 4= Very Hard
 * 5= Insane

players
This is a list of the players in this game, where each player gets their own &lt;player /&gt; tag. Attributes are control, which is either human, cpu, or cpu-ultra</tt>, though GAE and MegaGlest add cpu-easy</tt> and cpu-mega</tt> as well. MegaGlest also adds the option of a network</tt> player. This asserts who controls that player, and one must be human and one must be some brand of cpu. In MegaGlest you can also edit the resource_multiplier</tt> for the cpu.

The faction is the name of the faction (must all be in the same techtree), and the team is the team number for the purpose of placing players on the same or different teams (players with the same number are allies, while different numbers are enemies).

map
The name of the map to use. It should exist in the player's maps folder. GAE can also have the map inside the scenario's folder itself, to allow the map to be used for the scenario only, without appearing in the regular game menu.

tileset
The name of the tileset to use. Note that it must exist in the user's tileset folder.

tech-tree
The techtree to use for the scenario. The existing factions for each player must exist in it.

fog-of-war
An optional value. If true</tt>, fog of war and the shroud of darkness will be displayed as normal, if false</tt>, there will be no fog of war nor the shroud of darkness. Finally explored</tt> will remove the shroud of darkness, but keep the fog of war.

default-resources
If true, the faction XML will be used to define the starting resources. If false, they start with no resources and you must use Lua to specify the resources to give. Generally on for non-scripted scenarios.

default-units
If true, the faction XML will be used to define the starting units. If false, they start with no units and you must use Lua to specify the units to give. Generally on for non-scripted scenarios.

default-victory-conditions
If true, the game is won or lost by defeating all the opponents (or more specifically, all the opponent's units which have a be-built skill). If false, the game only ends when the Lua script tells it to. Generally on for non-scripted scenarios.

loading-screen
A GAE only function to allow an image to be used as the loading screen background. If not loading screen image is used, exclude the tag completely. Currently in GAE 0.4, only the first specified image will work, but in the future, it may be possible to use multiple images, with one chosen on random.

scripts
Lua code will go in children tags of scripts. The exact Lua code available depends on the engine used, but the XML tags are all the same. Lua code will be executed based on what tag it is in.