User Tools

Site Tools


modding:xml:systemtype

This is an old revision of the document!


Overview

<SystemType> defines a type of star system. The type describes the creation of a star system, including the random placement of planets and stations. In addition, a SystemType may have handle events while the player is in the system.

Multiple instances of a star system can be created from a single SystemType.

Basic Attributes

UNID= The UNID of the system type.

Creating a Star System

To create a star system from a SystemType definition, the engine looks for the <SystemGroup> element in the SystemType.

The SystemGroup element contains a sequence of directives, each of which is processed in sequence to create the contents of the system. For example, a directive like <Station type=“…” …/> creates a station in the system of the given type.

For example:

 <SystemGroup>
    <Station {a star type} />
 </SystemGroup>
 

In this example we create a single star at the center of the system (coordinates 0,0).

Some directives are used to define positions within the system. A positional directive can contain other directives, which then inherit the position defined.

For example:

<SystemGroup>
   <Orbitals distance="30" angle="random">
      <Station ... />
   </Orbitals>
</SystemGroup>

This Orbitals directive defines an orbit with a radius of 30 light seconds; a random position on the orbit is chosen. All of the directives inside the Orbitals directive inherit this new position.

Of course, an Orbitals directive can contain another Orbitals directive inside it. In that case, the nested Orbitals uses the inherited position as its center point. This can be useful, for example, to create a moon around a planet. For example:

<SystemGroup>
   <Station {a star type} />
   
   <Orbitals distance="30" angle="random">
      <Group>
         <Station {a planet type} />
      
         <Orbitals distance="10" angle="random">
            <Station {a moon type} />
         </Orbitals>
      </Group>
   </Orbitals>
</SystemGroup>

The above creates a planet with an orbit of 30 light-seconds around a star. Around the planet, it creates a moon with an orbit of 10-light-seconds.

Directives

The following directives are defined:

<AddAttribute>

<AddTerritory>

<AntiTrojan>

<ArcDistribution>

[Version 1.2+]

<Code>

<FillLocations>

<FillRandomLocation>

<Group>

<Label>

<LevelTable>

<LocationCriteriaTable>

<Lookup>

<Marker>

<Offset>

<Orbitals>

<Particles>

<PlaceRandomStation>

<Primary>

<RandomLocation>

<RandomStation>

<Ship>

<Siblings>

<SpaceEnvironment>

<Stargate>

<Station>

<Table>

<Trojan>

<Variants>

modding/xml/systemtype.1358185557.txt.gz · Last modified: 2014/12/27 04:40 (external edit)