This record describes API changes in 1.9 Beta 3.

Design Types

  • We now support properties on event handlers.
  • You may now define the core.namePattern for generic types. We use this mostly for debugging purposes.

Ship Classes

Conditions

A condition is a state of a ship, like being radioactive or paralyzed by EMP. In previous versions we provided functions for setting conditions, such as shpMakeRadioactive and objMakeParalyzed. But those functions are unconditional: they set the condition regardless of whether the ship is immune or not. In previous version, callers were responsible for checking immunities appropriately.

In API 51 we introduce a set of functions that check immunities automatically.

  • objApplyCondition: This function attempts to apply the condition, either to the ship as a whole or to a specific item. It returns a result code specifying whether the condition was applied.
  • objCanApplyCondition: This function works the same as objApplyCondition except it does not actually apply the condition; it only returns what would happen if you tried.
  • objRemoveCondition: This function attempts to remove a condition and returns a status code.
  • objCanRemoveCondition: This is the same as objRemoveCondition except it only returns a status code of what would happen if you tried.

<Armor> Element

The <Armor> element in a ship class can be inherited to override the armor type used but not the segment angles. For example:

<ShipClass unid="...baseClass..."
   ...
   >
   ...
   <Armor
      armorID= "&itPlasteelPlate;"
      startAt= "0"
      count=   "4"
      />
</ShipClass>

<ShipClass unid="...derivedClass..."
   ...
   >
   ...
   <Armor
      armorID= "&itBlastPlate;"
      />
</ShipClass>

In the example above, the base class defines the segments (4 segments starting at angle 0). The derived class inherits the segment layout but changes the armor type.

This is especially helpful with non-standard segments. And in API 51 we provide a new way of specifying uneven segment sizes. Example:

<ShipClass unid="...baseClass..."
   ...
   >
   ...
   <Armor
      armorID= "&itPlasteelPlate;"
      startAt= "0"
      >
      <Armor span="60"/>
      <Armor span="120"/>
      <Armor span="120"/>
      <Armor span="60"/>
   </Armor>
</ShipClass>

OrbitExact Order

In API 51 we introduce the 'orbitExact order, which sets a ship to follow a precise orbit around the given target. The order has the following parameters:

  • radius: This is the radius of the orbit, in light-seconds (defaults to 10).
  • speed: The speed around the orbit in degrees per tick (defaults to 1).
  • eccentricity: Orbital eccentricity (defaults to 0).
  • angle: The angle to start at, in degrees. If not specified, we spread out all objects in the same orbit at equidistant angles. The value may also be random to indicate a random angle.
  • time: If specified, this is the number of ticks that the order will be in effect. After the time expires, the order is cancelled.

You may specify parameters to the order as a struct in shpOrder. Example:

(shpOrder theShip 'orbitExact centerObj {
   radius: 10
   speed: 1
   eccentricity: 0.0
   angle: Nil
   time: 10
   })

Alternatively, you may specify the parameters in a <ShipTable> as follows:

<ShipTable ...>
   <Ship class="..." orders="orbitExact:radius=10:speed=1:angle=0..."/>
</ShipTable>

Station Types

  • When defining defenders for a station, you can use maxCount= to limit the number of defenders of a given class.
  • A station type can specify canAttack="false" to indicate that it cannot attack.

Missions

  • The <OnDeliveryMissionCompleted> event may return a dialog struct (compatible with dsRPGDialog).
  • You may define the rpg.statusDetails language element to show rank details during various mission screens.

Weapon Items

Interaction

In 1.9 Beta 2 changed shot interaction so that beams did not interact with solid bullets. Unfortunately, this had the effect of making pteravores, neuroplague, and quantumspheres more deadly than intended.

In Beta 3 we've added a new option to interaction:

<ItemType ...>
   <Weapon ...
      interaction="always"
      />
</ItemType>

Setting interaction to "always" indicates that a shot will always interact with other shots, even if those other shots have low or 0 interaction.

Item Enhancements

noAmmo

Added the noAmmo enhancement for weapons. If applied to a weapon that uses ammo, the weapon will be converted to one that does not consume ammo. Currently this does not work on launchers.

Sovereigns

  • Added <OnShipDestroyedByPlayer> and <OnStationDestroyedByPlayer> events.

Powers

  • Powers now support an <Image> element for use in the UI.

Effects

  • Added <FlashEffect> for shields.
  • You may specify a sound effect in ambient= inside <PlayerSettings>'s <DockScreenDisplay> element.

TLisp

New Properties

  • 'data property to return all object data (as a struct).
  • 'debug property to show debug info on an object in the HUD.
  • 'globalData property to return all global data (on a type).
  • 'hullCargoSpace property for ships.
  • 'slotIndex property for installed devices.
  • 'stargate property is True if the station is a stargate.
  • 'staticData property to return all static data (on a type).
  • 'tradeDesc property for stations and ships.

Miscellaneous

  • Prior to API 51, the map function swallow errors if using 'reduceMin or 'reduceMax options. In API 51, we propagate any errors.
  • Added support for OR criteria in msnFind.
  • Added +isEncounteredIn:x special attribute to stations. x is either a level or a node ID.
nms 22 Dec 2020:

Might it be better to go back to using the higher of the two interaction values? That made sense to me. Then you can give small kinetic shots very low interaction if you don't want them to block each other much.