INSTALLATION: Use an archive utility such as 7-zip to overwrite Balatro's main.lua with the [given one](#1331694321451139094 message). aml.lua is NOT the loader. See notes.
Main features:
- No modifications* by default: You can use a custom mod menu, or none at all, for example.
- No global pollution: Mod files have an empty global scope by default, except for the library
aml. No global variables define in your mod will pollute other mods or the game code by default. - Modular: Mods can define an
exportstable. Other mods can then useaml.require("library")to access exported functionality. - Advanced dependency resolution: You can specify version ranges for dependencies, and also whether the dependencies must be loaded before this mod. (only affects
preloadandpostloadcall order)
Usage
See [example-mod.lua](#1331694321451139094 message).
preload is called before G:start_up and steam init, while postload is called after.
aml.mods is a list of all mods (will be complete before preload is called). See aml.lua for its format.
*: Except changing the game version text to show you have AML installed.
PS: If you use LuaLS, as VSCode's Lua extension does, you can register the aml.lua as a lua library. This will give some autocomplete for the provided functions.
PPS: This uses the old "replace the balatro file" technique, but just because I haven't had time to look into Lovely yet. You are welcome to port this patch to Lovely, as I suspect it to be pretty easy.
PPPS: "my Byte Patcher mod" is referring to this: https://discord.com/channels/1116389027176787968/1266751398142414928; note that it is not a valid AML mod as it is