Forum rules Contrary to popular belief, we are not all-knowing-all-seeing magical beings!
If you want help you're going to have to provide lots of info. Like what is your hardware, what is your operating system, what version of GZDoom/LZDoom/whatever you're using, what mods you're loading, how you're loading it, what you've already tried for fixing the problem, and anything else that is even remotely relevant to the problem.
We can't magically figure out what it is if you're going to be vague, and if we feel like you're just wasting our time with guessing games we will act like that's what you're really doing and won't help you.
You can't enable cheats that way. You have to be in a game first, in order to have a cheat.
The only way you can do this is to actually write a mod that enables god mode for you. This can be accomplished in a number of ways - the easiest is probably creating a custom skill setting where your damagefactor is simply 0. The other ways involve a bit of scripting, using either ZScript or ACS to apply the god mode cheat as the player spawns in automatically in a level.
From what I recall, god mode doesn't carry over into new games or loaded games that don't already have it on, unlike in vanilla Doom. However, you can make commands run one after another using ;, so map map01;god should do the trick if you don't mind skipping the title screen.
Or perhaps I can rephrase: how would I enable god mode when playing from the sofa using a controller via Steam Big Picture? Can I at least map the god command to an input?
Assuming the OP's intention is to make activating godmode easier (for convenience reasons), another way is to bind a button to the god command.
bind g god
So they can just press G to activate god mode.
Yet another way, although this requires fumbling with the command line. You can enable the god mode if you also specify the map to warp to when running GZDoom.
gzdoom.exe -skill 3 +map map01 +god
Not exactly answering OP's question directly, but rather some alternative solutions. Others have already answered the question directly, and that is to make a custom skill level patch like what Rachael is showing.
Assuming the OP's intention is to make activating godmode easier (for convenience reasons), another way is to bind a button to the god command.
bind g god
So they can just press G to activate god mode.
This works nicely - thanks. Am just wondering about ammo - there's an infinite ammo in the options, though I have no idea if it works since there's no HUD, and I can't figure out how to turn the HuD on!