Question Writing vessel parameters to scenario file in Lua?

Thunder Chicken

Fine Threads since 2008
Donator
Joined
Mar 22, 2008
Messages
4,367
Reaction score
3,302
Points
138
Location
Massachusetts
Do equivalents to oapiReadScenario_nextline(scn, line) and oapiWriteScenario_int(scn, "status", status) and scenario callback functions exist for Lua in Orbiter 2016 to read and write animation and vessel status and states to the scenario file? I tried "Lua-fying" the Orbiter API equivalents with no luck, and I have not seen any of these features documented anywhere.
 

Perlynator

New member
Joined
Nov 25, 2023
Messages
1
Reaction score
1
Points
1
Location
New York
Exploring the intricacies of writing vessel parameters to a Lua scenario file has been a fascinating journey for me. The process has not only deepened my understanding of Lua scripting but has also ignited my passion for coding. It's like crafting a literary masterpiece where every line of code weaves a unique narrative for the vessel's journey through the scenario. In a way, it mirrors the diversity essay https://essaypro.com/blog/diversity-essay I once wrote, where each element contributed to the richness of the narrative. Just as diversity enriches the human experience, the varied parameters in Lua infuse life into the virtual voyages of coded vessels.
 
Last edited:
  • Wow
Reactions: JMW

Thunder Chicken

Fine Threads since 2008
Donator
Joined
Mar 22, 2008
Messages
4,367
Reaction score
3,302
Points
138
Location
Massachusetts
So it appears that there are some script MFD functions read_status(scn) and write_status(scn), where scn is the handle of the scenario file. But I have no idea how to get the handle of the scenario file, or how to actually enter how to write the MFD status elements to that file using these methods. scn is nil in the simulation, so it isn't automatically opened. I don't see any way to actually use these methods.
 
Top