[HARD-CODED] FTL: Hyperspace

Distribute and discuss mods that are functional. Moderator - Grognak
TheSwiftTiger
Posts: 47
Joined: Sun May 12, 2013 9:21 am

[HARD-CODED] FTL: Hyperspace

Postby TheSwiftTiger » Sun Sep 22, 2019 5:26 pm

Overview

FTL: Hyperspace is a hard-coded mod (or "exe mod") which aims to extend the modding capabilities of FTL.
It provides a backend to more complex mods which were never possible before, adding features such as the ability to add completely new races with their own stats, a ship selector with infinite pages, and combining augments to create completely new ones.

Seeded runs are now a feature of Hyperspace, too! You can input a seed before starting a run which will disable unlocks and generate the map based on the seed, allowing you to redo a run or play the same run as someone else (to race them, for example!).

Currently, the biggest mod which utilizes Hyperspace is FTL: Multiverse. Go check them out!

The mod also contains some Quality of Life changes to FTL, such as a numerical hull indicator for the player and enemy.

This mod DOES NOT WORK with the latest version of FTL. You will need to downgrade your FTL to 1.6.9 to be able to use it.

The versions between 1.6.9 and 1.6.14 only add a Japanese translation and Steam achievements, so you won't be losing out on much.

The instructions to downgrade are below.


Download

Newest Version (0.5.3):

Google Drive Link
Mediafire Link

Previous Versions:

Code: Select all

0.5.2:
https://drive.google.com/file/d/1Yqj09hOckYSAfCh2UQfZO6rejdnM1tbJ/view?usp=sharing
http://www.mediafire.com/file/hqkou47lflxpgbq/FTL_Hyperspace_%25280.5.2%2529.zip/file
0.5.1:
https://drive.google.com/file/d/1d9oNewZG0NzhruoHttl7a0iBCfl4C8mU/view?usp=sharing
http://www.mediafire.com/file/ws5drrlrc49ipcy/FTL_Hyperspace_%25280.5.1%2529.zip/file
0.5:
https://drive.google.com/file/d/123ByQ1-LqekPhl4oX0N2RP9rebyTGf9m/view?usp=sharing
https://www.mediafire.com/file/vbd1opngbtkk5nw/file
0.4.1:
https://www.mediafire.com/file/n1vhj0jchy3teq4/FTL_Hyperspace_(0.4.1).zip/file
https://drive.google.com/file/d/18DsfCHyZd2UoOnD7iVdrfaZNM3nQLYZ_/view?usp=sharing
0.4:
https://www.mediafire.com/file/48fke3obrypbfl4/FTL_Hyperspace_(0.4).zip/file
https://drive.google.com/file/d/18vOHnV4Tntg4rrnRwqQRmsb5bpFpfY_q/view?usp=sharing
0.3:
https://www.mediafire.com/file/36ifts30alccexi/FTL_Hyperspace_%280.3%29.zip/file
https://drive.google.com/file/d/1RFl7D3A1YNSk45AhQ8372iKnM321YAOj/view?usp=sharing
0.2:
https://www.mediafire.com/file/2o7cfcecu8el1ge/FTL_Hyperspace_%280.2%29.zip/file
https://drive.google.com/file/d/1xkQbjNfkBb5P_5VHF_fFe_2Z_OEk3Ea-/view?usp=sharing
0.1:
https://www.mediafire.com/file/zprnpga6n9j74ij/FTL_Hyperspace.zip/file
https://drive.google.com/file/d/17wOJu-RSWdzflBCDnglo4N6KTNkN-PBn/view?usp=sharing


Installation

Windows

To downgrade your FTL:

Steam (1.6.14 -> 1.6.9)

Extract the files in the "Extract where FTLGame.exe is" in your FTL directory.
This is usually in C:\Program Files (x86)\Steam\steamapps\common\FTL Faster Than Light.

Run the downgrade.bat included with the Hyperspace download.

Install the "Hyperspace.ftl" mod with Slipstream Mod Manager, along with any other mods that utilize Hyperspace after that.

Other Versions

For Epic Games and Origin, download one of these patchers and once again extract them to your FTL directory, replacing all files. Then, run downgrade.bat and install as normal.
GOG has their own version selector which you can use to get the 1.6.9 version.

Epic Games Downgrader (1.6.12 -> 1.6.9)
Origin Downgrader (1.6.12 -> 1.6.9)

Linux (Installer) (OUTDATED)

For the Linux install, you will need to have WINE installed.

Then, just use this great installer script made by Paradigm.

To execute:

Code: Select all

chmod +x ./setup.sh
./setup.sh


Linux (Manual)

For the Linux install, you will need to have WINE installed.

