Question Creating new vessel using Lua?

EarthMoon

The Earth and the Moon
Joined
Jul 12, 2022
Messages
54
Reaction score
38
Points
18
Location
Germany
Preferred Pronouns
He, His, Him or You, Your, Yours
Is it possible to create a new Orbiter vessel using a Lua MFD (even if it is hacky)? I am asking this because:
1. I cannot create C++ DLLS for Orbiter (I don't know much C++, setting up a new compiler is much pain, trying to compile with a different compiler (gcc/g++) fails (errors are caused inside the Orbiter headers) + building for 32 bit instead of 64 bit causes even more compiler errors) so I would prefer anything that doesn't require building/compiling,
2. Orbiter seems to only provide functions to manipulate (vi:set_globalpos etc.) and delete (oapi.del_vessel) vessels, but none to create them and
3. (Warning: Spoiler!) I need this functionality to create an addon which will be revolutionary for Orbiter (there are already a few addons like this but they unfortunately seem to be outdated/broken)

Big parts of the addon are already finished (in Lua) and everything is now floundering on this one missing Lua function...

I am looking for Orbiter 2016 (160828) solutions (e.g. patching one of the Orbiter .dlls, but I cannot create one nor build the entire Orbiter becuse of point 1 above) rather than things like "OpenOrbiter" or other unofficial versions.
 
Last edited:

Thunder Chicken

Fine Threads since 2008
Donator
Joined
Mar 22, 2008
Messages
4,486
Reaction score
3,394
Points
138
Location
Massachusetts
Is it possible to create a new Orbiter vessel using a Lua MFD (even if it is hacky)? I am asking this because:
1. I cannot create C++ DLLS for Orbiter (I don't know much C++, setting up a new compiler is much pain, trying to compile with a different compiler (gcc/g++) fails (errors are caused inside the Orbiter headers) + building for 32 bit instead of 64 bit causes even more compiler errors) so I would prefer anything that doesn't require building/compiling,
2. Orbiter seems to only provide functions to manipulate (vi:set_globalpos etc.) and delete (oapi.del_vessel) vessels, but none to create them and
3. (Warning: Spoiler!) I need this functionality to create an addon which will be revolutionary for Orbiter (there are already a few addons like this but they unfortunately seem to be outdated/broken)

Big parts of the addon are already finished (in Lua) and everything is now floundering on this one missing Lua function...

I am looking for Orbiter 2016 (160828) solutions (e.g. patching one of the Orbiter .dlls, but I cannot create one nor build the entire Orbiter becuse of point 1 above) rather than things like "OpenOrbiter" or other unofficial versions.
You can now make complete vessel Lua addons, no need to do anything hacky with a Lua MFD script. You will need to use Open Orbiter because a lot of Lua capabilities have been added that are not available in Orbiter 2016.

A lot of the Lua capabilities are documented under the Help button on the Orbiter splash page. For the rest, you probably will want to look through the Lua Scripting pages on this forum.
 
Top