Chat Commands Manager
CLI library for Outward chat. Eliminates the need to build a separate UI to execute mod functions by providing an in-chat console.
About this mod Author’s original text
Outward Chat Commands Manager
CLI brought to Outward Chat
Deeper Explanation
CLI stands for Command Line Interface. This mod brings a CLI-like
experience to the in-game chat, allowing you to easily create and use commands
directly in chat.
Commands can be created through the Mods
Communicator without the need to build a custom UI. This provides fast and
convenient access to dynamic mod methods through chat commands.
The Chat Commands Manager includes command history and allows navigation using
the ArrowUp and ArrowDown keys. It also provides several
helper commands and the ability to bind recently used commands to hotkeys.
As a command manager, it allows inspection of all registered commands, including
the original Outward commands. The tool also supports creating cheat commands
and debug-mode–required commands. When cheat commands are used, the current
game session will be marked as unsavable, preventing progress from being
saved.
How to use it
Firstly, install [Mods
Communicator]( After that,
you can publish and subscribe to ChatCommandsManager events.
All events are registered and visible in Mods Communicator’s logging system.
However, it is still recommended to read the event descriptions below and
review the examples.
Built-in Commands
The most important commands are:
/commands, /help, and /history.
These commands provide essential information about available commands and their
usage.
For hotkey control, the following commands are available:
/lockKey and /releaseKey.
Use /help lockKey for detailed information about how to use these
commands.
Events
Publish
Mod Namespace: gymmed.chat_commands_manager_*
Add Command
Event Name: ChatCommandsManager@AddChatCommand
Accepts all command parameters data described in the Command Parameters section.
Example
This example shows a command registered during
ResourcesPrefabManager.Load. This is done for safety in case a soft
dependency is missing. Commands can be added or removed dynamically at any time.
using OutwardModsCommunicator;...
[HarmonyPatch(typeof(ResourcesPrefabManager), nameof(ResourcesPrefabManager.Load))]
public class ResourcesPrefabManager_Load
{
static void Postfix(ResourcesPrefabManager __instance)
{
Dictionary<string, (string, string)> myParameters = new()
{
{
"myParameter",
("parameterDescription", defaultValue)
}
};
Action<Character, Dictionary<string, string>> myFunction = MyCommandFunction;
var payload = new EventPayload
{
// command is a chat message trigger /myCommandName
["command"] = "myCommandName",
["parameters"] = myParameters,
["function"] = myFunction,
["description"] = "Your command description that will be seen through /help myCommandName."
};
EventBus.Publish("gymmed.chat_commands_manager_*", "ChatCommandsManager@AddChatCommand", payload);
}
}
public static void MyCommandFunction(Character characterSender, Dictionary<string, string> arguments)
{
ChatPanel panel = characterSender?.CharacterUI?.ChatPanel;
if(panel == null)
{
Plugin.LogMessage("MySuperFunction Tried to use missing chatPanel.");
return;
}
// send message to chat
panel.ChatMessageReceived("System", "<color=#9900cc>Your command was triggered!</color>");
// parameter value = argument
arguments.TryGetValue("myParameter", out string parameterValue);
if(string.IsNullOrWhiteSpace(parameterValue))
{...Your code when argument is missing.
return;
}...Your code when argument is provided.
}
Remove Command
Event Name: ChatCommandsManager@RemoveChatCommand
Accepts only the following parameter:
"command" — the name of the command to remove.
Example
using OutwardModsCommunicator;...
[HarmonyPatch(typeof(ResourcesPrefabManager), nameof(ResourcesPrefabManager.Load))]
public class ResourcesPrefabManager_Load
{
static void Postfix(ResourcesPrefabManager __instance)
{
var payload = new EventPayload
{
// command is a chat message trigger /myCommandName
["c
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.
Install these first, or the mod will not work: