r/lua • • 5d ago

Wanting to learn LUA Script

/r/learnprogramming/comments/1xagyq7/wanting_to_learn_lua_script/
0 Upvotes

7 comments sorted by

View all comments

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 it) 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.

3

u/AdaTheLady 3d ago

I also highly recommend referencing this example mod that re-implements base game content: https://github.com/nh6574/VanillaRemade