The Ultimate Guide to X3 Mods on the Mac

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

icEPiraka
Posts: 64
Joined: Wed, 2. Jul 08, 02:42
x3tc

The Ultimate Guide to X3 Mods on the Mac

Post by icEPiraka » Sat, 18. Aug 12, 06:47

This topic is intended to be an all-in-one resource for new Mac players to go to and quickly figure out how to Modify their game of Terran Conflict/Albion Prelude.

:arrow: 1. Finding Your Game Files

Whilst this may seem trivial enough, finding out where X3 keeps the game data appears to be 90% of the trouble that Mac users encounter when installing mods and scripts. This is due in part because of the fact that there are three distributors of the X3 games: MacGameStore.com, Deliver2Mac.com, and the Apple App Store. The problem is not helped by the fact that Mac OS is not always forthcoming with the files that you have.

The first step in installing mods is finding the Data folder, which, because of aforementioned reasons, could be in one of three locations. I will reveal these locations in examples:

Here is an example of a TC directory from macgamestore.com:

Code: Select all

Z:\Applications\X3 Terran Conflict\Data
This directory is probably the easiest to identify, as the data folder is simply in the folder you downloaded and installed.

Here is a possible AP directory from a Deliver2Mac install:

Code: Select all

Z:\Users\Shared\Deliver2Mac\Accounts\<Account Name Here>\Installs\X3ALBIONPRELUDE\Data
This directory is a bit more tricky for users to find, only in that it requires a bit of digging to find the location of D2Mac's info and data.

And here is a likely AP directory from an Apple App Store install:

Code: Select all

Z:\Applications\X3 Albion Prelude.app\Contents\Resources\Data
This is probably the trickiest to find because the files are actually inside the app itself, unless you know a special trick. All you need to do is right-click(ctrl-click) on the app icon and select "Show Package Contents" from the drop-down menu. The rest is straightforward.

Regardless of all this, savegames should be in <username>/Library/Application Support/<X3-GameName>.

:arrow: 2. Installing Scripts and Mods Manually

If you've managed to obtain a mod or script contained in .zip format or something similar (such as Lucike's script collection), then installing is very easy. Once you've extracted the files, you'll note that the scripts are contained in folders with names "Scripts", "T", etc. These folders also exist in your game's Data folder. For Terran Conflict, installation is as simple as dragging the script files to their corresponding folders. The same is almost also true for Albion Prelude, except scripts go into an Addons folder, which should (or will) contain its own Scripts, T, etc. folders.

Some mods (like the X Rebalanced Mod) use big .cat and .dat files to add content. You install these via the Fake Patch method: in the data folder, you'll see .cat/.dat files numbered from 1 to some higher number, lets say it's 13. These numbered are official content updates from Egosoft. Lets suppose you have some mod files named AMod.cat/AMod.dat. For our example, you install these by placing these files in the Data folder and renaming them to 14.cat/14.dat. This way, you've fooled the game into thinking your mod is an official update. The only problem with this is whenever Egosoft/VirtualProgramming releases updates, your "patch" will be overwritten, and you will need to reinstall your mods.

:arrow: 3. The X Plugin Manager for Mac

It's a remarkable fact that when it comes to all of the X3 game files, functions, scripts and mods, etc., everything is compatible with both Windows and OSX. Unfortunately, given the PC dominated user base of X games, special tools required for modding or installing mods and scripts in the quite common .spk format were made only for PCs and not available to Macs.

Until now.

The X Plugin Manager for Mac is a port of Cycrow's X Plugin Manager, and is an app that excels in installing scripts and mods. It uses Wineskin technology that effectively wraps the Windows version of the Plugin Manager inside an interface, allowing the Mac OS to use it.

Download Here

--Installation and Running:
Drag the app's folder to your hard desktop/hard drive, and drop a dummy .exe (either x3tc.exe or x3ap.exe, both have been provided for you in the Plugin Manager folder) into your game's data folder. You need this because that .exe is how the Plugin Manager identifies the location of your game.

Before running the Plugin Manager app, you may need to alter the file permissions on your data folder. This is accomplished with right clicking the folder, selecting "Get Info", and editing the permissions to "Read and Write" for all users in the "Sharing and Permissions" section. Note that this may require administrator privileges.

On the first run, you will need to find and open that dummy .exe so that the manager will add the data folder as a new game directory. Remember that this app still thinks that it is running inside windows, so when you choose the location of you data folder, the directories will be organized as such. No problem: just note that to get to the Macintosh HD when browsing your directory, the HD is the Z drive (Z: ) inside My Computer. You will need to use the drowdown menu to navigate at first. Below is a picture for reference:

