Breaking Changes

Last modified by Chris Burtt-Jones on 2024/06/04 10:23

Introduction

Our goal is to keep breaking changes between any given version of X4 to an absolute minimum. In some cases, however, we have had to change things which break scripts/mods written for older versions.
The following table provides an overview about all breaking changes. This should help you to make any necessary changes to restore compatibility of older mods with new versions of X4.
Feel free to drop a note if a certain breaking change is breaking your mod and you have difficulties finding a way to work around the issue.

Information

⚠ The list of breaking changes does NOT cover changes in the provided/shipped scripts (for instance UI scripts like the ones located under ui/addons/XXX or ui/core/Lua). These scripts can change anytime without explicit notice. If you hook into one of these scripts or provide replacements for these, please check the script for possible breaking changes yourself.

Further note that the list provides information about breaking changes which are in the pipeline of being released. This is meant merely as an informational heads up. Neither do mistake this as an announcement of that version becoming available soon nor take it for granted that such a change will go live. Any information provided for not yet released versions can change (and even be removed) prior to such version having seen the light of day.

As a final note, please be aware that issues introduced during the beta phase might not be explicitly mentioned in the list below, if things would only be broken in-between two beta versions. While we still aim to document any (potential) breaking change here, there might be circumstances for which we divert from that procedure (especially in case of only minor issues which are considered merely bugfixes rather than an intended behavior change).

Warning
UI modding considered unstable until further notice...

Please note that UI modding must be considered unstable in the current version. While we are working hard to get the UI modding integration into a stable state, we might have to introduce larger backwards incompatibilities in the following patches. This means that you might have to modify any mod using UI modding capabilities to a larger extend to keep it compatible with certain patches. Still, we are doing our best not to unnecessarily break things for modders and certainly will announce such changes on this page here.

Breaking Changes

Version 7.00

Gamestarts7.00 Beta 8Text references
Fields containing text references in gamestarts.xml now have full text conversion applied, allowing texts to be constructed from multiple text entries, e.g. {1234,56}\n\n{1234,78}. As a result, raw text placed in the text fields needs to be formatted accordingly, e.g. "Test start (easy)" would need to be changed to "Test start \(easy\)" to avoid the text in brackets being treated as a comment.
Assets7.00 Beta 7\assets\textures\fx\highway_fx_electric_02 was deleted and replaced with \assets\textures\fx\fx_p2_electric_01
highway_fx_electric_02 is still available in "legacy" folder if needed
Parameters7.00 Beta 7<aiflight><skills>: strafespeed, strafeacc, steeringspeed, steeringacc moved to separate nodes; added support for min and max values

The four parameters used to represent flat factors applied to ships' properties with respect to their respective pilots' skill levels. Parameters moved to separate nodes with support for min and max values which, if supplied, scales the factor linearly if the affected ship's unmodified property is within min and max. Factor does not affect the ship if that property is below min.

Scripts7.00 Beta 6MD action <set_holomap_target> parameter change.

The pantime parameter has never actually done anything beyond turning panning on or making the transition instant. To make this clear it has been replaced with the boolean parameter instant.

Assets7.00 Beta 1Renamed some material names and changed file paths for textures.

Some material names and texture paths were changed. Please DIFF the materiallibrary.xml from 6.20 with 7.0 to see the difference

Scripts

7.00 Beta 1

MD action <set_presentation_cluster_persistence/> now requires the cluster to be a presentation cluster.

 Previously it was possible to set normal clusters to be persistent presentation clusters which was an invalid state.

UI extensions

7.00 Beta 1

FFI: RemoveBuildPlot() changed

 The build plot's buildstorage is no longer removed implicitly. The buildstorage will instead be cleaned-up once it is empty and no ships are docked.

Assets

7.00 Beta 1

Some Split DLC materials moved to base game

 "spl_p1_fx" AND "split_p1_hulltexture_01" were moved from Split DLC to base game

Version 6.00

Libraries

6.00 Beta 7

Updated weights for ship groups in shipgroups.xml libraries of base game and all DLCs.

Previously some entries were lacking "weight" parameter, causing it to default to "1", which prevent adding new ships to the group with appropriate/configurable granularity.

All groups should now have "weight" parameter added and old "weights" were updated to not have single-digit numbers.

