bw logo

Chapter 39. .xml

Various BigWorld files use the XML format, and this chapter describes the grammar of the following ones:

39.1. <effect>.xml

Used by the client engine to configure lens effects, these files are located under fantasydemo/res/environments/fx.

The grammar of <effect>.xml files is listed below:

<root>
   <maxDistance> float  </maxDistance>
   <area>        float  </area>
   <fadeSpeed>   float  </fadeSpeed>

  *<Flare>
      <occlusionLevel> float                   </occlusionLevel>
      <type>           folder/file             </type>
      <size>           float                   </size>
      <width>          float                   </width>
      <height>         float                   </height>
      <depth>          float                   </depth>
      <rgba>           float float float float </rgba>

     ?<secondaries>
        *<Flare>
            <type>   folder/file             </type>
            <size>   float                   </size>
            <depth>  float                   </depth>
            <rgba>   float float float float </rgba>
         </Flare>
      </secondaries>

   </Flare>

</root>

Grammar of fantasydemo/res/environments/fx/<effect>.xml

The list below describes the tags in <effect>.xml:

  • area

    Radius in pixels of the flare that will be used for occlusion calculations.

    By default, this value is 1, as used for point lens effects. Area lens effects such as the sun require a larger value.

  • depth

    Distance along the vector from the light source to the centre of the screen.

    If set to 1.0, the flare will be displayed directly on the light source. If set to anything less than 1.0, flare will be moved somewhere along the vector.

    Values below 0.0 are valid, and will place the flare on the other side of the pivot point (0.0, the centre of the screen).

  • fadeSpeed

    Speed in which the lens effect's flares will fade in/out. Larger numbers result in slower fade in/out speeds.

  • Flare

    The flares to use for the lens effect.

    If multiple flares are specified, then the flare which occlusionLevel most closely matches the current visibility will be rendered on the screen.

  • height

    size sets both height and width, therefore set either size or both height and width.

    Clip Coordinates range from (-1,-1) to (1,1) so a size of 2.0 represents the entire screen.

    Height of the lens flare in clip coordinates. Clip coordinates range from (-1,-1) to (1,1), and so a height of 2.0 represents the entire screen.

  • maxDistance

    Distance up to which flare will still be seen. This value also applies to secondary flares.

  • occlusionLevel

    Value between 0.0 and 1.0 specifying the percentage of the lens effect that needs to be visible in order for this flare to be rendered.

    All occlusionLevel values between flares must be unique — flares with duplicate occlusionLevel values are not loaded.

  • rgba

    Colour value to tint the lens flare's texture map. This colour is multiplied by the values in the texture.

  • secondaries

    Tag for section specifying secondary flares. Secondary flares are displayed whenever the primary flare is displayed. Set the depth value for secondary flares to something other than 1.0 for the best results (although a value of 1.0 is still valid).

  • size

    size sets both height and width, therefore set either size or both height and width.

    Clip Coordinates range from (-1,-1) to (1,1) so a size of 2.0 represents the entire screen.

    Size (height and width) of the lens flare in clip coordinates.

  • type

    Material generated by Model Editor used to describe the flare. For details on grammar of materials, see .mfm.

  • width

    size sets both height and width, therefore set either size or both height and width.

    Clip Coordinates range from (-1,-1) to (1,1) so a size of 2.0 represents the entire screen.

    Width of the lens flare in clip coordinates.

39.2. <enumeration>.xml

BigWorld's enumeration files (dxenum.xml and <enumeration>.xml) provide descriptions for enumerated values defined in DirectX, so that they can be used in source files (such as FX files) and BigWorld tools (such as Model Editor).

BigWorld uses the enumeration file specified in <res>/resources.xml's section system/dxenum (for details on this file, see the document Client Programming Guide's section Overview Configuration files File resources.xml). It is initially set to system/data/dxenum.xml, which is the file shipped with BigWorld Technology.

For details on the implementation of enumeration for material properties in World Editor and Model Editor, see the document Client Programming Guide's section 3D Engine (Moo) Textures Texture detail levels/compression.

The grammar for the enumeration file is described below:

<root>

  +<enum_name>
    +<ENTRY>
       <NAME>   string  </NAME>
       <VALUE>  number  </VALUE>
       <DESC>   string  </DESC>
     </ENTRY>
   </enum_name>

  *<enum_alias>
     <ALIAS>  enum_name  </ALIAS>
   </enum_alias>

</root>

Grammar of enumeration file

The list below describes the tags in the enumeration file:

  • ALIAS

    Name of the enumeration which entries the current enum_alias will use.

    Value must be the enum_name of another enumeration specified in the file.

  • DESC

    Description of the entry.

  • ENTRY

    Tag for section specifying a value entry for the enumeration.

  • enum_alias

    Name of an enumeration for which the entries have already been specified as part of another enumeration.

  • enum_name

    Name by which to refer to the enumeration.

  • NAME

    Name by which to refer to the enumeration entry.

    For example, FALSE for VALUE of 1, or BLENDFACTOR for VALUE of 14.

  • VALUE

    Numeric value of the entry.

39.3. <flora>.xml

Flora configuration files have their location set by the floraXML tag in <res>/resources.xml.

The XML flora file defines among other things, the light map to be used, plus the ecotypes and noise generation functions.

For details on flora light maps, see the document Client Programming Guide's section 3D Engine (Moo) Features Lighting Flora light map.

For more details on <res>/resources.xml, see the document Client Programming Guide's section Overview Configuration files File resources.xml.

The format of this file is described below:

<flora.xml>

  ?LightMapSection   1

   <vb_size>        integer  </vb_size>
   <texture_width>  integer  </texture_width>
   <texture-height> integer  </texture_height>

   <ecotypes>        

    ?<empty>
      *<texture>   file    </texture>
      ?<sound_tag> string  </sound_tag>  
     </empty>

    *<ecotype>  
     
      *<texture>   file  </texture>     
      *<visual>    file 
        ?<flex>    float </flex>
       </visual>

      [GeneratorSection|VisualSection]

     </ecotype>
   </ecotypes>
</flora.xml>

Grammar of the flora configuration file

The grammar for the GeneratorSection is described below:

 <generator>  [empty | visual1 | chooseMax]

   <! If empty !>
   <empty> </empty>

   <! If visual !>
   VisualSection

   <! If chooseMax !>
  *[NoiseSection | RandomSection | FixedSection]

 </generator>

