syntax = "proto3"; package Api; // // Observation // message ObservationUI { repeated ControlGroup groups = 1; oneof panel { SinglePanel single = 2; MultiPanel multi = 3; CargoPanel cargo = 4; ProductionPanel production = 5; } } message ControlGroup { optional uint32 control_group_index = 1; optional uint32 leader_unit_type = 2; optional uint32 count = 3; } message UnitInfo { optional uint32 unit_type = 1; optional uint32 player_relative = 2; optional int32 health = 3; optional int32 shields = 4; optional int32 energy = 5; optional int32 transport_slots_taken = 6; optional float build_progress = 7; // Range: [0.0, 1.0] optional UnitInfo add_on = 8; optional int32 max_health = 9; optional int32 max_shields = 10; optional int32 max_energy = 11; } message SinglePanel { optional UnitInfo unit = 1; optional int32 attack_upgrade_level = 2; optional int32 armor_upgrade_level = 3; optional int32 shield_upgrade_level = 4; repeated int32 buffs = 5; } message MultiPanel { repeated UnitInfo units = 1; } message CargoPanel { optional UnitInfo unit = 1; repeated UnitInfo passengers = 2; optional int32 slots_available = 3; } message BuildItem { optional uint32 ability_id = 1; optional float build_progress = 2; // Range: [0.0, 1.0] } message ProductionPanel { optional UnitInfo unit = 1; // build_queue ONLY gives information about units that are being produced. // Use production_queue instead to see both units being trained as well as research in the queue. repeated UnitInfo build_queue = 2; repeated BuildItem production_queue = 3; } // // Action // message ActionUI { oneof action { ActionControlGroup control_group = 1; ActionSelectArmy select_army = 2; ActionSelectWarpGates select_warp_gates = 3; ActionSelectLarva select_larva = 4; ActionSelectIdleWorker select_idle_worker = 5; ActionMultiPanel multi_panel = 6; ActionCargoPanelUnload cargo_panel = 7; ActionProductionPanelRemoveFromQueue production_panel = 8; ActionToggleAutocast toggle_autocast = 9; } } message ActionControlGroup { enum ControlGroupAction { ENUM_CONTROL_GROUP_ACTION_UNSET = 0; // PROTO3 COMPAT RECALL = 1; // EQUIVALENT TO NUMBER HOTKEY. REPLACES CURRENT SELECTION WITH CONTROL GROUP. SET = 2; // EQUIVALENT TO CONTROL + NUMBER HOTKEY. SETS CONTROL GROUP TO CURRENT SELECTION. APPEND = 3; // EQUIVALENT TO SHIFT + NUMBER HOTKEY. ADDS CURRENT SELECTION INTO CONTROL GROUP. SET_AND_STEAL = 4; // EQUIVALENT TO CONTROL + ALT + NUMBER HOTKEY. SETS CONTROL GROUP TO CURRENT SELECTION. UNITS ARE REMOVED FROM OTHER CONTROL GROUPS. APPEND_AND_STEAL = 5; // EQUIVALENT TO SHIFT + ALT + NUMBER HOTKEY. ADDS CURRENT SELECTION INTO CONTROL GROUP. UNITS ARE REMOVED FROM OTHER CONTROL GROUPS. } optional ControlGroupAction action = 1; optional uint32 control_group_index = 2; } message ActionSelectArmy { optional bool selection_add = 1; } message ActionSelectWarpGates { optional bool selection_add = 1; } message ActionSelectLarva { } message ActionSelectIdleWorker { enum Type { ENUM_ACTION_SELECT_IDLE_WORKER_TYPE_UNSET = 0; // PROTO3 COMPAT SET = 1; // EQUIVALENT TO CLICK WITH NO MODIFIERS. REPLACES SELECTION WITH SINGLE IDLE WORKER. ADD = 2; // EQUIVALENT TO SHIFT+CLICK. ADDS SINGLE IDLE WORKER TO CURRENT SELECTION. ALL = 3; // EQUIVALENT TO CONTROL+CLICK. SELECTS ALL IDLE WORKERS. ADD_ALL = 4; // EQUIVALENT TO SHIFT+CONTROL+CLICK. ADDS ALL IDLE WORKERS TO CURRENT SELECTION. } optional Type type = 1; } message ActionMultiPanel { enum Type { ENUM_ACTION_MULTI_PANEL_TYPE_UNSET = 0; // PROTO3 COMPAT SINGLE_SELECT = 1; // CLICK ON ICON DESELECT_UNIT = 2; // SHIFT CLICK ON ICON SELECT_ALL_OF_TYPE = 3; // CONTROL CLICK ON ICON. DESELECT_ALL_OF_TYPE = 4; // CONTROL+SHIFT CLICK ON ICON. } optional Type type = 1; optional int32 unit_index = 2; } message ActionCargoPanelUnload { optional int32 unit_index = 1; } message ActionProductionPanelRemoveFromQueue { optional int32 unit_index = 1; } message ActionToggleAutocast { optional int32 ability_id = 1; }