Scripts

6.00 Beta 4

Changed conditions for <event_player_travelmode_started> <event_player_travelmode_stopped> <event_player_travelmode_charge_started> <event_player_travelmode_charge_aborted> to be raised.

The <event_player_travelmode_started>, <event_player_travelmode_stopped>, <event_player_travelmode_charge_started> and <event_player_travelmode_charge_aborted> events will no longer be raised if the player is a passenger on board a ship which enters or leaves travel mode. Previously these events would be raised whether the player was the pilot or a passenger. 

Scripts that need to check whether the player exits travel mode may also need to consider checking whether the player leaves the control seat using <event_player_stopped_control> since this will also result in travel mode stopping.

Scripts

6.00 Beta 3

Changed result of <find_object_surface> action in the case of a failure

The 'posname' and 'rotname' result attributes of <find_object_surface> will now return null in the case of no valid surface position being found.

Previously, it returned null only if there was a physics error. It however returned a valid, somewhat-random, position if physics were fine but it was still unable to find a suitable surface position. This position was often unsuitable to use for gameplay purposes so it is now null so the caller can handle the situation.

The action itself has been improved to increase the chance of finding suitable surface positions.

Scripts

6.00 Beta 1

Behaviour change for <match_dock> script component filter

<match_dock> nodes can now be used on container and walkablemodule classes without wrapping them in <match_content> nodes.
This has introduced a new potential pitfall: If finding or counting contained components be wary that there may be multiple positive results, even if there is only one dockingbay. e.g. matching contents for a station will include the dockingbay but also its containing walkable module as that also contains the dockingbay. To only account for docking bays, also filter by dockingbay class.

Scripts

6.00 Beta 1

Changed result attribute location for <get_attackstrength>

The 'result' attribute of get_attackstrength has been moved into the new <result> subnode and renamed to 'total'.

Assets

6.00 Beta 1

Surface element connections are incompatible by default unless tagged as "standard", and also "combat" for non-missile, non-mining weapons

Connection tags used to specify compatibilities in component templates between a ship or station module and engines or shields now additionally require the use of the "standard" tag matching weapon or turret logic. For weapons that are neither Missile Launcher nor Mining Laser, the tag "combat" is also required.
Exception: special equipment that is deliberately not compatible with the majority of slots may use another tag instead of "standard", e.g. "highpower" for certain Terran weapons.

Scripts

6.00 Beta 1

Changed behaviour of attribute sortbygatedistanceto when finding objects, discarding unreachable objects

When finding components with attribute "sortbygatedistanceto", e.g. in <find_object>, any objects with a negative gatedistance (i.e. unreachable objects) are automatically excluded from the result.

Scripts

6.00 Beta 1

<event_player_owned_killed_object> and <event_player_owned_destroyed> are now triggered before the corresponding <event_object_destroyed>, instead of afterwards.

The order of events was adjusted, allowing handlers of <event_player_owned_killed_object> and <event_player_owned_destroyed> to access commander/subordinate relationship of the destroyed object.

Cutscenes

6.00 Beta 1

Changed behaviour of <angles> in cutscenes

The yaw and pitch nodes in <angles> are now correctly interpreted as values in degrees.


Version 5.00

Parameters

5.00 Beta 1

<controlpanel><entry>: minduration removed, maxduration renamed to duration

'minduration' was unused in X4, maxduration was and still is taken as the actual duration of control panel hacks. No functionality change.


Version 4.10

UI extensions

4.10 Beta 7

FFI: SetMapRenderCargoContents(), SetMapRenderWorkForceInfo(), SetMapRenderCrewInfo() and SetMapRenderDockedShipInfos() deprecated

The functionality represented by SetMapRenderCargoContents(), SetMapRenderWorkForceInfo(), SetMapRenderCrewInfo() and SetMapRenderDockedShipInfos() has been removed and the function was therefore stubbed.

UI extensions

4.10 Beta 6

FFI: CustomGameStartPlayerProperty2 changed

This struct was added in 4.10 Beta 2 and an additional member count was added in Beta 6.

Parameters

4.10 Beta 3

Renamed <stationinfobox> to <infobox>

Info box parameters are now shared across stations and ships. The node has a more generic name to reflect that.

