HowTo:Edit Systems:Milkyway
Edit Systems |
Contents
Autogenerated System Files
Since they are autogenerated, these systems must have some rules so that the generator knows what to make. These systems are autogenerated from the information contained in the XML file universe/milky_way.xml.
XML Schema Description
-
<galaxy> ... </galaxy>
- Marks the beginning and end of the XML file.-
<systems> ... </systems>
- You need it but I don't know why.-
<sector ... > ... </sector>
- (repeatable) A sector containg a group of systems.-
name
- the name of the sector. For, enigma_sector. -
< var ... />
- (repeatable) The default variables for the entire sector (var tag to be described later) -
<system ... > ... </system>
- (repeatable) A system (to be a system it must be inside another sector tag).-
name
- the name of the system, for example, heavens_gate. -
< var ... />
- (repeatable) To be described later (see below).
-
-
-
-
Variables
The < var name="" value="" />
tag
Here is a list of all of the possible names and their values so far. If these variables are not set inside any of the sector tags (innermost overrides) the system will randomly use a number between the corresponding values of the unknown_sector/min and max "systems"
Variable Types
-
BOOL
= boolean value = "true
" or "false
" -
INT
= integer -
FLOAT
= decimal number -
FILENAME
= the name of a file inside the universe directory. -
STRING
= Text
Variables
- num_stars
- Type:
INT
- Description: The number of suns in the system (to make binary systems).
- Example:
- Type:
- sun_radius
- Type:
FLOAT
- Description: The radius of the sun in the system.
- Example:
< var name="sun_radius" value="26000"/>
- Type:
- starlist
- Type:
FILENAME
- Description: A file with a list of colors/textures/sprites for different sizes of stars:
- Example
< var name="starlist" value="stars.txt"/>
- Contents of Stars.txt
- "
0 .3 1 .3 .1 stars/white_star.png
" - "
1000 .5 .5 1 .1 stars/white_star.png
" - ... means, "if the radius of the star is greater than or equal to 0 but less than 1000, then use RGB color (.3,1,.3), variance (?) of .1 and a texture/sprite filename of "
stars/white_star.png
". The same goes for 1000, etc.
- "
- Contents of Stars.txt
- Type:
- planets
- Type:
STRING
- Description: The possible planet types (defined in the
<planets>
section in milky_way.xml) in the system. - Example:
< var name="planets" value="a"/>
- Type:
- num_gas_giants
- Type:
INT
- Description: The number of gas giant planets.
- Example:
< var name="num_gas_giants" value="3"/>
- Type:
- num_planets
- Type:
INT
- Description: The total number of inhabited(?) planets (not including gas giants).
- Example:
< var name="num_planets" value="8"/>
- Type:
- num_moons
- Type:
INT
- Description: The number of moons orbiting any planet.
- Example:
< var name="num_moons" value="2"/>
- Type:
- asteroids
- Type:
BOOL
- Description: Whether there are asteroids or not.
- Example:
< var name="asteroids" value="true"/>
- Type:
- nebulae
- Type:
BOOL
- Description: Whether there are nebulae or not.
- Example:
< var name="nebulae" value="true"/>
- Type:
- num_natural_phenomena
- Type:
INT
- Description: How many asteroids/nebulae/? there are in the system.
- Example:
< var name="num_natural_phenomena" value="2"/>
- Type:
- namelist
- Type:
FILENAME
- Description: a file containing a list of planet names to use.
- Example:
< var name="planetlist" value="planets.txt"/>
- Type:
- gasgiantlist
- Type:
FILENAME
- Description: A list of possible textures for gas giants. If a "
^
" and another filename follows the first filename then the next texture will be used for lights. - Example:
< var name="gasgiantlist" value="gas_giants.txt"/>
- Type:
- planetlist
- Type:
FILENAME
- Description: A list of possible textures for non-gas-giant planets with the same rules as above.
- Example:
< var name="planetlist" value="planets.aera.txt"/>
- Type:
- moonlist
- Type:
FILENAME
- Description: A list of possible textures for moons with the same rules as above.
- Example:
< var name="moonlist" value="moons.txt"/>
- Type:
- ringlist
- Type:
FILENAME
- Description: A list of textures of planetary rings.
- Example:
- Type:
- asteroidlist
- Type:
FILENAME
- Description: A list of distances and units with the same format as unitlist.
- Example:
- Type:
- nebulalist
- Type:
FILENAME
- Description: A list of distances and units with the same format as unitlist.
- Example:
< var name="asteroidlist" value="asteroids.txt"/>
- data
- Type:
INT
- Description: The random number seed that is used to generate the system. This number ensures that the same system is generated each time.
- Example:
< var name="data" value="1039"/>
- Type:
- compactness
- Type:
FLOAT
- Description: The scale of the star system.
- Example:
< var name="compactness" value="5.8"/>
- Type:
- faction
- backgroundlist
- Type:
FILENAME
- Description: A list of background spheremaps/cubemaps without the extension (
.png
,.jpg
, etc... ). - Example:
- Type:
- force
- Type:
BOOL
- Description: If this is not
true
, then the system will clamp to the corresponding value of theunknown_sector/minlimit
or maxlimit "system__ FIXME What's meant here exactly ?? - Example:
- Type:
- num_starbases
- Type:
INT
- Description: how many bases there will be (may be changed around with dynamic universe)
- Type:
- unitlist
- Type:
FILENAME
- Description: A list of distances and units with the following format:
- Example:
< var name="unitlist" value="smallunits.txt"/>
- Contents of
smallunits.txt
- Example:
"U800^MiningBase U800^MiningBase A8480^AFieldBaseSparse&U400^MiningBase"
- Format:
"U"|"E"|"B"|"A"|"N"|"gas"|"jump"|"planet" distance-from-orbiting-planet "^" unit-name
- Description of the Format
-
U
= Unit -
N
= Nebula -
B
= Building -
E
= Enhancement -
A
= Asteroid.
-
- You can have another object at the same coordinates by putting a "
&
" and another of these unit-distance pairs with no white space in between.
- Example:
- Type:
- num_jump
- Type:
INT
- Description: The number of jump points to other systems there are.
- Example:
- Type:
- jumps
< var name="jumps" value="enigma_sector/harrison enigma_sector/repleetah enigma_sector/mccaffrey enigma_sector/wetland"/>
Building a System
To create a system, follow these steps;
- Always put the
<system>
tags first. Within the<system>
tag use thename
tag to specify the system name. - Using the
planets
variable define the possible types of planet textures. - Add the
data
value to specify the random seed value. From this value the same system will be created each time. - Using the
Faction
variable, specify who initially owns the system. - Define the number of planets using the
num_planets
variable. You can also define extra units, have a nebula or an asteroid field if you want. - Specfify the size of the sun using the
sun_radius
variable. - Define the position of the system in the galizy using the
xyz
variable. - Specify the Jumps using the
jumps
variable. - Finally, close with the </system> tag.
Examples
These examples are excerpts from universe/milky_way.xml
Crucible/Cephid_17
<galaxy> ... <systems> ... <sector name="Crucible"> ... <system name="Cephid_17"> <var name="planets" value="mol *r v a bs gd bd *r gg gg fr"/> <var name="data" value="-932898433"/> <var name="faction" value="klkk"/> <var name="luminosity" value="0"/> <var name="num_gas_giants" value="0"/> <var name="num_moons" value="2"/> <var name="num_natural_phenomena" value="2"/> <var name="num_planets" value="3"/> <var name="planetlist" value=""/> <var name="sun_radius" value="16600.000000"/> <var name="xyz" value="389.551310 -309.661278 348.064561"/> <var name="jumps" value="Crucible/17-ar Crucible/Stirling Crucible/Cardell Crucible/Enyo Crucible/Everett Crucible/Oldziey"/> </system> ... </sector> ... </systems> </galaxy>
Planet Texture Definitions
<galaxy> <planets> ... <planet name="Arid"> <var name="texture" value="planets/desert"/> <var name="initial" value="a"/> </planet> <planet name="Arid_Methane"> <var name="texture" value="planets/frigid_mud"/> <var name="initial" value="am"/> </planet> <planet name="Bio_Diverse"> <var name="texture" value="planets/m_class"/> <var name="texture_max" value="4"/> <var name="initial" value="bd"/> <var name="atmosphere" value="true"/> </planet> ... <planet name="Tropical"> <var name="texture" value="planets/carribean"/> <var name="texture_max" value="3"/> <var name="initial" value="t"/> <var name="atmosphere" value="true"/> </planet> <planet name="Oceanic"> <var name="texture" value="planets/ocean"/> <var name="initial" value="o"/> <var name="atmosphere" value="true"/> </planet> ... </planets> </galaxy>