Image

Do not try to launch TC/AP from inside the app: it will not work, as you will essentially be trying to execute a blank text file.

Otherwise, all functionality should be identical to that of Cycrow's original. No issues should exist at this time.

--Notes on Using Other Utilities:
The X Plugin Manager for Mac app also comes with six other utilities by Cycrow: X Plugin Manager Advanced, Cycrow's package creator, SPK explorer, XSP converter, Mod Merger, and a command line tool. Their true location is directly inside the package contents of the X Plugin Manager app, so to access them, right click on the Plugin Manager app and select "Show Package Contents".

If you wand advanced control over mod installation (such as organization of false patches), consider using the Advanced Plugin Manager. Usage of the package creator, spk explorer, mod merger, and xsp converter should parallel the operation of the windows version, although I have not tested them thoroughly.

Most users can ignore the command line stuff and skip down to the uninstallation section.

The command line app allows you to use Cycrow's command line utilities for spk files. This can be slightly tricky and annoying, since it takes a bit of searching to find these command line tools. Here's an example of how to extract the contents of an spk file:

1. Assuming the Package contents of the Plugin Manager app are revealed, locate and open the alias to the drive_c folder and navigate to Program Files/Egosoft/X Plugin Manager/Tools/. Place the .spk file here.

Note that you may wish to create an alias to the tools folder for easy access.

2. Start up the Command line app and type the following (this command changes directory to the Tools folder) and hit enter:

Code: Select all

cd C:\Program Files\Egosoft\X Plugin Manager\Tools\
3. Extract the files using spktool.exe with the following command:

Code: Select all

spktool.exe -e SPKFileNameHere.spk
The files inside the spk file are now extracted to the Tools folder where you originally placed the spk. They may now be installed manually into your Data folder or Addons folder.

In short, the SPKTools retain the same functionality as in windows, but I recommend placing all the files you will manipulate and doing all your work inside the Tools folder, just to be safe.

--Uninstallation:
Move the X Plugin Manager folder and the dummy .exe in the data folder to the trash. The preference files for the app should be located inside Documents/Egosoft/, so for a full install, drag the following .dat files to the trash: pluginmanager.dat, creator.dat, spkexplorer.dat, etc. Your TC/AP install should not be adversely affected, but you may not be able to uninstall spks you installed with the Plugin Manager without the manager.

:arrow: 4. The X3 Editor 2 for Mac

The X3 Editor 2 for Mac is a Wineskin port of doubleshadow's X3 Editor 2. It is an advanced editor for modifying game and mod files. Installation is the same as with the Plugin Manager, dummy .exes and all.

When the Editor starts up, I believe you will need to edit your default game profile by giving the Editor the location of you game data folder and dummy .exe. This is similar to what you do with the Plugin Manager.

Other than that, no issues are apparent, and functionality should be the same as the original.

Download Here (Note: 7zip file format)

:arrow: 5. Installing the Bonus Package and Mods in .exe Format

If the mod you want uses a special Windows .exe installer (like the Xtended Mod) or if you wish to install Egosoft's Bonus Script Package, you will simply need the installer file and either the Plugin Manager or X3 Editor (either will do).

Once you've downloaded the installer .exe, right-click(ctrl-click) it, select "Open With" > "Other…", and select the X Plugin Manager or X3 Editor 2 from your computer. You will have to give the installer an install destination. For installing the AP Bonus Pack, give it the directory to the Addons folder. For the TC Bonus Pack and mods like Xtended, just give it the Data folder. Then proceed with install (see above on info on data folder directories). Below is a picture on where to find your HD:

Image

Assuming all that works and completes successfully, you now have a TC/AP install with the Bonus Pack, Xtended mod, etc.

I'd like to give a big thanks to Cycrow and all the others for such good modding tools and support, and to the Wine community for making cross-compatibility dreams come true.
Last edited by icEPiraka on Sun, 19. Aug 12, 05:59, edited 3 times in total.

icEPiraka
Posts: 64
Joined: Wed, 2. Jul 08, 02:42
x3tc

Post by icEPiraka » Sat, 18. Aug 12, 06:47

-Reserved-

icEPiraka
Posts: 64
Joined: Wed, 2. Jul 08, 02:42
x3tc

Post by icEPiraka » Sat, 18. Aug 12, 06:52