UI extensions

4.10 Beta 2

FFI: SetMacroMapPlayerSectorOffset() deprecated

The functionality represented by SetMacroMapPlayerSectorOffset() has been removed and the function was therefore stubbed. Setting the gamestart properties "sector" and "offset" will affect the universe macro map instead directly.

UI extensions

4.10 Beta 2

FFI: FilterComponentForMapMode() and SetMapObjectFilter() changed

These functions were added in 4.10 Beta 1 and an additional boolean parameter allowentitydeliverymissionobject was added in Beta 2.

Scripts

4.10 Beta 1

People related attributes of mission <delivery> node moved

The <delivery> node of <create_mission> and <update_mission> has been changed to support a new <wares> subnode. The people related attributes: 'people' and 'skills' have been moved from the <delivery> node itself to a <people> subnode.

Scripts

4.10 Beta 1

$destructible.productions replaced with $defensible.productions

The $destructible.productions script property was removed and reimplemented as $defensible.productions meaning some old uses may no longer work unless the destructible is also a defensible. The old implementation functioned by finding the containing object of the destructible (including itself) to query for the production modules.

Scripts

4.10 Beta 1

Removed script property $object.spawnsourceseed

The spawnsource seed is no longer directly accessible by scripts. Use $component.seed, which will internally use the spawnsource seed if able. Note: An improvement is that .seed on objects without a spawnsource seed will now result in a value that differs between objects of the same macro, meaning it can now reliably be used for player property or job ships.


Version 4.00

UI core

4.00 Beta 10

Controlled ship can change without a gameplanchange-event occurring.

Before 4.00 Beta 10 it was ensured that there is no direct transition between the 'cockpit ui mode' of one ship to another. Instead, it was always ensured that the UI first transitions into the firstperson mode and then back into the cockpit mode (controlling then the other ship).
In order to support the new emergency eject feature which was added in 4.00 Beta 7, this assurance was dropped. As of 4.00 Beta 10 it is now possible that the ship the player controls can swap without the gameplanchange-event being risen which one could rely upon in previous versions. If your addon relied on the fact that the ship would not change without first going into first person mode, you will have to adjust your addon accordingly.

Scripts

4.00 Beta 7

Parameters of <event_terraforming_project_succeeded> and <event_terraforming_project_failed> changed

Old params: param = project ID, param2 = were there positive side-effects?, param3 = were there negative side-effects?
New params: param = project ID, param2 = [were there positive side-effects?, were there negative side-effects?], param3 = payout in Credits
Note: param3 only exists in <event_terraforming_project_succeeded> and not in <event_terraforming_project_failed>, but both now have the booleans in a list for consistency

UI core

4.00 Beta 6

FFI: GetFactionRelationStatus() handling for faction relation range [-20,-10] changed

In order to keep consistency with regards to the new behvior 'hostile' relation state and the older (deprecated) UI functions, the behavior of the deprecated GetFactionRelationStatus() function was changed according to the behavior of the GetRelationStatus()/GetRelationStatus2() functions which was done in the previous beta.
Factions with a relation rating between -20 and -10 will now report a relation status of 'neutral' (aka: 1) instead of 'hostile'/'enemy' (aka: 0).

If you rely on a handling where these factions are treated like enemies, please use the new GetFactionRelationStatus2() function instead.

UI core

4.00 Beta 5

FFI: GetRelationStatus()/GetRelationStatus2() handling for objects in relation range [-25,-10] changed

4.00 Beta 5 introduces a new 'hostile' relation status and the game now distinguishes between hostile and enemy relation states. Objects not yet 'hostile' with the player are now visualized differently and therefore distinguishable from real hostile ones. Because of that, several related changes were made for these objects to bring them more in line with how 'neutral' objects behave (f.e. no automatic attacking of these objects by the player property anymore, no target selection when targeting the closest enemy, etc.). To reflect this, these objects are now returning 1 (neutral) as the relation status by the GetRelationStatus()/GetRelationStatus2() functions.

If you rely on a handling where they are treated like enemies, please use the new GetRelationStatus3() function which returns the new range for these objects: 1 (meaning 'enemy' (aka: not yet hostile) here with following relations having been shifted up).

Parameters

4.00 Beta 1

