New Console commands
Moderator: GZDoom Developers
New Console commands
After playing doom for awhile its bugged me that these two commands arnt in Zdoom.
1. Nextlevel : for when you cant find an exit for a level and dont want to use idclev because then you'd lose all of your weapons.
2. Give_Uponload : I.E Give_uponload health so if you accidentally save the moment before you die you can still continue on with the level.
1. Nextlevel : for when you cant find an exit for a level and dont want to use idclev because then you'd lose all of your weapons.
2. Give_Uponload : I.E Give_uponload health so if you accidentally save the moment before you die you can still continue on with the level.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: New Console commands
1. Already in
2. no
2. no
- Xeotroid
- Posts: 448
- Joined: Sat Jun 23, 2012 7:44 am
- Graphics Processor: nVidia with Vulkan support
- Location: Czech Rep.
Re: New Console commands
Use the Changemap command, you keep your weapons that way but you have to specify the map name, eg. "changemap map02" or "changemap e2m8". There is also the Nextmap command, but that resets your inventory which is what you're trying to avoid.jacob_jub wrote:1. Nextlevel : for when you cant find an exit for a level and dont want to use idclev because then you'd lose all of your weapons.
Re: New Console commands
Consider the "resurrect" command, it raises you back to 100 health after death with all the stuff you had previously.jacob_jub wrote: 2. Give_Uponload : I.E Give_uponload health so if you accidentally save the moment before you die you can still continue on with the level.
- Major Cooke
- Posts: 8212
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: New Console commands
Unless your body disappears. And if you become frozen, you can still resurrect as long as you haven't shattered.
Re: New Console commands
If your body dissappears, there is no longer a game for you to resurrect in.Major Cooke wrote:Unless your body disappears.

Also, you forgot skullpopping. Or basically "any body detaching scenario" pretty much sums it up.
- Xeotroid
- Posts: 448
- Joined: Sat Jun 23, 2012 7:44 am
- Graphics Processor: nVidia with Vulkan support
- Location: Czech Rep.
Re: New Console commands
Why is it impossible to resurrect player after he's decapitated / shattered to pieces, anyway? Couldn't you just respawn in place of your decapitated head or head-less body?
Re: New Console commands
Speaking without looking at the guts of the code, the issue is something along the lines of the player's viewpoint being switched to a different actor than the playerpawn itself (which holds the player's inventory, etc). Notice how Hexen players' death frames are on the player actor itself while the head (where the viewpoint goes) is a new actor that gets spawned via A_SkullPop.
Frankly it's an annoying situation I'd love to be rectified somehow, though I'd have to spend time mucking about with the code to see where to start (if it's indeed possible).
Frankly it's an annoying situation I'd love to be rectified somehow, though I'd have to spend time mucking about with the code to see where to start (if it's indeed possible).
- phantombeta
- Posts: 2180
- Joined: Thu May 02, 2013 1:27 am
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: Brazil
Re: New Console commands
(Warning: This might be completely wrong.)
I'd guess it's because respawning (Creating a new player actor AFAIK) the player instead of reusing the existing playerPawn the player is currently in (Which AFAIK is a bad thing because dead playerPawns shouldn't be revived) would be inconsistent...
Maybe make a "respawn" CCMD that respawns the player where his body is while ignoring any DMFlags and not spawning a telefog actor?
I'd guess it's because respawning (Creating a new player actor AFAIK) the player instead of reusing the existing playerPawn the player is currently in (Which AFAIK is a bad thing because dead playerPawns shouldn't be revived) would be inconsistent...
Maybe make a "respawn" CCMD that respawns the player where his body is while ignoring any DMFlags and not spawning a telefog actor?
Re: New Console commands
I could imagine having the detached head get the main body in a pointer (probably master) and then it becomes easy to resurrect the player by checking if the bodyless viewpoint has a valid body pointer.
inb4 "it's going to break mods because someone will have somehow decided to use pointer manipulation on a detached head for ??? purpose"
inb4 "it's going to break mods because someone will have somehow decided to use pointer manipulation on a detached head for ??? purpose"
Re: New Console commands
In this weird competition between Xaser and Major Cook that they never knew they were in, they somehow both win. A draw? How boring.
They player indeed looses everything that made them that player (at a glance, I'm not exactly sure how they keep their inventory, seeing as that's also lost), but they are also no longer a valid playerpawn. Trying to resurrect that would result in some cthulhuian horror.
There's also a bit of a problem with Gez's idea. You can technically be detached and then have your old body removed. In fact I think that's exactly what happens with ice deaths.
Not really sure why you'd want to put in the effort to change this, honestly. The resurrect command is and always will be a kludge command. Reviving the player is always imperfect.
They player indeed looses everything that made them that player (at a glance, I'm not exactly sure how they keep their inventory, seeing as that's also lost), but they are also no longer a valid playerpawn. Trying to resurrect that would result in some cthulhuian horror.
There's also a bit of a problem with Gez's idea. You can technically be detached and then have your old body removed. In fact I think that's exactly what happens with ice deaths.
Not really sure why you'd want to put in the effort to change this, honestly. The resurrect command is and always will be a kludge command. Reviving the player is always imperfect.
Re: New Console commands
Gez's idea wouldn't work in the body-vanishes case, but it'd help for the rest (skullpops in particular). Better than nothing.
Thinking about it, I wonder what it is that makes co-op respawning always work. Plenty o' special coding around that case that is probably rooted pretty deep, but I'm curious if it's possible to bootstrap that to make a less-problematic system. Teleport flashes optional.
Thinking about it, I wonder what it is that makes co-op respawning always work. Plenty o' special coding around that case that is probably rooted pretty deep, but I'm curious if it's possible to bootstrap that to make a less-problematic system. Teleport flashes optional.

- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: New Console commands
A respawn cheat, basically? Seems like it could have its uses.
Re: New Console commands
Put simply, it's easier to make a new body than it is to reuse an old one.Xaser wrote:Thinking about it, I wonder what it is that makes co-op respawning always work.

But yes, a respawn cheat makes a lot of sense.
Re: New Console commands
Would this idea be too troublesome?
APlayerChunk (the detached head) is given a new variable called 'BodyClass'.
A_SkullPop and A_FreezeDeathChunks will store the body's classname (I think that's TypeName, isn't it?) as the APlayerChunk's BodyClass.
When the player calls the resurrect cheat and if the current pawn is a APlayerChunk, check the 'BodyClass' variable. If the class is valid and of type APlayerPawn, spawn the new body, transfer the inventory from the chunk to the new body, attach the body to the player, do whatever else is necessary when giving new bodies to players, and remove the chunk.
APlayerChunk (the detached head) is given a new variable called 'BodyClass'.
A_SkullPop and A_FreezeDeathChunks will store the body's classname (I think that's TypeName, isn't it?) as the APlayerChunk's BodyClass.
When the player calls the resurrect cheat and if the current pawn is a APlayerChunk, check the 'BodyClass' variable. If the class is valid and of type APlayerPawn, spawn the new body, transfer the inventory from the chunk to the new body, attach the body to the player, do whatever else is necessary when giving new bodies to players, and remove the chunk.