Slipstream Mod Manager v1.9.1 (2018-01-07)

Discuss and distribute tools and methods for modding. Moderator - Grognak
Vhati
Posts: 792
Joined: Thu Oct 25, 2012 12:01 pm

Slipstream Mod Manager v1.9.1 (2018-01-07)

Postby Vhati » Thu Aug 22, 2013 8:52 am

.
About

Slipstream is a mod manager for FTL, making it easy to install multiple mods at the same time and, later, revert to vanilla gameplay.

It is the successor to Grognak's Mod Manager (GMM).

As of 1.0, Slipstream worked just like GMM did, but without the bugs that plagued its predecessor.

1.2 introduced new XML tags for modders to use (announcement).

1.8 introduced support for FTL 1.6.1 (announcement).


Image


Download

Important: Return FTL to an unmodded state before upgrading or replacing an existing mod manager.
And when the game itself gets an upgrade, delete the mod manager's backups so it'll know to make fresh ones.

Version 1.9.1 - [Windows] - [Mac/Linux]
Version 1.9 - [Windows] - [Mac/Linux]
Version 1.8 - YANKED
Version 1.7 - YANKED
Version 1.6 - [Windows] - [Mac/Linux]

Uncompiled source is available at GitHub.


Donations

I can accept PayPal donations here, if you feel inclined.
That would be fantastic.


Setup

Extract the mod manager anywhere.
On startup, it'll either find FTL automatically or ask you to locate it.


Usage

Mods come in .ftl files. To make one available to Slipstream, simply drag it into the mods/ folder.

To install mods, open Slipstream, select the mods you want, and hit Patch. Anything not selected is effectively uninstalled.

In order to uninstall all mods, patch with nothing selected.


Requirements

  • Link: Java (1.6 or higher).
  • Link: FTL (1.01-1.6.3, Windows/OSX/Linux, Steam/GOG/Standalone).
    .
  • WinXP SP1 can't run Java 1.7.
    (1.7 was built with VisualStudio 2010, causing a DecodePointer error.)
    To get 1.6, you may have to google "jdk-6u45-windows-i586.exe".


Troubleshooting

On Windows, you may need to admin rights to modify FTL's files: double-click "modman_admin.exe"; or right-click the regular "modman.exe", and "Run as Administrator".

On Windows, "modman_debug.bat" will show you the logs and offer to fix interface glitches.

If you have other problems, check the readme's troubleshooting section.

If all else fails, try asking on this thread.


Credits

  • Grognak: For the long voyage on a Ship of Theseus that was so fun to patch. :P
  • bas: For his brilliant ftldat.
  • kartoFlane: For lots of good feature requests.


For Mod Developers

See "readme_modders.txt".


For Software Developers

I've ported ftldat.py (lib for reading/editing FTL resources) to Java (and since modernized it for FTL 1.6.1):

Import net.vhati.ftldat.PkgPack from modman.jar.

Code: Select all

PkgPack pack = new PkgPack( new File( "ftl.dat" ), "r" );
String innerPath = "data/names.xml";

// Replace a resource.
if ( pack.contains( innerPath ) ) pack.remove( innerPath );
pack.add( innerPath, anInputStreamOfNewContent );
pack.repack();

InputStream is = pack.getInputStream( innerPath );  // Read a resource.
List<String> innerPaths = pack.list();  // List all resources.
...
pack.close();


You may find some of the other classes interesting.
They might even be independently useful enough to make modman.jar a workable library for other projects without dissecting the source. :)

If you want to compile this project yourself, see "readme_developers.txt" on GitHub.
Last edited by Vhati on Wed Jan 17, 2018 5:56 pm, edited 28 times in total.
dalolorn
Posts: 532
Joined: Sun Sep 23, 2012 8:06 am

Re: Slipstream Mod Manager v1.0 (2013-08-22)

Postby dalolorn » Thu Aug 22, 2013 11:38 am

Haven't had time to actually try and test if it works, but... I CAN RUN IT. :D

GMM wouldn't run on my computer because I didn't have Python, so I had to write up a .bat file just to append Captain's Edition to a copy of FTL's .dat files. Not exactly as easy as this, though at least I managed to append most of the files through copy-pasting it into the relevant XMLs and packing a new file. :)

Great work!

Edit: MD5 hash for Expanded Enemy Window, standalone addon for Captain's Edition: cf9549a24c75fbc7207d8ffc2d0e945d
UltraMantis
Posts: 2141
Joined: Thu Sep 20, 2012 3:17 pm

Re: Slipstream Mod Manager v1.0 (2013-08-22)

Postby UltraMantis » Thu Aug 22, 2013 12:13 pm

Important: Return FTL to an unmodded state before starting a new mod manager.

This may need clarifying. Make sure you delete the resource folder completely and reinstall FTL (or restore unmodded backups of data.dat and resource.dat if you have them). This will remove previously patched files and insure they don't get mixed in when using Slipstream.

A couple of questions:

Does Slipstream unpack resources every time it runs?
How does Slipstream handle multiple installations of FTL?
Report spam using the handy Report Button Mod.
Vhati
Posts: 792
Joined: Thu Oct 25, 2012 12:01 pm

Re: Slipstream Mod Manager v1.0 (2013-08-22)

Postby Vhati » Thu Aug 22, 2013 12:43 pm

UltraMantis wrote:This may need clarifying...

