Skip to main content

Extra Console Commands

When you enable this feature, many custom commands will be added to the in-game console. See the dedicated command list for more information about them.

Note that in order to avoid conflicts, if two or more mods enable this feature, then the first loaded one will control all of the command logic. When this occurs, a global variable of __ISAACSCRIPT_COMMON_EXTRA_CONSOLE_COMMANDS_FEATURE will be created and will automatically be used by the non-main instances. For this reason, if you use multiple mods with isaacscript-common and a custom command from the standard library is not working properly, then you might need to get another mod author to update their version of isaacscript-common.

Hierarchy

  • Feature

    ExtraConsoleCommands

Methods

addConsoleCommand

addConsoleCommand(commandName, commandFunction): void

Helper function to add a custom console command.

The standard library comes with many existing console commands that are useful for debugging, but you can also add your own commands that are useful for your particular mod. It's easier to add commands to the existing command system than to add your own logic manually to the EXECUTE_CMD callback.

This function is intended to be called when your mod is first loading.

In order to use this function, you must upgrade your mod with ISCFeature.EXTRA_CONSOLE_COMMANDS.

Parameters

NameType
commandNamestring
commandFunction(params: string) => void

Returns

void

Defined in

packages/isaacscript-common/src/classes/features/other/ExtraConsoleCommands.ts:257


removeConsoleCommand

removeConsoleCommand(commandName): void

Helper function to remove a custom console command.

The standard library comes with many existing console commands that are useful for debugging. If you want to disable one of them, use this function.

This function is intended to be called when your mod is first loading.

In order to use this function, you must upgrade your mod with ISCFeature.EXTRA_CONSOLE_COMMANDS.

Parameters

NameType
commandNamestring

Returns

void

Defined in

packages/isaacscript-common/src/classes/features/other/ExtraConsoleCommands.ts:304


removeAllConsoleCommands

removeAllConsoleCommands(): void

Helper function to remove all custom console commands.

The standard library comes with many existing console commands that are useful for debugging. If you want to disable all of them after this feature has already been initialized, use this function.

In order to use this function, you must upgrade your mod with ISCFeature.EXTRA_CONSOLE_COMMANDS.

Returns

void

Defined in

packages/isaacscript-common/src/classes/features/other/ExtraConsoleCommands.ts:338