Grammar of flora configuration file's GeneratorSection

1

Please note that the keyword visual may appear as a value for the generator section (see the grammar above), or as a regular tag (see the grammar for VisualSection below)

The grammar for the VisualSection is described below:

*<visual>1 file 
  ?<flex> float </flex>
 </visual>

Grammar of flora configuration file's VisualSection

The grammar for the NoiseSection is described below:

*<noise>
  <frequency> float </frequency>
  GeneratorSection
 </noise>

Grammar of flora configuration file's NoiseSection

The grammar for the RandomSection is described below:

<random> float_btwn_0_and_1 </random>

Grammar of flora configuration file's RandomSection

The grammar for the FixedSection is described below:

<fixed> float_btwn_0_and_1 </fixed>

Grammar of flora configuration file's FixedSection

The list below describes the tags in the flora configuration file:

  • chooseMax

    One of the possible values for tag generator.

    If this type is specified, then it will define one more value sub-generators (possible values: noise, random, and fixed).

    Section specifying functions that generate values between 0 and 1.

    The one that generates the highest value will be used.

  • ecotype

    Arbitrary name identifying the ecotype.

    More than one texture can be associated with the ecotype.

    An ecotype might have a sound_tag associated with it, as well as a detail object (returned by generator section).

    The ecotype of a part of the terrain is determined by the texture with the highest blend applied to it.

  • ecotypes

    List of ecotypes.

  • fixed

    One of the possible value sub-generators that can be specified if generator is chooseMax.

    Value would normally be between 0 and 1, although higher values can be specified to make sure that this generator is always chosen.

  • flex

    Amount of flexion to be applied for visual, in relation to standard shader amount.

  • frequency

    Perlin noise frequency. Value must be between 0 and 1.

  • generator

    Specifies the parameters for choosing the detail objects to be randomly placed and oriented over the ecotype.

    Script bigworld/tools/WorldEditor/resources/scripts/ Ecotypes.py can be used to specify the rules of placement (i.e., how steep should the terrain be before the object is not placed, etc...).

  • LightMapSection

    For details, see LightMapSection.

  • noise

    One of the possible value sub-generators that can be specified if generator is chooseMax.

    Higher output value produces larger and fewer patches.

  • random

    One of the possible value sub-generators that can be specified if generator is chooseMax.

    This returns a random value between 0 and 1.

  • texture

    One of a list of terrain textures that will produce the given ecotype.

    Note that it should be a DDS file, as this is the type of file stored in the terrain data.

    Script bigworld/tools/WorldEditor/resources/scripts/ Ecotypes.py uses these entries to match terrain textures with ecotypes.

  • texture_height

    Maximum height of flora visuals.

  • texture_width

    Maximum width of flora visuals.

  • vb_size

    Size of the vertex buffer (in bytes).

  • visual

    • As tag

      File containing information about one of a list of flora visuals that is to be used for this ecotype.

      Ecotypes may contain more than one visual. In this case, visuals are used on a rotating basis, starting at the top of the list.

      For more details, see .visual.

    • As value for generator section

      One of the possible value sub-generators that can be specified if generator is chooseMax.

      Specifies that visuals will be used as flora objects. It may contain a list of visuals, which are used on a rotating basis, starting at the top of the list.

39.4. <graphics_settings>.xml

