The State of LUA in DDA

I agree with these statements, and they outline the core weakness of our LUA infrastructure. Instead of saying, “what is LUA good at?” then adding support for those things, the approach was “LUA is used for scripting in games, so let’s add it”. As a result, you can do a bunch of essentially random things in LUA, but there is no coherent or comprehensive support for doing things that LUA is good at in LUA. Even worse, since there’s no plan or goal to outline what good LUA support should look like, the only solution to “fixing” LUA integration is externalizing more and more game state, which has a terrible cost/benefit ratio.

This is probably the most complete rationale that I’ve posted, and in broad strokes it’s the same as what you pointed out, there’s nothing wrong with LUA, but the way we’re using it is deeply dysfunctional.

So, to address your question:

I have not, specifically because I don’t know what working LUA integration would even look like. Just piling more mods that use LUA on isn’t going to fix the fundamental problem:

In short, the current LUA support does not make it faster to add things to the game, it doesn’t work. Every line of LUA in the game is backed by 10+ lines of C++ infrastructure, that ratio is unsustainable.

What I would need to see for LUA integration to remain is a convincing argument/plan for:
What LUA is good/essential for.
What bindings are required to enable that functionality.
An outline describing how the amount of c++ and binding code required to make that happen is dwarfed by the increased productivity of using LUA for that task instead of coding it in c++ or json directly.
An argument outlining why JSON plus a judicious amount of C++ can’t do the same thing.

Even with those arguments successfully made, I would still be axing most of the LUA bindings, specifically the ones that are not needed for the use cases identified in the plan. Even if LUA has a good use, we still need to trim the fat, because right now there’s an absurd amount of game state exposed to LUA, and the vast majority of it is unused.

Side note, I’ve become really sceptical that embedding LUA is as productive as people keep claiming. I keep running across things like this where we find out that LoL heavily uses LUA (oh hey they’re super successful, so it must be working), only to have it clarified that it’s now considered 100% tech debt, and that it was a mistake to use it, and that they have a large and very expensive proposal to root LUA out because it’s causing major problems.

1 Like