Lua and the Operations Planner and Flight Plans

All discussions & material related to Command's Lua interface

Moderators: angster, RoryAndersonCDT, michaelm75au, MOD_Command

Post Reply
thewood1
Posts: 10280
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

Lua and the Operations Planner and Flight Plans

Post by thewood1 »

Are there lua functions associated with the ops planner or the flight plan editor? I didn't see any in the github docs but didn't remember if any were listed in the release notes. I couldn't find anything or see any discussion on it.
User avatar
blu3s
Posts: 1240
Joined: Fri Jul 08, 2022 9:45 am

Re: Lua and the Operations Planner and Flight Plans

Post by blu3s »

AFAIK the lua that was introduced it was in relation to the new terrain mask type and zones. In tiny release notes I found nothing related to the Operations Planner.
thewood1
Posts: 10280
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

Re: Lua and the Operations Planner and Flight Plans

Post by thewood1 »

Does anyone know if there is a plan to have lua support for ops planner or flight plans?
User avatar
michaelm75au
Posts: 12463
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

Re: Lua and the Operations Planner and Flight Plans

Post by michaelm75au »

It is on my list. Just need to figure out what exactly is needed.

There are already some Lua properties present in game which have yet to be documented.
Michael
thewood1
Posts: 10280
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

Re: Lua and the Operations Planner and Flight Plans

Post by thewood1 »

One of the key things is manipulating the phase. Being able to force a mission from satisfied back to another phase is something I would like to do. The other one is being able to adjust priorities.
thewood1
Posts: 10280
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

Re: Lua and the Operations Planner and Flight Plans

Post by thewood1 »

Is there any news on this topic?
User avatar
blu3s
Posts: 1240
Joined: Fri Jul 08, 2022 9:45 am

Re: Lua and the Operations Planner and Flight Plans

Post by blu3s »

Next update will have the possibility to edit some elements of the flight planner via lua
thewood1
Posts: 10280
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

Re: Lua and the Operations Planner and Flight Plans

Post by thewood1 »

Is there an update on this?
User avatar
blu3s
Posts: 1240
Joined: Fri Jul 08, 2022 9:45 am

Re: Lua and the Operations Planner and Flight Plans

Post by blu3s »

There's no official documentation yet since it's a work in progress but let me share some code here to illustrate how to access the flight plan of a mission:

Code: Select all


local mission = ScenEdit_GetMission('BLUE','STRIKE')
--List of flights
local flights = mission.flightlist
print(flights)
--1st Flight Course Table
local flight_1 = mission.flightlist[1]
print(flight_1.course)

You can change some of the WPs fields (latitude, longitude...) but I have not tested it in depth.

Time on target/station was also added to the mission wrapper, atm it only works for strike missions since for patrol you need to chek also the "Use Flightplans" settings.

I have submitted a ticket to link the introducion of a ToS to a Patrol/Support mission to automatically checks the "Use Flightplans", when this is implemented ToS through lua will work for all the missions.

Image
thewood1
Posts: 10280
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

Re: Lua and the Operations Planner and Flight Plans

Post by thewood1 »

Thanks. Just getting back to this and will play around with it.
Post Reply

Return to “Lua Legion”