FTL Ship Selector (removes player ship limits)

Discuss and distribute tools and methods for modding. Moderator - Grognak
BFrizzleFoShizzle
Posts: 16
Joined: Sun Jul 19, 2015 3:43 am
Location: New Zealand

FTL Ship Selector (removes player ship limits)

Postby BFrizzleFoShizzle » Tue Sep 01, 2015 3:16 am

Hey all.
This here is a "mod" that allows modders to add new player ships without having to replace existing ones.
It modifies the ship selection UI.
I figured I'd post this in "Mod Development", since it doesn't really do anything by itself.

Image
The original buttons (arrows, list, A, B, C) are disabled.
You can use the new "previous" and "next" buttons to cycle through all ships whose IDs start with "PLAYER_".
So, if you want to add a new ship without replacing existing ones, all you have to do is give it an ID starting with "PLAYER_".
This also has a side effect where users can access ships they haven't unlocked.

This currently only supports the latest (1.5.13) Steam version on Windows.
Download (Mediafire)

Source code (GitHub)

Note: THIS MODIFIES YOUR FTLGame.exe. If it breaks, you may have to re-install FTL.
Installation
Download and unpack the .rar
Run install.bat and follow instructions

Uninstallation
Run uninstall.bat and follow instructions
If that doesn't work, go to your FTL directory and rename FTLGame-backup.exe to FTLGame.exe

This is actually a sub-project for an FTL multiplayer mod I'm currently working on, which is still a few months away from a public release.
Last edited by BFrizzleFoShizzle on Tue Sep 01, 2015 10:28 pm, edited 1 time in total.
User avatar
NarnKar
Posts: 778
Joined: Thu Jun 19, 2014 4:24 pm
Location: this forum
Contact:

Re: FTL Ship Selector (removes player ship limits)

Postby NarnKar » Tue Sep 01, 2015 4:14 am

Whoa.

Now that's some groundbreaking stuff. Hope it works.
User avatar
stylesrj
Posts: 3645
Joined: Tue Jul 08, 2014 7:54 am
Location: The Shrike
Contact:

Re: FTL Ship Selector (removes player ship limits)

Postby stylesrj » Tue Sep 01, 2015 4:32 am

There's always something new and unexpected that can be modded into FTL. :o
User avatar
R4V3-0N
Posts: 1289
Joined: Sun Oct 06, 2013 11:44 am
Location: Last Federation Fleet
Contact:

Re: FTL Ship Selector (removes player ship limits)

Postby R4V3-0N » Tue Sep 01, 2015 5:57 am

At first when I saw the threads title I thought it was just a dry eagles descent into darkness like mod.

Then I read the first page so far and I was like "so this is an over ambitious mod that will never happen as soon as someone says that is hard coded and destroy there dreams?"- then I saw the 'rough' ui update and thought "yep... it was just a simple 'meh' ui..."

But then I read a bit more... this was more fitting to my reaction as I was drinking iced tea at the time
Image

This is brilliant! I have no idea how this will affect me directly because I lived my whole life with these limits I mean jebus!....

I'm dumbfunded.
R4V3-0N, a dreamer.
stargateprovider
Posts: 228
Joined: Thu Oct 03, 2013 1:21 pm
Location: Subspace

Re: FTL Ship Selector (removes player ship limits)

Postby stargateprovider » Tue Sep 01, 2015 8:35 am

This is awesome! Now I just wonder if there's a limit to how many new ships you can add?


EDIT: Just noticed the title says "removed limits" so... an infinite amount of ships is possible?
Last edited by stargateprovider on Tue Sep 01, 2015 10:41 am, edited 1 time in total.
Some of my FTL mods you may like, or hate, or... yeah:
Image Image
User avatar
Sleeper Service
Posts: 2305
Joined: Sun Mar 24, 2013 8:49 pm

Re: FTL Ship Selector (removes player ship limits)

Postby Sleeper Service » Tue Sep 01, 2015 8:43 am

Wow this is neat I guess, although I'm not sure whether this mod is in accordance with the very simplistic modding rules that Justin once posted:
Justin wrote:Mods that require redistribution of the game files won't be allowed. This will have to be self regulated I think. I'm not going to manually delete posts but please adopt older mods to work with the ".ftl" system (or a new mod manager if it works better).

Basically what we have here requires redistribution of the FTL .exe, right? You might want to ask the devs whether this is ok with them.
User avatar
TaxiService
Posts: 204
Joined: Mon Dec 23, 2013 6:04 pm
Location: 4154313 1227347
Contact:

Re: FTL Ship Selector (removes player ship limits)

Postby TaxiService » Tue Sep 01, 2015 8:47 am

No dude, it's just a patch for the .exe, it doesn't include any of the game's assets. Just checked.

FoShizzle: you are a friggin' pioneer. I wish you the best of luck in completing your project and I hope you'll stick around! People like you are those that take a game's modding to a new level.
Last edited by TaxiService on Tue Sep 01, 2015 9:03 am, edited 1 time in total.
ImageImageImageImageImage
User avatar
R4V3-0N
Posts: 1289
Joined: Sun Oct 06, 2013 11:44 am
Location: Last Federation Fleet
Contact:

Re: FTL Ship Selector (removes player ship limits)

Postby R4V3-0N » Tue Sep 01, 2015 8:54 am

Is it possible to patch the ftl.exe to also allow custom races, augments, make ion beams work, etc or did my eyes just get a few dozen times bigger then my plate? xD
R4V3-0N, a dreamer.
User avatar
Sleeper Service
Posts: 2305
Joined: Sun Mar 24, 2013 8:49 pm

Re: FTL Ship Selector (removes player ship limits)

Postby Sleeper Service » Tue Sep 01, 2015 8:57 am

Ok, that should be all right I guess. Sweet. Hey Shizzle do you want to illustrate a little how you made this? I have to assume you decompiled the .exe and looked for the menu stuff in the source code?
BFrizzleFoShizzle
Posts: 16
Joined: Sun Jul 19, 2015 3:43 am
Location: New Zealand

Re: FTL Ship Selector (removes player ship limits)

Postby BFrizzleFoShizzle » Tue Sep 01, 2015 9:27 am

Thanks y'all!

As R4V3-0N said, player ships are hard coded, which is why this was a total pain in the butt to make.

@R4V3-0N
Possibly, I'm only mildly familiar with regular FTL modding, and I haven't reverse engineered any of the code that deals with that stuff.

My main focus right now is trying to add multiplayer. If someone who knows a lot about modding wants to help me out, that would be awesome. Preferably, someone who's worked on mod tools and actually understands FTL's underlying resource formats (.DAT files, all the XML files, etc).

@Sleeper Service
I'm well aware of those rules, which is why it's distributed as a 300 byte patch file. I'm not distributing a copy of the FTL exe in any form.
As TaxiService said, it's just a patch file, which is used to modify a user's existing FTL exe.

I didn't actually decompile the game.
I've spent the last month or two reverse engineering FTL for the purpose of writing a multiplayer mod. This mostly consisted of running the game in various debuggers, and trawling through a stupid amount of x86 assembler code.
So, I wrote a DLL in C/C++ (with bits of inline assembler where needed) that's injected into the game. The DLL modifies the game's compiled code at runtime.
I'm drawing on the screen by intercepting calls from the game to OpenGL (more specifically, the call that's made when FTL is done drawing the current frame).
I disabled the buttons by disabling bits of code in memory.
The "previous" and "next" buttons work by intercepting mouse clicks and modifying the code that selects a random ship.

The patch file just makes FTL load my DLL so users don't need to use any dodgy injectors.

Who is online

Users browsing this forum: No registered users and 5 guests