Console Command Runner is an SFSE plugin that executes user-defined console commands on startup. There’s no need to open the console!
Console Command Runner
Console Command Runner is an SFSE plugin that automatically runs a list of console commands from user defined .toml files.
While the main game has an ini parameter that can be configured to run console commands on startup, there were a few reasons I wanted to develop my own implementation.
- On the user end, having to change the ini file to add at least one new command every mod can be time consuming. Console Command Runner will execute as many commands as an author or collection of authors allows.
- While Console Command Runner currently only allows commands being executed when you reach the main menu, I’d want to add other events in the future, such that a command might be performed on key press or something similar.
- I couldn’t wait to start modifying Starfield! Furthermore, having the game’s “execute command” function internally described allows quick access to a range of additional capabilities that would otherwise require considerably more effort to fully reverse engineer.
When the CK is released, this mod will become somewhat obsolete, but in the meanwhile, I hope it will encourage more people to start modifying Starfield.
Simply drop the mod into the game’s data folder, as you would for any other SFSE plugin.
Now requires Address Library, and will support any game version address library does.
In order to create a Console Command Runner preset, first create a uniquely named .toml file in the Starfield\Data\SFSE\Plugins\ConsoleCommandRunner directory. Any number of .toml files can be read, you are not limited to a single file. This ensure compatibility with other mods.
In this new .toml file you’ll want to create layout that looks like this:
EventType = "DataLoaded"
Commands = ['tgm', 'tcl', 'coc CityNeonEuphorika']
EventType = "OnMenuOpenCloseEvent"
asMenuName = "BSMissionMenu"
abOpening = true
Commands = ['tgm', 'tcl']
The tag “[[Event]]” precedes each unique event. The event type must be defined within the event. If an event includes parameters, they are shown. The firing orders are then listed. Any legal console command should function in this situation. Commands should be separated by commas and encased in apostrophes (quotes will also work for any command that does not take a string parameter, i.e. does not have quotes inside of quotes).
That’s all there is to it!
Valid Event Names
When the game is launched, this function fires when the main menu is first reached. Keep in mind that this is a one-time event, so if you load another save or return to the main menu, commands from this event will not be executed again.
When a legitimate menu is opened or closed, this event is triggered. Includes two parameters: asMenuName, which allows filtering by menu type, and abOpening, which allows filtering by whether or not a menu is open.
Go easy on me this is my first script extender plugin :p