Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Introduction

Our goal is to keep breaking changes between any given versions of X Rebirth to an absolute minimum. In some cases, however, we have had to change things which break scripts/mods which were written for older versions. The same will be true for UI modding. The following section contains all breaking changes on the UI modding side. This should help you to make any necessary changes to restore compatibility of older mods with new versions of X Rebirth.

Please note that during the beta/RC phase of 3.50, the UI modding design is still in a state of flux and we are more likely to introduce breaking changes while we stabilise the modding interface.

3.20 -> 3.50 Beta 1

ui.xml changes

In order to make UI modding available, we have had to update the handling of the ui.xml file. In 3.20 your ui.xml file used a patch facility to hook into the UI system. In 3.50 your ui.xml file is now directly interpreted by the UI engine.

Here's a quick example on how to convert the 3.20 ui.xml file to a matching 3.50 one:

pre 3.50 ui.xml file

 

<?xml version="1.0" encoding="utf-8"?>
  <add sel="/addon[@name='ego_detailmonitor']/dependency" pos="before">
    <file name="foo.lua" />
  </add>
</diff>

 

post 3.50 ui.xml file

 

1
2
3
4
5
<?xml version="1.0" encoding="UTF-8"?>
<addon name="my_addon" viewtype="detailmonitor" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../core/addon.xsd">
    <file name="foo.lua" />
    <dependency name="ego_detailmonitor" />
</addon>

 

line 2: ensure the name attribute is set to your own addon's name
line 4: add the dependency to the Egosoft addon, you hook into

XPL and Lua byte code support removed

If you provided your scripts in byte code or with a file extension other than ".lua" (for instance ".xpl"), you will have to rename the file and provide the Lua script in plain-text.

Note that this also works in versions prior to 3.50. So if you provided the Lua scripts already with these specifications for 3.20, there's no need to change anything.

3.50 Beta 1 -> 3.50 Beta 2

IsComponentValid() renamed to IsValidComponent()

The function was renamed. If you called IsComponentValid() before, you'll need to change your code and call IsValidComponent() now.

3.50 Beta 2 -> 3.5 post Beta 2

Lua/FFI function changes

type
breaking change
note
LuaGetComponentFactionName()removed - use FFI GetFactionName()
LuaGetRelationComponentStatus()removed - use FFI GetRelationStatus()
LuaGetRelationFactionStatus()removed - use FFI GetFactionRelationStatus()
FFIint RelationStatus GetRelationStatus()changed - return value changed
  • No labels