Resurrect: Ability to revive players in coop

Sprites, textures, sounds, code, and other resources belong here. Share and share-alike!
Forum rules
Before posting your Resource, please make sure you can answer YES to any of the following questions:
  • Is the resource ENTIRELY my own work?
  • If no to the previous one, do I have permission from the original author?
  • If no to the previous one, did I put a reasonable amount of work into the resource myself, such that the changes are noticeably different from the source that I could take credit for them?
If you answered no to all three, maybe you should consider taking your stuff somewhere other than the Resources forum.

Consult the Resource/Request Posting Guidelines for more information.

Please don't put requests here! They have their own forum --> here. Thank you!
sylandro
Posts: 33
Joined: Tue Feb 17, 2015 8:49 pm

Resurrect: Ability to revive players in coop

Post by sylandro »

A while back I read a post of someone asking for the ability to revive dead players in coop without respawning: viewtopic.php?f=3&t=51692&start=0. There were some hacky proposals implemented through ACS, but none felt very natural. Through ZScript, I've been able to implement this very quickly without a hassle.

For those who haven't read the original thread, what you get is the following:

- A custom key (defaults to R) that can be used to revive a dead player, if you're standing next to its corpse.
- The cvar resurrect_seconds controls how many seconds it takes to revive a player (defaults to 3).
- The cvar resurrect_life controls the amount of health the player is revived with (defaults to 1).
- A custom menu to modify the above values.
- The mod is universal, should work with any IWAD/PWAD.
- Only works in cooperative mode.
- If you want to fully disable respawning, you should start the game with the sv_norespawn gameplay flag enabled. That way you're forced to load a game if everyone falls.

Image

Requires GZDoom 3.1.0+!

Download:
http://www.mediafire.com/file/jaf551q46 ... urrect.pk3
cmw1986
Posts: 154
Joined: Mon Jan 09, 2012 1:41 pm

Re: Resurrect: Ability to revive players in coop

Post by cmw1986 »

Do they come back as zombies or fully human?.
sylandro
Posts: 33
Joined: Tue Feb 17, 2015 8:49 pm

Re: Resurrect: Ability to revive players in coop

Post by sylandro »

Fully human, with 1 HP (tweakable through the resurrect_life cvar).
cmw1986
Posts: 154
Joined: Mon Jan 09, 2012 1:41 pm

Re: Resurrect: Ability to revive players in coop

Post by cmw1986 »

Okay, just wondering. 8-)
User avatar
Jblade
Posts: 127
Joined: Fri Jun 25, 2010 9:11 am
Location: England
Contact:

Re: Resurrect: Ability to revive players in coop

Post by Jblade »

This is pretty cool, hopefully it gets some good use in servers and stuff.
User avatar
PandaDoomer
Posts: 107
Joined: Sun Apr 12, 2015 9:05 pm
Location: USA

Re: Resurrect: Ability to revive players in coop

Post by PandaDoomer »

cmw1986 wrote:Do they come back as zombies or fully human?.
I think it would be pretty cool if a player not revived in time would turn into a hostile zombieman.
User avatar
camaxide
Posts: 382
Joined: Thu Jun 11, 2015 8:38 am

Re: Resurrect: Ability to revive players in coop

Post by camaxide »

This pk3 is simply amazing.. been using it for hours and hours in Coop already.. :)
This version 2.4 however got activator and activatee mixed up in the text on screen so when player 1 resurrects player 2 it says player 1 is being resurrect by player 2 and vice versa. Is there an easy fix?
I tried going through the code but could not pinpoint where I need to make the change :)
Would be nice with a 2.5 with that solved.
User avatar
Blorgx3
Posts: 1
Joined: Fri Apr 05, 2019 9:04 pm
Graphics Processor: nVidia with Vulkan support

Re: Resurrect: Ability to revive players in coop

Post by Blorgx3 »

Yessssssss, I've been wanting something like this for years!
camaxide wrote:This pk3 is simply amazing.. been using it for hours and hours in Coop already.. :)
This version 2.4 however got activator and activatee mixed up in the text on screen so when player 1 resurrects player 2 it says player 1 is being resurrect by player 2 and vice versa. Is there an easy fix?
I tried going through the code but could not pinpoint where I need to make the change :)
Would be nice with a 2.5 with that solved.
Hey I went ahead and fixed this bug! http://blorgblorgbl.org/doom/Resurrect.pk3
I'm not exactly a zscript maestro but I know enough programming to swap a couple variable names.
User avatar
ZDL_800
Posts: 448
Joined: Wed May 15, 2019 3:06 am

