This record describes API changes in 1.9 Alpha 3.

Parallax Options

In API 47 we add various options to control the z-position of a station (also know as the parallax level). Objects with a positive z-position appear to be above the main plane, while a negative z-position makes the object appear below the plane.

There are two principal ways to define the z-position: (1) and explicit z-position value (in light-seconds), or (2) an orbital inclination, which tilts the orbit into the z-dimension.

Inclination

You may specify an orbit inclination in any <Orbitals>, <Siblings>, or <OrbitalDistribution> directive:

...
<Orbitals distance="100" inclination="45" rotation="90">
   ...
</Orbitals>
...

The above defines a 100 light-second radius orbit with an inclination of 45 degrees. The rotation== parameter controls the angle on the XY plane where the orbit tilts.

<ZAdjust>

The <ZAdjust> directive can be used inside of a <SystemType> to define either a z-position or an orbital inclination to its child elements:

...
<ZAdjust inclination="90" rotation="alignedRandom">
   <Lookup ...>
</ZAdjust>
...

The above <ZAdjust> sets the orbital inclination of its children (the <Orbitals> directive) to 90 degrees and a random rotation. An object on that orbit will be above or below the plane. This is mostly used for look up tables.

You can also adjust the z-position directly:

...
<ZAdjust zOffset="50">
   <Lookup ...>
</ZAdjust>
...

This will create an orbit centered 50 light-seconds above the plane.

Note: The player cannot interact with out-of-plane objects, so you should not place activate stations. However, when creating a asteroid belt with an existing table, the table itself defines locations (labels) to place station on. You can use the option, excludeLocations="true" in the <ZAdjust> directive to make sure that locations are always on the main plane.

SystemType

We've made the following minor changes to system type definitions:

  • <Label ...> has been renamed to <Location ...>.
  • <RandomLocation ...> adds noWarnings="true" to suppress warnings about not enough locations.
  • <RandomLocation ...> adds exclusionRadius="..." to choose a location that is at least the given distance away from other encounters. This can also be used to override the exclusion radius of a child <Station...> element.
  • In a <Station> element you may use showMapLabel="true" or showMapLabel="false" to override the default behavior (see StationType below).
  • <Lookup> directives now support noMapLabel=, showOrbit=, and showMapLabel= options that are inherited by whatever stations are created in the lookup.
  • When creating a location (label) you may specify required="true" to indicate that the location should not be deleted even if it overlaps with another location.

StationType

Hull Types

Prior to API 47 stations could specify multiHull="true", which made the station resistant to non-WMD weapons. In API 47 we generalize this to the concept of a "hull type":

<StationType ...>
   ...
   <Hull
      hullType="multiHull"
      ...
      />
</StationType>

The following hull types are supported:

  • singleHull: This is a normal, single hull station. The station takes full damage.
  • multiHull: Damage taken is proportional to the WMD-level of the weapon.
  • asteroidHull: Damage taken is proportional to the higher of WMD-level or mining-level.
  • undergroundHull: Damage taken is proportional to mining-level.

Map Labels

Starting in API 47 we show map labels on certain worlds. If a world has a name, we show it on the map if the world is 1,000 km or larger. You may override this on a <StationType> with showMapLabel="true" or showMapLabel="false".

ItemType

  • In API 47 you can specify a weapon's range instead of its lifetime. Use range="x", where x is a range in light-seconds. The engine will compute the appropriate lifetime value to reach the range at the shot's average speed. Do not specify both a lifetime and a range.
  • Added 'interaction property for weapone.
  • Added stdInteraction property for weapons, which returns the default (auto-calculated) interaction for a weapon, regardless of what the specified interaction is.
  • Added stdHP property for weapons, which returns the default hit points for the shot.

TLisp

  • Nil values are ignored when creating structs. For example, { a:'foo b:nil } evaluates to { a:'foo }.
  • (typGetProperty theType 'known) now returns the aggregated known state, for item types that have multiple unknown types. If all the unknown types are known to the player, then we return True. Otherwise we return Nil. Similarly, (typSetProperty theType 'known True|Nil) will set all unknown types to the given state.
  • Added (unvGetProperty 'difficulty) property, which returns the game's difficulty level as chosen by the player at create-time. Valid values are: story, normal, challenge, and permadeath.
  • Added (typGetProperty stationType 'primaryWeapon) to return the station's primary weapon (the highest level installed weapon). We also support 'primaryWeaponLevel, which returns the level of that weapon.
  • Added 'encounteredByNode property for station types.
  • Added 'encounteredTotal property for station types.