Getting Started

This chapter will guide you how to use more functionalities of Balamod. Such as decompiling and code injection the game.

Balatro is a game that is written in Lua with the LÖVE framework. The game is compressed into a single executable file. Balamod can easily decompile the game or inject code into it.

Note

Sometimes, the game will be updated, and the decompiled files will be outdated. You need to decompile the game again to get the latest files.

Balamod CLI

Balamod CLI is a command-line interface that allows you to interact with the game. You can decompile the game, inject code into it, and more.

Use the following command to see the available commands:

$ ./balamod --help
Usage: balamod [OPTIONS]

Options:
  -x, --inject
  -b, --balatro-path <BALATRO_PATH>
  -c, --compress
  -a, --auto
  -d, --decompile
  -i, --input <INPUT>
  -o, --output <OUTPUT>
  -u, --uninstall
  -h, --help                         Print help
  -V, --version                      Print version

Decompiling

Use the following command to decompile the game, this will generate decompiled folder with the decompiled game lua files:

./balamod -d

Also, you can specify the output folder:

./balamod -d -o output

Injecting

This is useful when you want to pack your modifications back into the game. Use the following command to inject the game:

./balamod -x -i <file_to_injected> -o <file_destination>

The file_to_injected is the path to the file that you want to inject, and the file_destination is where the file originally located in game.

For example, if you want to inject the UI_definitions.lua file, you can use the following command:

./balamod -x -i ./my_decompiled_files/functions/UI_definitions.lua -o functions/UI_definitions.lua

Uninstall

If the mod-loader crashes the game, or any other reason, you want to uninstall the mod-loader.

Uninstall by Balamod CLI

You can use balamod CLI to uninstall and restore the backup of the game.

./balamod -u

Uninstall by Steam

You can also restore the game with Steam by verifying the integrity of the game files.

The steps are:

  1. Open Steam.
  2. Go to the Library.
  3. Right-click on Balatro.
  4. Select Properties.
  5. Go to the Local Files tab.
  6. Click on Verify Integrity of Game Files.