Basic LUA advice
Hi Chaps,
I'm a big fan of playing NS, have played it since ns1.04 all them years ago, I've decided i want to try out LUA programming and have decided to seek advice on how to get started in teaching myself the Language and writing some code to maybe be helpful for NS gamers. I have a few of idea's of my own on how to improve/implement certain aspects of the game which are slightly missed/overlooked.
I've looked on youtube/reading web pages devoted to LUA and have downloaded the Notepad++ program and have thought about starting off by writing a few codes and designing a few mods for World of Warcraft as it seems like a good place to start and teach myself but if anyone, knows of anywhere which helped them it would be greatly appreciated.
Also i thought it would be a good idea after playing games for 10+ years to finally teach myself to do something bit more constructive apart from ripping peoples faces off in NS and other games :)
Anyway, it was just a thought, will be greatly thankful to anyone who gives 2minutes of their time to help a newbie :)
Thanks Again,
Mike Brown.
I'm a big fan of playing NS, have played it since ns1.04 all them years ago, I've decided i want to try out LUA programming and have decided to seek advice on how to get started in teaching myself the Language and writing some code to maybe be helpful for NS gamers. I have a few of idea's of my own on how to improve/implement certain aspects of the game which are slightly missed/overlooked.
I've looked on youtube/reading web pages devoted to LUA and have downloaded the Notepad++ program and have thought about starting off by writing a few codes and designing a few mods for World of Warcraft as it seems like a good place to start and teach myself but if anyone, knows of anywhere which helped them it would be greatly appreciated.
Also i thought it would be a good idea after playing games for 10+ years to finally teach myself to do something bit more constructive apart from ripping peoples faces off in NS and other games :)
Anyway, it was just a thought, will be greatly thankful to anyone who gives 2minutes of their time to help a newbie :)
Thanks Again,
Mike Brown.
Comments
1. The best way to learn programming, is to program.
What I mean is, Learn LUA with ns2 since you are planning on modding ns2. Don't bother with world of warcraft.
2. Learn the good programming practices first, it will be much harder to unlearn bad habits later.
3. Don't rely on learn x in very short amount of time books.
I would estimate it would take at least 100 hours to be a competent programmer of any language.
By competent, I mean is able to understand what you are doing, why you are doing it, and know it's a good way of doing it. By it, I mean programming.
4. Official documentation is often the best place to go for help. So the actual LUA website, wiki, forums etc are great places to go for advice.
5. Try to find video tutorials, theyre great.
I hope that doesn't discourage you at all, but I read it takes 10 000 hours to become a master at something. I assume you aren't going for a master LUA programmer, and even before you reach that 100 hour mark, you will be able to make some decent mods, you just have to understand that it will take time to get good at programming, just like it took time to be able to play ns effectively.
Cya later while I stop being a hypocrite and get back to my homework :D.
Now lets hope someone on this forum actually gives some solid websites and tutorials to go to, because I wouldn't mind learning lua for ns2 modding purposes myself.
- Look at other <i>simple</i> mods, to find out what they did. Compare the original file with a modded file to see what they did, and then try to understand why. (Notepad++ should be able to do this; there are other tools as well).
- Start small. Try to make a very small change and see if it works. Then move on.
- Backup before you change. That way, if you screw it up, you can just restore the file and you're back in business.
- Try out NS2Docs, which shows you most available Lua methods that can be called (and modified). <a href="http://www.unknownworlds.com/ns2/forums/index.php?showtopic=112360" target="_blank">http://www.unknownworlds.com/ns2/forums/in...howtopic=112360</a>
P.S. Remember that while some changes can be made on the client side, others require that the server be changed. Consequently, you will probably have to run your own server to make many changes.
First time I see this advice. Must say that I like it, would probably help ppl learn modding pretty well.
It looks like lua might be a bit easier and more fun to play around with, so far i've found how to change certain values in the balance files but how do you do more interesting stuff like create a new game mode or add something new like a grappling hook for the gorge?
If you know of any good video tutorials to learn lua or get a better understanding of programming in general that would be great, i find its easier to learn by watching than reading most of the time.
If someone (anyone?) would create a kind of walkthrough document/video, where they take us through a lua file(s) in NS2 and look at each component/function, and they demonstrate how that affects/is shown in the NS2 gameworld*, that would really be amazing, and would probably go a long way in explaining how to actually craft new features.
*This should be possible, since I believe NS2 lua files can be changed on the fly and their result displayed in-game immediately.