Download the Windows version of FTL by running your launcher (Steam, Epic, Origin or GOG) through WINE and downloading it through there.
It should tell you where it's downloaded once it's complete.

Install the "Hyperspace.ftl" mod with Slipstream Mod Manager, along with any other mods that utilize Hyperspace after that one.

Extract the files in the "Where FTLGame.exe is" into the Windows FTL version directory.

Downgrade the FTL version:
- Make a backup of FTLGame.exe
- Go to the patch folder
- Open flips.exe
- Apply patch
- Select patch.bps
- On the bottom right where it says "Most Common ROM Files", click that and select All Files
- Select FTLGame.exe
- Select FTLGame.exe again
- replace file

Then, open a terminal emulator and run the command "winecfg"
Open the "Libraries" tab, and write "xinput1_4" in the "New override for library:" textbox. Click on "Add" and you should see "xinput1_4 (native, builtin)" inside "Existing overrides:". Select it, click on "Edit...", select "Native (Windows)".
Do the same for the Hyperspace dll.

Now running FTLGame.exe should open Hyperspace.

NOTE: There may be a bug with fullscreen on Linux. To avoid this, play in windowed mode.

Uninstalling

To uninstall, simply delete the "Hyperspace.dll" file from your FTL directory, where you installed the mod.
To revert back to 1.6.14, in your FTL directory, delete FTLGame.exe and rename FTLGame_orig.exe to FTLGame.exe.
Just removing the mod from Slipstream will NOT remove the entire mod.

Changes/Additions

Code: Select all

 
- Added creation of custom races
  > Their abilities can be changed inside the hyperspace.xml
  > Existing crewmembers can also have their abilities changed, but you will need to rewrite the old abilities as well
  > Create a blueprint for them and put their definition in the <crew> tag in hyperspace.xml
 
- Added infinite ship list
  > The number of pages increases the more ships you have to fill them
  > Ships can be added by having a custom blueprint for them, and adding their id to the <ships> in hyperspace.xml
  > NOTE: High scores for custom ships are never saved, and they have no achievements

- Added custom augments (sort of)
  > Different augments can now be combined to make a new augment
  > Create a blueprint for the augment, then add their definition to the <augments> in hyperspace.xml
  > This can also be used to make new versions of old augments, so that the player and enemy can have seperate values for one augment, for example
  > Added hidden augments
      • Customizable per ship
      • These cannot be removed or added, and do not take up a slot
  > Added locked augments
      • These cannot be sold/swapped for different augments once equipped

- Added creation of custom drones, with unique stats

- Added Discord Rich Presence integration

- Can now change crew limits

- Added new augment, NANOBOT_DEFENSE_SYSTEM (disabled by default)
- Added FTL_JUMPER_GOOD augment which allows you to jump to any beacon in the sector (disabled by default)
- Explosive Replicator's <value> tag now works as intended

- Seeded runs!
  > You can now input a seed before starting a run which will disable unlocks and generate the map based on the seed
  > This means that you can redo a run or play the same run as someone else (to race them, for example!)
  > You can check your seed in the game pause menu
  > Seeds are only the same if the mods used, FTL versions, and Advanced Edition toggles are the same

- Added ih8ih8sn0w's infinite mode (enabled in hyperspace.xml)

- Fixed hacking drone bypass bug - the drone now explodes when hacking is depowered (enabled by default -- can change in hyperspace.xml)

- Can now enable command console through hyperspace.xml
  > Added STORE command
  > Added KILL command to console which allows you to kill a crew member or boarder on your ship
- Can now enable Hull Numbers through hyperspace.xml
- Ghosts can now phase through doors
- Low O2 warning no longer appears when the ship has no oxygen system
- Added customisation of boss crew
  > Can customise the race and room that the crew member spawns in
- Can now customize the drones that the boss uses for its phase 2 drone surge
  > Customizable for each difficulty
- Different save files and continue files for vanilla and Hyperspace FTL versions
- Can customise the drone(s) that buying a drone system gives you

- Event features
  > Ships can now use the boss ship box (useful for minibosses and large ships)
  > Events can now have a label on the map, like stores and exit beacons
    • These replace quest beacon labels and exit beacon labels
  > Can add custom event files for the game to load
    • The value of <eventFile> in the <event> tag will load data/events_x.xml
    • For example, <eventFile>special</eventFile> will make the game load data/events_special.xml
    • data/events_hyperspace.xml will always be loaded if it exists
  > Added sector specific exit beacons
    • Useful for something like a miniboss at the end of a sector
  > Added sector specific fleet beacons
  > Added <preventQuest> tag to stop quests from overwriting specific events
  > No longer forces rebel fleet to show in fleet events
  > Allowed events to check cargo for the "req" attribute
    • Add your event into <events> in hyperspace.xml and add a <checkCargo/> tag
    • This also works for the <remove> tag

  > Added <noQuestText> tag which means the event does not say that a quest has been added
  > Added <removeHazards> tag
  > Added <removeNebula> tag
  > Added win events

