New Console commands

Moderator: GZDoom Developers

User avatar
jacob_jub
Posts: 9
Joined: Tue Jul 28, 2015 1:47 pm

New Console commands

Post by jacob_jub »

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: New Console commands

Post by Graf Zahl »

1. Already in
2. no
User avatar
Xeotroid
Posts: 448
Joined: Sat Jun 23, 2012 7:44 am
Graphics Processor: nVidia with Vulkan support
Location: Czech Rep.

Re: New Console commands

Post by Xeotroid »

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.
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.
User avatar
JPL
 
 
Posts: 523
Joined: Mon Apr 09, 2012 12:27 pm
Contact:

Re: New Console commands

Post by JPL »

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.
Consider the "resurrect" command, it raises you back to 100 health after death with all the stuff you had previously.
User avatar
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

Post by Major Cooke »

Unless your body disappears. And if you become frozen, you can still resurrect as long as you haven't shattered.
User avatar
edward850
Posts: 5890
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Re: New Console commands

Post by edward850 »

Major Cooke wrote:Unless your body disappears.
If your body dissappears, there is no longer a game for you to resurrect in. ;)

Also, you forgot skullpopping. Or basically "any body detaching scenario" pretty much sums it up.
User avatar
Xeotroid
Posts: 448
Joined: Sat Jun 23, 2012 7:44 am
Graphics Processor: nVidia with Vulkan support
Location: Czech Rep.

Re: New Console commands

Post by Xeotroid »

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?
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: New Console commands

Post by Xaser »

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).
User avatar
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

Post by phantombeta »

(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?
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: New Console commands

Post by Gez »

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"
User avatar
edward850
Posts: 5890
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Re: New Console commands

Post by edward850 »

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.
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: New Console commands

Post by Xaser »

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. :P
User avatar
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

Post by NeuralStunner »

A respawn cheat, basically? Seems like it could have its uses.
User avatar
edward850
Posts: 5890
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Re: New Console commands

Post by edward850 »

Xaser wrote:Thinking about it, I wonder what it is that makes co-op respawning always work.
Put simply, it's easier to make a new body than it is to reuse an old one. :P
But yes, a respawn cheat makes a lot of sense.
User avatar
Fishytza
Posts: 793
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: They/Them
Contact:

Re: New Console commands

Post by Fishytza »

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

Return to “Closed Feature Suggestions [GZDoom]”