Mission Type enumeration

All discussions & material related to Command's Lua interface

Moderators: angster, RoryAndersonCDT, michaelm75au, MOD_Command

Post Reply
jkgarner
Posts: 175
Joined: Thu Apr 30, 2020 12:42 pm

Mission Type enumeration

Post by jkgarner »

I am trying to add a mission through Lua, and am running into issues with not having the correct mission type. Where can I find an enumeration of the valid mission type strings to pass into this function? I did not find it on the help site.

Thanks.
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

RE: Mission Type enumeration

Post by KnightHawk75 »

You can find most of these detailed in the docs under the mission wrapper when you click one of the mission types and then look at the type field.
http://commandlua.github.io/#table_StrikeMission
http://commandlua.github.io/#table_PatrolMission


For the 3rd param class:
STRIKE
PATROL
SUPPORT
FERRY
MINING
MINECLEARING
CARGO

For the subtype where applicable ie {type=}

Patrol:
Sea | SeaControl
Sub | ASW
SEAD
AIR | AAW
NAVAL| SUR_SEA | ASuW_Naval
SUR_LAND | ASuW_Land
SUR_MIXED | MIXED | ASuW_Mixed

STRIKE:
Maritime_Strike | SEA | SUR_SEA | NAVAL
Land_Strike | LAND | SUR_LAND
Sub_Strike | SUB | ASW
Air_Intercept |AIR| AAW

| == can be any of those to get the same result technically, but probably best to stick with the one in the docs.

jkgarner
Posts: 175
Joined: Thu Apr 30, 2020 12:42 pm

RE: Mission Type enumeration

Post by jkgarner »

Are these case sensitive?
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

RE: Mission Type enumeration

Post by KnightHawk75 »

I can't say 100%, I do believe in most cases they are converted to upper before being evaluated though. What I typed is what the actual compare is against post any conversion though. So my guess is for Class it's always converted, for type...it probably is as well and there may be a problem there such that the compares aren't against caps, which is why I avoid using the 4-5 case'd versions. ;)

Post Reply

Return to “Lua Legion”