The main pro is that you can run
lua - I don't think it has caps in the name right ? - from
inside an
Orbiter simulation session, it's a bit the
Inception of programming
The obvious application is of course guidance programs for rockets or autopilots that you can run through a
Console MFD, which also is quite immersive. You can load a pre-written script with a "run" command through that console, or even enter it "live" (say, if you only need one simple thing). You have an example with the ascent guidance program for the default
Space Shuttle Atlantis. It can even display the instructions and their state, which looks cool (and can be handy).
The other way requires to write and compile a
.dll (Dynamic Link Library) plugin, which is a
Microsoft format, correct me if I'm wrong. It really isn't that hard, but for beginners the compiler (
MS Visual Studio) setup itself can be a bit daunting. You can do nearly everything, but a
.dll is quite a closed box and you'll have to recompile it for modifications, which can't be done from
Orbiter inside. There is a way to run
Orbiter through the compiler - aka the debugger - which helps you a bit from going back and forth
Visual Studio and
Orbiter. But still, having to recompile everything to track bugs is... not very handy. There are however ways to go around that "closed" aspect of the
.dll like storing variables into a third-party file (like a
.cfg or
.scn, which is a mere text file with a different extension). Or you can even program an editor with integrated GUI that allows more flexibility (the
Scenario Editor you have in
Orbiter is actually a
.dll plugin). Also there is the graphical stuff which can - I think - only be handled by a
.dll (like panels, virtual cockpits, custom interfaces, even graphic clients...)
Both can be useful, really. Still a lot of devs use
.dll because they are professionals that already have an extensive knowledge of
C++. Maybe people also think
"oh man compiling a .dll looks so pro I'm going to do that !". And - maybe this is the most important point - having a "closed box" can be quite convenient if you don't want people to mess with your own stuff (also solving 'rights' issues in commercial uses - this isn't the case in
Orbiter as you can't sell addons, Martins was very clear from the start, which allows the whole thing to stay 100% free -). You can provide the
source files with your plugin so that other people are able to recompile it but that is totally up to you. Again it can be professional habit not to share your knowledge for free (though the vast majority of addons devs do share their source files). Or it can even be a lack of confidence, I'd personally would fit in that category as I am a pure hobbyist and can think
"oh professionals are going to have a good laugh if they see my very messy way of doing things". You don't have that with
lua.
AFAIK you can't "close" a
lua script in the Orbiter context. I don't know the legal details but
lua is "open source" in mind.
Also until very recently
lua functions were a bit under-documented and its why it is very interesting to see more interest on that side. It can really allow a lot of people to adapt existing things (typically autopilots) to their needs by replacing variables values. You can do that with the
Atlantis sample in a few seconds. Definitively there is a lot of room for tutorials and things like that.
Orbiter has become a huge project and we can't expect Martins to take care of everything, even if he wanted that would probably be impossible. So :thumbup: