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: 161
Joined: Tue, 14. Nov 17, 14: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, https://steamcommunity.com/id/patolinux on Steam. PC I use for playing: Ryzen 7 2700 with 16 Gig RAM, NVIDIA GTX 1070 with driver 418.56, Ubuntu 18.04
Controllers: steam controller via sc-controller or HOTAS set: Thrustmaster Warthog + Saitek X52 Pro + MFD F-16 + brandless chinese 3-pedal USB set.

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13899
Joined: Sun, 20. Nov 05, 23: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: 161
Joined: Tue, 14. Nov 17, 14: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, https://steamcommunity.com/id/patolinux on Steam. PC I use for playing: Ryzen 7 2700 with 16 Gig RAM, NVIDIA GTX 1070 with driver 418.56, Ubuntu 18.04
Controllers: steam controller via sc-controller or HOTAS set: Thrustmaster Warthog + Saitek X52 Pro + MFD F-16 + brandless chinese 3-pedal USB set.

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 11481
Joined: Sun, 15. Feb 04, 21: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”