An open API service indexing awesome lists of open source software.

https://github.com/korewachino/balatro-osagnostic

Bypass OS Checks in Balatro, Enable Steam API integration!
https://github.com/korewachino/balatro-osagnostic

Last synced: 2 months ago
JSON representation

Bypass OS Checks in Balatro, Enable Steam API integration!

Awesome Lists containing this project

README

        

# Balatro-OSAgnostic

> [!NOTE]
> The changes this mod makes has already been mainlined in SMODS, you do not need to install the mod if you'd like to play on Linux.
>
> Simply follow the [Installation Guide](#installation) but skip step 4.

This simple Lovely mod simply bypasses the OS check in Balatro, allowing Steamworks API integration in the game while running natively on Linux

This mod also enables some extra patches not available in the Steamodded patches, such as:

- Removing Windows-specific check in `globals.lua` to replicate Windows behavior on Linux (i.e Discord and Twitter integration)
- Optional Mobile UI scaling (See `lovely.toml`)

## Installation

1. Install Lovely Injector and LOVE (For now, you'll need to build the latest version of LOVE from source from [this tree](https://github.com/ethangreen-dev/lovely-injector/tree/master/crates/lovely-unix), copy `liblovely.so` into the same directory as `Balatro.exe`

2. Download [luasteam](https://github.com/uspgamedev/luasteam) and the [Steamworks SDK](https://partner.steamgames.com/downloads/steamworks_sdk.zip)

3. Copy `linux64_luasteam.so` into `luasteam.so`, and `sdk/redistributable_bin/linux64/libsteam_api.so` from the Steamworks SDK into the same directory as `Balatro.exe`

4. Clone this repository into the Lovely Injector mods directory

```bash
cd ~/.config/love/Mods
git clone https://github.com/korewaChino/Balatro-OSAgnostic.git
```

5. Run Balatro with Lovely Injector, make sure to also set `LD_LIBRARY_PATH` to the directory containing `libsteam_api.so` and `luasteam.so` (The game directory). In this example we'll just `cd` to the game directory and run the game

```bash
cd /path/to/Balatro
LD_LIBRARY_PATH=. LD_PRELOAD=liblovely.so love Balatro.exe
```

6. Enjoy Balatro natively on Linux! Now with achievements.

## Notes

Cloud saves will probably not work, as they rely on the Steam app manifest to determine the save directory. You can manually symlink the save directory to the Steam cloud save directory if you want to use cloud saves.

Steamodded should also handle the OS-agnostic changes out of the box if need be (as of ), so you may skip installing this mod and follow the rest of the instructions on how to load
the Steam API libraries.

```bash
ln -sf ~/.steam/steam/steamapps/compatdata/2379780/pfx/drive_c/users/steamuser/AppData/Roaming/Balatro ~/.local/share/love/Balatro
```

For Lovely Injector mods, the directory is different (for now), so you'll need to symlink the mods directory as well

```bash
ln -sf ~/.steam/steam/steamapps/compatdata/2379780/pfx/drive_c/users/steamuser/AppData/Roaming/Balatro/Mods ~/.config/love/Mods
```