This record describes API changes in 1.8 Beta 4.

Design Type

  • Added <OnGlobalObjGateCheck> to prevent player from entering a gate.
  • Added requiredVersion= parameter for all design types. This prevents a design type from being bound unless all bound extensions at game-create time have the specified minimum API.
  • (unvGetProperty 'apiVersion) returns the current Engine API version.
  • (unvGetProperty 'minAPIVersion) returns the minimum API version required by currently bound extensions.

Encounter Regions

We now use attributes on system nodes to define where specific sovereigns can spawn. See: Encounter Guidelines.

Ships

Devices

  • Added slotID to devices, so you can specify which slot to install a device on.
  • You can specify charges= in a <Device> element.

Miscellaneous

  • Non-character ships do not have their event handlers reset when ascending.
  • Ship classes now get an <OnDestroyCheck> event.
  • Added hullPoints property to ship classes.
  • Added price property.
  • Added autoTarget property.
  • Added target property.
  • Added fuelEfficiency property.
  • Added ratedPower property, which is power consumed at max shield consumption, max primary weapon consumption, max thrust, and idle consumption for all other devices.
  • Added identified property.
  • Added extiGateTime property.
  • Added suspended property.

Stations

  • Added +location:{attrib} special attribute to determine whether the spawn location of the station has as specific attribute. For example, +location:asteroids; can be used in criteria to find station objects that spawn in asteroid fields.

Weapons

  • Added fragmentMinRadius and fragmentMaxRadius parameters.

Missions

<CanCreate> Event

Traditionally, the <OnCreate> event on a mission gets to decide whether the mission should be created. If conditions do not allow for the given mission, then <OnCreate> is supposed to call msnDestroy to abort creation.

Sometimes, however, it makes sense to separate the logic for determining when a mission should be created. For example, sometimes we need to spawn the mission-giver inside <OnGlobalSystemStarted>. In those case, we need to be able to tell if the mission can be created.

Starting in API 43, we add a new event to mission: <CanCreate>. This even should return True if the mission can be created or Nil otherwise. This event should not have any side-effects.

When the engine looks for missions to offer, it calls <CanCreate> to determine if a given mission is available. [NOTE: If <CanCreate> is not implemented, we assume the mission can be created and rely on the old method of calling <OnCreate>.]

If necessary, you may call (msnCanCreate ...) to determine whether a mission can be created or not.

<OnSystemStarted> and <OnSystemStopped> Events

Active missions now get these two events when the player enters or leaves a system. Note that in both cases the player is not in the system at the time the event is called.

Miscellaneous

  • Added msnRefreshSummary.
  • Added completedOn property.
  • Added inProgress property.

Dock Screens

<GetGlobalDockScreen>

Starting in API 43 you can return a structure from <GetGlobalDockScreen> to select the screen to show:

<GetGlobalDockScreen>
   {
      screen: &dsCommonwealthDecon;
      priority: 10

      data: { ... }
      overrideOnly: True
      }
</GetGlobalDockScreen>

This syntax is more convenient and easier to read.

In addition, we've introduced a new flag, overrideOnly, which is required to specify that a screen should only be shown on objects that already have a dock screen. This flag is required to prevent these kinds of screens from showing up on ships, which traditionally do not have dock screen.

Miscellaneous

  • Add aScreenName and gData to <OnGlobalPaneInit>.

Sovereigns

Relationship alignment can specify a class of sovereigns:

  • community or its opposite, independence.
  • constructive or its opposite, destructive.
  • evolution or its opposite, tradition.
  • knowledge or its opposite, spirituality.

TLisp

  • Added unvGetProperty.
  • sysAddEncounterEventAtDist now takes a list of targets.
  • objAddOverlay now takes an optional posZ.
  • Added autoClearOnGate option to objSetShowAsDestination.
  • Added known property to systems.
  • Added regen property to armor and shields.
  • Added options to objHasTradeService.
  • Added name property to <Power>.
  • Added more options to itmIsEqual (and related functions).
  • Added plyIncItemStat
  • Allow equality and inequality comparisons against properties in criteria. See: https://ministry.kronosaur.com/record.hexm?id=82642