
You are viewing a potentially older version of this package. View Latest Version
AutoConsoleCommands
This code automatically executes a custom list of console commands in Valheim every time you enter a world, so you don’t have to type them manually.AutoConsoleCommands by Pille
AutoConsoleCommands is a Valheim mod (BepInEx plugin) that automatically runs a user-defined list of in-game console commands whenever you enter (or re-enter) a world. This is especially useful if you regularly enable certain cheats or other console commands without having to type them manually each time.
How It Works
Define a comma-separated list of commands (e.g., god, debugmode) in the plugin’s config file.
Simply edit the AutoConsoleCommands.cfg file in your BepInEx config folder to add or remove commands.
Triggers on world join: Detects when you spawn into a world and executes your commands right away.
Commands only run once per spawn, so you won’t see repeated commands unless you disconnect/reconnect or respawn with a fresh player entity.
Installation
Place the DLL "~/BepInEx/plugins/AutoConsoleCommands.dll" into BepInEx/plugins within your Valheim install folder.
Run Valheim once. The plugin will create a config file named AutoConsoleCommands.cfg in your BepInEx/config folder.
Configuration
Open BepInEx/config/AutoConsoleCommands.cfg in a text editor and edit the CommandList to your preferred commands. For example:
[General]
Comma-separated list of console commands to run automatically.
Setting type: String
Default value: god, debugmode
CommandList = god, debugmode, heal
Any commands listed here will be executed whenever you join or rejoin a world. Notes
Make sure cheats are enabled in your Valheim game if your commands require them (e.g. devcommands).
If you often switch between singleplayer and multiplayer servers, the commands will run in both contexts.
The plugin uses the Valheim in-engine Console (Console.instance), not System.Console.