Script Documentation

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

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

Post Reply
Shamon
Posts: 12
Joined: Wed, 21. Nov 18, 10:37

Script Documentation

Post by Shamon » Mon, 25. May 20, 20:50

Where can I see script documentation?

Alberto.Rota
Posts: 78
Joined: Fri, 22. Feb 13, 17:34
x4

Re: Script Documentation

Post by Alberto.Rota » Mon, 25. May 20, 22:24

Shamon wrote:
Mon, 25. May 20, 20:50
Where can I see script documentation?
For all the XML based scripting (MD and AI) you can find the documentation in their XSDs.

You can also read this:
https://www.egosoft.com/download/x_rebi ... rGuide.pdf

Shamon
Posts: 12
Joined: Wed, 21. Nov 18, 10:37

Re: Script Documentation

Post by Shamon » Tue, 26. May 20, 02:32

Thank you, but this is not a complete guide.
How, for example, to get a list of all the rooms at the station?

Rastuasi
Posts: 461
Joined: Mon, 1. Oct 18, 16:28
x4

Re: Script Documentation

Post by Rastuasi » Tue, 26. May 20, 04:03

There isn't a complete guide, sometimes you just got to do your own research and testing. I know, that's a rare technique in today's youth, but it does work.

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: Script Documentation

Post by kuertee » Tue, 26. May 20, 04:14

Shamon wrote:
Tue, 26. May 20, 02:32
Thank you, but this is not a complete guide.
How, for example, to get a list of all the rooms at the station?
Yup. Unfortunately, modding X4 requires a study of the existing XML scripts.

I also thought, 4 weeks ago, that there'd be a guide similar to Oblivion's and Skyrim's.

That's not a slight to X4, of course. I actually find X4 script engine a lot more robust than Oblivion's and Skyrim's put together. A whole lot more robust.

EDIT: Definitely more rewarding scripting X4.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: Script Documentation

Post by kuertee » Tue, 26. May 20, 04:38

Here's a tip, actually:
After going through the guidelines referred to above by Alberto Rosa,

1. create a folder "extensions/base" in your X4 folder.
2. extract these script folders from the *.dat files into "extensions/base": aiscripts, cutscenes, index, libraries, MD, t, UI
3. browse them with your chosen editor. I use Sublime.

You'll find the actual API docs in various "libraries/*.xsd" files - also mentioned by Alberto.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

Post Reply

Return to “X4: Foundations - Scripts and Modding”