[Index] X4: Foundations Tools, Tutorials and Resources

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

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

Alan Phipps
Moderator (English)
Moderator (English)
Posts: 30349
Joined: Fri, 16. Apr 04, 19:21
x4

[Index] X4: Foundations Tools, Tutorials and Resources

Post by Alan Phipps » Fri, 30. Nov 18, 13:01

Modding Tools Image

Modding Tutorials and Guides Image

Resources Image

Submission
  • Please submit links to be included in this index by using and adjusting the code line below.

Code: Select all

[url=http://forum.egosoft.com/viewtopic.php?t=xxxxxx]Topic Title[/url] - [i]Author[/i]
A dog has a master; a cat has domestic staff.

User avatar
enenra
Posts: 7150
Joined: Fri, 8. Apr 05, 19:09
x4

Re: [Index] X4: Foundations Tools, Tutorials and Resources

Post by enenra » Fri, 30. Nov 18, 15:25

Unsure of whether you prefer to have the discussion in a separate topic but FYI for everyone: XR CAT extractors work for X4 files.

User avatar
StoneLegionYT
Posts: 1428
Joined: Fri, 4. Nov 05, 01:18
x4

Re: [Index] X4: Foundations Tools, Tutorials and Resources

Post by StoneLegionYT » Fri, 30. Nov 18, 15:27

I think this the master List <3 Of all the topics overtime.

Also this not stickied :)

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

Re: [Index] X4: Foundations Tools, Tutorials and Resources

Post by euclid » Fri, 30. Nov 18, 16:19

Kane Hart wrote:
Fri, 30. Nov 18, 15:27
.....
Also this not stickied :)
It is now ;-)

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

User avatar
Frstwlfz
Posts: 34
Joined: Thu, 26. May 11, 12:47
x4

Re: [Index] X4: Foundations Tools, Tutorials and Resources

Post by Frstwlfz » Sat, 1. Dec 18, 00:53

Hi and thanks for this. I suggest adding this one:

[Guide] How to add your own Logo! - Nexuscrawler

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

Re: [Index] X4: Foundations Tools, Tutorials and Resources

Post by Assailer » Sat, 1. Dec 18, 07:57

When can we expect Steam Workshop support?

StopBanningMe7_III
Posts: 47
Joined: Wed, 24. Feb 16, 05:23
x4

Re: [Index] X4: Foundations Tools, Tutorials and Resources

Post by StopBanningMe7_III » Sun, 2. Dec 18, 06:23

Sorry if I'm ignorant here; I completely skipped on X Rebirth (haven't even looked at it in the slightest), but I am quite familiar with X3 modding. Is there any kind of proper script editor for the XML files available? There may be one for X Rebirth that I haven't seen, which is why I prefaced this with an apology-in-advance, but it's also possible that none exists. Have things maybe changed so significantly from X3 that there couldn't be such a thing? Has nobody bothered to write one? All the tutorials I've skimmed across seem to be directly editing the XML source, which I consider absurd.

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

Re: [Index] X4: Foundations Tools, Tutorials and Resources

Post by euclid » Sun, 2. Dec 18, 14:19

Assailer wrote:
Sat, 1. Dec 18, 07:57
When can we expect Steam Workshop support?
Hi Assailer :-)

The short answer is soon™ ;-)

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

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

Re: [Index] X4: Foundations Tools, Tutorials and Resources

Post by euclid » Sun, 2. Dec 18, 14:24

StopBanningMe7_III wrote:
Sun, 2. Dec 18, 06:23
........Is there any kind of proper script editor for the XML files available? .....
Hi StopBanningMe7 :-)

I'm not entirely sure what you mean by "proper" but if you refer to an in-game script editor then the answer is no.

The beauty of the new X game engine is that you can code scripts outside the game and that you do not need any special editor. Some suggestions and other hints you will find here.

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

User avatar
alt3rn1ty
Posts: 2287
Joined: Thu, 26. Jan 06, 19:45
x4

Re: [Index] X4: Foundations Tools, Tutorials and Resources

Post by alt3rn1ty » Sun, 2. Dec 18, 19:13

Hi Euclid or Alan

A few links to add to the OP - Maybe under Resources ? : Other Supporting Websites ?


