Resource for Lua

Hey all. I've recently started doing the whole modding thing and I was looking for some places to teach a little more of the ins and outs of Lua.

I'm new to the whole programming thing (Not by choice, I've tried many times and failed to learn, lol) and would love a nice place to start as I really want to get into it. I've found a few sites for learning, but if anyone has any specific ideas or sites, I would love you forever.

Any tips? :)

2,069 views 9 replies
Reply #1 Top

my best advice is pick some small(!!!) mod you want to make then get started!  when you see something confusing pull out trusty ol' google.  If you can't figure out what to google, then goto one of the lua tutorial sites you've found and read enough to understand what question you are wanting to ask.

Reply #2 Top

That's what I'm working on now :)

I hate HP items, so they're first to be popped.

But! I've only hit a few snags, I was just seein if there were any pointers :)

Reply #3 Top

One of the first things to do for any language is find a good editor.  Color coding the different pieces of the language is very helpful. 

Notepad ++ has a text highlighting set for LUA, and someone posted a version of Notepad++ in this forum that handles some of the LUA customizations Gas Powered Games made for thier implimentaiton of LUA.

 

If you are interested in programming outside of LUA modding it may help to pick an easy language to learn and run through a good set of tutorials on that language (Java or Visual Basic).  Once you have the fundamentals of programming jumping between most languages is just a matter of syntax.   With a basic foundation you should be able to recognize functions, loops, and logic statements in any language and do some damage modding :P

Reply #4 Top

I'm recognizing a lot of it. I've worked on C++, Java, HTML, Lua, and Python. I just never stuck with them as I always hit a brick wall for some reason.

I'm waiting till I get a chance to get back to school and take a class (I think a structured course would help a LOT) but with bills, it's hard :(.

The Notepad++ is great, I got that set up yesterday.

I do look forward to doing some damage modding though! :D I got plans, and a good idea on how to do em...just needa figure some more out.

Thanks for the help guys :)

Reply #5 Top

for learning lua modding is not a good start. get the lua sdk with scite. with this you can debug and you get an output in like seconds! you just press run and it runs your program.

Reply #6 Top

But it's not as fun :D

Reply #7 Top

so you rather wait half a minute for the map to reload?

i mean i dont care but believe me: if you want to be really productive and test many things, then half a minute is a loooong time and everytime you have to hit ctrl+f10 it just sucks!

in 30 seconds i have testet 2 more things by changing the code and hitting the run button while youre still stuck at the loading screen. thats not always possible but when it is you really gotta use it...

Reply #8 Top

I'd just rather learn doing something that I really want to do.

Like, nerfing HP items gave me a sick sense of satisfaction. But yeah, loading suxxorz.

Reply #9 Top

I might be missing something, but whenever I've tested the lua code I've written to do things like skin changes, modify demigod abilities, and item changes, I've always had to do the testing in game. I've yet to see a way to do anything but syntax checkingwith the lua editors.

That being said if you are writing complex code (have you see some of the SupCom mods, they are very impressive), syntax and function checking will very important.

Additionally, unless you are planning on making more complex code, understanding what the lua is doing is far more important than understanding the lua language. I believe that a basic understanding of any programming language is sufficient to allow for these sorts of changes.