The graphics settings configuration files have their location set by the graphicsSettingsXML tag in resources.xml (for details, see the document Client Programming Guide's section Overview Configuration files File resources.xml).

The XML graphics settings file hosts the customisable options of the client's graphics settings feature — for details, see the document Client Programming Guide's section 3D Engine (Moo) Graphics settings.

The grammar of this <graphics_settings>.xml is described below:

<graphics_settings.xml>

   <flora>
    +<option>
       <label> string </label>
       <value> float  </value>
     </option>
   </flora>

   <farPlane>
    +<option>
       <label> string </label>
       <value> float  </value>
     </option>
   </farPlane>

</graphics_settings.xml>

Grammar of <graphics_settings>.xml configuration file

The list below describes the tags in <graphics_settings>.xml:

39.5. <light>.xml

Mentioned in:

The grammar for the XML light configuration files for ambient lights is described below:

<fileName>
  <ambientLight>
     <colour>      float float float  </colour>
    ?<multiplier>  float              </multiplier>
  </ambientLight>
</fileName>

Grammar of XML light configuration file — Ambient lights

The grammar for the XML light configuration files for directional lights is described below:

<fileName>
  <directionalLight>
     <colour>      float float float  </colour>
     <direction>   float float float  </direction>
    ?<dynamic>     [true|false]       </dynamic>
    ?<static>      [true|false]       </static>
    ?<specular>    [true|false]       </specular>
    ?<multiplier>  float              </multiplier> 
  </directionalLight>
</fileName>

Grammar of XML light configuration file — Directional lights

The grammar for the XML light configuration files for flares is described below:

<fileName>
  <flare>
     <resource>  file               </resource>
     <position>  float float float  </position>
     <colour>    float float float  </colour>
  </ambientLight>
</fileName>

Grammar of XML light configuration file — Flares

The grammar for the XML light configuration files for omni lights is described below:

<fileName>
  <omniLight>
     <colour>        float float float  </colour>
     <position>      float float float  </position>
     <innerRadius>   float              </innerRadius>
     <outerRadius>   float              </outerRadius>
    ?<dynamic>      [true|false]        </dynamic>
    ?<static>       [true|false]        </static>
    ?<specular>     [true|false]        </specular>
    ?<multiplier>    float              </multiplier>
  </omniLight>
</fileName>

Grammar of XML light configuration file — Omni lights

The grammar for the XML light configuration files for spot lights is described below:

<fileName>
  <spotLight>
     <colour>        float float float  </colour>
     <position>      float float float  </position>
     <direction>     float float float  </direction>
     <innerRadius>   float              </innerRadius>
     <outerRadius>   float              </outerRadius> 
     <cosConeAngle>  float              </cosConeAngle>
    ?<dynamic>      [true|false]        </dynamic>
    ?<static>       [true|false]        </static>
    ?<specular>     [true|false]        </specular>
    ?<multiplier>    float              </multiplier>
  </spotLight>
</fileName>

Grammar of XML light configuration file — Spot lights

The list below describes the tags in the MVL light configuration file:

  • colour (Available for ambientLight, directionalLight, flare, omniLight, and spotlight)

    Colour of the light.

  • cosConeAngle (Available for spotlight)

    Cosine of the angle of light's cone.

  • direction (Available for directionalLight and spotlight)

    Direction at which light will be projected.

  • dynamic (Available for directionalLight, omniLight, and spotlight)

    Specifies that light should be applied to dynamic, i.e., moving objects.

  • innerRadius (Available for omniLight, and spotlight)

    Area over which the light will be at full intensity.

  • outerRadius (Available for omniLight, and spotlight)

    Total area influenced by light.

  • position (Available for flare, omniLight, and spotlight)

    XYZ point of origin for the light.

  • resource (Available for flare)

    Configuration file for the flare effect.

  • specular (Available for directionalLight, omniLight, and spotlight)

    Boolean specifying whether light should be applied to materials with a specular map specified.

  • static (Available for directionalLight, omniLight, and spotlight)

    Boolean specifying whether light should be applied to static, i.e., scene objects.

39.6. <mouse_cursors>.xml

Used by the client engine to define the shapes of mouse cursor available from within the game, the mouse cursor definition file can be specified in tag gui/cursorDefinitions in res/resources.xml, but defaults to res/gui/mouse_cursor.xml (the tags are documented in the file itself — for details, see Client Programming Guide's section Overview Configuration files File resources.xml).

For details on how to control the behaviour and appearance of mouse cursor via game scripts, see the document Client Programming Guide's section Graphical User Interface (GUI) Mouse cursor.

The grammar of <mouse_cursors>.xml files is listed below:

<mouse_cursors>

  *<cursor_name> 
      <hotspot>  integer integer  </hotspot>
      <texture>  folder/file      </texture>
   </cursor_name> 

</mouse_cursors>

Grammar of <mouse_cursors>.xml

The list below describes the tags in file <mouse_cursors>.xml:

  • cursor_name

    Arbitrary value identifying the type of cursor.

    For example, FantasyDemo's mouse cursor definition file (res/gui/ mouse_cursors.xml) is shipped with the following cursor names:

    • arrow

    • drag

    • no

    • point

  • hotspot

    XY location of the cursor icon's hotspot in the respective texture.

  • texture

    Image file to be associated to the icon type.

39.7. <particle>.xml

Generated by Particle Editor (for more details, see Content Tools Reference Guide's chapter Particle Editor), the grammar for <particle>.xml files is described below:

<file_name>

  +<sub_system>  
     <serialiseVersionData>  integer            </serialiseVersionData>
     <capacity>              integer            </capacity>
     <windFactor_>           float              </windFactor_>
     <explicitTransform_>   [true|false]        </explicitTransform_>
     <explicitPosition_>     float float float  </explicitPosition_>
     <explicitDirection_>    float float float  </explicitDirection_>
     <localOffset_>          float float float  </localOffset_>
     <maxLod_>               float              </maxLod_>
     <fixedFrameRate_>       float              </fixedFrameRate_>

     <Actions>
       *Source       1
       *Sink         2
       *Barrier      3
       *Force        4
       *Stream       5
       *Jitter       6
       *Scaler       7
       *TintShader   8
       *NodeClamp    9
       *Orbitor      10
       *Flare        11
       *Collide      12
       *MatrixSwarm  13
       *Magnet       14
       *Splat        15
     </Actions>
     <Renderer>
       { Amp    |    (16)
         Blur   |    (17)
         Mesh   |    (18)
         Sprite |    (19)
         Trail  }    (20)
     </Renderer>

</file_name>

Grammar of <particle>.xml

39.7.1. Sub system components

The sub-sections below describe the 15 possible sub system components of the particle system (they are described in the order in which they appear in Particle Editor's Add Component drop-down list box):

39.7.1.1. SourceComponent

The grammar for the SourceComponent is described below:

<Source>
   <delay_>       float  </delay_>
   <minimumAge_>  float  </minimumAge_>
   <name_>        string </name_>
   <pPositionSrc>
      {BoxVectorGenerator      |   1
       CylinderVectorGenerator |   2
       LineVectorGenerator     |   3
       PointVectorGenerator    |   4
       SphereVectorGenerator   }   5
   </pPositionSrc>
   <pVelocitySrc>
      {BoxVectorGenerator       |  6
       CylinderVectorGenerator  |  7
       LineVectorGenerator      |  8
       PointVectorGenerator     |  9
       SphereVectorGenerator    }  10
   </pVelocitySrc>
   <motionTriggered_>       [true|false]             </motionTriggered_>
   <timeTriggered_>         [true|false]             </timeTriggered_>
   <grounded_>              [true|false}             </grounded_>
   <dropDistance_>          float                    </dropDistance_>
   <rate_>                  float                    </rate_>
   <sensitivity_>           float                    </sensitivity_>
   <activePeriod_>          float                    </activePeriod_>
   <sleepPeriod_>           float                    </sleepPeriod_>
   <sleepPeriodMax_>        float                    </sleepPeriodMax_>
   <minimumSize_>           float                    </minimumSize_>
   <maximumSize_>           float                    </maximumSize_>
   <forcedUnitSize_>        integer                  </forcedUnitSize_>
   <allowedTimeInSeconds_>  float                    </allowedTimeInSeconds_>
   <initialRotation_>       float float              </initialRotation_>
   <randomInitialRotation_> float float              </randomInitialRotation_>
   <initialColour_>         float float float float  </initialColour_>
   <randomSpin_>            [true|false}             </randomSpin_>
   <minSpin_>               float                    </minSpin_>
   <maxSpin_>               float                    </maxSpin_>
   <ignoreRotation_>        [true|false]             </ignoreRotation_>
   <inheritVelocity_>       float                    </inheritVelocity_>
</Source>

Grammar of SourceComponent in <particle>.xml

39.7.1.2. SinkComponent

The grammar for the SinkComponent is described below:

<Sink>
   <delay_>         float  </delay_>
   <minimumAge_>    float  </minimumAge_>
   <name_>          string </name_>
   <maximumAge_>    float  </maximumAge_>
   <minimumSpeed_>  float  </minimumSpeed_>
</Sink>

Grammar of SinkComponent in <particle>.xml

39.7.1.3. BarrierComponent

The grammar for the BarrierComponent is described below:

<Barrier>
   <delay_>       float   </delay_>
   <minimumAge_>  float   </minimumAge_>
   <name_>        string  </name_>
   <shape_>       [1|2|3] </shape_> 1
   <reaction_>    [0|1|2] </reaction_> 2
   <vecA_>        float float float  </vecA_>
   <vecB_>        float float float  </vecB_>
   <radius_>      float              </radius_>
</Barrier>

Grammar of BarrierComponent in <particle>.xml

1

Possible values:

  • 1 — Vertical cylinder

  • 2 — Box

  • 3 — Sphere

13

Possible values:

  • 0 — Bounce

  • 1 — Remove

  • 2 — Allow

39.7.1.4. ForceComponent

The grammar for the ForceComponent is described below:

<Force>
   <delay_>      float              </delay_>
   <minimumAge_> float              </minimumAge_>
   <name_>       string             </name_>
   <vector_>     float float float  </vector_>
</Force>

Grammar of ForceComponent in <particle>.xml

39.7.1.5. StreamComponent

The grammar for the StreamComponent is described below:

<Stream>
   <delay_>      float              </delay_>
   <minimumAge_> float              </minimumAge_>
   <name_>       string             </name_>
   <vector_>     float float float  </vector_>
   <halfLife_>   float              </halfLife_>
</Stream>

Grammar of StreamComponent in <particle>.xml

39.7.1.6. JitterComponent

The grammar for the JitterComponent is described below:

<Jitter>
   <delay_>          float        </delay_>
   <minimumAge_>     float        </minimumAge_>
   <name_>           string       </name_>
   <affectPosition_> [true|false] </affectPosition_>
   <affectVelocity>  [true|false] </affectVelocity_>
   <pPositionSrc>
      {BoxVectorGenerator      |  1
       CylinderVectorGenerator |  2
       LineVectorGenerator     |  3
       PointVectorGenerator    |  4
       SphereVectorGenerator   }  5
   </pPositionSrc>
   <pVelocitySrc>
      {BoxVectorGenerator      |  6
       CylinderVectorGenerator |  7
       LineVectorGenerator     |  8
       PointVectorGenerator    |  9
       SphereVectorGenerator   }  10
   </pVelocitySrc>
</Jitter>

Grammar of JitterComponent in <particle>.xml

39.7.1.7. ScalerComponent

The grammar for the ScalerComponent is described below:

<Scaler>
   <delay_>      float  </delay_>
   <minimumAge_> float  </minimumAge_>
   <name_>       string </name_>
   <size_>       float  </size_>
   <rate_>       float  </rate_>
</Scaler>

Grammar of ScalerComponent in <particle>.xml

39.7.1.8. TintShaderComponent

The grammar for the TintShaderComponent is described below:

<TintShader>
   <delay_>      float         </delay_>
   <minimumAge_> float         </minimumAge_>
   <name_>       string        </name_>
   <repeat_>     [true|false]  </repeat_>
   <period_>     float         </period_>
   <tints_>
     *<Tint>
         <time>  float             </time>
         <color> float float float </color>
      </Tint>
   </tints_> 
</TintShader>

Grammar of TintShaderComponent in <particle>.xml

39.7.1.9. NodeClampComponent

The grammar for the NodeClampComponent is described below:

<NodeClamp>
   <delay_>       float         </delay_>
   <minimumAge_>  float         </minimumAge_>
   <name_>        string        </name_>
   <fullyClamp_>  [true|false]  </fullyClamp_>
</NodeCLamp>

Grammar of NodeClampComponent in <particle>.xml

39.7.1.10. OrbitorComponent

The grammar for the OrbitorComponent is described below:

<Orbitor>
   <delay_>           float             </delay_>
   <minimumAge_>      float             </minimumAge_>
   <name_>            string            </name_>
   <point_>           float float float </point_>
   <angularVelocity_> float             </angularVelocity_>
   <affectVelocity_>  [true|false]      </affectVelocity_>
</Orbitor>

Grammar of OrbitorComponent in <particle>.xml

39.7.1.11. FlareComponent

The grammar for the FlareComponent is described below:

<Flare>
   <delay_>           float         </delay_>
   <minimumAge_>      float         </minimumAge_>
   <name_>            string        </name_>
   <flareName_>       folder/file   </flareName_>
   <flareStep_>       integer       </flareStep_>
   <colourize_>       [true|false]  </colourize_>
   <useParticleSize_> [true|false]  </useParticleSize_>
</Flare>

Grammar of FlareComponent in <particle>.xml

39.7.1.12. CollideComponent

The grammar for the CollideComponent is described below:

<Collide>
   <delay_>             float         </delay_>
   <minimumAge_>        float         </minimumAge_>
   <name_>              string        </name_>
   <spriteBased_>       [true|false]  </spriteBased_>
   <elasticity_>        float         </elasticity_>
   <minAddedRotation_>  float         </minAddedRotation_>
   <maxAddedRotation_>  float         </maxAddedRotation_>
   <entityID_>          integer       </entityID_>
   <soundTag_>          string        </soundTag_>
   <colourize_>         [true|false]  </colourize_>
   <useParticleSize_>   [true|false]  </useParticleSize_>
</Collide>

Grammar of CollideComponent in <particle>.xml

39.7.1.13. MatrixSwarmComponent

The grammar for the MatrixSwarmComponent is described below:

<MatrixSwarm>
   <delay_>       float  </delay_>
   <minimumAge_>  float  </minimumAge_>
   <name_>        string </name_>
</MatrixSwarm>

Grammar of MatrixSwarmComponent in <particle>.xml

39.7.1.14. MagnetComponent

The grammar for the MagnetComponent is described below:

<Magnet>
   <delay_>       float  </delay_>
   <minimumAge_>  float  </minimumAge_>
   <name_>        string </name_>
   <strength_>    float  </strength_>
   <minDist_>     float  </minDist_>
</Magnet>

Grammar of MagnetComponent in <particle>.xml

39.7.1.15. SplatComponent

The grammar for the SplatComponent is described below:

<Splat>
   <delay_>       float  </delay_>
   <minimumAge_>  float  </minimumAge_>
   <name_>        string </name_>
</Splat>

Grammar of SplatComponent in <particle>.xml+

39.7.2. Particle renderers

The sub-sections below describe the 5 possible vector generator for position and velocity:

39.7.2.1. AmpParticleRenderer

The grammar for the AmpParticleRenderer is described below:

<AmpParticleRenderer>
   <viewDependent_>  [true|false]  </viewDependent_>
   <local_>          [true|false]  </local_>
   <textureName_>    folder/file   </textureName_>
   <width_>          float         </width_>
   <height_>         float         </height_>
   <steps_>          integer       </steps_>
   <variation_>      float         <variation_>
   <circular_>       [true|false]  </circular_>
</AmpParticleRenderer>

Grammar of AmpParticleRenderer in <particle>.xml

39.7.2.2. BlurParticleRenderer

The grammar for the BlurParticleRenderer is described below:

<BlurParticleRenderer>
   <viewDependent_>  [true|false]  </viewDependent_>
   <local_>          [true|false]  </local_>
   <textureName_>    folder/file   </textureName_>
   <width_>          float         </width_>
   <time_>           float         </time_>
</BlurParticleRenderer>

Grammar of BlurParticleRenderer in <particle>.xml

39.7.2.3. MeshParticleRenderer

The grammar for the MeshParticleRenderer is described below:

<MeshParticleRenderer>
   <viewDependent_>  [true|false]  </viewDependent_>
   <local_>          [true|false]  </local_>
   <visualName_>     folder/file   </visualName_>
   <doubleSided_>    [true|false]  </doubleSided_>
   <materialFX_>     integer       </materialFX_>
   <sortType_>       integer       </sortType_>
</MeshParticleRenderer>

Grammar of MeshParticleRenderer in <particle>.xml

39.7.2.4. SpriteParticleRenderer

The grammar for the SpriteParticleRenderer is described below:

<SpriteParticleRenderer>
   <viewDependent_>  [true|false]  </viewDependent_>
   <local_>          [true|false]  </local_>
   <textureName_>    folder/file   </textureName_>
   <materialFX_>     integer       </materialFX_>
   <frameCount_>     integer       </frameCount_>
   <frameRate_>      float         </frameRate_>
</SpriteParticleRenderer>

Grammar of SpriteParticleRenderer in <particle>.xml

39.7.2.5. TrailParticleRenderer

The grammar for the TrailParticleRenderer is described below:

<TrailParticleRenderer>
   <viewDependent_>  [true|false]  </viewDependent_>
   <local_>          [true|false]  </local_>
   <textureName_>    folder/file   </textureName_>
   <width_>          float         </width_>
   <skip_>           integer       </skip_>
   <steps_>          integer       </steps_>
</TrailParticleRenderer>

Grammar of TrailParticleRenderer in <particle>.xml

39.7.2.6. VisualParticleRenderer

The grammar for the VisualParticleRenderer is described below:

<VisualParticleRenderer>   <viewDependent_>  [true|false]  </viewDependent_>
   <local_>          [true|false]  </local_>
   <visualName_>     folder/file   </visualName_>
</VisualParticleRenderer>

Grammar of VisualParticleRenderer in <particle>.xml

39.7.3. Position/velocity vector generators

The sub-sections below describe the 5 possible vector generator for position and velocity:

39.7.3.1. BoxVectorGenerator

The grammar for the BoxVectorGenerator is described below:

<BoxVectorGenerator>
   <nameID_>    BoxVectorGenerator  </nameID_>
   <corner_>    float float float   </corner_>
   <opposite_>  float float float   </opposite_>
</BoxVectorGenerator>

Grammar of BoxVectorGenerator in <particle>.xml

39.7.3.2. CylinderVectorGenerator

The grammar for the CylinderVectorGenerator is described below:

<CylinderVectorGenerator>
   <nameID_>     CylinderVectorGenerator  </nameID_>
   <origin_>     float float float        </origin_>
   <direction_>  float float float        </direction_>
   <maxRadius_>  float                    </maxRadius_>
   <minRadius_>  float                    </minRadius_>
   <basisU_>     float float float        </basisU_>
   <basisV_>     float float float        </basisV_>
</CylinderVectorGenerator>

Grammar of CylinderVectorGenerator in <particle>.xml

39.7.3.3. LineVectorGenerator

The grammar for the LineVectorGenerator is described below:

<LineVectorGenerator>
   <nameID_>     LineVectorGenerator  </nameID_>
   <origin_>     float float float    </origin_>
   <direction_>  float float float    </direction_>
</LineVectorGenerator>

Grammar of LineVectorGenerator in <particle>.xml

39.7.3.4. PointVectorGenerator

The grammar for the PointVectorGenerator is described below:

<PointVectorGenerator>
   <nameID_>    PointVectorGenerator  </nameID_>
   <position_>  float float float     </position_>
</PointVectorGenerator>

Grammar of PointVectorGenerator in <particle>.xml

39.7.3.5. SphereVectorGenerator

The grammar for the SphereVectorGenerator is described below:

<SphereVectorGenerator>
   <nameID_>     SphereVectorGenerator  </nameID_>
   <centre_>     float float float      </centre_>
   <maxRadius_>  float                  </maxRadius_>
   <minRadius_>  float                  </minRadius_>
</SphereVectorGenerator>

Grammar of SphereVectorGenerator in <particle>.xml

39.8. <sky>.xml

Sky configuration files are used by spaces, and can be located in any folder of your choice, as their location is set by the timeOfDay tag in <res>/spaces/<space>/space.settings (for details on this file's grammar, see space.settings).

Mentioned in the documentClient Programming Guide's sections Terrain Cloud shadows Tweaking and 3D Engine (Moo) Features Lighting Light maps Sky light map.

The grammar is listed below:

<root>

  <texture>            file      </texture>
  <mieAmount>          float     </mieAmount>
  <turbidityOffset>    float     </turbidityOffset>
  <turbidityFactor>    float     </turbidityFactor>
  <vertexHeightEffect> float     </vertexHeightEffect>
  <sunHeightEffect>    float     </sunHeightEffect>
  <power>              float     </power>
  <farPlane>           integer   </farPlane>
 
  ?LightMapSection 1

  <day_night_cycle>
     <angle>       float              </angle>
     <moonAngle>   float              </moonAngle>
     <hourLength>  float              </hourLength>
     <startTime>   float              </startTime>

    +<lightKey>
      <time>      float              </time>
      <colour>    float float float  </colour>
     </lightKey>

    +<ambientKey>
      <time>      float              </time>
      <colour>    float float float  </colour>
     </ambientKey>

</root>

Grammar of sky configuration file

The list below describes the tags in the sky configuration file:

  • ambientKey

    Section specifying colour that should be used to evenly light all models at the specified time.

    The ambient lighting is an approximation of global bounce lighting, and hence comes from all directions (is directionless)

  • angle

    Angle of the sun (in degrees).

    It determines the sun's path across de sky.

  • colour

    Base colour that the respective light source (sun or ambient) should produce.

  • day_night_cycle

    Section containing settings that configure the lighting at various times of the day, as well as how quickly hours pass.

  • farPlane

    Camera far plane for all spaces using this sky definition file.

    This will be overridden on a per-space basis if there is a farplane entry in the space.settings file (for details, see space.settings).

  • hourLength

    Number of real seconds that a game hour will last.

  • lightKey

    Section specifying colour that the sun should produce at the specified time.

  • LightMapSection

    For details, see LightMapSection.

  • mieAmountA

    Amount of mie (forward) scattering in the sky. Set this to larger values to increase the amount of light that is added to the sky when looking in the direction of the sun.

  • moonAngle

    Angle of the moon (in degrees).

    It determines the moon's path across de sky.

  • power

    Exponent for the mie (forward) scattering in the sky.

    Set this to a higher value to create a more focused corona around the sun.

  • sunHeightEffectA

    Unit-less value that adds mie (forward) scattering as the sun rises in the sky.

  • texture

    File containing texture, which displays the colour gradient of the sky over time.

    Vertical line displays the sky gradient at a particular time.

    Horizontal line displays a point in the sky along the day.

  • time

    Time (in 24-hour format) at which the respective light should be used.

  • turbidityFactorA

    Overall multiplier for mie (forward) scattering in the sky.

    Set this to a higher value to represent more particulate matter in the sky (and thus see more forward scattering of light in the direction of the sun).

  • turbidityOffsetA

    Overall offset for mie (forward) scattering in the sky.

  • vertexHeightEffectA

    Unit-less value that adds mie (forward) scattering depending on the height of the vertex in the sky. Higher values produce more scattering on the horizon.

A — Advanced setting. Should only be modified by advanced users.

39.9. <fx>.xml

FX files are used by the python FX module, and can be located in any folder of your choice. FX files are based around Actors. For each actor, you should specify one Joint. And for each actor, you can specify any number of Events. Each Actor, Joint or Event section requires the name of the actor to be specified as its section name as a string.

The grammar is listed below:

<file_name>
   +<Actor> string 
     { Light |       1
       Model |        2
       ParticleSystem |      3
       PPChain }      4
   </Actor>

   +<Joint> string
     { DummyModel |    5
       Entity |    6
       HardPoint |    7
       LightSource |    8
       ModelRoot |    9
       Node |    10
       PPScreen  }    11
   </Joint>

   *<Event> string
     { AOEVictimNodeList |    12
       AddDecal |    13
       AlignModel |    14
       ClearParticles |    15
       CorrectMotionTriggeredParticles |    (16)
       Fade |    (17)
       Flicker |    (18)
       FlickeringLight |    (19)
       ForceParticle |    (20)
       PPAnimateProperty |    (21)
       PPTranslationProperty |    (22)
       ParticleSubSystem |    (23)
       PlayAction |    (24)
       PlaySound |    (25)
       RampTimeTriggeredParticles |    (26)
       RandomDelay |    (27)
       ResetTimeTriggeredParticles |    (28)
       SetBasis |    (29)
       SetColour |    (30)
       SetOrbitorPoint |    (31)
       Shockwave |    (32)
       SwarmTargets }    (33)
   </Event>
</file_name>

Grammar of FX file

The list below describes the tags in the FX file:

39.9.1. Light Section

The Light Actor creates a PyChunkLight. It allows specification of the following :

<Light>
    <innerRadius> float </innerRadius>
    <outerRadius> float </outerRadius>
    <colour> Vector4 </colour>
</Light>
  • innerRadius

    Inner Radius of the light, in metres.

  • outerRadius

    Outer Radius of the light, in metres.

  • colour

    Colour of the light source in RGBA form.

39.9.2. Model Section

The Model Actor creates a PyModel. It allows specification of the following :

<Model> string </Model>
  • Model

    Resource ID of the model to load.

39.9.3. ParticleSystem Section

The ParticleSystem Actor creates a PyMetaParticleSystem. It allows specification of the following :

<ParticleSystem> string </ParticleSystem>
  • Particle System

    Resource ID of the particle system to load.

39.9.4. PPChain Section

The PPChain Actor creates a post processing chain. It allows specification of the following:

<PPChain> string
    <Property> string
        <Float> float </Float>
    </Property>
    <Property> string
        <Vector4> Vector4 </Vector4>
    </Property>
    <Property> string
        <Colour> colour </Colour>
    </Property>
</PPChain>
  • PPChain

    Resource ID of the *.ppchain file to load.

  • Property

    Property in post processing chain to set. Properties can be of types:

    • float

    • vector4

    • colour

39.9.5. DummyModel Section

The DummyModel Joint attaches the actor to a dummy model, which follows the player but is not attached to them. This is useful because even if the player changes model, or becomes invisible, effects attached to a DummyModel will still be visible. It allows specification of the following :

<DummyModel> </DummyModel>

39.9.6. Entity Section

The Entity Joint adds the actor as a secondary model of an entity. It the actor is a Model, it creates a Motor that makes it follow the entity. If the actor is a ParticleSystem, its position is set to where the source is at time of attachment. It allows specification of the following :

<Entity> </Entity>

39.9.7. HardPoint Section

The HardPoint Joint attaches the actor to a hardpoint. It uses the hardpoint feature, meaning that both the actor and the source must have the corresponding hard point. It allows specification of the following :

<HardPoint> string </HardPoint>
  • HardPoint

    Hard Point name, without the HP_ prefix.

39.9.8. LightSource Section

The LightSource Joint attaches a light to a PyModelNode. The actor must be a PyChunkLight.

<LightSource> ?string
</LightSource>
  • LightSource

    Optional name of node to attach to.

39.9.9. ModelRoot Section

The ModelRoot Joint attaches the actor to the source model's root node. It allows specification of the following :

<ModelRoot> </ModelRoot>

39.9.10. Node Section

The Node Actor attaches the actor directly to the specified node on the source model. It allows specification of the following :

<Node>  string  </Node>
  • Node

    Node name.

39.9.11. PPScreen Section

The PPScreen Joint attaches a post processing chain to the screen. It allows specification of the following :

<PPScreen> </PPScreen>

39.9.12. AOEVictimNodeList Section

The AOEVictimNodeList Event this event finds all victims in the area of effect, and sets the node list into the actors' MatrixSwarmPSA target lists. It allows specification of the following :

<AOEVictimNodeList> string
    <maxNodes> float </maxNodes>
    <maxRange> float </maxRange>
    <findTeam> int </findTeam>
</AOEVictimNodeList>
  • maxNodes

    Maximum number of nodes that can be struck.

  • maxRange

    Maximum range for AOE.

  • findTeam

    Hit team members within range.

39.9.13. AddDecal Section

The AddDecal Event adds a decal to the world, at the position of the source when the event is fired. It allows specification of the following :

<AddDecal> string
    <size> float </size>
    <extent> Vector3 </extent>
</AddDecal>
  • size

    width and depth of the decal, in metres.

  • extent

    extent of the collision ray. The actor's position is used as the midpoint for the collision ray when choosing where to put the decal in the world.

39.9.14. AlignModel Section

The AlignModel Event will position and align a model actor at runtime according to the basis tuple (dir,pos) passed into the Effect's variable arguments dictionary. It allows specification of the following :

<AlignModel> </AlignModel>

39.9.15. ClearParticles Section

The ClearParticles Event clears all particle containers, resetting them to their initial state. It allows specification of the following :

<ClearParticles>
    *<systemName> string </systemName>    
</ClearParticles>
  • systemName

    Optional list of names of sub-systems within the MetaParticleSystem actor to apply the event to.

39.9.16. CorrectMotionTriggeredParticles Section

The CorrectMotionTriggeredParticles Event resets the motion trigger flag on all applicable sub-systems. This allows motion triggered particle systems to be re-used. It works around a problem caused by the motion trigger using its last known world position to calculate the distance the particle system has moved since the last frame. It allows specification of the following :

<CorrectMotionTriggeredParticles>
    *<systemName> string </systemName>
</CorrectMotionTriggeredParticles>
  • systemName

    Optional list of names of sub-systems within the MetaParticleSystem actor to apply the event to.

39.9.17. Fade Section

The Fade Event fades out a light actor over the specified time. It allows specification of the following :

<Fade>
    <time> float </time>    
</Fade>
  • time

    Specifies the time over which the light will fade out.

39.9.18. Flicker Section

The Flicker Event flickers the colour of a light actor. It allows specification of the following :

<Flicker>
    <amplitude> float </amplitude>
    <speed> float </speed>    
</Flicker>
  • amplitude

    Multiplies the amplitude of the noise that drives the flicker.

  • speed

    Multiplies the frequency of the noise that drives the flicker.

39.9.19. FlickeringLight Section

The FlickeringLight Event creates a canned flickering light effect at the position of the source's model's root node. It lasts for the duration of the effect, or the duration of a specified actor in the effect, fading out over the last 50 percent. It allows specification of the following :

<FlickeringLight>
    <innerRadius> float </innerRadius>
    <outerRadius> float </outerRadius>    
    <colour> Vector4 </colour>
    ?<actorForTiming> string </actorForTiming>
</FlickeringLight>
  • innerRadius

    Inner Radius of the light, in metres.

  • outerRadius

    Outer Radius of the light, in metres.

  • colour

    Colour of the light source in RGBA form.

  • actorForTiming

    [Optional] Specify the name of another actor in the Effect to use as the duration of the FlickeringLight event. If not specified, the total duration of the rest of the effect will be used.

39.9.20. ForceParticle Section

The ForceParticle Event spawns a single unit of particles. The unit size is specified with the particle system, in Particle Editor. It allows specification of the following :

<ForceParticle>
    *<systemName> string </systemName>
</ForceParticle>
  • systemName

    Optional list of names of sub-systems within the MetaParticleSystem actor to apply the event to.

39.9.21. PPAnimateProperty Section

The PPAnimateProperty Event animates a material property in a post-processing chain over time. It allows specification of the following :

<PPAnimateProperty>
    *<Key> float, Colour, Vector4 </Key>
</PPAnimateProperty>
  • Key

    It reads a list of keyframes of (time,value) The value can currently be a Float or Vector4.

39.9.22. PPTranslationProperty Section

The PPTranslationProperty Event gets the world position of the SFX source, and sets it on a post-processing chain actor It allows specification of the following :

<PPTranslationProperty> string
</PPTranslationProperty>
  • PPTranslationProperty

    Property name.

39.9.23. ParticleSubSystem Section

The ParticleSubSystem Event is a base class that exists to provide a foundation for all events that deal with selected subSystems of a MetaParticleSystem. ParticleSubSystem-based events allow the user to specify the name of specific ParticleSystems within the MetaParticleSystem, by adding a list of "systemName" tags in the XML file. If no system names are specified, then the entire MetaParticleSystem will be affected. It allows specification of the following :

<ParticleSubSystem>
    +<systemName> string </systemName>
</ParticleSubSystem>
  • systemName

    Resource ID of the particle system.

39.9.24. PlayAction Section

The PlayAction Event plays, in sequence, a list of Actions on a Model. It allows specification of the following :

<PlayAction>
    +<Action> string </Action>    
</PlayAction>
  • Action

    List of action names to play sequentially on the actor.

39.9.25. PlaySound Section

The PlaySound Event This class implements an event that plays a sound. The sound may be associated with a particular actor to provide its 3D position; if not the sound will be played on the source model. It allows specification of the following :

<PlaySound> string
    +<attachToActor> string </attachToActor>
</PlaySound>
  • attachToActor

    Specify an actor's position from which the sound should be played.

39.9.26. RampTimeTriggeredParticles Section

The RampTimeTriggeredParticles Event ramps up/down the generation rate of time triggered particles, to fade them in/out. It also gives them a specified duration, which allows time triggered particles to behave correctly in a OneShot effect scenario. It allows specification of the following :

<RampTimeTriggeredParticles>
    <Duration> float </Duration>
    <FadeTime> float </FadeTime>    
</RampTimeTriggeredParticles>
  • Duration

    Total duration of the event, i.e. how long the particles will be visible for.

  • FadeTime

    Time in seconds, measured from the end of the event, when the particles should be turned off.

39.9.27. RandomDelay Section

The RandomDelay Event waits for a random amount of time, then spawns a list of events at once. It allows specification of the following :

<RandomDelay>
    <MinDelay> float </MinDelay>
    <MaxDelay> float </MaxDelay>
    +<Event> EventSection </Event>
</RandomDelay>
  • MinDelay

    Minimum time in seconds for the random delay.

  • MaxDelay

    Maximum time in seconds for the random delay.

  • Event

    List of Events to spawn at once, after the delay has been observed.

39.9.28. ResetTimeTriggeredParticles Section

The ResetTimeTriggeredParticles Event resets the time trigger of a particle system actor. This is useful for effects that are reused. It means that when reused, the particles will begin "from the beginning", instead of sometime through their normal cycle. It allows specification of the following :

<ResetTimeTriggeredParticles>
    *<systemName> string </systemName>
</ResetTimeTriggeredParticles>
  • systemName

    Optional list of names of sub-systems within the MetaParticleSystem actor to apply the event to.

39.9.29. SetBasis Section

The SetBasis Event positions and aligns a particle system in the world, based on the basis tuple (dir,pos) passed in at run-time to the effect's variable arguments dictionary. It allows specification of the following :

<SetBasis>
    *<systemName> string </systemName>
</SetBasis>
  • systemName

    Optional list of names of sub-systems within the MetaParticleSystem actor to apply the event to.

39.9.30. SetColour Section

The SetColour Event sets a colour modulator on the TintShader action of a particle system actor, using a Vector4Provider passed int at run-time to the effect's variable arguments dictionary. It allows specification of the following :

<SetColour>
    *<systemName> string </systemName>
</SetColour>
  • systemName

    Optional list of names of sub-systems within the MetaParticleSystem actor to apply the event to.

39.9.31. SetOrbitorPoint Section

The SetOrbitorPoint Event sets the world position of the orbitor location for Particle System actors using the Orbitor action, using the location of the effect source when the event is initiated. It allows specification of the following :

<SetOrbitorPoint>
    *<systemName> string </systemName>
</SetOrbitorPoint>
  • systemName

    Optional list of names of sub-systems within the MetaParticleSystem actor to apply the event to.

39.9.32. Shockwave Section

The Shockwave Event is an event that you can play on a shockwave model. It allows specification of the following:

<Shockwave>
    <colour> Colour </colour>
    <actionName> String </actionName>
    <shimmerStyle> int </shimmerStyle>
    <hitCameraSound> String </hitCameraSound>
</Shockwave>
  • Colour

    Fade colour.

  • actionName

    Name of the action to play on the shockwave model.

  • shimmerStyle

    Shimmer style for the shockwave.

  • hitCameraSound

    Sound to play when the shockwave hits the camera.

39.9.33. SwarmTargets Section

The SwarmTargets Event sets a list of target nodes on a particle system containing the MatrixSwarm action. It allows specification of the following :

<SwarmTargets>
    +<Node> string </Node>
    *<systemName> string </systemName>
</SwarmTargets>
  • Node

    One or more node names on the target model to be set on the MatrixSwarm particle system actions as their target.

    systemName

    Optional list of names of sub-systems within the MetaParticleSystem actor to apply the event to.

39.10. <weather>.xml

The weather XML file specifies a list of weather systems available for an entire game. The number of different weather systems is up to you. Since the file is simply a list of systems, and each tag name is the user's name for the weather section, there's no point documenting the grammar of the overall file. Instead we will look at what goes within each weather system section.

The grammar is listed below:

<weather.xml>
   *< WeatherSystemName >
        +<skyBox> string </skyBox>
        ?<sfx>  string </sfx>
        ?<rain> float </rain>
        ?<sun> Vector4 </sun>
        ?<ambient> Vector4 </ambient>
        ?<fog> Vector4 </fog>
        ?<windSpeed> Vector2 </windSpeed>
        ?<windGustiness> float </windGustiness>
        ?<bloom>
            <attenuation> Vector4 </attenuation>
            <numPasses> int </numPasses>
            <power> float </power>
            <width> int </width>        
        </bloom>
</weather.xml>

The list below describes the tags in the Weather System section:

  • skyBox

    resource ID of a .model file. The model file should use one of the environment .fx file in order to draw and sort correctly in the scene. You may specify any number of sky box models. These will be drawn in the order they are specified in the XML file.

  • sfx

    resource ID of a Special Effect file. This will be attached to the player when the weather system is summoned.

  • rain

    Amount of rain, from 0.0 to 1.0.

  • sun

    Colour that multiplies with the dynamic time-of-day colour of the sunlight. In RGBA form.

  • ambient

    Colour that multiplies with the dynamic time-of-day ambient colour. In RGBA form.

  • fog

    Colour that multiplies with the dynamic time-of-day colours of fog. The fourth value is the fog density, where 1.0 is the normal amount of fog, and any higher value is thicker fog. The colours are in RGB form.

  • windSpeed

    Wind velocity, as x/z metres per second in world-space.

  • windGustiness

    Wind gustiness. The gustiness randomly adjusts the wind velocity over time. A value of 0 means the wind will always be exactly the windSpeed.

  • bloom

    Section describing bloom settings.

  • attenuation

    Per-pass colour attenuation of the bloom filter. In normalised RGBA form; e.g (1,1,1,1) means no colour attenuation.

  • numPasses

    Number of gaussian blur passes the bloom filter will perform.

  • power

    Mathematical power of the scaling function, for shader 2.0 cards and above.

  • width

    Texel width multiplier of the bloom filter kernel. Larger values produce a larger bloom area, but beware of creating gaps or holes in the effect.