Is it used for end-users to make custom adjustments?
Not doing games (VFX), but currently working on a little indy software where I lean on Lua a whole lot.
First the user-end adjustment goal is there. Users can invoke things from the UI or script them on the fly or add scripts they wrote to become like a permanent resident accessible through the UI. Shown below with something resembling the Quake console users can bring up with the tilde key and start typing stuff in for the application to do (sorry, UI is still rough and I need to add icons):
Is it used for game developers to speed up creation of game logic (levels, AI, ...)?
This is also there in mine, and it's a HUGE deal for me. I can really do things a lot faster in Lua (maybe 4x faster as a rough estimate), and I use LuaJIT which tends to almost rival C in performance in some cases. Yet I often need C and C++ when I need SIMD and multithreading. Lua makes it possible to do multithreading, but we have to use separate Lua states for it and it gets kind of messy and painful.
There's also an interesting dynamic that goes on between the Lua code and native code. Since I favor doing as much as possible in Lua, my C and C++ code shrinks to just the core API implementation and most performance-critical parts. That reduces build times a whole lot, helping me work faster on the native end too.
It also just has a satisfying organization to me where I'm reserving these native languages for just core and performance-critical areas. It kind of forces a discipline on me where I'm not tempted to optimize things that don't matter. Also when I'm optimizing the things that do matter, vtune ends up showing me more relevant hotspots since there's much less native code involved. Any time used by Lua just shows up in the profiler as a few LuaJIT function calls.
But most of all, I'd say the most valuable reason to favor LuaJIT when possible is
safety. There are no undefined behaviors in Lua. I cannot possibly crash it within the language, only get a scripting error. There's nothing I hate more than tripping over an undefined behavior which only shows up on some random user's machine on a full moon, and while I've developed a lot of safety and testing practices to mitigate those to a minimum when I'm coding natively, the guarantee that comes when using Lua is really, really a nice reassurance.
Basically I'm wondering how deep between plain configuration and
framework logic such scripting usage goes. And how much scripting is
done. A few configuration lines or a considerable amount?
In my case, I use Lua as much as possible. When I first started using Lua about a decade ago, I used it sparingly for just small tasks like configurations, front-end UI stuff.
Now I use it so much that it's almost "pseudo-extended" instead of "embedded". My application feels more like a Lua application calling C library routines rather than a C application doing a handful of tasks in Lua.
Perhaps one of the greatest things to appreciate about Lua is how easy it is to bind functionality from your C or C++ codebase in a way that allows Lua to instantly run and invoke your functions on the fly. It only took me a day even when I first tried Lua to have it calling functions in my codebase, and I was plugging it into a very mature codebase. With LuaJIT, it can call your C functions directly through the FFI with no binding effort whatsoever, and the funniest thing: LuaJIT can call your C functions faster than it can call native Lua functions. The JIT generates the machine instructions on the fly to call your dylib C function in a way that's as cheap as calling it from C itself.
I love Lua and consider it like a natural extension of my C and C++ arm. It gives me those safety and runtime characteristics I lack (especially C with the safety side) in these languages.