Currently in S44:
CMD_UPGRADE = 31140 + number of upgrade defs
CMD_MORPH_STOP = 32210
CMD_MORPH = 31210 + number of morph defs
CMD_PLANES = 34400 + number of sortie defs
CMD_SMOKE = 35520
CMD_TURN = 35521
CMD_CLEARMINES = 35522
CMD_AREAATTACK = 39954
I was thinking of perhaps making some table in GG such that each custom command ID was SOME_BASE_NUMBER + NUMBER_OF_COMMANDS_ALREADY_DEFINED to avoid having to keep track of these, though that then might make it hard to reference them in widgets or whatever, so the table should probably keep track of what they are too. i.e.
local CMD_SMOKE = GG.NextCommandID
GG.Commands["CMD_SMOKE"] = CMD_SMOKE
GG.NextCommandID = GG.NextCommandID + 1
(I don’t fully understand GG and _G and passing stuff to unsynced in this manner)
The alternative is to have a Commands.h.lua which contains them all in one place and is included into each gadget with a custom command.