I just ran into this too
From what I can tell, the problem is that Balatro is sensitive to the LUA_CPATH environment variable. When you work with Lua, the value of this variable tells Lua where to look for compiled C modules that can be require-ed in Lua.
One way to do this without affecting your Lua installation is to 1) open a terminal, 2) unset the variable, and 3) run Balatro.exe. For example, with powershell, this would be
Remove-Item Env:LUA_CPATH
cd "C:\Program Files (x86)\Steam\steamapps\common\Balatro"
.\Balatro.exe
But note that you **can't **use the steam launcher nor the start menu and desktop shortcuts. You have to use the terminal each time. This stinks.
You could also:
- prepend the Balatro game directory path to the
LUA_CPATH variable. This variable uses a special syntax where you need to wildcard the DLLs in the format ?.dll and also semicolon-delimit the values.
[System.Environment]::SetEnvironmentVariable('LUA_CPATH', "C:\Program Files (x86)\Steam\steamapps\common\Balatro\?.dll;" + [System.Environment]::GetEnvironmentVariable('LUA_CPATH', 'User'), 'User')
_Make sure to completely restart Steam afterwards (system tray -> right click Steam icon -> "Exit Steam")_
But this stinks too because there's no good reason you'd want to search in this path for other general Lua development.
-
Just delete the LUA_CPATH variable, but now your Lua is broken.
-
Uninstall the lua scoop package, but now you can't use Lua at all.
All of these are unreasonable options. A user may have this variable set for other work on their PC, and Balatro shouldn't take cues on where to find its own stuff from an out-of-band variable value.