Sorry for the WoT, I'm beginning in X4 Modding and, like many people, I found the learning curve over it a bit steep
So, following a discussion with ChemO'Dun over reddit (https://www.reddit.com/r/X4Foundations/ ... ns_plans/ regarding the station editor and an opportunity to improve its plans' management with a mod. I started digging in through the wealth of docs, threads, github repos, wiki and all that span over a decade now (if I includes XR modding stuff).
In order to better understand the inner working of X4 game engine before modding anything, I try to do a trace through a specific module (Station-configuration.lua) to see which functions are called/used when a new plan is brought in the editor from the "load plan" button.
I set a dev environment on my windows 10 rig, with VSCode and ChemODun's tools for debugging and codeComplete. all .cat files (both core and extensions) have been unpacked and good to go.
I launched X4 with the prescribed starting parameters:
Code: Select all
x4.exe -debug all -logfile x4debug.log -scriptlogfiles x4scripts.log -prefersinglefiles - 1-The X4.exe doesn't attach to the VSCode debug console for some reason, nothing goes through it...
2-x4debug.log fills with lots of things but not the specific lua code I want to trace on (i probably need to insert some print lines within the lua code, as (according to kuertee's readme on UI support API) lua debug libraries will not work properly. I'm assuming the same for the trace libraries)
3- I tried different .bat files to redirect/filter the logs but nothing is actually written in the scriptlogfiles' files (except for the x4debug.log) I probably missed something somewhere for the scriptlogfiles to work while executing
Regards,