Re: Resurrect: Ability to revive players in coop

Post by ZDL_800 »

Hello.

This mod is brilliant so firstly, thankyou for your epic works here.

We seem to have a slight issue here in coop mode, sometimes when the host revives a player, the host cannot move what so ever, even if you save the COOP game, upon reloading the savepoint, host still cannot move?

Seems to occur at random times, I have increased/reduced the revive time for testing but no luck?

Any help would be greatly appreciated as I cant find any other coop revive mods like this one.

Thanks again.
User avatar
Alcar
Posts: 5
Joined: Mon Feb 08, 2021 12:53 pm

Re: Resurrect: Ability to revive players in coop

Post by Alcar »

Hello,

Long time ago, I worked on an ACS script that allows players to resurrect others in coop, but it is only recently that I decided to finish this work. You can find the script here:
https://gitlab.com/AlcarKerlomesy/doom-resurrect-acs

It seems to work perfectly fine on GZDoom and the light version should also work on Zandronum (and other source ports that support ACS scripts). It should also work with any mod (tested it with project brutality).

You have to allow the players to respawn (sv_norespawn disabled) because you have to respawn if you want to be resurrected. The important console variable are "cv_resurrect_health" and "cv_resurrect_seconds". The only difference with the light version is the ability to change those console variables in the option menu (gameplay options -> cooperative settings).

On a side note, I took the sprite of the arrow from a map, but I forgot which one (sorry about that). The only thing that I remember is that this arrow was used to indicate the wall where a bomb has to be placed.

If someone writes a more detailed description of my work along with a small review, I would be very very happy. The work of sylandro, with the modification from Blorgx3, is also very good, so don't hesitate to try both solutions (ZScript-based and ACS script-based).
User avatar
Colerx
Posts: 175
Joined: Thu Feb 11, 2021 6:16 am

Re: Resurrect: Ability to revive players in coop

Post by Colerx »

Thanks guys for these great pk3s I needed those!
I just tried in Hexen + some mods on gzdoom 0.4.5. The one by sylandro works good! but unfortunately doesn't have the arrows marker the one by Alcar has instead, wich I like a lot.
In the one by Alcar I think there's a bug, once died if pressing "use" button and then got revived when it resurrects it gots bugged, like invisible player and sometimes is seeing everything black.. if not pressing use button while dead seems working well but unfortunately the coop mate can't see what's going on around his corpse.
Are you still working on that Alcar?

Great job to both of you
User avatar
Alcar
Posts: 5
Joined: Mon Feb 08, 2021 12:53 pm

Re: Resurrect: Ability to revive players in coop

Post by Alcar »

Colerx wrote:Thanks guys for these great pk3s I needed those!
I just tried in Hexen + some mods on gzdoom 0.4.5. The one by sylandro works good! but unfortunately doesn't have the arrows marker the one by Alcar has instead, wich I like a lot.
In the one by Alcar I think there's a bug, once died if pressing "use" button and then got revived when it resurrects it gots bugged, like invisible player and sometimes is seeing everything black.. if not pressing use button while dead seems working well but unfortunately the coop mate can't see what's going on around his corpse.
Are you still working on that Alcar?

Great job to both of you
Hi Colerx,

Sorry that I answer only now (I rarely visit the forum). I also wanted to reply to your PM... but I cannot do that yet since I'm a new user.

About your question: I'm working on it only if I see a way to improve it :) And I just tested it with GZDoom 4.5 (gzdoom 0.4.5 is a bit old ;) ) with hexen and it seems to work perfectly well, so it may be an issue with one of the mods -> can you send me the list of the mods that you used (send me the list by PM. Give the website where I can download it if it is difficult to find)? I expect an interference between the mods (and don't combine the mod from sylandro with mine... you will get some weird stuff going on if you do so).

Normally, you are not revived if you don't press "use": You die, your friend resurrects you -> your screen is black and you cannot move (because you are still dead). On the other hand, (you die, your friend resurrects you, you press use) and (you die, you press use, your friend resurrects you) is 100% equivalent: the program goes through the same line of codes in my ACS script (and you are alive in both cases at the end of the sequence if there is no bug).

Btw, thank you for trying my mod :)

PS: My mod is not very friendly in maps where you can die by falling in a pit... since, if you fall in a pit, you are condemned to stay dead until your friend finish the map :twisted:
User avatar
Colerx
Posts: 175
Joined: Thu Feb 11, 2021 6:16 am

