[PSA] Steps to make your mod work on Linux+Mac

The place to discuss scripting and game modifications for X Rebirth.

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

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Sun, 5. Jul 15, 14:05

Thanks for the confirmation! I'll change station engineers accordingly.

Only problem I could anticipate with MICT is that the prefixes for the aiscripts are capitalized. Not looking forward to changing that, because I'm not sure if ai script capitalization is taken into account in any of the game versions (windows, linux, mac), and since ai scripts include blocking commands, breaking connections could lead to stuck ships with could get really messy for people who have huge empires involving hundreds of ships.

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

Post by UniTrader » Sun, 5. Jul 15, 14:15

no need to worry about changing the file name - relevant for the game is only the script name defined in the script itself: ;)

Code: Select all

<aiscript name="foo" />
you could call the file bar.xml and the game would still recocnize the included Script as foo ;) (i created some error messages with that bacause i copied Scripts as template and forgot to change the name there ^^ as expected the the modified script was not properly recognized)
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 ;)

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Sun, 5. Jul 15, 14:20

whew! Thanks, Uni. Just realized that marine rebalance might not work with the linux and mac versions either because the vanilla boarding file is named /md/Boarding.xml. So both my nexus and steam workshop versions might not work. Rectifying that now. Hope I don't break anything.

CulunTse
Posts: 73
Joined: Mon, 15. Jun 15, 08:10
xr

Post by CulunTse » Sat, 11. Jul 15, 18:09

Update:
confirmed working of MitchTech Station Logistics
confirmed adaptibility of Desexualised Clubs and Bar Music

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 21542
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Sat, 11. Jul 15, 18:19

I added the guide to the Tutorials and Resources index.
Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend and Nopileos as Kindle e-books! (NOW also available: X3: Yoshiko!)

CulunTse
Posts: 73
Joined: Mon, 15. Jun 15, 08:10
xr

Post by CulunTse » Sat, 11. Jul 15, 20:12

Thanks Illuminatus!

P.S. confirmed working of Marine Rebalance

strude
Posts: 1435
Joined: Wed, 3. Aug 05, 08:15
x4

Post by strude » Wed, 5. Aug 15, 15:30

Hey there, I just posted my mod here http://forum.egosoft.com/viewtopic.php?t=381658

Hopefully I followed all the rules, but since I don't use Linux it'll be up to someone else to confirm it's works.

I changed all the diff xml files to lower case and used lower case extension folder name. I used mixed case for one of my files though, but I didn't see a rule for that in the list, and I have matched the case of that file name with the name within the md script.
Gaming PC: Gigabyte H270M-D3H | i7 7700 | 16Gb DDR4 | Gigabyte GTX1060 6Gb OC | Asus Xonar DGX | Window 10 Home 64bit | Samsung 256Gb SSD

CulunTse
Posts: 73
Joined: Mon, 15. Jun 15, 08:10
xr

Post by CulunTse » Wed, 5. Aug 15, 22:32

Hi Strude!

Thanks for taking the effort to follow these steps!

I just gave your mod a try, and it is recognised in the Linux version and seems to work correctly. :-D

