|
Post by Variaz on Sept 1, 2006 9:02:26 GMT -5
I know ToME, Vanilla, Zangband and probably some other variants uses Lua for some scripting. Though I was initially hesitant to implement it as well, do you think it would be a worthy addition to the next version of NewAngband? It could be interesting to have some things such as damages formulas moddable! Also, adding lua or similar language scripting is the ONLY way for NewAngband to allow custom classes creation. Simple text files just won't do it, as the abilities can be very complex code-wise. I don't how hard it would be to implement lua. First, I must learn it(doesn't seem too hard though), then I must learn how to implement it. I just want to hear your opinions about whether or not it would be a valuable addition(if only to compete with the other variants! ). Let me know your opinions!
|
|
|
Post by Variaz on Sept 14, 2006 8:50:57 GMT -5
I did some experiments with implementing Lua scripts in NewAngband, and it turned out to be much easier to implement than I thought! I believe I will implement it, as the variant could really benefit from custom scripts for things like formulas, etc... It would also be the only way in NewAngband to allow custom class creation without going through source code compiling. Since I will have to work on the abilities code to make the ability menu more macro-friendly, I thought it was a good time to try to implement lua! Also, since ToME, Zangband and even Vanilla(and perhaps other variants that I haven't tried) uses it, I thought that it could be good to have it too!
I'll start with implementing the easy stuff like the formulas, and if I like it, I may go further!
|
|
|
Post by Variaz on Sept 18, 2006 11:20:30 GMT -5
Heh heh... just added a new, NEAT feature! Monsters attacks and spells can now call scripted functions! This means that attacks and spells from monsters will have the power to do a lot of stuff! Scripting may not be easy for everyone, but since the .lua files do not require any C compilers, you will be able to try it out and experiment with it! What's the next feature? Well, you will soon be able to put scripts on every grids of a town or quest, as well as scripts that are executed when entering the town/quest! All of this will bring a LOT of possibilities for complex events and puzzles, and I think it will add a lot to the game...without the need of hardcoding anything! The next beta will surely include some uses of this feature! Like, an introduction dialog when you enter Jindar for the first time... and perhaps a little quest featuring a scripted monster...
|
|
|
Post by Lipa on Sept 18, 2006 12:54:34 GMT -5
Sounds really interesting. I'm not yet familiar with LUA though (can you direct me somewhere where I can learn more about it?), but your ideas sound excellent!
|
|
|
Post by Variaz on Sept 18, 2006 13:20:36 GMT -5
www.lua.org/manual/5.1/This is the reference manual for lua. Of course, this is only the basic language... But if you want some more examples, Vanilla, Zangband, ToME and possibly some other variants uses it. However, note that NewAngband doesn't implement it the same way that the other variants does, due to it's gameplay being very different... It may better to wait until the next beta is released before starting to code .lua files. But you can familiarize yourself with the language in the meantime. It's a fairly simple language!
|
|
|
Post by Lipa on Sept 18, 2006 13:41:13 GMT -5
Thanks! I'll check it out!
|
|
|
Post by junyortrakr on Sept 19, 2006 10:42:32 GMT -5
I'm not at all familiar with it, but it sounds like a way one could easily create game modules. One could even make pre-made quests for a specific premade character or such. So many possibilities...
|
|
|
Post by Variaz on Sept 19, 2006 11:17:16 GMT -5
Yep! Lots of options here, hence why I'm implementing it! I plan on making melee combat, archery, spellcasting, abilities and probably all those passive bonus calculations modable. Of course, don't expect all of that in the next beta... it will take some time, and then there's the other stuff too! Right now, I'm converting melee combat to lua. Getting some weird errors... The good thing about it though is that changing the lua code does not require recompiling the program, so debugging is quite easier!
|
|
|
Post by Variaz on Sept 23, 2006 12:14:35 GMT -5
YES!!! FINALLY GOT THIS TO WORK!! I have the pleasure to announce that my combat script is now working fine, and in the next beta, the melee combat code will be entirely moddable! This is only a start to script implementation, the other being scriptable cells, and scripts that are run when you enter a town/quest(it's done too! It just needs to be tested...) I'm happy that it works so well!
|
|