-
Notifications
You must be signed in to change notification settings - Fork 20
Custom Commands
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.
-
Ensure the game is not currently running.
-
Install Borderlands Commander if you have not already.
-
Locate the
UserFeedbackfolder insideUserFeedback.zip.
- Copy the
UserFeedbackfolder to your Mods folder (next to the Commander folder, as per Commander's installation instructions).
- You're done! Launch the game, and navigate to
Options > Mods > Commander > Custom Commandsto ensure the configurator is working.
-
Navigate to
Options > Mods > Commander > Custom Commandsto launch the configurator. -
Press 'N' to create a new command.
-
When prompted, enter a nickname for the command, and press 'Enter'.
- When prompted, enter the console command that you would like to run, and press 'Enter'.
- You should now see your new command show up in the list of custom commands.
- Navigate to
Options > Keyboard/Mouse > Modded Key Bindingsto assign a hotkey to your new command.
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 theBinariesfolder. -
py [Python code]to interpret and execute Python script (seepyUsage). -
pyexec [Python filename]to interpret and execute a Python file stored in theModsfolder.
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
unrealsdkmodule are imported (literally:from unrealsdk import *). - The convenience function
PC()is provided. When invoked, it returns the local player'sWillowPlayerController(literally:GetEngine().GamePlayers[0].Actor). - The convenience function
Popup(str)is provided. When invoked, it displays a popup in-game with the provided string.