- Added splash screens to main menu

- Added <forceDlc> tag which stops you from disabling Advanced Edition


Mod Makers

Most of the features that you can use from Hyperspace are documented in data/hyperspace.xml in Hyperspace.ftl.
Use a hyperspace.xml.append and add the xml tags you need for your mod.
Ideally, the user would download Hyperspace as well as your mod, and install Hyperspace.ftl first then your mod.
For maximum compatibility with other mods, don't redistribute the Hyperspace resource files and instead just direct the user to download Hyperspace in your forum post.

A Lua API was planned for this release, but unfortunately, due to lack of free time, that wasn't possible.
This may be added to the mod in the future, but don't expect it too soon.

If anyone wants to create some more detailed documentation for the mod's features, please feel free to do so.

Credits

Development:
TheSwiftTiger#7324 - Discord (TheSwiftTiger - forum name)
Winderps#0001 (Winderps)
ih8ih8sn0w:blue_heart:#9183 (ih8ih8sn0w)

Art:
SaltyFriedRice#0605

Special Thanks

_Kilburn#5703
slow#7018 (slowriderxcorps)
Masala#0621
bamalf#8127 (bamalf)
Puffias Leroy McBillington III#8899 (KingdomKrafters)
BlizzArchonJ#3158 (mr_easy_money)
Paradigm#0001
FTL Multiverse Team

Previews

Custom Ship Selector
Custom Races
Seeds
Last edited by TheSwiftTiger on Sun Sep 13, 2020 8:51 pm, edited 25 times in total.
User avatar
jacobsmash1
Posts: 6
Joined: Sun Sep 08, 2019 3:17 pm

Re: [HARD-CODED] FTL: Hyperspace

Postby jacobsmash1 » Fri Sep 27, 2019 11:39 am

This looks amazing! How did you get the source code from FTL to do this though?
Image
TheSwiftTiger
Posts: 47
Joined: Sun May 12, 2013 9:21 am

Re: [HARD-CODED] FTL: Hyperspace

Postby TheSwiftTiger » Fri Sep 27, 2019 2:46 pm

We don't actually have the source code - if we had it and could edit it, we probably could have made the mod in 4 days instead of 4 months!

For a technical explanation, any compiled programming language (like C++, the language the game was written in) results in a binary file such as an exe file for Windows. The contents of the FTL binary file is x86 assembly code, which can actually be read and processed by a CPU, unlike the human readable C++ code. This assembly code can be decompiled to give very rough C code - this is NOT the original source code, this is just the decompiler's interpretation of the assembly code which is often much more difficult to understand than the original source (still a lot better than trying to understand the assembly code, though).

How we add content is by replacing some assembly instructions in specific parts/subroutines in the binary and making it run our own C++ code (called "hooking") found in Hyperspace.dll.

