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

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

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

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16: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: 14571
Joined: Sun, 20. Nov 05, 22: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: 2963
Joined: Tue, 18. Nov 14, 16: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: 118
Joined: Mon, 15. Jun 15, 08:10
x4

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: 24950
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.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

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, Nopileos, X3: Yoshiko as Kindle e-books!

CulunTse
Posts: 118
Joined: Mon, 15. Jun 15, 08:10
x4

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

Thanks Illuminatus!

P.S. confirmed working of Marine Rebalance

strude
Posts: 1471
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: 118
Joined: Mon, 15. Jun 15, 08:10
x4

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: 1471
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: 118
Joined: Mon, 15. Jun 15, 08:10
x4

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: 143
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: 118
Joined: Mon, 15. Jun 15, 08:10
x4

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: 14571
Joined: Sun, 20. Nov 05, 22: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: 143
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: 118
Joined: Mon, 15. Jun 15, 08:10
x4

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.

radcapricorn
Moderator (English)
Moderator (English)
Posts: 3230
Joined: Mon, 14. Jul 08, 13:07
x4

Post by radcapricorn » Mon, 8. Feb 16, 05:00

Orange Mouse Cursor (Steam Link) works if *.cur files are converted into *.png.

If you have ImageMagick installed, you can batch-convert them, execute this from terminal:

Code: Select all

cd <path_to_your_xrebirth_steam>/extensions/egosoft_orange_cursor

for f in *.cur; do fn=${f%.*}; convert -background none $f ${fn}.png; done
EDIT: tested on 4.0 Beta 7

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth » Fri, 26. Feb 16, 14:20

Hi

I posted this on the general thread but have no takers so I thought that I might ask it again over here

VMware player for testing mods on Linux

Its obviously not going to be very quick but will it at least start up a copy of Linux and allow me to test my mods ? They are not graphics intensive.

I just don't have any spare hardware thats 64 bit. Done dual boot lots of times and dug myself into too many holes with various flavours of Linux, Windows 7 and XP to do this on my main machine

Otherwise booting from Flash, USB, external hard disk. Anything that doesn't involve boot loaders ?

Any thoughts

jth

EDIT 16:35 BST

Did read the X Rebirth on Linux requirements but thought that I may as well try it anyway

Whats 10Gb of downloads between friends :)

Tried it and got a GLXBadFBConfig message which is I suspect video driver issues. Probably vmware not having a new enough version of OpenGL

OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on SVGA3D; build: RELEASE;
OpenGL version string: 2.1 Mesa 11.0.2
OpenGL shading language version string: 1.20
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 11.0.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
OpenGL ES profile extensions:

So I reckon that counts VMware player 12 out.

Did see Wubi which offers to install Ubuntu into a file rather than a partition which strictly fails my no bootloader requirement but I may be prepared to stretch the point as it attaches itself to the standard Windows bootloader rather than drops its own in.

If I put the file onto an SSD drive might get away with it

what do you think ?

jth

CulunTse
Posts: 118
Joined: Mon, 15. Jun 15, 08:10
x4

Post by CulunTse » Sat, 27. Feb 16, 09:46

Hi radcapricorn, that's immensely valuable information. I guess all modders should pack their .cur stuff in PNG :-)
I did notice many other mods with images already worked, such as the "desexualised clubs". Those were textures though, so they probably weren't in .cur format.

@jth:
VmWare is cool but virtualised 3D acceleration is HARD. It's available in some of the paid products, and possible in some of the free ones, I'm not too familiar with it.
The technical term you want to look for is "paravirtualised" GPU or passthrough graphics. This basically means you "steal" the GPU from the main system, and assign exclusively it to the VM.
There are also "guest mode" drivers, and I thought VmWare was working on something called "Virgil" (virtual gl) though that may be another vendor too.
Maybe also try VirtualBox, it tends to have more open source support.
Hope that helps, even if it's just a bunch of random pointers. It would be pretty cool if you could get it to work!

radcapricorn
Moderator (English)
Moderator (English)
Posts: 3230
Joined: Mon, 14. Jul 08, 13:07
x4

Post by radcapricorn » Sat, 27. Feb 16, 09:55

jth wrote: OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on SVGA3D; build: RELEASE;
OpenGL version string: 2.1 Mesa 11.0.2
This means software OpenGL implementation. AFAIK, both VMware and VirtualBox have means to use your host GPU for hardware-accelerated OpenGL, look it up. However, it still might not work for the game, but at least worth a try.


@CulunTse: well, that was pretty easy to discover by running steam -console via terminal. With .cur files, the game simply crashed, and complained it couldn't load those files :)

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth » Mon, 14. Mar 16, 18:54

CulunTse wrote:@jth:
VmWare is cool but virtualised 3D acceleration is HARD. It's available in some of the paid products, and possible in some of the free ones, I'm not too familiar with it.
The technical term you want to look for is "paravirtualised" GPU or passthrough graphics. This basically means you "steal" the GPU from the main system, and assign exclusively it to the VM.
There are also "guest mode" drivers, and I thought VmWare was working on something called "Virgil" (virtual gl) though that may be another vendor too.
Maybe also try VirtualBox, it tends to have more open source support.
Hope that helps, even if it's just a bunch of random pointers. It would be pretty cool if you could get it to work!
Spent some more time on the problem with VMware workstation player 12 and a brand new install of Ubuntu 15.04 and managed to apply

http://www.mesa3d.org/vmware-guest.html

and survive the experience this time :)

OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on SVGA3D; build: RELEASE;
OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.2.0-rc3 (git-9f21fdd)
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 11.2.0-rc3 (git-9f21fdd)
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 11.2.0-rc3 (git-9f21fdd)
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:

It was rather painful to get there :(

and surprisingly it actually works :) It looked like it had hung the first time but I think it was still building stuff.

Frame rate of 25fps is about half of what I get under Windows 7 with the graphics at medium (linux) and ultra (windows). I have a GTX 960 card.

Found the savegame location and copied my Windoze ones over and so far so good.

The joystick button mappings are out of this world though :( So I need to get them sorted out but it is seeing my Logitech Force 3D pro joystick. I can strafe fine but actually moving is a problem.

Managed to get into my Station Production Limiting mod Ok but its a bit early to say it works yet ... but its encouraging

If you would like to know where the elephant traps are please let me know

jth

Post Reply

Return to “X Rebirth - Scripts and Modding”