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
slotIDto 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
hullPointsproperty to ship classes. - Added
priceproperty. - Added
autoTargetproperty. - Added
targetproperty. - Added
fuelEfficiencyproperty. - Added
ratedPowerproperty, which is power consumed at max shield consumption, max primary weapon consumption, max thrust, and idle consumption for all other devices. - Added
identifiedproperty. - Added
extiGateTimeproperty. - Added
suspendedproperty.
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
fragmentMinRadiusandfragmentMaxRadiusparameters.
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
completedOnproperty. - Added
inProgressproperty.
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
aScreenNameandgDatato<OnGlobalPaneInit>.
Sovereigns
Relationship alignment can specify a class of sovereigns:
communityor its opposite,independence.constructiveor its opposite,destructive.evolutionor its opposite,tradition.knowledgeor its opposite,spirituality.
TLisp
- Added
unvGetProperty. sysAddEncounterEventAtDistnow takes a list of targets.objAddOverlaynow takes an optional posZ.- Added
autoClearOnGateoption toobjSetShowAsDestination. - Added
knownproperty to systems. - Added
regenproperty to armor and shields. - Added options to
objHasTradeService. - Added
nameproperty 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