The xinput1_4.dll is always loaded by FTL but is unused (since it's for controllers/gamepads) so all that does is load the Hyperspace.dll alongside it.
Yorkshire-Man
Posts: 11
Joined: Sat Aug 26, 2017 8:54 am

Re: [HARD-CODED] FTL: Hyperspace

Postby Yorkshire-Man » Fri Sep 27, 2019 11:21 pm

how would this mod work with big mods like CE and what load order would you need to use if it was possible also great work there is a lot of stuff in this I have wanted for a while.
User avatar
belomar
Posts: 4
Joined: Sat Sep 28, 2019 2:51 am

Re: [HARD-CODED] FTL: Hyperspace

Postby belomar » Sat Sep 28, 2019 3:03 am

Yorkshire-Man wrote:how would this mod work with big mods like CE and what load order would you need to use if it was possible also great work there is a lot of stuff in this I have wanted for a while.

I am using this load order:

-Hyperspace.ftl
-Full-Hull HUD.ftl
-CE Resource Pack 1.308.ftl
-FTL Captains Edition 1.308.ftl
-CE Infinite Addon 1.301b.ftl
-EL Texture Pack 1.27.ftl
-CE Endless Loot Addon for CE Infinite 1.308.ftl
-Advanced System Upgrades.ftl
-shields+.ftl
-Advanced LTO! Base v1.0.2.ftl
-Advanced LTO! Patch - CE v1.0.2.ftl
-CE Vanilla Portrait Patch V2.ftl
-Expanded Enemy Window 1.2.ftl
-Extended Pursuit Indicator x3 v.1.3.ftl
-FTLEventTags1.6.v1.0.4.ftl

I am thinking of trying to make some ship mods compatible with hyperspace.
Yorkshire-Man
Posts: 11
Joined: Sat Aug 26, 2017 8:54 am

Re: [HARD-CODED] FTL: Hyperspace

Postby Yorkshire-Man » Tue Oct 01, 2019 11:00 am

I am using this load order:

-Hyperspace.ftl
-Full-Hull HUD.ftl
-CE Resource Pack 1.308.ftl
-FTL Captains Edition 1.308.ftl
-CE Infinite Addon 1.301b.ftl
-EL Texture Pack 1.27.ftl
-CE Endless Loot Addon for CE Infinite 1.308.ftl
-Advanced System Upgrades.ftl
-shields+.ftl
-Advanced LTO! Base v1.0.2.ftl
-Advanced LTO! Patch - CE v1.0.2.ftl
-CE Vanilla Portrait Patch V2.ftl
-Expanded Enemy Window 1.2.ftl
-Extended Pursuit Indicator x3 v.1.3.ftl
-FTLEventTags1.6.v1.0.4.ftl

I am thinking of trying to make some ship mods compatible with hyperspace.


Do you think we could try using the limited time offer mod in this list?
also if you are going to make some ship would you like to use some of my old mods to work off of?
viewtopic.php?t=32258
User avatar
belomar
Posts: 4
Joined: Sat Sep 28, 2019 2:51 am

Re: [HARD-CODED] FTL: Hyperspace

Postby belomar » Tue Oct 01, 2019 2:34 pm

Yorkshire-Man wrote:Do you think we could try using the limited time offer mod in this list?

You mean this.
-Advanced LTO! Base v1.0.2.ftl
-Advanced LTO! Patch - CE v1.0.2.ftl
Yorkshire-Man wrote:also if you are going to make some ship would you like to use some of my old mods to work off of?
https://www.subsetgames.com/forum/viewtopic.php?t=32258

Why not, when I have time.
First mod I made compatible with hyperspace was The Dreamship by jacobsmash1
Yorkshire-Man
Posts: 11
Joined: Sat Aug 26, 2017 8:54 am

Re: [HARD-CODED] FTL: Hyperspace

Postby Yorkshire-Man » Sat Oct 05, 2019 3:04 pm

belomar wrote:You mean this.
-Advanced LTO! Base v1.0.2.ftl
-Advanced LTO! Patch - CE v1.0.2.ftl


I mean the one for CE mainly
User avatar
belomar
Posts: 4
Joined: Sat Sep 28, 2019 2:51 am

Re: [HARD-CODED] FTL: Hyperspace

Postby belomar » Sun Oct 06, 2019 1:47 am

Yorkshire-Man wrote:I mean the one for CE mainly

-Advanced LTO! Base v1.0.2.ftl <-- better version of limited time offer(LTO).
-Advanced LTO! Patch - CE v1.0.2.ftl <-- patch to make advanced limited time offer work with captains edition(CE).
User avatar
Engi-nious
Posts: 22
Joined: Sat Dec 07, 2019 7:34 am
Location: Sector 8

Re: [HARD-CODED] FTL: Hyperspace

Postby Engi-nious » Sat Dec 07, 2019 8:36 am

This mod sounds great, and I had so many questions about making my own mods with it, I made an account.

Only then I discovered I can't get it to work. :?

I am using the Steam build of the game, Version 1.6.3 (which is the latest, unless I've missed something?) on Windows 7.
The game can patch the .ftl file fine, although obviously the mod itself doesn't work properly without the "Extract where FTLGame.exe is" content. I've dropped the two .dlls in the "C:\Program Files (x86)\Steam\steamapps\common\FTL Faster Than Light" folder, as instructed.

The issue only occurs when BOTH .dll files are in the folder with the game - without them everything is OK, but when it is in the folder with the game I am getting an Error:

Code: Select all

Failed to find address for function achievementtracker::getshipachievements


This holds true whether or not I have the .ftl file patched. Removing either file fixes the issue, although I obviously can not use the mod then.
I have tested with the downloads from both Mediafire and Google Drive.

Anyone know the cause? Thanks for your help!

EDIT: Like a smart cookie, I didn't realize an update was released about a year ago. :roll: Updating fixed the issue, of course. Leaving this post only as an aid in case anyone else suffers the problem - unlikely, but I can never stand it when someone online has exactly the same problem as me and then says "nvm fixed it"
Will make another post here shortly with a bunch of questions about the mod.
This (hyper)space intentionally left blank.

Who is online

Users browsing this forum: No registered users and 13 guests