Is it possible to call an external executable from a mod?

The place to discuss scripting and game modifications for X4: Foundations.

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

Post Reply
User avatar
MakerLinux
Posts: 234
Joined: Tue, 14. Nov 17, 13:10
x4

Is it possible to call an external executable from a mod?

Post by MakerLinux » Sat, 25. May 19, 23:12

Sorry, this is a very basic question, I know. Thing is, to get into X4 modding there's a whole lot to learn, and it is quite convoluted. What I want to do: at every notification (ships killed, order completed etc.) I want to pass the strings to a native executable that will send them to my Saitek X52 Pro LCD screen. Is it possible at all? If it is, I will be sure to read all the modding tutorials and manuals.
Brazilian Linux-only user living in Poland, https://steamcommunity.com/id/patolinux on Steam. PC I use for playing: Ryzen 7 7800X3D with 64 GB 6GHz DDR5 CL30, AMD Radeon RX 7900 XTX, ArchLinux
Controllers: steam controller via Steam Input or HOTAS set: TSaitek X52 Pro + MFD F-16 + G29 pedals.
VR headset: Valve Index & Meta Quest 2. My other PC: Steam Deck OLD with nReal AIR AR headset

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Re: Is it possible to call an external executable from a mod?

Post by UniTrader » Sun, 26. May 19, 02:44

its a bit convoluted, but all <debug_text/> should also be sent to stdout (at least im sure it did in XR)

(might require activating the logfile though, i have te feeling the debug_text is otherwise just skipped entirely)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

User avatar
MakerLinux
Posts: 234
Joined: Tue, 14. Nov 17, 13:10
x4

Re: Is it possible to call an external executable from a mod?

Post by MakerLinux » Sun, 26. May 19, 03:31

UniTrader wrote:
Sun, 26. May 19, 02:44
its a bit convoluted, but all <debug_text/> should also be sent to stdout (at least im sure it did in XR)
(might require activating the logfile though, i have te feeling the debug_text is otherwise just skipped entirely)
Just like X-Rebirth had? That is an EXCELLENT idea! Thanks! Do you have a reference for X4 command line parameters? Like, can I use something like -debug notifications to get only the notifications on the debug console?
Brazilian Linux-only user living in Poland, https://steamcommunity.com/id/patolinux on Steam. PC I use for playing: Ryzen 7 7800X3D with 64 GB 6GHz DDR5 CL30, AMD Radeon RX 7900 XTX, ArchLinux
Controllers: steam controller via Steam Input or HOTAS set: TSaitek X52 Pro + MFD F-16 + G29 pedals.
VR headset: Valve Index & Meta Quest 2. My other PC: Steam Deck OLD with nReal AIR AR headset

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13292
Joined: Sun, 15. Feb 04, 20:12
x4

Re: Is it possible to call an external executable from a mod?

Post by euclid » Mon, 27. May 19, 13:47

Hi MakerLinux :-)

Not sure this is what you are after but you may want to check step 2) in this sticky which explains how to write information from an XML script to a file.

Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786

Post Reply

Return to “X4: Foundations - Scripts and Modding”