official Egosoft X4 modding API docs?

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

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

Post Reply
ESonix
Posts: 10
Joined: Sat, 12. Jan 19, 03:47
x4

official Egosoft X4 modding API docs?

Post by ESonix » Thu, 28. Feb 19, 14:14

Does Egosoft have any official API documentation for modding X4 available? If so,where?

BrummBear02
Posts: 308
Joined: Fri, 3. Oct 08, 20:43
x3ap

Re: official Egosoft X4 modding API docs?

Post by BrummBear02 » Thu, 28. Feb 19, 15:12

Gebt mir einen Spiegel dann schlage ich ihn mit seinem eigenen Gesicht

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

Re: official Egosoft X4 modding API docs?

Post by UniTrader » Thu, 28. Feb 19, 19:50

you forgot to mentoin the .xsd filed and the scriptproperties.html from the extracted game files
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 ;)

ESonix
Posts: 10
Joined: Sat, 12. Jan 19, 03:47
x4

Re: official Egosoft X4 modding API docs?

Post by ESonix » Fri, 1. Mar 19, 05:40

Ok thanks for the help.

TheMandalorian
Posts: 49
Joined: Wed, 5. Dec 18, 07:07
x4

Re: official Egosoft X4 modding API docs?

Post by TheMandalorian » Sat, 27. Jun 20, 12:48

Hoping it is ok to resurrect this thread: I have problems to use the scriptproperties.html in Firefox and also using MS Edge.
Is there any workaround or fix?

Background: from running the file in debugger, I see that in Firefox the fileloading doesn‘t work correctly.

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

Re: official Egosoft X4 modding API docs?

Post by euclid » Sat, 27. Jun 20, 19:23

TheMandalorian wrote:
Sat, 27. Jun 20, 12:48
Hoping it is ok to resurrect this thread: I have problems to use the scriptproperties.html in Firefox and also using MS Edge.
Is there any workaround or fix?

Background: from running the file in debugger, I see that in Firefox the fileloading doesn‘t work correctly.
Odd, using FF myself and do not have that problem. Try to change the encoding (Firefox > Web Developer > Character Encoding) to ANSI or UTF-8.

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

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

Re: official Egosoft X4 modding API docs?

Post by UniTrader » Tue, 7. Jul 20, 22:23

recent versions of FF broke local usage of that file. now it only works if this file and all its dependencies are on some webserver.
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 ;)

thijso
Posts: 89
Joined: Thu, 2. Jul 20, 23:24

Re: official Egosoft X4 modding API docs?

Post by thijso » Wed, 8. Jul 20, 10:01

I had an issue with FF too, related to CORS. I fixed it by disabling the CORS protection for local drives (which can be a security issue, so be aware).

TheMandalorian
Posts: 49
Joined: Wed, 5. Dec 18, 07:07
x4

Re: official Egosoft X4 modding API docs?

Post by TheMandalorian » Wed, 8. Jul 20, 18:10

UniTrader wrote:
Tue, 7. Jul 20, 22:23
recent versions of FF broke local usage of that file. now it only works if this file and all its dependencies are on some webserver.
That is exactly my problem. It would be very helpful if scriptproperties.html would be fixed in a future update....or some workaround would be given.
My knowledge of JavaScript is not enough to fix it myself and enabling local file usage in FF seems to be risky.

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

Re: official Egosoft X4 modding API docs?

Post by UniTrader » Wed, 8. Jul 20, 19:42

The issue is entierely with firefox to my knowledge - it used to have some kind of Webserver builtin to view Webpages locally properly, but that got removed "for security reasons". (EDIT: Or they blocked Access to other local files for the same reasons, not really sure) - So not really fixable by editing some of the provided files..

EDIT: Just set up some webserver on your PC and throw the needed files in, then use the url from it (should be something like

Code: Select all

http://localhost/scriptproperties.html
) and it works again.
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 ;)

Skeeter
Posts: 3665
Joined: Thu, 9. Jan 03, 19:47
x3

Re: official Egosoft X4 modding API docs?

Post by Skeeter » Wed, 8. Jul 20, 20:04

Oh yeah wasnt 3.0 suppose to come with mod tools and documentation etc, whatever happened to that?
[ external image ]
7600x cpu 5.4ghz 32gb DDR5 5600mhz 6700XT 32" 1440p mon

TheMandalorian
Posts: 49
Joined: Wed, 5. Dec 18, 07:07
x4

Re: official Egosoft X4 modding API docs?

Post by TheMandalorian » Wed, 8. Jul 20, 20:39

UniTrader wrote:
Wed, 8. Jul 20, 19:42
The issue is entierely with firefox to my knowledge - it used to have some kind of Webserver builtin to view Webpages locally properly, but that got removed "for security reasons". (EDIT: Or they blocked Access to other local files for the same reasons, not really sure) - So not really fixable by editing some of the provided files..

EDIT: Just set up some webserver on your PC and throw the needed files in, then use the url from it (should be something like

Code: Select all

http://localhost/scriptproperties.html
) and it works again.
Sounds fair.
You said that the problem is related to Firefox.
For me, MS Edge and IE also do not work: if I type in a keyword the list does not show the corresponding properties.
The best way for me to deal with it currently seems to directly look and search the xsd-files or learn from other mods.

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

Re: official Egosoft X4 modding API docs?

Post by kuertee » Thu, 9. Jul 20, 15:07

ahhh ... scriptproperties.xml does work in a local webserver.
i use xampp. i also use it for work, so always have it installed on my machines.
are there any local webserver apps that are lighter?

also, what xsd readers do you guys use?

all this time, i've simply been using sublime regex search.
but having the API browsable would be helpful.
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.

SirNukes
Posts: 546
Joined: Sat, 31. Mar 07, 23:44
x4

Re: official Egosoft X4 modding API docs?

Post by SirNukes » Thu, 9. Jul 20, 18:20

If you have python installed already then it is fairly easy to serve the page:
1) Open command prompt (or powershell) in the folder with scriptproperties.
2) Run "python -m http.server"
3) Open browser to "http://localhost:8000/scriptproperties.html" (or jobeditor.html).
4) When done, just close or ctrl-c the command prompt to stop the server.

Post Reply

Return to “X4: Foundations - Scripts and Modding”