requiresconstructionvessel parameter moved

The 'requiresconstructionvessel' attribute has been moved from the 'recycling' node itself, to the new 'station' subnode.

Scripts

4.00 Beta 1

Changed behaviour of gatedistance script property

The 'gatedistance' script property now minimizes the number of gate jumps instead of counting the number gate jumps in the fastest route.


Version 3.30

UI extensions

3.30 Beta 3

FFI: Removed GetMissionLimit() and IsMissionLimitEnabled()

These mission limit-related functions (added in 3.30 Beta 1 and 2) are replaced with FFI IsMissionLimitReached()


Version 3.20

Scripts

3.20 Beta 1

Parameters of <event_player_attacked_object/> and <event_object_attacked_object/> changed

Old params: param = attacked object, param2 = attack method, param3 = attacked component
New params: param = attacked object, param2 = attack method, param3 = attack component detail list: [attacked component, attacking weapon]
Note that this also means the component attribute to the events is no longer available, so scripts checking the attacked component need to use event.param3.{1} instead

Scripts

3.20 Beta 1

Removed script property $trade.restriction.faction

$trade.restriction.faction has been replaced with $trade.restriction.factions, which returns a list of factions.

UI extensions

3.20 Beta 1

Lua: GetTradeRestrictions(), ToggleFactionTradeRestriction() and ToggleFactionTradeWareOverride() are now obsolete!

With the addition of the Trade Rule feature the given functions are obsolete and do not function anymore. This set of functions will return dummy values to avoid breaking scripts. Use GetAllTradeRules(), GetContainerTradeRuleID(), SetContainerTradeRule() and similar trade rule functions as replacement.


Version 3.10

Scripts

3.10 Beta 1

Removed script action <add_build/>

Removed <add_build/> action which was no longer needed and would result in builds being added in unsupported ways. Use other <add_build_xxx/> actions.


Version 3.00

Scripts

3.0 Beta 6

Changed behaviour of script action <get_suitable_job/>

<get_suitable_job/> previously did not respect job quotas or the current number of job ships. It now does, only returning job IDs which are not exceeding the maxgalaxy quota. Using 'exceedquota' allows the action to behave as before.

Scripts

3.0 Beta 6

Changed behaviour of script action <get_ware_definition/>

<get_ware_definition/> previously filtered for equipment wares by default. This is now not the case and existing cases now use flags="equipment". Additional filter attributes for group and tags has also been added.

Global

3.0 Beta 5

Renamed all files in the md, ui, and cutscenes folders to lower-case

All MD, UI, and cutscene files have been renamed as lower-case. For most users this should have no effect since files packed in catalogs are essentially case-insensitive. However, this change can affect users on Linux systems when running a mod that contains single files instead of a catalog, and/or when playing with unpacked base game files. If your mod has XML patch files that are not packed in a catalog, the filenames must be lower-case to match the filenames in the base game. (For info on using mod catalogs, see the Readme of the X Catalog Tool.)

Note that this change has no effect on the actual content of scripts or cutscenes. The MD script/cutscene names are stored in the files, regardless of the filenames, so that references to them remain unchanged (e.g., "md.Setup.Start" references a cue in setup.xml).

Scripts

3.0 Beta 5

Adjustments of some MD library cues in the base game to change their usage from <include_actions> to <run_actions>

Some MD library cues in the base game that were previously used with <include_actions> have been adjusted, so they must now be used with the new MD action <run_actions> instead. Mods that use such a library with <include_actions> will have to switch to <run_actions> as well. A list of affected libraries is not provided here. Note: Additional library cues may be adjusted in future builds without further warning.

Scripts

3.0 Beta 5

Changes to $dockingbay.todockpos and $dockingbay.launchpos

Before the change, positions are relative to $dockingbay.parent.
After the change, positions are relative to $dockingbay as specified in the documentation.

Global

3.0 Beta 2

Support for entity flag "skillsvisible" dropped

Entity skills are always visible; that flag was a leftover from XR. We removed support for the script property .skillsvisible, the attribute "skillsvisible" of <set_entity_traits> and <set_npc_template_traits>, and the parameter "skillsvisible" of Lua function GetComponentData().

Scripts

3.0 Beta 2

