{"id":13635916,"url":"https://github.com/UwUDev/balamod","last_synced_at":"2025-04-19T04:31:44.415Z","repository":{"id":212884857,"uuid":"731795154","full_name":"balamod/balamod","owner":"balamod","description":"Modloader/Injector/Decompiler that supports ingame code injection for Balatro (Linux/Windows/Mac)","archived":false,"fork":false,"pushed_at":"2024-08-21T15:12:37.000Z","size":440,"stargazers_count":94,"open_issues_count":5,"forks_count":19,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-04T07:19:01.823Z","etag":null,"topics":["balamod","balatro","mod","modding","modloader"],"latest_commit_sha":null,"homepage":"https://balamod.github.io","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/balamod.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-14T22:36:28.000Z","updated_at":"2024-10-27T16:04:51.000Z","dependencies_parsed_at":"2024-01-02T17:27:40.886Z","dependency_job_id":"26f126d3-ccf4-4324-8a11-d5d0126849cd","html_url":"https://github.com/balamod/balamod","commit_stats":null,"previous_names":["uwudev/balamod"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balamod%2Fbalamod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balamod%2Fbalamod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balamod%2Fbalamod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balamod%2Fbalamod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/balamod","download_url":"https://codeload.github.com/balamod/balamod/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223790507,"owners_count":17203355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["balamod","balatro","mod","modding","modloader"],"created_at":"2024-08-02T00:00:54.080Z","updated_at":"2024-11-09T05:31:07.921Z","avatar_url":"https://github.com/balamod.png","language":"Rust","readme":"# Balamod\n\nMod loader, Injector and Decompiler that supports **in-game code injection for Balatro**\n\n[![Balamod Discord](https://discordapp.com/api/guilds/1185706070656688128/widget.png?style=banner2)](https://discord.gg/p7DeW7pSzA)\n\n# Summary\n- [Balamod](#balamod)\n- [Summary](#summary)\n- [Easy Install](#easy-install)\n\n- [How to Install Mods](#how-to-install-mods)\n- [CLI Usage](#cli-usage)\n  - [Example of usages](#example-of-usages)\n- [Modding](#modding)\n  - [How to Use Code Injection](#how-to-use-code-injection)\n  - [How to find the function names, where to inject code, etc...](#how-to-find-the-function-names-where-to-inject-code-etc)\n\n# Easy Install\n\u003e [!IMPORTANT]\n\u003e **Balamod** currently don't work on macOS i86, but it will work on ARM64 aka M1/M2/M3.\n\nBalamod has now a [GUI installer](https://github.com/balamod/balamod-gui/releases/latest)\n\n## How to Install Mods\n\nYon can directly install mods from the in game mod menu or just put your mods in the `mods` folder\n- **Windows**: `C:\\Users\\\u003cusername\u003e\\AppData\\Roaming\\Balatro` aka `%APPDATA%\\Balatro`\n- **macOS**: `~/Library/Application Support/Balatro`\n- **Linux**: `~/.local/share/Steam/steamapps/compatdata/2379780/pfx/drive_c/users/steamuser/AppData/Roaming/Balatro`\n\n## CLI Usage\n\nInitially, Balamod searches for all Balatro installations.\nIf a single installation is found, it becomes the default.\nFor multiple installations, a prompt will allow you to select one.\nIn case no installation is detected, you will be prompted to specify one using the `-b` flag.\n\n\u003e [!WARNING]\n\u003e Since balamod is now fully external, the usage of -x should not be used anymore.\n\n### Example of usages\n- Basic Help\n\n    ```bash\n    ./balamod --help\n    ```\n- Full Auto-Injection of the Mod Loader\n\n    ```bash\n    ./balamod -a\n    ```\n- Injecting a File into the Game\n\n    ```bash\n    ./balamod -x -i \u003cfile\u003e -o \u003cgame_file_name\u003e\n    ```\n- Example to patch an asset file\n\n    ```bash\n    ./balamod -x -i balatro.png -o ressources/textures/x2/balatro.png\n    ```\n- Decompiling the game\n\n    ```bash\n    ./balamod -d\n    ```\n  or to decompile it into multiple folders,\n    ```bash\n    ./balamod -d -o MyCustomFolder\n    ```\n\nIf you want to inject game code, you will need to compress it with -c\nExample to inject a Lua file:\n```bash\n./balamod -x -c -i Balatro.lua -o DAT1.jkr\n```\n\n## Modding\n\nDocumentation moved to [balamod.github.io](https://balamod.github.io/modding-basics.html)\n\nFor a complete example see [example-mod](https://github.com/balamod/example-mod) which shows events, api, injection and a github action for release\n\n## How to Use Code Injection\n\nBefore the game starts, Balamod will retrieve all the code and store it in a map where one file equals to one key. It allows Balamod to know the current state of the game code, and to overwrite parts of it already loaded by the engine.\n\nTo use it, you will need 3 elements:\n- The Lua file where you want to inject your code,\n- The function name,\n- The part of the code you want to replace.\n\n\nThe `inject` function takes 4 parameters which are the 3 elements seen above and the new code as 4th parameter. In the mod, it replaces the part that manages the number of cards to be activated very simply like that:\n```lua\nlocal to_replace = 'amount = amount or 1' -- old code\nlocal replacement = 'amount = ' .. planet_multiplicator_strength -- new code\nlocal fun_name = \"level_up_hand\"\nlocal file_name = \"functions/common_events.lua\"\n\ninject(file_name, fun_name, to_replace, replacement)\n```\n\n## How to find the function names, where to inject code, etc...\nYou can use the `./balamod -d` command to decompile the game and take a look at the code.\n","funding_links":[],"categories":["模组加载器"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUwUDev%2Fbalamod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FUwUDev%2Fbalamod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUwUDev%2Fbalamod/lists"}