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.
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).
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.
|UI extensions||2.0 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.0 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.
|Scripts||2.0 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.0 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.0 Beta 1|
Attribute changes to <shoot/> and <shoot_at/>:
Changed: Attribute "primary" is now optional and defines whether weapons from the ship's active primary weapon group will be fired. Defaults to true.
|Corrects now-obsolete assumption that primary weapon groups only contain guns and secondary weapon groups only contain missile launchers.|