Changes to <event_object_changed_owner> and added <event_object_changed_true_owner>.

Before 3.0 Beta 2 there was just a single <event_object_changed_owner> condition. This condition was triggered in multiple cases when an owner change occurred. However, the exact cases were inconsistent and also the event could have been triggered w/o an effective owner change having been applied.
3.0 Beta 2 fixes these inconsistencies and ensures that the event is only fired, if the "effective" component owner of the object changed. To handle cases where the script actually needs to be informed if the "true" owner of a component was changed (i.e. not taking the cover faction into account) a new <event_object_changed_true_owner> was introduced.
If in your scripts you make use of the <event_object_changed_owner> condition you need to verify that you indeed want to work with the "effective" component owner or whether your script code actually should work with the true owner of an object and update your code accordingly.
On top of that the 3rd parameter of <event_object_changed_owner> (trueprevious) was dropped as the event is no longer triggered upon a change of the true owner alone (i.e. only if the change of the true owner has also an effect on the "effective" component owner).

Global

3.0 Beta 1

MissionBoard support dropped

MissionBoards was a dummy asset type which was only used during early development and never meant to be shipped in the released version. If any mod tried to make use of this asset type, undefined behaviour would occur. Therefore we cleaned things up in 3.0 Beta 1 including deprecating/removing any related UI/script function.

Job/God

3.0 Beta 1

By default, job/god entries now only spawn objects in space added by the extension in which they are defined

To better support extensions which add to the base game map, a job/god entry now defaults to only spawning objects in areas of the map that are added by the extension in which that entry is defined. You can override this behaviour by adding a matchextension="false" attribute to the job/god entry definition. This allows the entry to spawn objects anywhere that matches the entry's other criteria.

Scripts

3.0 Beta 1

Script action <add_actor_to_room/> attribute 'room' renamed to 'object'

Due to engine changes, script action <add_actor_to_room/> has had the attribute 'room' changed to 'object', which is more accurate. Most likely requires a 'position' if a slot is not provided.

Scripts

3.0 Beta 1

Script action <set_doors_locked/> attribute 'group' changed

The 'group' attribute of <set_doors_locked/> can no longer be a list. It must be a single tag value. Previously, a list containing one tag was accepted, which was redundant.

Scripts

3.0 Beta 1

Script conditions <event_hack_*/> and <event_controlpanel_hack_*/> removed

These events were never triggered, with the exception of <event_hack_started/> on the player entity for instant control panel hacks. Use <event_player_hacked_object> instead.

Scripts

3.0 Beta 1

Script actions <set_hack_target/> and <abort_hack/> removed

These actions had no effect and were removed.

Scripts

3.0 Beta 1

<setup_conversation_minigame/> script action removed

The script action was a leftover from the XR era and was never supported in X4 and couldn't be used in a meaningful way. It was therefore decided to better drop it altogether as it's not expected having been used by any mods.

Scripts

3.0 Beta 1

<add_player_choice_*> confidence attribute removed

The default confidence of player options is another leftover from the XR era and had no effect in X4.

Scripts

3.0 Beta 1

<hack_via_control_panel/> script action removed

Unused script action <hack_via_control_panel/> was removed.

UI core

3.0 Beta 1

Lua: GetMiniGameCursorPosition() removed

GetMiniGameCursorPosition() was a left over from the XR era and never supposed to be shipped with X4. The function practically always returned 0 and hence we don't expect the removal of this obsolete function causing any actual mod to break.

UI core

3.0 Beta 1

FFI: GetLocalizedInteractiveNotificationKey can return icon placeholders

In 3.0 Beta 1 we added support to display icons for keyboard bindings, if an icon is available for the specified keys. This results in GetLocalizedInteractiveNotificationKey() potentially returning a different text now if such an icon is assigned to the mapped key/button.

UI extensions

3.0 Beta 1

FFI: UIWeaponMod returned by GetInstalledWeaponMod() now includes property SurfaceElementFactor

In 3.0 Beta 1 we added support for a new weapon mod property "SurfaceElementFactor" to allow weapons to deal increased damage to surface elements such as Shield Generators, Turrets or Engines.

Scripts

3.0 Beta 1

$ware.illegal updated

$ware.illegal used to return true if the specified ware has the 'illegal' tag which is no longer used.
It now returns true if $ware is illegal to any faction in the game.