So I'm basically rehashing a lot of what I know and of what was in my Plugin Manager topic in order to create this guide for Mac users. At this point, it is WIP, and I will do a bit of searching to see if I missed any important info. If anyone has information to contribute, please let me know. Also, I want this topic to be a replacement for my old topic, so any issues and inquiries you have with the Plugin Manager and X3 Editor Ports I made can also go here.

I am also hoping that this topic can be stickied or placed in the tutorials section for people to find easily.

Lastly, the X3 Editor 2 for Mac is available for anyone wishing to test it out.

Lemant
Posts: 75
Joined: Fri, 27. Jul 12, 02:10

Post by Lemant » Sat, 18. Aug 12, 14:25

Thank you for releasing the Mac version of X3 Editor 2. I will be your guinea pig and try the editor. Before I use the editor, should I go ahead and remove the TShips.txt file in one of my X3AP folders?

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44
x3tc

Post by DrBullwinkle » Sat, 18. Aug 12, 14:32

Lemant wrote:Before I use the editor, should I go ahead and remove the TShips.txt file in one of my X3AP folders?
You can modify your existing TShips.txt with the X3 Editor. For your first pass, that will be the easiest way to "get the hang of" the editor.

When you learn how .cats work, you can create your own .cat and put your modified TShips in it.

Lemant
Posts: 75
Joined: Fri, 27. Jul 12, 02:10

Post by Lemant » Sat, 18. Aug 12, 14:49

Here we go again with more headaches... I've downloaded the X3 Editor 2. The dummy *.exe files have been placed in the /data folder. The file permissions have been altered accordingly. But when I double-click on the X3 Editor 2 application file to run it, nothing happens. What am I doing wrong?

Edit: I also noticed that the X3 Editor 2 is seen to be "on" in the Mac OS X dock menu. When I right-click on the icon to QUIT the application, it won't quit. It's strange that the editor isn't really running either. The only way to make the blue dot at the bottom of the Editor icon in the dock to go away is to reboot the Mac...except I can't reboot because of the X3 Editor 2 running in the background prevents it. And the editor won't quit, either. I guess I can always try the Force Quit option.

FYI, I have the App Store download version of X3AP, v 2.0.1. And I am running Mac OS X 10.7.4.

Andrew Wilde
Posts: 56
Joined: Tue, 13. Jul 04, 23:58
x3tc

Post by Andrew Wilde » Sat, 18. Aug 12, 16:56

"Houston, we have a problem" ...

Hi icEPiraka, many thanks for the work on XPM and X3Ed, but unfortunately, I'm getting exactly the same problem as Lemant - Wineskin/X3 Editor launches, but displays no dialog, and will neither 'Quit' nor 'Forceful Quit', and requires a Force Quit from the OS (I'm on 10.7.4 too).

I had a looksee with Activity Monitor (Mac's equivalent to Task Manager), and noticed a CrashReporter process had run, so had a look at latest created files in the system areas (these don't show up in standard OSX searches unless you specify that you want them) to see if could spot any useful logging, and there is indeed a Wineserver crash report; essentially we've got the following:

Dyld Error Message:
Library not loaded: @executable_path/../lib/libwine.1.dylib
Referenced from: /Applications/X3 Editor 2/X3 Editor 2.app/Contents/Frameworks/wswine.bundle/bin/wineserver
Reason: no suitable image found. Did find:
/Applications/X3 Editor 2/X3 Editor 2.app/Contents/Frameworks/wswine.bundle/bin/../lib/libwine.1.dylib: file too short
/Applications/X3 Editor 2/X3 Editor 2.app/Contents/Frameworks/wswine.bundle/bin/../lib/libwine.1.dylib: file too short
/Applications/X3 Editor 2/X3 Editor 2.app/Contents/Frameworks/wswine.bundle/lib/libwine.1.dylib: file too short



Any use ?

FWIW, this was the first time I'd had to download a segmented zip, and I found OSX's built in Archive Helper app got a bit confused, so in the end downloaded Stuffit Expander, which seemed to cope OK; just wondered whether there might be a problem with the segmenting ?

Let us know if more info is needed.

Andy.

vkerinav
Posts: 622
Joined: Sun, 11. Apr 10, 21:38
x3ap

Post by vkerinav » Sat, 18. Aug 12, 18:15

Feel free to use the screenshots I posted here. apricotslice is probably right to say that any guide is better with pictures. I prefer a well-written paragraph or two, but I'm weird.

icEPiraka
Posts: 64
Joined: Wed, 2. Jul 08, 02:42
x3tc

Post by icEPiraka » Sun, 19. Aug 12, 01:35

