X4: Foundations

X4: Foundations

40 ratings
upb Lua Loader
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
76.032 KB
11 Jun, 2024 @ 2:36am
18 Jul @ 8:32am
6 Change Notes ( view )

Subscribe to download
upb Lua Loader

Description
  • You may need to disable UI Protection mode ("Settings" -> "Extensions" -> "Protected UI Mode") before use.

    For Mod Creators:
    x4 version 6.xx and 7 are also suitable for use.

    Example from MD:

    <cue name="Load_Lua_Files" instantiate="true">
    <conditions>
    <event_ui_triggered screen="'Upb_Lua_Loader'" control="'Ready'" />
    </conditions>
    <actions>
    <raise_lua_event name="'Upb_Lua_Loader.Load'"
    param="'extensions.folder_named_pipes_api.Named_Pipes'"/>
    </actions>
    </cue>

    Here, the cue name can be anything, and the param is the specific
    path to the lua file to load, without extension.
    The file extension may be ".lua" or ".txt", where the latter may be
    needed to distribute lua files through steam workshop.
    The lua file needs to be loose, not packed in a cat/dat.

    When a loading is complete, a message is printed to the debuglog, and
    a ui signal is raised. The "control" field will be "Loaded " followed
    by the original file_path. This can be used to set up loading
    dependencies, so that one lua file only loads after a prior one.

    Example dependency condition:

    <conditions>
    <event_ui_triggered screen="'Upb_Lua_Loader'"
    control="'Loaded extensions.folder_named_pipes_api.Named_Pipes'" />
    </conditions>
19 Comments
QuietMan 7 Jun @ 3:51am 
@netupb, still thx for taking time to look at it.
netupb  [author] 6 Jun @ 4:21pm 
@QuietMan, I tested SN Community edition alone but it has problems with multiple lua loads. So for now you have to use the original SN mod or the upb loader.
QuietMan 6 Jun @ 3:02am 
PS: I did a small test it seems your mods do not work with the new version of the API mod. So one has to use either the old SN API mod or your loader.
QuietMan 6 Jun @ 2:16am 
As I understood SirNukes API can act instead of your Lua Loader. But the GitHub project has taken over development of SirNukes API and has released a new version. So can this still be used instead of your loader?
Btw: Thank you for your great work for the X community.
netupb  [author] 5 Jun @ 12:50pm 
@QuietMan, I didn't understand what you asked?
SKI-FI 30 May @ 3:59pm 
How to fix the error at startup writes version 0.1 and the game asks to update. I'm re-subscribing to the mod, it's not updated
What to do?
114338506 28 Feb @ 3:55am 
Author, please update the mod version. Thank you very much
netupb  [author] 9 Sep, 2024 @ 10:52am 
I would also appreciate it if you could point out any issues with upb Restock Fleet Manager in the relevant mod section.
netupb  [author] 9 Sep, 2024 @ 10:46am 
@Tsenamu, I think you are using old version as RFM mod version. As it is, it just adds RFM tag to the name you give before opening RFM. It doesn't corrupt the name you give. The version that caused corruption was in one of the old versions and I fixed it. I think yours is 3-4 versions old. I put it while leaving the repair as a method to change ship names without closing RFM. Promoted commander, that is, if there is RFM tag in the name, you can change the name of the ship name without deleting the rfm tag with repair method at the station.
Current version works properly. Also, RFM tag is only valid for RFM Promoted commander. Since there is no tag in subordinates, you can be more comfortable while renewing ship names.

If you plan the registration information that the fleet will store before opening RFM, you will not have to make changes one by one later.