I'm not 100% sure about the uninstall functionality yet though.
Even after deleting the entire folder, the seminars are still in the black-marketeer trade window. (Though I'm not sure if I actually resaved after telling the guy to uninstall.. it's way past my bedtime, so I'm starting to mix things up..)

strude
Posts: 1435
Joined: Wed, 3. Aug 05, 08:15
x4

Post by strude » Thu, 6. Aug 15, 09:16

CulunTse wrote:I'm not 100% sure about the uninstall functionality yet though.
Even after deleting the entire folder, the seminars are still in the black-marketeer trade window. (Though I'm not sure if I actually resaved after telling the guy to uninstall.. it's way past my bedtime, so I'm starting to mix things up..)
Thanks for checking, and glad I got it right! :D

For the uninstall, the seminar items won't be removed until you change zones. Once you've left the zone you uninstalled in, they shouldn't appear again. Hopefully it's just a sleepy issue and I haven't missed something. :shock:
Gaming PC: Gigabyte H270M-D3H | i7 7700 | 16Gb DDR4 | Gigabyte GTX1060 6Gb OC | Asus Xonar DGX | Window 10 Home 64bit | Samsung 256Gb SSD

CulunTse
Posts: 73
Joined: Mon, 15. Jun 15, 08:10
xr

Post by CulunTse » Fri, 7. Aug 15, 09:41

I'll assume my sleepy head used the uninstall wrongly, rather than a scripting error or Linux-specific bug ;-)

In general, my experience is that if the mod is listed in-game, and debug.log isn't spammed with xml-diff errors, everything 'just works'
Because the xml file is either completely ignored OR completely included, failure is usually very obvious :-)

Mackan
Posts: 74
Joined: Thu, 1. Aug 13, 05:59
xr

Post by Mackan » Wed, 23. Sep 15, 12:37

The OP should be obvious enough but I'm still a bit confused. Tried to get CWIR to work with Linux. The extension wouldn't be recognized by the game, even after trying to forcefully load its ID. Looked for a fix, found this thread and renamed all folders and subfolders to lowercase and modified all the path names in index/components.xml and index/macros.xml to lowercase only. That made the mod show up in the extension list but it still wouldn't initialize on game load. So I went through all the folders looking for files named in uppercase for modification, found a bunch and made changes accordingly while being unsure if files also had to be lowercase since I couldn't find anything about that in the OP (I'm unfamiliar with some of the technical terms. "XML diff" is that Latin for "apple"? :P).

Now it seems to initialize properly upon game load and the obvious scripts that I have tried have fired successfully, such as the architect trade script. But I'm still a bit paranoid there are steps that I have missed, since I won't really know if something went wrong until it actually goes wrong in-game.

In general, are file paths only listed in the XMLs located in the index folder? Or are there rogue XML files out there waiting to ruin my day? And everything not involving file paths should be safe as long as the cases match, right? For script calls etc or whatever it's called, as long as the game has loaded the XMLs (which it seems to do without issues if named in lowercases)?

CulunTse
Posts: 73
Joined: Mon, 15. Jun 15, 08:10
xr

Post by CulunTse » Thu, 24. Sep 15, 12:30

Hi Mackan,

Thanks for your interest!
The Latin word for "apple" would be "malum" ;-)
"Xml diff" it's a special patchformat that says 'take some full xml file, then apply these changes to get the desired result'. It is not XR specific, so the internets (also these forums) have agood tutorials.

It sounds like you did everything correctly to get it working. If you have a visible effect in-game it's usually all-or-nothing. (That is, either everything works, or nothing works)
Filenames are indeed only referenced from the 'index' subfolder, nowhere else.
I myself am not 100% sure if filenames can have uppercase, that's a 'maybe'. So far I've always lowercased the entire subpath (files+folders) to be safe. Folders definitely must be all-lowercase.

If you encounter any difficulties, it may be worthwhile to investigate the debug-log. This needs a special steam launch option ("-debug all -log sometime.txt" if I recall correctly)
Beware: the debug log is usually very full, and many things are unimportant. Distinguishing the important from the unimportant it's a dark art that I only half possess myself.

Hope this helps!

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

Post by UniTrader » Thu, 24. Sep 15, 12:50

CulunTse wrote: If you encounter any difficulties, it may be worthwhile to investigate the debug-log. This needs a special steam launch option ("-debug all -log sometime.txt" if I recall correctly)
Beware: the debug log is usually very full, and many things are unimportant. Distinguishing the important from the unimportant it's a dark art that I only half possess myself.

Hope this helps!
I personally only use the "-logfile" option because "-debug all" prints really everything even the info stuff that you are usually not interested in
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 ;)

Mackan
Posts: 74
Joined: Thu, 1. Aug 13, 05:59
xr

Post by Mackan » Fri, 25. Sep 15, 18:13

That's reassuring, if it tends to be under an all-or-nothing principle. I'll be sure to have a quick rummage through the log files using the commands specified just to be safe. Thanks!

I suppose my follow-up question would be if the same fixes are in general required for packed mods as well? Or does the game just load everything present in .dat files regardless of folder and file names?

CulunTse
Posts: 73
Joined: Mon, 15. Jun 15, 08:10
xr

Post by CulunTse » Fri, 25. Sep 15, 22:55

Re: .dat packed mods:
The first few mods I debugged with w.Evans started out in packed format, and didn't work until he fixed paths.
So .dat internals are also case sensitive.

Post Reply

Return to “X Rebirth - Scripts and Modding”