Lua Scripting Engine

You forgot Z80! Hardcore coding Z80 without an assembler since 1987!

Silly me. You’re absolutely right. I was doing the same thing on a 6502 during the 2nd half of the 80s.

Still, this thread is about Lua and TC. I stand by the belief that C++ is not required for quality scripts to be written in Lua (or any other scripting language used with TC). I like the idea of a generic API that was used by an additional scripting language addon (with multiple addon options available), but there is a drawback to that idea which I haven’t seen mentioned. Maybe I missed it. I would assume that only 1 scripting engine would be loaded during server startup. As such, suppose a script was written to add something really desired, but it was written in a language that most people didn’t support? I mean, as an example, the admin for a server with 10 Lua scripts spots a single perl/python/ruby/whatever (just not Lua) script that they really want added to their server. What would the solution be, other than simply not using that non-Lua script? It would likely be best to have fixed scripting options so all servers were capable of supporting whatever scripts were released. Sure, that would restrict customization of the server, but anyone using the server is already dealing with that limitation.

I am not saying Lua is the best choice or that I can only work with the server if that was added. I have done both C++ (item scripts) and database scripting (quest-related critters, mostly). I can say from experience that a scripting language addition would be useful for a great many things (mostly world interaction stuff, like special NPCs). Just my unsolicited opinion.

has any decision about this topic been made yet?

Hey, just wondering if any decisions were made here. I come from a C# and PHP background, though I can dabble in C++ somewhat proficiently, and I’m sure I could get better, the main advantage I see at the moment is that the scripting engine would allow really fast debug times without having to recompile. I noticed that people mentioned another way to do this with libraries and I’d be fine with that too.

While I’m new to TC, and this topic is a bit aged. I have worked with C++ in combination with LUA before.

As with any scripting language, it makes prototyping and initial development faster, but debugging/performance might suffer.

With that in mind, how about adding the lua scripting engine in a form (markup, function names etc) that can easily be translated over to c++ code once the script is final.
This way developers can still experiment and create scripts with all the advantages of a scripting language while developing creature/other scripts.

The final implementation will then retain the benefits of native c++.

Hot reloadable C++ code is much superior then a scripting engine, you can work with the objects without any abstraction which makes it easy to keep the scripts up to date with the scripting api. → https://github.com/TrinityCore/TrinityCore/pull/15671

Since the hotswap system implementation on 3.3.5 and 6.x branches by @Naios this discussion can be closed now.