I guess the splitting could have caused a problem. The reason I split it is because Mediafire only allows 200MB files for a free account.

Now I've reuploaded a whole zip to Rapidshare. The download page does look a little confusing, but just look for the download button and ignore the rest. You don't need to create an account if that's what you're worried about.

Also, the Editor does take a few seconds to launch, so be just a little patient with it. I noticed that it also seems to stay active when you close the Editor window, but command-Q can shut it down.

Edit: I've gone back to Mediafire and have reuploaded for you guys. Note the 7zip file format, so you will need an expander that can handle those.

Lemant
Posts: 75
Joined: Fri, 27. Jul 12, 02:10

Post by Lemant » Sun, 19. Aug 12, 06:16

icEPiraka, the X3 Editor 2 is still not working. Still no dialog. I've waited for like more than 2 minutes and nothing happened.

Andrew Wilde
Posts: 56
Joined: Tue, 13. Jul 04, 23:58
x3tc

Post by Andrew Wilde » Sun, 19. Aug 12, 08:05

Well this is all very weird ... as Lemant says, we're getting exactly the same behaviour I'm afraid.

But here's the weird:

The original segmented zip, once I'd got Stuffit to actually unpack it, gave me an X3Ed2 app/package of 806.4MB; the latest 7z download, however, unpacks to 773MB; but running both leads to EXACTLY the same end result, even down to the very same error reported in the 'Wineserver' crash log, as reported earlier. There's actually a further Wineskin11 crash log once X3Ed2 has been force-quitted (which essentially states 'code exception' etc,etc).

Out of curiosity, I took a look at the files for the Crossover 'Bottle' within which I'd had X3Ed2 running successfully, and for instance, comparing Crossover's Microsoft.NET/Framework folder to the same folder in the latest Mediafire X3Ed2 (bearing in mind, Crossover IS essentially Wineskin, just with extra knobs, bells and whistles), and we have, at top level of that folder, EXACTLY the same items, files (.dlls et al) and folders, and exactly the same sizes UNTIL we get to the v3.0 and v3.5 folders where Crossover has 62.3 and 49.7MB, but X3Ed2 Wineskin has 60.5, and only 25.8MB for the v3.5 folder. Don't know if this is relevant or not, but seems odd.

Presumably you've had the wrap working ok prior to compression/upload/download ? A first question would usually be, what version of OSX has it run successfully on, but then both me and Lemant have the XPM wrap working ok, so the problem's not Wineskin vs 10.7.4 per se. XPM unpacks to only 412.8, but I can see that it needed fewer frameworks/additions.

Does an immediate unpack of the compression run successfully on your machine _prior_ to upload, i wonder ?


Curiouser and curiouser ...

I can't try any more downloads (or launch Crossover) till Tue now, I'm down to my last 40MB of data on my Mobile BB dongle, and all cards currently maxed out till then :cry: ), but I can upload more crash log info or folder screenshots of the unpack to my Dropbox if needed. Can't help thinking there's a simple reason for all this somewhere, though, given that the XPM wrap works fine.

Andy.

User avatar
apricotslice
Posts: 13643
Joined: Sun, 16. May 04, 13:01
x3ap

Post by apricotslice » Sun, 19. Aug 12, 09:13

Thankyou icEPiraka, this is a much needed Guide.

Please use the photos taken for the other thread to explain the file folder depth, the photos make it so much clearer. Once people find where the data is, the photos will give them an idea of what it looks like, and then some of the things people say when giving advise may make sense later on. eg. when we talk about the "types" folder, it helps if the guide they first read has already shown it to them.

Also, dont forget to submit this thread to the Guides sticky thread for listing in the Guides List for people to find it easily.

icEPiraka
Posts: 64
Joined: Wed, 2. Jul 08, 02:42
x3tc

Post by icEPiraka » Mon, 20. Aug 12, 02:28

Andrew Wilde wrote:Well this is all very weird ... as Lemant says, we're getting exactly the same behaviour I'm afraid.

But here's the weird:

The original segmented zip, once I'd got Stuffit to actually unpack it, gave me an X3Ed2 app/package of 806.4MB; the latest 7z download, however, unpacks to 773MB; but running both leads to EXACTLY the same end result, even down to the very same error reported in the 'Wineserver' crash log, as reported earlier. There's actually a further Wineskin11 crash log once X3Ed2 has been force-quitted (which essentially states 'code exception' etc,etc).

