Changes for page Breaking Changes

Last modified by Michael Baumgardt on 2026/04/17 12:03

From version 2.1
edited by stefan
on 2019/02/01 01:44
Change comment: There is no comment for this version
To version 16.1
edited by klaus
on 2019/02/01 16:14
Change comment: Added some pre-2.0 notes

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -xwiki:XWiki.stefan
1 +xwiki:XWiki.klaus
Content
... ... @@ -1,12 +1,127 @@
1 1  = Introduction =
2 2  
3 -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 which were written for older versions.
3 +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.
4 4  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.
5 +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.
5 5  
6 6  {{note}}
7 -The list of breaking changes does **NOT** cover changes in the provided/shipped Lua scripts (for instance 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.
8 +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.
9 +
10 +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.
11 +
12 +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).
8 8  {{/note}}
9 9  
10 -Please note that issues introduced during the beta phase might not be explicitly mentioned as a breaking change, if things would only be broken in-between two beta versions.
15 +{{warning title="UI modding considered unstable until further notice..."}}
16 +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.
17 +{{/warning}}
11 11  
12 -The following pages list all breaking changes related to UI modding.
19 += Breaking Changes =
20 +
21 +|=(((
22 +Type
23 +)))|=(((
24 +Version
25 +)))|=(((
26 +Summary
27 +)))
28 +|(((
29 +UI extensions
30 +)))|(((
31 +2.0 Beta 1
32 +)))|(((
33 +**FFI: GetUpgradeSlotCurrentComponent()/GetUpgradeSlotGroup()** works on non-operationals
34 +)))
35 +|(% class="highlight-grey" colspan="3" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="3" data-highlight-colour="grey" %)
36 +(((
37 +//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.//
38 +)))
39 +|(((
40 +UI extensions
41 +)))|(((
42 +2.0 Beta 1
43 +)))|(((
44 +**FFI: SetFormationShape()** no longer indicates an error upon certain error cases
45 +)))
46 +|(% class="highlight-grey" colspan="3" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="3" data-highlight-colour="grey" %)
47 +(((
48 +//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.//
49 +//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.//
50 +)))
51 +|(((
52 +Scripts
53 +)))|(((
54 +2.0 Beta 1
55 +)))|(((
56 +**<create_formation/>** now requires the attributes: 'leader' and 'follower'. Attribute 'object' is now deprecated.
57 +)))
58 +|(% class="highlight-grey" colspan="3" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="3" data-highlight-colour="grey" %)
59 +(((
60 +//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.//
61 +)))
62 +|(((
63 +Scripts
64 +)))|(((
65 +2.0 Beta 1
66 +)))|(((
67 +**<event_player_changed_target/>** now fires and returns null if the player deselects a target.
68 +)))
69 +|(% class="highlight-grey" colspan="3" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="3" data-highlight-colour="grey" %)
70 +(((
71 +//For prior behavior, check for event.param being non-null.//
72 +)))
73 +|(((
74 +AI Scripts
75 +)))|(((
76 +2.0 Beta 1
77 +)))|(((
78 +Attribute changes to **<shoot/>** and **<shoot_at/>**
79 +)))
80 +|(% class="highlight-grey" colspan="3" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="3" data-highlight-colour="grey" %)
81 +(((
82 +//Changed: Attribute "primary" is now optional and defines whether weapons from the ship's active primary weapon group will be fired. Defaults to true.//
83 +//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.//
84 +//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.//
85 +
86 +//Corrects now-obsolete assumption that primary weapon groups only contain guns and secondary weapon groups only contain missile launchers.//
87 +)))
88 +|(((
89 +All
90 +)))|(((
91 +1.50 Beta 2
92 +)))|(((
93 +Corrected **meaning of "Shipyard"** throughout Lua/MD/AI scripts, so that Wharfs are not Shipyards (unlike in XR).
94 +)))
95 +|(% class="highlight-grey" colspan="3" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="3" data-highlight-colour="grey" %)
96 +(((
97 +//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".//
98 +
99 +//Lua: Adjusted GetComponentData() and HasShipyard(), added HasWharf()//
100 +//Lua / GetComponentData() properties: Removed "iscapitalshipyard", fixed "isshipyard", added "canbuildships", "iswharf", "isequipmentdock"//
101 +//Scripts: Fixed property .isshipyard, added .iswharf (.canbuildships existed already)//
102 +)))
103 +|(% colspan="1" %)(% colspan="1" %)
104 +(((
105 +UI extensions
106 +)))|(% colspan="1" %)(% colspan="1" %)
107 +(((
108 +1.50 Beta 1
109 +)))|(% colspan="1" %)(% colspan="1" %)
110 +(((
111 +**FFI:** Removed **SetGuidance()** argument useinfopoint.
112 +)))
113 +|(% class="highlight-grey" colspan="3" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="3" data-highlight-colour="grey" %)
114 +(((
115 +//The deprecated third argument was removed. The new function declaration is: void SetGuidance(UniverseID componentid, UIPosRot offset)//
116 +)))
117 +|(((
118 +UI extensions
119 +)))|(((
120 +1.32
121 +)))|(((
122 +**Lua:** Removed **GetComponentData()** property "**nextdestname**".
123 +)))
124 +|(% class="highlight-grey" colspan="3" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="3" data-highlight-colour="grey" %)
125 +(((
126 +//Instead of "nextdestname", use the GetComponentData() properties "destination" or "destinationsector" to retrieve a destination component, then retrieve its "name" property.//
127 +)))
Confluence.Code.ConfluencePageClass[0]
id
... ... @@ -1,1 +1,1 @@
1 -78577859
1 +78577909
url
... ... @@ -1,1 +1,1 @@
1 -https://www.egosoft.com:8444/confluence/wiki/spaces/X4WIKI/pages/78577859/Breaking Changes
1 +https://www.egosoft.com:8444/confluence/wiki/spaces/X4WIKI/pages/78577909/Breaking Changes