How to automatically enable cheats?

Need help running G/Q/ZDoom/ECWolf/Zandronum/3DGE/EDuke32/Raze? Did your computer break? Ask here.

Moderator: GZDoom Developers

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.
Post Reply
daninthemix
Posts: 5
Joined: Sat Jun 03, 2017 4:41 am

How to automatically enable cheats?

Post by daninthemix »

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
User avatar
Rachael
Posts: 13571
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: How to automatically enable cheats?

Post by Rachael »

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
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm
Contact:

Re: How to automatically enable cheats?

Post by Arctangent »

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
User avatar
Rachael
Posts: 13571
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: How to automatically enable cheats?

Post by Rachael »

Here's a sample custom skill level that has 'god mode' always enabled:

Code: Select all

skill baby
{
	AutoUseHealth
	AmmoFactor = 2
	DamageFactor = 0.0
	EasyBossBrain
	SpawnFilter = Baby
	PicName = "M_JKILL"
	Name = "$SKILL_BABY"
	Key = "i"
}
daninthemix
Posts: 5
Joined: Sat Jun 03, 2017 4:41 am

Re: How to automatically enable cheats?

Post by daninthemix »

Rachael wrote:Here's a sample custom skill level that has 'god mode' always enabled:

Code: Select all

skill baby
{
	AutoUseHealth
	AmmoFactor = 2
	DamageFactor = 0.0
	EasyBossBrain
	SpawnFilter = Baby
	PicName = "M_JKILL"
	Name = "$SKILL_BABY"
	Key = "i"
}
How do I use this?
daninthemix
Posts: 5
Joined: Sat Jun 03, 2017 4:41 am

Re: How to automatically enable cheats?

Post by daninthemix »

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?
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: How to automatically enable cheats?

Post by Nash »

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.
daninthemix
Posts: 5
Joined: Sat Jun 03, 2017 4:41 am

Re: How to automatically enable cheats?

Post by daninthemix »

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!
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: How to automatically enable cheats?

Post by Nash »

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.
daninthemix
Posts: 5
Joined: Sat Jun 03, 2017 4:41 am

Re: How to automatically enable cheats?

Post by daninthemix »

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.
Post Reply

Return to “Technical Issues”