Skip to content

Custom Commands

mopioid edited this page Oct 18, 2023 · 5 revisions

Custom Commands in Borderlands Commander

Borderlands Commander provides you with the ability to assign hotkeys to arbitrary console commands of your choosing. This greatly extends Commander's functionality, allowing you to perform any action that can be coded with the press of a key.

Custom console commands are added to Commander via Options > Mods > Commander > Custom Commands, then assigned hotkeys via Options > Keyboard/Mouse > Modded Key Bindings. However, for this to work, you will need to perform some basic setup.

Initial Setup Instructions

  1. Ensure the game is not currently running.

  2. Install Borderlands Commander if you have not already.

  3. Download apple1417's UserFeedback library.

  4. Locate the UserFeedback folder inside UserFeedback.zip.

UserFeedback.zip
  1. Copy the UserFeedback folder to your Mods folder (next to the Commander folder, as per Commander's installation instructions).
Mods Folder
  1. You're done! Launch the game, and navigate to Options > Mods > Commander > Custom Commands to ensure the configurator is working.
Custom Command Configurator

Usage

Adding custom commands

  1. Navigate to Options > Mods > Commander > Custom Commands to launch the configurator.

  2. Press 'N' to create a new command.

  3. When prompted, enter a nickname for the command, and press 'Enter'.

Configurator Nickname Entry
  1. When prompted, enter the console command that you would like to run, and press 'Enter'.
Configurator Command Entry
  1. You should now see your new command show up in the list of custom commands.
Configurator Completed Command
  1. Navigate to Options > Keyboard/Mouse > Modded Key Bindings to assign a hotkey to your new command.
Modded Key Bindings

What can I put in custom commands?

Start by joining the Discord Server to see commands that others have created!

When adding custom console commands, Borderlands Commander allows you to use effectively anything you would type into the "normal" console. This includes, but is not limited to:

  • Commands beginning with set
  • Multiple commands chained with | characters.
  • exec [filename] to execute series of commands stored in a file the Binaries folder.
  • py [Python code] to interpret and execute Python script (see py Usage).
  • pyexec [Python filename] to interpret and execute a Python file stored in the Mods folder.

py Usage

Borderlands Commander allows you to enter Python code to run via custom console commands by prefixing it with py just as you would in the regular console.

Note that the environment in which your Python code runs is the same one as the actual in-came console (i.e. globals defined via py in the console are accessible in Commander's custom commands, and vice-versa). For convenience, Commander adds a few items to the console namespace:

  • All members of the unrealsdk module are imported (literally: from unrealsdk import *).
  • The convenience function PC() is provided. When invoked, it returns the local player's WillowPlayerController (literally: GetEngine().GamePlayers[0].Actor).
  • The convenience function Popup(str) is provided. When invoked, it displays a popup in-game with the provided string.

Clone this wiki locally