Commanding Menu Modding – Arma Reforger
Class Creation
The first step is to create a new class inheriting from SCR_BaseGroupCommand.
From there, it is time to override important methods to give life to the command:
Execute
The Execute() method determines what happens when the command is executed from the menu; it can be AI commanding, but it can actually be anything - an emote, a hint, a Game Master lightning, etc.
CanBeShown
The CanBeShown() method determines when is the command shown in the command menu; for example, a "move" order cannot be issued by a non-leader, a "get in" order cannot be issued without aiming at a vehicle, etc.
The command can be shown, yet be unavailable - see CanBePerformed below.
CanBePerformed
The CanBePerformed() method determines whether or not the command can be executed; for example, an emote cannot be used when in a vehicle, lightning cannot be thrown if not aiming at the terrain, etc.
Example
Config Declaration
Command Declaration
The commands.conf config file is the file that declares the class as a command and holds its various properties, including its string ID, whether or not the command is leader-only, etc.
Now remains adding that command to the commanding menu.
Command Menu Declaration
The commandingMenu.conf config file declares what is present in the actual commanding menu.
The commandingMapMenu.conf config file declares what is present in the map commanding menu.
Commands are referenced simply by their previously declared ID there along with their display text.
That's it! The new command is now added to the desired Command Menu.