Is there a way to set god mode on the player on boot based on a cvar or something similar?

Often during dev, I want god mode turned on by default. In Unreal, god mode is a cheat command and not a cvar and so I cannot add it to ConsoleVariables.ini.

Without modifying any code/BP (i.e. with default UE5), is there a debug way to have god mode be turned on when launching the game?

Hello Dbrespawn,

This method for passing console commands through a command-line argument is worth a try. (Assuming you’re not talking about Play in Editor)

You might need to do this in a shortcut to your .exe instead of on the .exe itself.

Summer 2024 Edit: I’ve noticed that the above link is broken, adding this doc as a backup incase the doc linked above never heals.

Indeed I am talking about using PIE (which ConsoleVariables.ini doesn’t support either).

What we’ve ended up settling on is adding a new cvar that uses a FConsoleVariableDelegate::CreateLambda in order to set it. We’re also combining this with the Console Variables Editor plugin to make it a smoother workflow.

1 Like