This record describes API changes in 1.9 Beta 1.

Items

Devices

  • Added maxFireRange="..." to device slots. The range (in light-seconds) is used to exclude targets beyond the given range. For example, it can be used for stations that want weapons with artificially short range.

Enhancements

  • When <GetEnhancement> is called we set (@ gData 'mode) to either canEnhance or onEnhance depending on our mode.

Station Types

  • Added noIndependentAttack= parameter to <StationType>. If set to "true", and if the station is a satellite of another station, then the station will not attack if its parent is destroyed or abandoned. This is useful for station turrets/guns that we want to disable if the main station is destroyed.
  • Added destroyWhenAbandoned= paramter to <StationType>. Use by Abbasid walls.

Missions

  • Added createCriteria= parameter to <MissionType>. If defined, we search for existing missions that match the given criteria. If none are found, then the mission cannot be created.
  • Added A directive to mission criteria, which selects the latest mission in a mission arc.
  • Added allowArcMissions to allow a mission to be created even if another mission in the same arc is active.
  • Added options to msnCanCreate.
  • Added ignoreOwnerLimit= to allow a mission to be created even if the owner has already hit its limit for missions.

Overlays

In API 49 you can specify <EnhancementAbilities> to confer enhancements to specific devices. For example:

<OverlayType ...>
   <EnhancementAbilities>
      <Enhancement type="..." criteria="w" enhancement="+hpBonus:50"/>
   </EnhancementAbilities>
</OverlayType>

Underground Caverns

Added <Underground> sub-element to <OverlayType>.

System Create

maxCount in <Table>

In API 49, a <Table> element in system create can specify maximum count limits on its children. For example:

<RandomLocation count="3" ...>
   <Table>
      <Station chance="25" type=... maxCount="1"/>
      <Station chance="25" type=... maxCount="1"/>
      ...
   </Table>
</RandomLocation>

The code above generate three stations at a random location, picking the station randomly from the table. The maxCount= parameter specifies the maximum number of times that the given entry in the table can be chosen.

In practice, this can be used to force each chosen station to be unique.

maxCount in <RandomStation>

You can add maxCount="..." to <RandomStation> to prevent duplicate stations.

Optional Stations

In API 49 you can mark a station as optional:

...
<Station type="..." optional="true"/>
...

If marked optional, the station is only created if it does not exceed system limits. For example, Sisters of Domina are marked as being unique in a system. When the optional parameter is set, a Sisters of Domina station will not be created if one already exists. Without the optional parameter, a second station would be created.

<Items>

You can add items to a station at create-time:

<Station type="...">
   <Items>
      ...
   </Items>
</Station>

Miscellaneous

Difficulty Level

In API 49 you can force an adventure to use a specific difficulty level:

<AdventureDesc ...
   difficulty=     "{difficultyLevel}"
   ...
   >

difficultyLevel can be one of:

story
normal
challenge
permadeath

If blank or if set to "choose", then we let the player pick difficulty.

Obsolete Extensions

Added obsoleteVersion="..." to <TranscendenceExtension>. If the core API version number is equal to or higher than the obsolete version, we do not offer the extension at game-create time. This is used to deprecate an entire extension.

core.gameStats

If a type has a language element with ID core.gameStats, then we used that to generate stats instead of calling <GetGlobalAchievements>.

Properties Criteria

You may use a range selection in criteria:

(itmGetTypes "w +property:cost[100-1000]")

The above returns all weapons that cost between 100 and 1,000 credits (inclusive).

TLisp

Properties

  • Added 'imageRotationCount property to ships.
  • Added next and prev as special values when setting the 'selectedMissile and 'selectedWeapon properties.
  • Added 'useScreen property to items.
  • Added 'challengeRating to station types.
  • Added 'stdTreasure to station types.
  • You can now set the 'target property on the player ship.
  • Added 'character to ships.
  • Added 'characterName to ships.
  • Added 'wreckType to ships.
  • Added 'stdMass to missiles and ammo.
  • Added 'canBeFired to ammo.

Functions

  • Added aliases for property functions. For example, (objGetProperty ...) has been aliased to ([email protected] ...) which is shorter.
  • objEnhanceItem now also takes an enhancementDesc structure.
  • Added (typFireObjItemEvent ...)~
  • Added (typHasProperty ...)
  • (unvFindObject ...) now has a U criteria to select objects unknown to the player.