Scripts

3.0 Beta 1

MD script RML_Flight_Along_Path removed

The MD script RML_Flight_Along_Path was not referened and was removed.

Scripts

3.0 Beta 1

parameters of <event_venture_mission_completed/> changed

old params: param = venture details, param2 = ships involved, param3 = duration
new params: param = venture detail list: [mission name, mission type], param2 = list of ships involved, param3 = duration

Scripts

3.0 Beta 1

<set_object_wing_name/> removed,
<set_object_fleet_name/> added

The common action <set_object_wing_name/> has been replaced with <set_object_fleet_name/>

Scripts

3.0 Beta 1

$controllable.wing.* removed,
$controllable.fleet.* added

$controllable.wing.name, $controllable.wing.iscommander, and $controllable.wing.commander have been replaced with $controllable.fleet.name, $controllable.fleet.iscommander, and $controllable.fleet.commander


Version 2.60

Scripts

2.60 Beta 1

'checkoperational' filter behaviour changed

Actions and conditions which use the 'checkoperational' filter now behave differently. Instead of changing how 'class' and 'exactclass' behave, checkoperational == true adds an additional filter for the components being of state operational, equivalent to state="componentstate.operational". This is implicitly enabled in action elements (e.g. <find_.../>) or condition elements (e.g. <count_...>), meaning that find_ship will only find operational ships. Using such actions/conditions with checkoperational="false" will include non-operational components such as wrecked and constructions. Existing uses may find that results now exclude non-operational components.

Sub nodes such as match_child will have checkoperational default to false. Existing uses may find that results now include non-operational components.

Scripts

2.60 Beta 1

$container.supplyresources behavior changed

   

The script keyword $container.supplyresources now includes reserved wares.


Version 2.20

UI core

2.20 Beta 3/4

Lua: GetControllerInfo() returned mouseSteering/mouseCursor values are undefined.

2.20 Beta 3 introduced the new direct mouse steering mode. The mode was however not integrated as a first level mode and hence GetControllerInfo() returned the "gamepad" mode while direct mouse steering was active.
In 2.20 Beta 4 we improved the situation slightly so that a call to GetControllerInfo() will return either "mouseCursor" or "mouseSteering" in any of the 3 mouse modes.

It's a pending change to ensure that the returned mode is more reasonable in an upcoming patch. So be aware that another breaking change might be introduced at some point.

Scripts

2.20 Beta 3

Attribute for build related conditions e.g. <event_build_finished/> renamed from 'buildmodule' to 'buildprocessor'

The underlying behaviour remains the same in that it involves the buildprocessor, not the buildmodule. The attribute name has simply been corrected.


Version 2.00

Scripts

2.00 Beta 1

<event_build_finished/> param2 now returns null instead of a construction sequence

The construction sequence which was finished should now be accessed via the buildtask provided via param3.

Scripts

2.00 Beta 1

param.boarding.{...} strength parameters removed

The 'recruitstrength', 'veteranstrength' and 'elitestrength' script parameters were no longer required for balancing the boarding gameplay, and were removed.

Scripts

2.00 Beta 1

$defensible.boardee/$defensible.boarder and <set_object_boarder/>/<remove_object_boarder/> removed

Due to changes to boarding in X4, the boarding connections accessed by these script properties and actions became redundent and thus, removed. Any connections set by these actions in a savegame will not survive loading.

UI extensions

2.00 Beta 1

FFI: GetUpgradeSlotCurrentComponent()/GetUpgradeSlotGroup() works on non-operationals

Before 2.0 Beta 1 using GetUpgradeSlotCurrentComponent() or GetUpgradeSlotGroup() only performed on operational objects (i.e. not wrecked objects or objects under construction). Since this is inconsistent with the rest of the UI functions, this was considered a bug and fixed in 2.0 Beta 1. If you require the old behavior, use the FFI function: IsComponentOperational() to check the passed object's state before making the call.

UI extensions

2.00 Beta 1

FFI: SetFormationShape() no longer indicates an error upon certain error cases

