2.5 UI and Modding

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Phipsz
Posts: 335
Joined: Mon, 23. Apr 12, 23:56
x4

Post by Phipsz »

Nice find :) are you able to add entries to existing menus (like trade menu) as well? then my mod would be quite superflous :D

as for your other question: try

Code: Select all

local cf_mission_computer_active = GetAllUpgrades(GetPlayerPrimaryShipID()).software_cf_mission_computer_macro.operational == 1
cyberfuzzie
Posts: 136
Joined: Tue, 21. Nov 06, 13:58
x4

Post by cyberfuzzie »

Thanks, I'll try that.

The example above adds an entry to the mission menu (the only entry so far is the mission manager). It should also be possible to add a completely new top-level entry, with something like

Code: Select all

table.insert(menu.setup.top, newSubMenu)
inside the custom createSetup... function
Phipsz
Posts: 335
Joined: Mon, 23. Apr 12, 23:56
x4

Post by Phipsz »

Hm.. I will possibly change my extender to your variant then, should be no difference for anyone using my mod right now, but your method most definitely has one big advantage over mine: my mod would break the main menu if egosoft would introduce new entries to it...
and a bit offtopic: how far is the mission computer? I'm quite interested in it :) I've tried for myself a bit, but did not find any method to list mission offers that are currently available...
cyberfuzzie
Posts: 136
Joined: Tue, 21. Nov 06, 13:58
x4

Post by cyberfuzzie »

Thanks to your help it is now 2.50 compatible and released in v1.0: http://forum.egosoft.com/viewtopic.php?t=371250

Do you have some kind of X:Rebirth Lua reference or was that just a guess / you already tried something similar? Only thing I found so far is the list of available commands from the LuaJIT decompiler thread, which is already outdated.
Phipsz
Posts: 335
Joined: Mon, 23. Apr 12, 23:56
x4

Post by Phipsz »

Well, kind of a guess.. I used some serializeTable on the return of GetAllUpgrades... with DebugError that was quite helpfull. and yeah, I tried to implement a mission software myself, that's why I got that in the first place :D though I never would have had the clever idea to inject signals into the genericmission cue, proably the reason I failed with that ^^
pref
Posts: 5625
Joined: Sat, 10. Nov 12, 17:55
x4

Post by pref »

Wow, nice work!
Thanks for the code samples too, this seems like a real step forward.
Looking forward for the 2.5 release to try this.

Return to “X Rebirth - Scripts and Modding”