Nexusmods now has a specific X4: Foundations site to upload mods to, which will be handy for anyone not using steam workshop (GOG users for example, or Mod Authors who do not agree with Valve T&C's)

https://www.nexusmods.com/x4foundations

Nexusmods forums

https://forums.nexusmods.com/index.php? ... undations/


There is also a thriving X4 Discord going being monitored by Developers

https://discord.gg/J8u6Kdc


Steam forums

https://steamcommunity.com/app/392160/discussions/0/

Steam Depots (For anyone watching out for impending updates / patches)

https://steamdb.info/app/392160/depots/


GOG Forums

https://www.gog.com/forum/x_series#1543565692
Last edited by alt3rn1ty on Mon, 3. Dec 18, 00:13, edited 2 times in total.
Laptop Dell G15 5510 : Win 11 x64
CPU - 10th Gen' Core I7 10870H 2.2-5.0ghz, GPU - NVidia Geforce RTX 3060, VRAM 6gb GDDR5,
RAM - 32gb (2x16gb, Dual Channel mode set in BIOS) DDR4 2933mhz Kingston Fury Impact,
SSD - Kioxia M.2 NVME 512gb (System), + Samsung M.2 NVME 970 Evo Plus 1tb (Games)

:boron: Long live Queen Polypheides and may her tentacles always be supple.
Seeker of Sohnen.

User avatar
Phinixa
Posts: 320
Joined: Sun, 4. Apr 10, 01:47
x4

Re: [Index] X4: Foundations Tools, Tutorials and Resources

Post by Phinixa » Sun, 2. Dec 18, 22:54

The discord link doesn't seem to do anything?
***modified*** 4 life!

User avatar
alt3rn1ty
Posts: 2287
Joined: Thu, 26. Jan 06, 19:45
x4

Re: [Index] X4: Foundations Tools, Tutorials and Resources

Post by alt3rn1ty » Mon, 3. Dec 18, 00:15

Phinixa wrote:
Sun, 2. Dec 18, 22:54
The discord link doesn't seem to do anything?
My bad, link has been corrected to the invite link. You can make a new username to just have a browse, or if you already have a Discord account, dont enter username, just click the link to "Already have an account", you will then log in and have the channel added to your Discord account ( although dont quote me, I am fairly new to Discord myself so it may not work exactly how I think it should :P )
Laptop Dell G15 5510 : Win 11 x64
CPU - 10th Gen' Core I7 10870H 2.2-5.0ghz, GPU - NVidia Geforce RTX 3060, VRAM 6gb GDDR5,
RAM - 32gb (2x16gb, Dual Channel mode set in BIOS) DDR4 2933mhz Kingston Fury Impact,
SSD - Kioxia M.2 NVME 512gb (System), + Samsung M.2 NVME 970 Evo Plus 1tb (Games)

:boron: Long live Queen Polypheides and may her tentacles always be supple.
Seeker of Sohnen.

StopBanningMe7_III
Posts: 47
Joined: Wed, 24. Feb 16, 05:23
x4

Re: [Index] X4: Foundations Tools, Tutorials and Resources

Post by StopBanningMe7_III » Mon, 3. Dec 18, 01:53

euclid wrote:
Sun, 2. Dec 18, 14:24
StopBanningMe7_III wrote:
Sun, 2. Dec 18, 06:23
........Is there any kind of proper script editor for the XML files available? .....
Hi StopBanningMe7 :-)

I'm not entirely sure what you mean by "proper" but if you refer to an in-game script editor then the answer is no.

The beauty of the new X game engine is that you can code scripts outside the game and that you do not need any special editor. Some suggestions and other hints you will find here.

Cheers Euclid
Sorry, perhaps I ought to be clearer. I meant something more like a translator of sorts that would turn the xml files into some kind of clearer source code, then "compile" the source back into xml later. This existed for X3. If nothing of the sort exists yet, then it looks like I have myself my first X4 project!

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

Re: [Index] X4: Foundations Tools, Tutorials and Resources

Post by euclid » Mon, 3. Dec 18, 02:48

