How to add global parameters to MD scripts?

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

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

Assailer
Posts: 478
Joined: Sun, 25. May 14, 17:45
x4

How to add global parameters to MD scripts?

Post by Assailer »

Hi,

I would like to add some entries to the global settings page to allow the player changing the behavior of an MD script.

Could anyone help me with some advice?

Thanks in advance!
kuertee
EGOSOFT
EGOSOFT
Posts: 817
Joined: Sun, 14. Dec 03, 13:05
x4

Re: How to add global parameters to MD scripts?

Post by kuertee »

you can use Sir Nuke's UserData API that comes with his Mod Support API mod:
https://github.com/bvbohnen/x4-projects ... ata_API.md

i use it to save the Dead is Dead feature of my Alternatives To Death mod - allowing it to work across different saved games.
Assailer
Posts: 478
Joined: Sun, 25. May 14, 17:45
x4

Re: How to add global parameters to MD scripts?

Post by Assailer »

Thanks! Is this adding in-game editable settings for the player?
kuertee
EGOSOFT
EGOSOFT
Posts: 817
Joined: Sun, 14. Dec 03, 13:05
x4

Re: How to add global parameters to MD scripts?

Post by kuertee »

Assailer wrote: Sat, 31. Jul 21, 13:00 Thanks! Is this adding in-game editable settings for the player?
nah, for that you need the Simple Menu Options API, which is also in that mod.
here's its docs: https://github.com/bvbohnen/x4-projects ... ons_API.md
Assailer
Posts: 478
Joined: Sun, 25. May 14, 17:45
x4

Re: How to add global parameters to MD scripts?

Post by Assailer »

Thanks!

I wish to make standalone mods and rely only on officially supported APIs.

Simple 'append a new item' to global option page would do the trick for me.
DeadAirRT
Posts: 1124
Joined: Fri, 25. Jan 19, 03:26
x4

Re: How to add global parameters to MD scripts?

Post by DeadAirRT »

Assailer wrote: Thu, 30. May 24, 06:55 Thanks!

I wish to make standalone mods and rely only on officially supported APIs.

Simple 'append a new item' to global option page would do the trick for me.
Not possible in any sort of compatible way due to the LUA modding methods available afaik.

Return to “X4: Foundations - Scripts and Modding”