Re: Resurrect: Ability to revive players in coop

Post by Colerx »

Alcar wrote:
Hi Colerx,
And I just tested it with GZDoom 4.5 (gzdoom 0.4.5 is a bit old ;) )
oooops my bad, dunno why on earth I kept swapping that zero... hope devs didn't get offended :lol: Gzdoom is more than complete!!!

Alcar wrote: can you send me the list of the mods that you used (send me the list by PM. Give the website where I can download it if it is difficult to find)?
No problem mate I can do it right here, I used Wrath of Cronos plus Cult of Despair campaign, with and without some hd textures by AndrewMRX and Nash's gore mod. here's my load order:
Spoiler:
Tried also your lite version, clean without textures and gore, and also with vanilla hexen I'm almost sure that pressing "use" before my mate revives me it messes up something and I can't resurrect correctly, I think it tries to respawn at beginning of the level but remains there like in a limbo with black screen.. If I press "use" after he revived me it works!

Probably in Cult of Despair since maps later than the very first one have no 2nd player spawn point I think it messes up something with the script, since it instantly kills players when starting in the same point.. I don't know, sometimes it even can't detect the dead coop mate.


Plus a little request if don't bother, if not being able to resurrect due to circumstances, could you please add a selectable option, while dead, that if pressing "use" it respawns at the beginning of the level or it's too hard to edit?

Thank you very much for your time!
User avatar
Alcar
Posts: 5
Joined: Mon Feb 08, 2021 12:53 pm

Re: Resurrect: Ability to revive players in coop

Post by Alcar »

Thank you from the map and mods. I tried them and it was fun :D

There were several small issues (and your tips helped me to find them) that are now fixed (I hope):
- There were some initialization issues if you come back into a map (which typically happens in Hexen).
- If the button "use" was pressed too early after death, the screen became black.
- Having the whole team being telefragged at the very beginning of the map messed up the script. Now, if the players are killed at the very beginning, they can respawn as usual.
- When the player presses "use" after his death, he respawns and the script applies a few effects on the players (and changes the field of view). In the previous version, the player was still blocking and could be telefragged. This is no more the case.

I have also added a few mods in the "Player_flag" folder:
- "Flag_notelefrag.pk3": the players cannot be telefragged anymore. It is a small cheat for the "Icon of sin" map, but I advise to use it for coop (telefragging your friend is not cool 8-) ). It is also highly recommended for maps such as Cult of Despair in coop :wink: .
- The two others are cheats that you can use when you want to discover a map without getting annoyed by the monsters (they won't block you or they won't attack you)
Spoiler:
Colerx wrote:Plus a little request if don't bother, if not being able to resurrect due to circumstances, could you please add a selectable option, while dead, that if pressing "use" it respawns at the beginning of the level or it's too hard to edit?
About your request, I cannot make it work that way. However, if you still have issues, I can do a minimal version of my script (which is way more safe) where you respawn as usual and, when someone resurrects you, you are teleported to the location of your previous death. So, it would not really be a resurrection but a way to teleport your friends back after they respawn.

As a reminder, you can find all the files there: https://gitlab.com/AlcarKerlomesy/doom-resurrect-acs
Last edited by Alcar on Sat Mar 06, 2021 10:57 am, edited 1 time in total.
User avatar
Colerx
Posts: 175
Joined: Thu Feb 11, 2021 6:16 am

Re: Resurrect: Ability to revive players in coop

Post by Colerx »

^^ hey thank you very much for your fixes, features and explanations, sounds great!
Yes that telefrag fix is useful :D, even if the kind creator of Cult of Despair campaign Exeor told me that being available to include further player startpoints! But will be useful in general!
Alcar wrote:About your request, I cannot make it work that way. However, if you still have issues, I can do a minimal version of my script (which is way more safe) where you respawn as usual and, when someone resurrects you, you are teleported to the location of your previous death. So, it would not really be a resurrection but a way to teleport your friends back after they respawn.
Yeess, I'm actually playing with dear but not very patient people (me not much either :lol: ) so having to load the savegame everytime we both die (quite often :lol:) could be a bit annoying. The penality in this case would be just to recross the map together from the beginning, maybe with partial health I dunno.

but anyway don't worry, I appreciate a lot your work and gonna retry it soon . Many thanks Alcar
Post Reply

Return to “Resources”