StopBanningMe7_III wrote:
Mon, 3. Dec 18, 01:53
....
Sorry, perhaps I ought to be clearer. I meant something more like a translator of sorts that would turn the xml files into some kind of clearer source code, then "compile" the source back into xml later. This existed for X3. If nothing of the sort exists yet, then it looks like I have myself my first X4 project!
No, sorry, such an API does not exist (yet). But maybe someone will code it eventually. However, scripting is not that difficult. For a start there are many useful topics in the XR S&M forum but I'm happy to try to answer any question on MD and XML scripting.

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

StopBanningMe7_III
Posts: 47
Joined: Wed, 24. Feb 16, 05:23
x4

Re: [Index] X4: Foundations Tools, Tutorials and Resources

Post by StopBanningMe7_III » Mon, 3. Dec 18, 22:49

As I mentioned, I'm going to try to write such a program (if it's even possible...), so I do have a few questions if it's not too much bother.
  1. Is there a general reference on the whole of the XML based language somewhere? A list of all commands, keywords, events, etc?
  2. Out of curiosity, what does the development team use to edit the scripts? Are the XML files actually edited as such by hand?
  3. What does the question mark that often appears in boolean statements imply? It is only used sometimes and I can't work out how it modifies the thing preceding it. Here is an example I found:

    Code: Select all

    <do_elseif value="$timeout and not $time_init?">
  4. Similarly, what does the '@' sign that appears before variables in some if statements imply?
Actually, I'm realizing that I have a lot of questions I could ask, but most would be answered by a language reference if one exists, so I won't waste your time typing a bunch out (unless I have to... :|).

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

Re: [Index] X4: Foundations Tools, Tutorials and Resources

Post by euclid » Tue, 4. Dec 18, 00:09

Hi StopBanningMe7_III :-)

1. Yes, there are. If you have unpacked all game files then check the libraries folder. You'll find there several xsd files. the common.xsd and md.xsd are most important. For XML scripts check the aiscripts.xsd and in the main root of your unpacked file folder also the scriptproperties.html. More info you can find in the XR S&M forum.

2.As I wrote in the sticky here (I know it's potentially invisible :p ) visual studio is commonly used because it allows XML setup with the under 1. mentioned xsd files in the same location as the to be edited scripts (i.e. the work folder).

3. The ? maps the value to binary, i.e. 0 or 1. if it does not exists or if it does, respectively.

4. The @ maps the value to a Boolean, i.e. false or true, if it does not exists or if it does, respectively.

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

User avatar
Meiyo
Posts: 41
Joined: Wed, 20. Nov 13, 23:47
x4

Re: [Index] X4: Foundations Tools, Tutorials and Resources

Post by Meiyo » Tue, 4. Dec 18, 03:46

euclid wrote:1. Yes, there are. If you have unpacked all game files then check the libraries folder. You'll find there several xsd files. the common.xsd and md.xsd are most important. For XML scripts check the aiscripts.xsd and in the main root of your unpacked file folder also the scriptproperties.html. More info you can find in the XR S&M forum.
Thank's for this... I've dont see these files at the first time... (bad unpack ? only aiscript & assets)

aftokinito
Posts: 229
Joined: Sun, 30. Mar 08, 17:29
x4

Re: [Index] X4: Foundations Tools, Tutorials and Resources

Post by aftokinito » Tue, 4. Dec 18, 03:51

I was suggested to ask here so please Euclid, schemas for macros and components:
viewtopic.php?f=181&t=404364

Or if those don't exist internally just answer me this, please:
viewtopic.php?f=181&t=403612&p=4767089#p4767089

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

Re: [Index] X4: Foundations Tools, Tutorials and Resources

Post by euclid » Tue, 4. Dec 18, 04:25

Both of your questions have the same answer: This is an internal resource. I can try and see if this can be made available but no promise here as those are XML/C++ parsers and the usage may violate the EULA.

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

aftokinito
Posts: 229
Joined: Sun, 30. Mar 08, 17:29
x4

Re: [Index] X4: Foundations Tools, Tutorials and Resources

Post by aftokinito » Tue, 4. Dec 18, 14:55

We already have XSDs for a lot of stuff like MD, many of the xmls in libraries, etc. Why would the ones for macros and components be different?

Post Reply

Return to “X4: Foundations - Scripts and Modding”