Version 5 (modified by sanderd17, 9 years ago) ( diff )

Document escaping feature

The auras can be used on an entity by including the following part in the entity XML:

  <Auras>
    <Aura1>
      <Type>range</Type>
      <Radius>60</Radius>
      <Affects>Worker</Affects>
      <Modifications>
        <Builder.Rate> <Multiply>1.15</Multiply> </Builder.Rate>
      </Modifications>
      <AuraName>Builder Aura</AuraName>
      <AuraDescription>Buildings construct 15% faster within his vision.</AuraDescription>
    </Aura1>
    <Aura2>
      <Type>global</Type>
      <Affects>Temple</Affects>
      <Modifications>
        <Cost.Resources.stone> <Add>-50</Add> </Cost.Resources.stone>
      </Modifications>
      <AuraName>Acropolis Aura</AuraName>
      <AuraDescription>Temples are 50 stone cheaper during his lifetime.</AuraDescription>
    </Aura2>
  </Auras>

The Type can currently be range, global, formation, garrison or garrisonedUnits. The range type also requires an extra Radius (as in the example), all entities in this Radius will be affected by the aura. Global auras work on all entities (like technologies, but the working is reverted when the entity with an aura dies). Global and range auras also affect the unit itself when applicable. Formation auras affect all members of the same formation as the unit. The garrison aura has an effect on the garrisoning structure (arrows the structure shoots, speed of a ship, ...). And as last one, the garrisonedUnits aura influences the units that are visibly garrisoned (giving units on a wall extra armor f.e.).

Affects determines the classes it affects, listed as "Class1+Class2 Class3", which means Class3 OR (Class1 AND Class2). The aura will only have an effect on the listed classes.

AffectedPlayers defines on which players it will act (a hero might cause the enemy to have less armour). The possible values are Player (yourself), Ally, MutualAlly or Enemy. This value defaults to Player.

Modifications are list of modifications that will be applied. Similarly structured as with technologies. A modification consists out of key, which presents the name of the value that will be changed, and either Add or Multiply to resp. add or multiply the value of the affected entity with something. Note that the actions should be reversible (they are reversed when the aura carrying entity is killed), so multiplications with 0 are not allowed. All other values are supported.

Note that the list of modifiable unit properties is the same as with the Technologies (see TechModifications), but as '/' is not valid as an XML key, the '/' signs are replaced with dots. So Health.Max instead of Health/Max. You can escape a dot (.) by using a double (..). So "ResourceGatherer.Rates.food..grain" would become "ResourceGatherer/Rates/food.grain".

AuraName and AuraDescription are not mandatory, but will appear in various UI elements.

Note: See TracWiki for help on using the wiki.