[HARD-CODED] FTL: Hyperspace

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

[HARD-CODED] FTL: Hyperspace

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

Image

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
Image


Korean translation is unofficial, not from Subset Games (한국어 번역은 Subset Games 에서 제공하지 않은 비공식 번역입니다)

Previous Versions:

Code: Select all

Historical versions after 1.0.3 available only on github: https://github.com/FTL-Hyperspace/FTL-Hyperspace/releases
1.0.3:
https://bit.ly/3kIOs4d
https://bit.ly/39l7FpX
1.0.2:
Drive - https://bit.ly/3uZWhIn
Mediafire - https://bit.ly/3jWvR3V
1.0.1:
https://bit.ly/3uKKEFb
https://bit.ly/37q2zIr
0.9.2:
https://drive.google.com/file/d/1gmjf8sD6RA2QEfMhbuuerR0uRQnNJDNU/view?usp=sharing
https://www.mediafire.com/file/28lkwl0pun8s1rp/FTL_Hyperspace_%25280.9.2%2529.zip/file
0.9.1:
https://drive.google.com/file/d/1IjDIqg534ILvCr414HjnL_I0xBps44nd/view?usp=sharing
https://www.mediafire.com/file/v1se1fqi9xaypr0/FTL_Hyperspace_%25280.9.1%2529.zip/file
0.9:
https://drive.google.com/file/d/1byvNuMmrpt5VMJ9xoPI6z6f1ZhpSHHTG/view?usp=sharing
https://www.mediafire.com/file/6ft36s3ocunpoxw/FTL_Hyperspace_%25280.9%2529.zip/file
0.8:
https://drive.google.com/file/d/11xMsD-1PuHAdcplQ3uAgr0sPNTiFq5dB/view?usp=sharing
https://www.mediafire.com/file/sn6hzl5wocxoa6z/FTL_Hyperspace_%25280.8%2529.zip/file
0.7.1:
https://drive.google.com/file/d/1J42xtnGxguc5V1nahfmxMOdVu0IagOyu/view?usp=sharing
https://www.mediafire.com/file/xxa3568ec4zc2ro/FTL_Hyperspace_%25280.7.1%2529.zip/file
0.7:
https://drive.google.com/file/d/1YwfOZRRkQMaH92E4yEe4ukCOn0iwhLeF/view?usp=sharing
https://www.mediafire.com/file/uwslduyed1ae3o7/FTL_Hyperspace_%25280.7%2529.zip/file
0.6.3:
https://drive.google.com/file/d/1_FHWKntrCZ5xpb3hV2ImSumRbDBEgAQw/view?usp=sharing
https://www.mediafire.com/file/yavva0s46jw9mcp/FTL_Hyperspace_%25280.6.3%2529.zip/file
0.6.2:
https://drive.google.com/file/d/1aAuMr_3nq-D8Jglxt_IoZNCZylYAXM_z/view?usp=sharing
https://www.mediafire.com/file/487u0pfz3yfjy5m/FTL_Hyperspace_%25280.6.2%2529.zip/file
0.6.1:
https://drive.google.com/file/d/13R6zzyt7d9aTEc84TTA86DK03vEddTM6/view?usp=sharing
https://www.mediafire.com/file/wsh7jhi7z9myk6v/FTL_Hyperspace_%25280.6.1%2529.zip/file
0.6:
https://drive.google.com/file/d/1eROAEC_WouOeD5hCeTRbQutaGoCtiqS_/view?usp=sharing
https://www.mediafire.com/file/0j52rlt84eb61n2/FTL_Hyperspace_%25280.6%2529.zip/file
0.5.6:
https://drive.google.com/file/d/11UtdvicjGqSIqFHJ1vV-RInEm8cWbHdN/view?usp=sharing
http://www.mediafire.com/file/pqcm3h384eu1gl6/FTL_Hyperspace_%25280.5.6%2529.zip/file
0.5.5:
https://drive.google.com/file/d/1eMcCMZ8k9t0UB_11axRQrUh1Lx0tN-wR/view?usp=sharing
http://www.mediafire.com/file/vkpn97rpyi45gzb/FTL_Hyperspace_%25280.5.5%2529.zip/file
0.5.4:
https://drive.google.com/file/d/1mBhctLm4iBb-pnZclsHOVd-e-HSgIBpW/view?usp=sharing
http://www.mediafire.com/file/hjwzibw8vkuinql/FTL_Hyperspace_%25280.5.4%2529.zip/file
0.5.3:
https://drive.google.com/file/d/1JVefqnUIJ-0XQvCWJZ4OlS47g4zIFFYM/view?usp=sharing
http://www.mediafire.com/file/4xryq13oju52lo8/file
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

