FleetCommand API
FleetCommand is the active command payload from a fleet.
Reference
getCommand()Returns the exact StarMadeFleetCommandTypesenum name as aString.getTarget()Attempts to parse command args into a sector target. ReturnsLuaVec3i, ornilwhen no target is present.getArgs()Returns raw command arguments as aString[].
Enum names
These are the enum names present in the current StarMade build used by Logiscript:
Enum name |
Expected args |
Lua access |
Notes |
|---|---|---|---|
|
|
Allowed |
Idle fleet state |
|
|
Allowed |
Move to a target sector |
|
|
Allowed |
Patrol through sector targets |
|
|
Internal-only |
NPC trade system state; rejected by |
|
|
Internal-only |
Active trade system state; rejected by |
|
|
Allowed |
Trade waiting state enum exposed by the client |
|
|
Allowed |
Attack at target sector |
|
|
Allowed |
Defend target sector |
|
|
Allowed |
Escort/formation behavior |
|
|
Allowed |
Repair behavior |
|
|
Allowed |
Standoff combat behavior |
|
|
Allowed |
Formation sentry behavior |
|
|
Allowed |
Sentry behavior |
|
|
Allowed |
Idle formation behavior |
|
|
Allowed |
Recall to carrier |
|
|
Allowed |
Mining behavior |
|
|
Allowed |
Fleet cloaking command |
|
|
Allowed |
Fleet uncloaking command |
|
|
Allowed |
Fleet jamming command |
|
|
Allowed |
Fleet unjamming command |
|
|
Allowed |
Remote activation command |
|
|
Allowed |
Interdiction command |
|
|
Allowed |
Stop interdiction command |
Argument types are the current upstream StarMade command signatures. LuaVec3i and LuaVec3i[] correspond to StarMade’s internal Vector3i and Vector3i[] types.
getCommand() can still return internal-only names when the game places a fleet into one of those states. The restriction only applies to sending commands back through Fleet.setCurrentCommand(...).