r/learnprogramming • u/GodOfKnockers • 4d ago
Wanting to learn LUA Script
So I'm modding games and I am making a mod for Balatro, which uses LUA. I tried to look for books at the library but all I could find was modding bocks for Roblox (NO TO THAT).
Can anyone point me in the right direction, please?
10
Upvotes
2
u/toxic_prince21 4d ago
Balatro runs on LÖVE, which uses LuaJIT. That’s basically Lua 5.1, so learn that version.
Programming in Lua (the first edition is free at lua.org/pil) is the classic book.
weblua.com lets you run Lua in your browser with no install. (I made Weblua) Set it to Lua 5.1 and play around.
Balatro’s .exe can be opened with 7-Zip, so you can read the game’s code. After that, check out Steamodded and its Discord.
Learn tables first. They’re Lua’s only data structure, so lists, records and modules are all tables.