Right. Thanks.

  • In Slipstream 1.0, patching with no mods selected will restore backups - from "SMM/backup/".
    .
  • In GMM 1.7, patching with no mods selected will restore backups - from "GMM/backup/".
    .
  • In GMM 1.6, same deal, but it restored from "data.dat.bak" and "resource.dat.bak" in "FTL/resources/". Those backups will no longer be necessary afterward, so delete them.
    .
  • In GMM 1.5, selecting no mods would use backups from "FTL/resources/", unpack them to "FTL/resources/*-unpacked/", do nothing, then pack them, clobbering "data.dat" and "resource.dat".
    Not a perfect restore, but okay I guess.
    .
    Or you could go into that folder and manually rename *.bak to *.dat.
    Otherwise backups in "FTL/resources/" should be deleted, not because of conflict so much as clearing litter. The "*-unpacked/" folders are litter as well.

Alternatively, the following can wipe the slate clean regardless of what came before. ;)

  • Swapping in backups you made yourself.
    .
  • For the standalone edition of FTL, you can uninstall, then delete your FTL folder, then reinstall.
    .
  • For the steam edition, delete your "FTL/resources/" folder then verify steam's cache.


If you don't know where "FTL/resources/" is, open GMM/modman.ini with a text editor to find out.

For completeness, it's usually one of these...
  • Windows - GOG:
    C:\Program Files[ (x86)]\GOG.com\Faster Than Light\resources\
  • Windows - Steam:
    C:\Program Files[ (x86)]\Steam\steamapps\common\FTL Faster Than Light\resources\
    .
  • Linux - Steam:
    ~/.local/share/Steam/SteamApps/common/FTL Faster Than Light/data/resources/
    $XDG_DATA_HOME/Steam/SteamApps/common/FTL Faster Than Light/data/resources/
    .
  • OSX - Standalone:
    /Applications/FTL.app/Contents/Resources/
  • OSX - Steam:
    /Library/Application Support/Steam/SteamApps/common/FTL Faster Than Light/FTL.app/Contents/Resources/


UltraMantis wrote:Does Slipstream unpack resources every time it runs?

Nope. This app streams bytes directly from mod zips into resource dats without temp files.

UltraMantis wrote:How does Slipstream handle multiple installations of FTL?

On the first startup, it looks in the usual places, and tells you the first one it found.
You have the option of saying "no" and telling it where the resources really are.

You can change that later by editing modman.cfg.
Last edited by Vhati on Sat Sep 21, 2013 4:35 am, edited 15 times in total.
UltraMantis
Posts: 2141
Joined: Thu Sep 20, 2012 3:17 pm

Re: Slipstream Mod Manager v1.0 (2013-08-22)

Postby UltraMantis » Thu Aug 22, 2013 12:47 pm

Thanks for the response, and the work on the tool. :)
What i meant by unpacking though, was previous GMM versions unpacking the resources into ...-unpacked folders. Handy to have once maybe but pretty annoying imo. There's over a thousand files that were copied each and every time.
Report spam using the handy Report Button Mod.
Vhati
Posts: 792
Joined: Thu Oct 25, 2012 12:01 pm

Re: Slipstream Mod Manager v1.0 (2013-08-22)

Postby Vhati » Thu Aug 22, 2013 1:01 pm

UltraMantis wrote:What i meant by unpacking though, was previous GMM versions unpacking the resources into ...-unpacked folders.

No temp files or folders here.
Every time you patch, backups are restored beforehand clobbering the game's dats.
Then it literally pulls bytes into memory - from the mods, and as needed, the dats - and then sends those bytes directly into those same dats.

Oh... the word "repack()" in the example code.
That just compacts the dat after adding/removing files (editing leaves gaps of unused bytes) to get it back into a sane state. It scoots bytes toward the beginning within the dat to defrag it.

It's a cleanup step, not a "transforming a real folder into a dat" step.
That's just what FTLDat originally called the function.
Last edited by Vhati on Thu Aug 22, 2013 2:04 pm, edited 1 time in total.
dalolorn
Posts: 532
Joined: Sun Sep 23, 2012 8:06 am

Re: Slipstream Mod Manager v1.0 (2013-08-22)

Postby dalolorn » Thu Aug 22, 2013 1:13 pm

The only problem I have with this thing is that I'll have to rewrite my mod's files to be appendable if I ever want to mix mods, but that was something I saw coming ages ago. Again, great work. :P
Vhati
Posts: 792
Joined: Thu Oct 25, 2012 12:01 pm

Re: Slipstream Mod Manager v1.0 (2013-08-22)

Postby Vhati » Thu Aug 22, 2013 2:14 pm

dalolorn wrote:Edit: MD5 hash for Expanded Enemy Window, standalone addon for Captain's Edition: cf9549a24c75fbc7207d8ffc2d0e945d

Thanks! I intermittently check the Master Mod List and read all the threads' top posts,
but that one slipped by me.

Exactly the situation that message is for. :D
dalolorn
Posts: 532
Joined: Sun Sep 23, 2012 8:06 am

Re: Slipstream Mod Manager v1.0 (2013-08-22)

Postby dalolorn » Thu Aug 22, 2013 2:42 pm

Also, Star Trek Universe description - you should remove the "Eventually" bit, as it already does that.
User avatar
Ora_unit_SR388
Posts: 193
Joined: Fri Apr 12, 2013 2:41 pm

Re: Slipstream Mod Manager v1.0 (2013-08-22)

Postby Ora_unit_SR388 » Fri Aug 23, 2013 1:53 am

I really like this mod manager, but I cannot load .zip files (all of my unstable mods that I make/test are in zips).