Before 2.0 Beta 1 a call to SetFormationShape() indicated an error state to the caller in certain cases where setting a formation shape (potentially) failed. Due to a design flaw in the handling of formations, this however doesn't do any good, since the function by itself doesn't really set the formation shape in all cases. On top of that the call can fail at random. Hence, at the moment an indication of an error case that setting a formation potentially fails is no good to the caller and he has no means to distinguish that case from a real error case.
Therefore, in 2.0 Beta 1 we drop the error indication in case of an attempt to set the formation fails. We are currently working on a better solution to the underlying problem and hope to have it ready as part of a following beta.

Scripts

2.00 Beta 1

<create_formation/> now requires the attributes: 'leader' and 'follower'. Attribute 'object' is now deprecated.

This now enforces a leader and at least one follower in order to create or change a formation.  Former implementation made it possible to create formations without any followers which led to issues.

Scripts

2.00 Beta 1

<event_player_changed_target/> now fires and returns null if the player deselects a target.

For prior behavior, check for event.param being non-null.

AI Scripts

2.00 Beta 1

<shoot/>/<shoot_at/> attribute changes.

Changed: Attribute "primary" is now optional and defines whether weapons from the ship's active primary weapon group will be fired. Defaults to true.
New attribute: "secondary" is an optional attribute that defines whether weapons from the ship's active secondary weapon group will be fired. Defaults to true.
New attribute: "missiles" is an optional attribute that defines whether only missile launchers will be used. If false, only guns will be fired. Defaults to false.

Corrects now-obsolete assumption that primary weapon groups only contain guns and secondary weapon groups only contain missile launchers.

UI extensions

2.00 Beta 1

FFI: GetBuildTask()/GetNumBuildTasks() got a new "buildmoduleid" parameter.

Added possibility to query build tasks of a certain buildmodule.

UI extensions

2.00 Beta 1

Lua: GetLibraryEntry() retrieved a new "buildresources" field.

Added list of resources a buildmodule needs to build.

UI extensions

2.00 Beta 1

Lua: CalculateTotalHullFraction() was removed. 

Unused, derelict function from XR - use GetComponentData(..., "hullpercent") instead.

UI extensions

2.00 Beta 1

FFI: RequestDockAtReason()/UndockPlayerShip() changed their return values.

Changed return value type to const char* to better identify failure reasons in Lua script.


Version 1.50

UI extensions

1.50 Beta 3

Lua: GetComponentData() changed behavior of "docksizes" property.

The "docksizes" property no longer includes internal ship storage docks.

All

1.50 Beta 2

Meaning of "Shipyard" was corrected throughout Lua/MD/AI scripts, so that Wharfs are not Shipyards (unlike in XR).

Shipyards (formerly also known as Capital Shipyards) can build capital ships, while Wharfs only build non-capital ships. To check whether a station is a Shipyard or a Wharf, check whether the station "can build ships".

Lua: Adjusted GetComponentData() and HasShipyard(), added HasWharf()
Lua / GetComponentData() properties: Removed "iscapitalshipyard", fixed "isshipyard", added "canbuildships", "iswharf", "isequipmentdock"
Scripts: Fixed property .isshipyard, added .iswharf (.canbuildships existed already)

UI extensions

1.50 Beta 2

FFI: UpgradeGroupInfo datatype was changed.

Added new "operational" field to retrieve information about number of operational upgrades in a group.

UI extensions

1.50 Beta 1

FFI: SetGuidance() removed useinfopoint argument.

In X Rebirth "info points" existed (which were mainly used as interaction points to scan stations/access information about modules). These were removed in X4 but this left-over property here was missed to be removed in-time for release. It was therefore removed now in order to move towards a stable/clean UI API.

The new function declaration is: void SetGuidance(UniverseID componentid, UIPosRot offset)

UI extensions

1.50 Beta 1

FFI: CancelConstruction() changed its return value.

CancelConstruction() now returns if the cancellation was successful. 


Version 1.32

UI extensions

1.32

Lua: GetComponentData() removed the "nextdestname" property.

Instead of "nextdestname", use the properties "destination" or "destinationsector" to retrieve a destination component, then retrieve its "name" property.


Version 1.20

UI extensions

1.20

FFI: GetAAOption() got a new "useconfig" parameter.

The AA setting was changed to check the new setting with the user. In order to restore the old setting GetAAOption() gets the option to retrieve the config settings.