Arcade-like respawning on death instead of loading a save

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
Jekyll Grim Payne
 
 
Posts: 1065
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

Arcade-like respawning on death instead of loading a save

Post by Jekyll Grim Payne »

I wonder if there's a way to build the gameplay about the main character dying and respawning at a 'respawn point' with certain consequences (like they get experience points or something else), instead of letting the player load a save. I know that it's probably impossible to block save/loading completely (would be neat, though), but I'd like this respawning mechanic to take place instead of automatically loading a save by pressing 'action'. Is it possible to implement?
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: Arcade-like respawning on death instead of loading a sav

Post by wildweasel »

I've seen a handful of mods implement it in various ways; the one I can think of is Vaecrius' Never Breaking Orbit: http://forum.zdoom.org/viewtopic.php?f=43&t=53548
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: Arcade-like respawning on death instead of loading a sav

Post by Matt »

tl;dr give player a buttload of health (20k should be more than anything that one can expect the player to be able to take in vanilla short of a telefrag) or make them buddha, then in the player's pain state, once certain conditions are met (health below X, etc.) reset their health and give them an insta-use Chaos Device.

(NBO doesn't use the chaos device but instead records the player's position at start and warps them accordingly - makes for a smoother transition with less spaghetti up front to deal with the teleport fog, but does make it potentially buggier on some maps with elaborate transitions)
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Arcade-like respawning on death instead of loading a sav

Post by Enjay »

I don't remember the details but I'm sure I've seen it done by essentially getting the player to start a single player game in multiplayer mode and then somehow activating checkpoints. I think some of Cutmanmike's stuff from years ago did it that way.
TechnoDoomed1
Posts: 89
Joined: Fri Jul 29, 2016 12:36 pm
Location: Spain

Re: Arcade-like respawning on death instead of loading a sav

Post by TechnoDoomed1 »

The Wolf3D TC should have what you want, as it has a life system and when you die the map is restarted after pressing the spacebar. Unfortunately, only the compiled script is in the data as far as I know, so no idea how they managed to do it.
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Arcade-like respawning on death instead of loading a sav

Post by Nash »

MAPINFO AllowRespawn property won't do? You can easily script what happens after death and respawn, in combination with this map property.
User avatar
jpalomo
Posts: 771
Joined: Mon May 17, 2010 9:45 am

Re: Arcade-like respawning on death instead of loading a sav

Post by jpalomo »

Soft permadeath mod by Snarboo. The source is on Github.
User avatar
Mikk-
Posts: 2274
Joined: Tue Jun 30, 2009 1:31 pm
Location: Somewhere off Kanagawa

Re: Arcade-like respawning on death instead of loading a sav

Post by Mikk- »

Nash wrote:MAPINFO AllowRespawn property won't do? You can easily script what happens after death and respawn, in combination with this map property.
Would be ideal, but wouldn't work for gameplay mods unless you redefine every MAPINFO entry for every level. For some reason it doesn't work on DefaultMap (I wonder why...?). It would make my Dark Souls mod much simpler if I could apply it for every map
User avatar
AFADoomer
Posts: 1322
Joined: Tue Jul 15, 2003 4:18 pm
Contact:

Re: Arcade-like respawning on death instead of loading a sav

Post by AFADoomer »

TechnoDoomed1 wrote:The Wolf3D TC should have what you want, as it has a life system and when you die the map is restarted after pressing the spacebar. Unfortunately, only the compiled script is in the data as far as I know, so no idea how they managed to do it.
The ACS source for the Wolf3D TC is available here, but won't help much in this case... The life system is buried in there, but there aren't checkpoints, it just restarts you at the beginning of the level (and restarts the level from scratch, unless you're in multiplayer).
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm
Contact:

Re: Arcade-like respawning on death instead of loading a sav

Post by Arctangent »

Mikk- wrote:For some reason it doesn't work on DefaultMap (I wonder why...?).
It does, it's just that DefaultMap only affects map definitions created after it.
User avatar
Mikk-
Posts: 2274
Joined: Tue Jun 30, 2009 1:31 pm
Location: Somewhere off Kanagawa

Re: Arcade-like respawning on death instead of loading a sav

Post by Mikk- »

Oh right. My mistake. How could I make that work for say, a gameplay mod?
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Arcade-like respawning on death instead of loading a sav

Post by Major Cooke »

sv_singleplayerrespawn. It's been in for a while yet... no one's documented it. Fixed.
User avatar
Beed28
Posts: 598
Joined: Sun Feb 24, 2013 4:07 pm
Location: United Kingdom

Re: Arcade-like respawning on death instead of loading a sav

Post by Beed28 »

Major Cooke wrote:sv_singleplayerrespawn. It's been in for a while yet... no one's documented it. Fixed.
The problem with that is that gameplay mods can't control that... the player has to set it themselves, which isn't the ideal solution.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: Arcade-like respawning on death instead of loading a sav

Post by Matt »

Right now the way player death is handled is so deeply hard-coded that the only reasonable way you can do this without modifying the executable is to set up the illusion of death without actually killing the player.

On that note, ZScript makes it much easier to replicate the view-fall-to-the-floor effect, though I haven't tried getting the player to face whatever last hurt them.
User avatar
Jekyll Grim Payne
 
 
Posts: 1065
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

Re: Arcade-like respawning on death instead of loading a sav

Post by Jekyll Grim Payne »

I'm thinking of using it for a mapset, not a gameplay mod. Think Dark Souls, in essense.
Creating an illusion via Pain state or something sounds really good.
However, there is no way to truly block saving, is there?
Locked

Return to “Editing (Archive)”