HowTo:Edit Systems:System Files

From VsWiki
Jump to: navigation, search
thumb_arrow_up.png Edit Systems

"Hand-made" System Files

These systems take much longer, because you have to do all of the generator's work by hand. Although you may think that using the milky_way.xml file is so much better for that reason, think about systems like Sol (sol_sector/sol) where you want exact exactness to occur in the system file because adventurers who explore it will look at every detail that can not be perfected with even random numbers. I used this method for the starting system in the 3.x releases, enigma_sector/heavens_gate.system

XML schema description

<system> ... </system> -- Marks the beginning and end of the XML file.

  • name -- The name of the system.
  • ScaleSystem - The scale of the system.
    • = 1 (default)

FIXME : ScaleSystem is an optional parameter, but this is not indicated. Besides indicating which parameters are optional, versus mandatory; for optional parameters there needs to be information about their default values. (chuck_starchaser)

  • reflectivity [float] - ??? Not actually used.
    • = (graphics/reflectivity=.2)
  • background - The background cube map to use (NO extension like .png, .jpg, etc.)
    • = "cube"
  • backgroundColor (r g b a)
    • = 1.0, 1.0, 1.0, 1.0 (default)
  • backgroundDegamma [bool] - ? Not actually used.
    • = false (default)
  • fadestars - ? Not actually used.
    • = ! (physics/game_speed_affects_autogen_systems = false) = true
  • nearstars - The number of near stars at a given time.
  • stars - The number of (far?) stars at a given time.
  • starspread - The distance between the stars (?).
  • x, y, z - The coordinates of the system. Implemented long ago for possible use with a map, but not used yet.
  • <light> ... </light> - (repeatable) Creates a light that can be referenced later.
    • <attenuated> ... </attenuated> - Specifies the color of attenuated light that is generated.
      • red, green, blue, alfa -- Specify the value (between 0 and 1) of the color.
    • <ambient> ... </ambient> - Specifies the color of ambient light that is generated.
      • red, green, blue, alfa -- Specify the value (between 0 and 1) of the color.
    • <diffuse> ... </diffuse> - Specifies the color of diffuse light that is generated.
      • red, green, blue, alfa -- Specify the value (between 0 and 1) of the color.
    • <specular> ... </specular> - Specifies the color of specular light that is generated.
      • red, green, blue, alfa -- Specify the value (between 0 and 1) of the color.
  • <planet> ... </planet> - (repeatable) (ALIAS: jump) This tag creates a planet (or sun if it generates light).
    • NOTE: planets and jumps can have any (not light) tags nested inside. This creates the nested tag orbiting around the planets.
    • name - The name of the planet.
    • file - The texture of the planet (also used to decide which products are sold).
    • radius - The radius of the planet.
    • alpha - The blend mode of the texture
    • gravity - The gravity of the planet. I think that it only affects other planets orbiting it, not units.
    • red, green, blue, alfa -- The color of the planet (not the color of the light it generates). I think that "alfa" is correct, not "alpha".
    • ReflectNoLight - does the planet not reflect light? Defaults to false, do you shouldn't have to worry about this most of the time.
    • light - A reference to one of the lights above that this sun generates. This is the criteria for a planet becoming a sun.
    • destinations - A space separated list of the destinations that this jump point will take you to. (usually only one, but more will make the jump point random). NOTE that the presence of this attribute is the only criteria for the planet being a jump point, not the name of the tag, which is just to make it clearer.
    • citylights - A texture for using city lights (looks like [Texturefile]wrapx[WrapXValue]wrapy[WrapYValue])
    • insideout - Is the texture inside out? (?)
    • For "suns" that do not orbit:
      • x, y, z - The position of the planet.
    • For Planets that orbit around another planet:
      • ri, rj, rk - the farthest point of the orbit (vector x,y,z in meters) (see here)
      • si, sj, sk - the nearest point of the orbit (vector x,y,z in meters)
    • year - The amount of time for a year (?)
    • day - The amount of time for a day (?)
    • position - The current position on the orbiting ellipse (in radians).
    • <citylights ... /> - Lights that appear on a planet. The parent object must have planet type.
      • file - The texture.
      • alpha - The blend mode of the texture
      • radius - A radius of the lights (only if different than the planet).
      • wrapx, wrapy - How much the texture wraps.
      • insideout - Is the texture inside out? (?)
      • VarName [string], VarValue [float] - FIXME seems to be a graphics/VarName confvar based spawn condition (i.e. "add eye-candy only on certain settings").
    • <atmosphere ... /> - The clouds of the planet (if any). The parent object must have planet type.
      • file - The texture.
        • = "sol/earthcloudmaptrans.png"
      • alpha - The blend mode of the texture
      • radius - the radius of the atmosphere (should be greater than planet's).
      • insideout - Is the texture inside out? (?)
      • VarName [string], VarValue [float]
    • <Terrain, ContinuousTerrain ... /> - Planet terrains.
      • NumWraps, ScaleX, ScaleAtmosphereHeight - for Continuous Terrain.
      • file - The texture file. Currently, none are available, even though there are references in system files. FIXME
      • gravity
      • Mass - Defines position.
      • radius - For Terrain.
      • x, y, z - The position.
      • ri, rj, rk
      • qi, qj, qk
    • <Fog ... /> - The atmospheric scattering of the planet (if any). graphics/usePlanetFog must be = true. The parent object must have planet type.
      • OpticalIllusion [boolean] [=true] - Uses halo system instead of making an unit.
    • <FogElement ... /> - Used for stellar atmospheres, in pairs ("atmXatm.bfxm"+"atmXhalo.bfxm"), or even without (in Modelview system - with different alpha), and some test systems.
      • Red, Green, Blue, Alfa | alpha -- Specify the value (between 0 and 1) of the color. Emission?
      • DRed, DGreen, DBlue, DAlfa -- Specify the value (between 0 and 1) of the color. Diffuse?
      • file - Mesh file.
      • MinAlpha, MaxAlpha
      • Concavity, Focus
      • TailModeStart, TailModeEnd
      • ScaleAtmosphereHeight
    • <ring ... /> - (repeatable) A planetary ring. The parent object must have planet type.
      • file - The texture.
      • alpha - The blend mode of the texture
      • innerradius, outerradius - the inner/outer radii of the ring (should be greater than planet's and outer should be more than inner).
      • wrapx, wrapy - How much the texture wraps.
      • ri, rj, rk - the farthest point of the orbit (vector x,y,z in meters) (see here)
      • si, sj, sk - the nearest point of the orbit (vector x,y,z in meters)
      • numslices - ???
      • VarName [string], VarValue [float]
    • <SpaceElevator ... /> - (repeatable) An elevator to space (?) The parent object must have planet type.
      • file - The file for the elevator.
      • direction - The direction the elevator goes in. Can be d(own), u(p), l(eft), r(ight), b(ack) or f(ront [default]).
      • faction - The faction that owns the elevator.
      • VarName [string], VarValue [float]
    • <unit, building, vehicle, asteroid, nebula, enhancement ... /> - (repeatable) An object.
      • NOTE: that these can NOT have anything orbiting them.
      • name - The name of the unit.
      • file - The name of the unit file.
      • faction - The name of the unit's faction.
      • destinations - A space separated list of the destinations that this will take you to. (usually only one, but more will make the jump point random).
      • insideout - Is the texture inside out? (?)
      • difficulty - A scaling factor???
      • For units that do not orbit:
        • x, y, z - The position of the planet.
      • For units that orbit around another planet:
        • ri, rj, rk - the farthest point of the orbit (vector x,y,z in meters) (see here)
        • si, sj, sk - the nearest point of the orbit (vector x,y,z in meters)
      • year - The amount of time for a year (?)
      • day - The amount of time for a day (?)
      • position - The current position on the orbiting ellipse (in radians).
      • VarName [string], VarValue [float] - for asteroid | nebula | enhancement only.
      • <Condition ... />
    • <Condition ... /> Spawn condition?
      • expression

Building a System

To manually create a system, follow these steps;

  • Always put the <system> tags first.
  • Next, add X <light> tags in the system, where X is the number of stars in the system.
  • After that, insert one object inside the system that has x,y,z coordinates. Give it ReflectNoLight="true" and light="some_light_number" to make it be a sun. The sun should have one of the textures inside the stars/ directory.
  • Inside that, maybe put another sun orbiting the first sun if the system is binary.
  • Add a bunch of planets, and add units or more planets around those. Planets' textures should be inside the planets directory. You can also have a nebula or an asteroid field if you want.
  • Finally, close with the </system> tag.

Note that for a completely circular orbit, make ri=sk, rj=sj and rk=si. <ri,rj,rk> Is the relative position to the planet when position=0. <si,sj,sk> is the relative position to the planet when position=1.57 (PI/2). Then make position 0 (normally) and set day to a fairly high number and year to be extremely high.

Examples

See also