[TUTORIAL] Lua for beginners


For some time, I’ve been looking for a Lua tutorial more accessible, I’m mean for “very beginners”.
I’ve found this tutorial, it’s brand new, made some days ago.

I have edited a lot of Lua files in the past, but this tutorial will cover basic things and fill in some answers. if anyone have watched it, or have a better option or simply have watched other videos, you can use this thread for it too.

Intro for the series
Tutorial 1
Remaining links you find next to the video you’ll be watching, as usual.

Before going on installing Lua, the version in the Tutorial is different from what the game uses, so I suggest to just stick to the Lua files structure and code. Remember, I’m not the most appropriate to suggest you a script tutorial, but I also haven’t found a similar thread about it. If I’m too far from goal, some of our colleagues here will speak out.


As you said in your post, for those interested, be careful that there is some important differences in how lua4 (which is what HW2/HWRM uses) and lua 5 and beyond (the video) works, especially the way commands are written (and lu4 functionnality is far from lu5+).
Unfortunately, there is very few tutorials available (I’ve personnaly never found any) for the lua4 version :’(

@Bitvenom : do you or any of your colleague have a “bible” for lu4 which you could share with us ? (other than the standard documentation)

Standard documentation for me! Also, looking through how lua was written in C. Also, the fact that I know many, many, many different languages…

Standard documentation you want ? Or that’s what you use ? (same for me, no other choice anyway ^^)

That’s what I use; sorry for the confusion.

no problem, just wanted to be sure ^^

Aha, nope. I’m self taught for all the stuff I do/know - Lua for this project was no difference… I have zero reference.

1 Like

“Bienvenu au club !” as we would say in french ^^ (more or less “welcome to our group of people” ^^)

There’s this: http://www.lua.org/manual/4.0/manual.html

A lot of programming languages I know, I taught to myself.

yeah, that’s the “standard” documentation I was referring to :wink:

And same here, self-learning is the way to go ^^