How to automatically enable cheats?

Sat Jun 03, 2017 4:44 am

According to https://zdoom.org/wiki/CCMDs I should be able to create an autoexec.cfg file like this:

god


And it should auto-enable God mode. But that's not happening (I'm using GZDoom).

So what's the process for automatically enabling cheats?

Thanks

Re: How to automatically enable cheats?

Sat Jun 03, 2017 4:50 am

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.

Since the custom skill method is the easiest, I'll just link this ZDWiki article: https://zdoom.org/wiki/MAPINFO/Skill_definition

Re: How to automatically enable cheats?

Sat Jun 03, 2017 4:51 am

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.

gah ninja'd

Re: How to automatically enable cheats?

Sat Jun 03, 2017 4:57 am

Here's a sample custom skill level that has 'god mode' always enabled:
Code:
skill baby
{
   AutoUseHealth
   AmmoFactor = 2
   DamageFactor = 0.0
   EasyBossBrain
   SpawnFilter = Baby
   PicName = "M_JKILL"
   Name = "$SKILL_BABY"
   Key = "i"
}

Re: How to automatically enable cheats?

Sat Jun 03, 2017 5:48 am

Rachael wrote:Here's a sample custom skill level that has 'god mode' always enabled:
Code:
skill baby
{
   AutoUseHealth
   AmmoFactor = 2
   DamageFactor = 0.0
   EasyBossBrain
   SpawnFilter = Baby
   PicName = "M_JKILL"
   Name = "$SKILL_BABY"
   Key = "i"
}


How do I use this?

Re: How to automatically enable cheats?

Sat Jun 03, 2017 5:53 am

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?

Re: How to automatically enable cheats?

Sat Jun 03, 2017 6:01 am

Lots of good information here.

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.

Re: How to automatically enable cheats?

Sat Jun 03, 2017 6:10 am

Nash wrote:Lots of good information here.

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!

Re: How to automatically enable cheats?

Sat Jun 03, 2017 6:13 am

That's odd. Are you playing some mod that somehow removes the HUD?

Also, try typing

screenblocks 10

to see if you get your HUD back.

Also also, try messing around in the Options -> HUD Options to see if it makes any difference.

Re: How to automatically enable cheats?

Sat Jun 03, 2017 6:22 am

Nash wrote:That's odd. Are you playing some mod that somehow removes the HUD?

Also, try typing

screenblocks 10

to see if you get your HUD back.

Also also, try messing around in the Options -> HUD Options to see if it makes any difference.


screenblocks 10 made the HUD appear, and I was able to confirm that the infinite ammo option works :D

Odd.