X4: Foundations

X4: Foundations

54 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>
26 Comments
netupb  [author] 22 Sep @ 6:15am 
Yes, it's really great that sirNuke solved the problem. I use it for other mods too.

But it uses the upb loader to load my mods in lua. Either way, my mods should work.
QuietMan 22 Sep @ 6:12am 
the acutall version of SirNukes API also fixed the issue with menue not shown. @netupb: Great Mods, I had removed all other stuff but not your mods, works all fine with new version.
Sajuuk-Khar 15 Sep @ 9:21pm 
Fixed, switched to Mod Support APIs Community Edition on nexus
seems API 1.92 is buggy
Sajuuk-Khar 15 Sep @ 8:53pm 
Same issue, @netupb
no main menu (Esc pause in game screen)
bug appeared with game version 8.00
if you turn off upb Lua Loader then everything is fine
netupb  [author] 15 Sep @ 11:50am 
@Barok, It seems to be caused by SN mod support API 1.92. Try reverting to 1.90. This issue is not related to my mods.
netupb  [author] 13 Sep @ 3:53am 
@Barok, My apps do not use the mod support API. My mods use the upb loader mod.
Barok 13 Sep @ 3:42am 
In 8.0, the main menu does not open when pressing the Esc key when you are in the game. I don't know if it affects it, but I've installed an updated one Mod Support APIs v1.92.
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.