Out of curiosity, I took a look at the files for the Crossover 'Bottle' within which I'd had X3Ed2 running successfully, and for instance, comparing Crossover's Microsoft.NET/Framework folder to the same folder in the latest Mediafire X3Ed2 (bearing in mind, Crossover IS essentially Wineskin, just with extra knobs, bells and whistles), and we have, at top level of that folder, EXACTLY the same items, files (.dlls et al) and folders, and exactly the same sizes UNTIL we get to the v3.0 and v3.5 folders where Crossover has 62.3 and 49.7MB, but X3Ed2 Wineskin has 60.5, and only 25.8MB for the v3.5 folder. Don't know if this is relevant or not, but seems odd.

Presumably you've had the wrap working ok prior to compression/upload/download ? A first question would usually be, what version of OSX has it run successfully on, but then both me and Lemant have the XPM wrap working ok, so the problem's not Wineskin vs 10.7.4 per se. XPM unpacks to only 412.8, but I can see that it needed fewer frameworks/additions.

Does an immediate unpack of the compression run successfully on your machine _prior_ to upload, i wonder ?


Curiouser and curiouser ...

I can't try any more downloads (or launch Crossover) till Tue now, I'm down to my last 40MB of data on my Mobile BB dongle, and all cards currently maxed out till then :cry: ), but I can upload more crash log info or folder screenshots of the unpack to my Dropbox if needed. Can't help thinking there's a simple reason for all this somewhere, though, given that the XPM wrap works fine.

Andy.
Very perceptive of you to figure that out. Allow me to explain:

The thing is, when I tried porting the Editor using only Wineskin, Wineskin just would not install .NET beyond 2.0. For whatever reason, the installer crashes. On the other hand, the Editor, after some trouble, seemed to work perfectly in Crossover. So my solution was to take the drive_c folder from the Crossover bottle and use it to replace the drive_c in a blank Wineskin wrapper. That setup seemed to work well enough for me, as the wineskin wrapper launched the Editor and all, so I called it good. It is possible that this is the reason the port is not working for everyone else, so I guess I'll have to rethink how I've done things. I'm running the latest version of Lion BTW.

Once I figure this whole fiasco out, I'll add pictures to the guide. I've already e-mailed Cycrow about adding my guide, but I haven't heard back yet.

User avatar
apricotslice
Posts: 13643
Joined: Sun, 16. May 04, 13:01
x3ap

Post by apricotslice » Mon, 20. Aug 12, 02:53

Just add the guide to the end of the guides sticky thread as a submission, and the mod looking after that thread will add it for you. ie. just post on the end of the thread with your guide submission details.

You do need to use a specific 'code' method, but there are plenty of examples to follow in how to present it.

Andrew Wilde
Posts: 56
Joined: Tue, 13. Jul 04, 23:58
x3tc

Post by Andrew Wilde » Mon, 20. Aug 12, 04:31

icEPiraka wrote:The thing is, when I tried porting the Editor using only Wineskin, Wineskin just would not install .NET beyond 2.0. For whatever reason, the installer crashes. On the other hand, the Editor, after some trouble, seemed to work perfectly in Crossover. So my solution was to take the drive_c folder from the Crossover bottle and use it to replace the drive_c in a blank Wineskin wrapper. That setup seemed to work well enough for me, as the wineskin wrapper launched the Editor and all, so I called it good. It is possible that this is the reason the port is not working for everyone else, so I guess I'll have to rethink how I've done things. I'm running the latest version of Lion BTW.
That all makes perfect sense, except for it not working after compression/decompression - there's not really much that can go wrong with that process - without completely screwing the material to a point where you wouldn't even get an executable app after decompression, I would have thought.

I wonder if Wineskin on your machine is finding something it needs when it runs that's actually _outside_ the wrap top level folder, and that is therefore not getting compressed/uploaded ?

Or, thinking about it, perhaps more precisely, bet there's some alias(es) in Crossover's C: folder pointing to files Crossover knows it has elsewhere (code or resource that Crossover knows will be common to all Bottles for instance) - a Wineskin launch on your machine would still be able to resolve any such aliases, but they'd point nowhere on another machine ?

2nd EDIT:

Maybe just copy over the necessary .Net Framework folders from Crossover's Bottle to the relevant Wineskin folder rather than the whole C: folder ? Umm, no, perhaps not (thinking out loud here, sorry), the respective .Net installs are going to have to register their presence in some no doubt obscure and various places after install, just dumping the folders there probably won't be enough.

Is Wineskin still being worked on/updated/supported, or has it kind of gone quiet ?

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”