Updating

Simply replace the Hyperspace.dll with the new one in your FTL installation directory and patch the new Hyperspace.ftl if necessary.
Patching Hyperspace.ftl is not needed for Multiverse but updating the Hyperspace.dll is crucial.

Windows

See our full step-by-step Windows install guide here

Linux & Steam Deck
DO NOT downgrade Linux FTL, you must have 1.6.13 (Steam) or 1.6.12 (GoG/Humble)
Other versions are Windows only and you'll need the WINE instructions below and will have to downgrade to 1.6.9.

See our full step-by-step Linux & Steam Deck install guide here

More linux help is available on the MV Discord and ping Mr. Doom if you're stuck or ask in questions and other people might have help for you.

Linux - Windows only versions with WINE
If your copy is from GoG, Steam, or Humble do not use this method, use native 64-bit above

You'll need WINE installed, and if you plan to run Mutliverse your GPU may also need Vulkan support.

Download the Windows version of FTL by running your launcher (Epic, Origin or Game Pass) 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 with WINE
- 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

Launch FTL from the command line as such:

Code: Select all

WINEDLLOVERRIDES="xinput1_4=n,b;Hyperspace.dll=n,b" wine ./FTLGame.exe

(If using versions before 1.5.0 you must include `-opengl` at the end of the command line after FTLGame.exe, 1.5.0 and higher detect when running under WINE for you)

You could also create a script that has this.

Specifically for Multiverse: (WINE only)
If you encounter crashes (not a hang but the game just straight up closes) while the MV loading bar is loading you are probably running into this graphics issue: (You will 100% have this problem with Nvidia GPUs)
1. For AMD & Intel GPUs: Make sure Mesa is up to date and tweak your starting command to:

Code: Select all

MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink WINEDLLOVERRIDES="xinput1_4=n,b;Hyperspace.dll=n,b" wine ./FTLGame.exe

2. For Nvidia GPUs, you'll need to install a relatively new version of Mesa and you can try to force Nvidia to use Zink, change your starting command to:

Code: Select all

__GLX_VENDOR_LIBRARY_NAME=mesa MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink WINEDLLOVERRIDES="xinput1_4=n,b;Hyperspace.dll=n,b" wine ./FTLGame.exe

3. For users with two GPUs such as an integrated AMD or Intel GPU in their CPU and a separate NVidia GPU you'll probably have to force FTL to launch on just one GPU with prime-run or DRI_PRIME=1.

More linux help is available on the MV Discord and go check out #hyperspace-linux-information

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

 
See changelogs/hyperspace.xml for more additions.

- 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
  > High scores for custom ships are now saved!
  > Custom ships can also have their own unlocks

- 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 stores
- 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
Winderps
ih8ih8sn0w
Admiral Billy
laszlogasd
mathchamp93
Mr. Doom
ChronoVortex
Pepson
And other contributors! See Github for the full list.

Art:
SaltyFriedRice

Unofficial Translations:
Korean - H2O & nedsociety

Special Thanks

_Kilburn
slow (slowriderxcorps)
Masala
bamalf
Puffias Leroy McBillington III (KingdomKrafters/Kix)
BlizzArchonJ (mr_easy_money)
Paradigm
FTL Multiverse Team

Previews

Custom Ship Selector
Custom Races
Seeds
Last edited by TheSwiftTiger on Fri Nov 01, 2024 6:55 pm, edited 74 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: 68
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: 13
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: 13
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: 13
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

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.