mons00n 3 Posted January 28, 2015 (edited) SRS(Simple Revive Script)by: Monsoon I'd like to share with everyone a simple revive script that I've been working on for the past few weeks. This project started off as a learning exercise, but blossomed into a mostly functional multiplayer only 'no frills' revive script. It is meant to be light weight, and re-settable mid-mission (per unit). I'm still actively developing it, so any feedback or thoughts would be greatly appreciated. Again this is meant to be a MP-only, COOP based revive script (no AI support!). Features: Ability to revive or drag fallen teammates In order to revive the reviver must have one FAK or a Medikit After being revived, a unit's damage is set to ~0.245 which requires an actual medic to heal to full. The unit's fatigue is also set quite high. Units do not die unless they 'suicide' or their revive timer expires Units with a Medikit revive at a faster rate than others Option to mute TFAR/ACRE radios Option to add markers to the map for fallen units Option to add 3D icons on fallen units within 30m Scroll-wheel action item to reset the entire SRS system on an individual basis JIP support (Mostly...) call for help button when downed does not require CBA Current issues under investigation: units randomly cannot drop a player while dragging - select "Reset SRS" from your action menu if this happens occasionally units will lose the ability to revive/drag units that are already down - this is typically resolved on respawn Download I am using Bitbucket for version control; to download the latest version follow this link and click "Download repository". SRS is heavily inspired and would not be possible without these excellent community scripts: AIS Injury BTC Revive FAR Revive Grimes UPDATES: Jan. 29, 2015: - Switched Debug default to False - prevented SRS execution on dedicated servers. Feb. 2, 2015: - Fixed undefined variable issue when a unit dies - cleaned up some SP/MP log messages - moved ResetSRS action to the lowest priority (bottom of list) - turned SRS debug off by default Feb. 6, 2015: - Added statements to prevent execution on headless clients - hopefully resolved the undefined variable issue! Feb. 26, 2015: - Added a check to only setup the unitVariable when the JIP client is fully initialized Mar. 25, 2015: - Added SRS_requireFAK: this checks for and removes a FAK, if disabled this check is bypassed and no FAKs are removed. - Added SRS_toggleCam: this enables the 3rd person 1st person camera toggle Edited March 25, 2015 by mons00n Share this post Link to post Share on other sites
dr death jm 117 Posted January 29, 2015 wow ... nice... ill be using this Share this post Link to post Share on other sites
Guest Posted January 29, 2015 Release frontpaged on the Armaholic homepage. Simple Revive Script (SRS) 2015-01-29 ================================================ We have also "connected" these pages to your account on Armaholic. This means soon you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have. When you have any questions already feel free to PM or email me! Share this post Link to post Share on other sites
syncie 10 Posted January 29, 2015 Do you keep your gear after revive/suicide? Sorry for asking instead of testing but I tested more revivescripts and all scripts have their pluses and minuses. One of the most important features for me is that you get revived with the gear as it was when you died. So no default gear or the gear where you have started with. f.e: when you die with only 5 bullets left you get revived with only 5 bullets. Share this post Link to post Share on other sites
mons00n 3 Posted January 29, 2015 Do you keep your gear after revive/suicide? Sorry for asking instead of testing but I tested more revivescripts and all scripts have their pluses and minuses. One of the most important features for me is that you get revived with the gear as it was when you died. So no default gear or the gear where you have started with. f.e: when you die with only 5 bullets left you get revived with only 5 bullets. When a unit is revived their inventory is not changed because they never died. If they suicide or their timer runs out however, they will respawn. This script is not designed to handle all of the possible facets of respawn, I leave that up to the mission designer. However, accomplishing what you describe is fairly straight forward - for an example you can take a look at this script of mine which saves your gear locally every second, then when you respawn it puts it all back. Just stick it in your init.sqf so that it executes on all clients and you will be good to go: [] execVM "respawnLoop.sqf"; The only issue with this method is you will lose the current mag you have in your weapons. There is probably a more complicated way to fix that issue, but I haven't had time to dive into nor have I found it a huge problem. The reason this happens is because say you have 2 mags left: one in your gun, and the other in your backpack. When you execute most magazine commands it does not return the magazine currently loaded into your weapon. This means that when you add magazines back, then add an empty weapon, one of your previously unused mags will load into that weapon and you will be short one. I like to think of it as a punishment for dying =) Share this post Link to post Share on other sites
syncie 10 Posted January 29, 2015 I like to think of it as a punishment for dying =) haha, ok fair. I understand you want to keep the script simple but one other option I prefer (but that's how I think about it) is that reviving costs 1 FAK. One from your own inventory or you can take a FAK from the person that you are reviving. When playing coop with friends i see that we are more aware of the amount of fak's we have left. Also strategy changes with less FAK's. But no idea if that makes your/the script less simple ;-) Share this post Link to post Share on other sites
mons00n 3 Posted January 29, 2015 I like to think of it as a punishment for dying =) haha, ok fair.I understand you want to keep the script simple but one other option I prefer (but that's how I think about it) is that reviving costs 1 FAK. One from your own inventory or you can take a FAK from the person that you are reviving. When playing coop with friends i see that we are more aware of the amount of fak's we have left. Also strategy changes with less FAK's. But no idea if that makes your/the script less simple ;-) Ah yes, removing a FAK is on the road map but not a high priority at this point. I forgot to mention that in order to actually revive someone you must have at least 1 FAK, or a Medikit (updated description above). Share this post Link to post Share on other sites
Dariox 10 Posted January 31, 2015 Beautiful script, thank you very much;) I have a bug, when you come revive, the player can no longer run fast. you have a solution? thank you Dario p.s Google translator Share this post Link to post Share on other sites
mons00n 3 Posted January 31, 2015 Beautiful script, thank you very much;)I have a bug, when you come revive, the player can no longer run fast. you have a solution? Hi Dario! This is by design; the revived unit's fatigue is purposely set to a high value and they will need to rest before being able to run fast. Share this post Link to post Share on other sites
deleyt 13 Posted February 3, 2015 Looking good! I already like a lot of the features it has but what I think most of the other script versions are missing and what would make this script unique if added, is a two stage heal-process (BTW: I know some addons have it but not scripted versions). A wounded player (patient): 1) first needs to be stablized to reduce the bleeding (and thus slowing down the timer). This gives the medic time to work on multiple patients. Any player with a FAK (or a FAK taken from the patient) is able to stabilize the patient. 2) can then be healed. Time of process can be varied by the severity of the wounds (lightly wounded, moderate or heavy) added with a random value. A easy parameter would set if all players, only players with a medikit or only medics with a medikit are able to fully heal a patient (like BTC has, so missionmakers can decide who is able to heal) Such a feature will require a lot more teamwork and will put the medic in a more dominant/depending role. If there's a possibility you could/would add this, we will probably add this medic-system to all of our missions. If you want we can do some additional testing for you in a multiplayer environment and report back. Share this post Link to post Share on other sites
Dariox 10 Posted February 4, 2015 hello guys, We have tried in TvT, and revive, sometimes it does not work, does not show the icon on the player. and when he dies an OPFOR, shows an error of undefined variable. any solution? thx Dario google traslate Share this post Link to post Share on other sites
easyeb 137 Posted February 5, 2015 Any way to get it single-playerized? One of the scripts you mentioned in the thanks (BTC Revive) has this great feature where the closest AI to you comes and revives you if you fall. Pretty please? With sugar on top? Share this post Link to post Share on other sites
mons00n 3 Posted February 5, 2015 (edited) Looking good! I already like a lot of the features it has but what I think most of the other script versions are missing and what would make this script unique if added, is a two stage heal-process (BTW: I know some addons have it but not scripted versions).A wounded player (patient): 1) first needs to be stablized to reduce the bleeding (and thus slowing down the timer). This gives the medic time to work on multiple patients. Any player with a FAK (or a FAK taken from the patient) is able to stabilize the patient. 2) can then be healed. Time of process can be varied by the severity of the wounds (lightly wounded, moderate or heavy) added with a random value. A easy parameter would set if all players, only players with a medikit or only medics with a medikit are able to fully heal a patient (like BTC has, so missionmakers can decide who is able to heal) Such a feature will require a lot more teamwork and will put the medic in a more dominant/depending role. If there's a possibility you could/would add this, we will probably add this medic-system to all of our missions. If you want we can do some additional testing for you in a multiplayer environment and report back. I like this idea, but it adds an additional layer of complication that I really didn't want to get into. As of right now the parameter "SRS_medicAdvantage" dictates how much quicker a unit with a Medikit will revive; by default this is set to 0.5, so 50% quicker healing. You can very easily crank this up to say 0.75 (75%) and tinker with "SRS_reviveTime" which dictates how long it takes to revive for non-medic units. But when I get more time I'll revisit the idea and think about how to properly implement it. hello guys, We have tried in TvT, and revive, sometimes it does not work, does not show the icon on the player.and when he dies an OPFOR, shows an error of undefined variable. any solution? Hi Dario, the undefined variable error should be fixed in the latest commit (download latest version and replace in your mission). I was using BIS_fnc_MP to delete the map markers when a unit died, but I forgot that BIS_fnc_MP executes the function on the server as well, which does not have those variables defined. In regards to it sometimes not working - could you provide a little more detail on what happened? Thanks for the feedback! Any way to get it single-playerized?One of the scripts you mentioned in the thanks (BTC Revive) has this great feature where the closest AI to you comes and revives you if you fall. Pretty please? With sugar on top? haha I'm sorry EasyEB, I really don't want to deal with AI FSMs and further clutter up the script. I would highly recommend you check out AIS Injury as it does precisely this. Edited February 5, 2015 by mons00n Share this post Link to post Share on other sites
Dariox 10 Posted February 6, 2015 simply, it does not appear any AddAction. and even the icon on the dead. where is latest version ? thx dario Share this post Link to post Share on other sites
mons00n 3 Posted February 6, 2015 simply, it does not appear any AddAction. and even the icon on the dead.where is latest version ? thx dario You'll want to download it from bitbucket as I described in my original post: Download I am using Bitbucket for version control; to download the latest version follow this link and click "Download repository". Share this post Link to post Share on other sites
Drongo69 117 Posted February 9, 2015 Hi Monsoon, thanks for this script. I'll be trying it in coop tomorrow. One question, how do I detect if all players are in a downed/unconscious state? I want to end the mission in such a case. Share this post Link to post Share on other sites
mons00n 3 Posted February 9, 2015 Hi Monsoon, thanks for this script. I'll be trying it in coop tomorrow.One question, how do I detect if all players are in a downed/unconscious state? I want to end the mission in such a case. Hey Drogo! The most reliable way to do this right now is to check if a unit is captive and alive. You could check the internal SRS unit variables, but I don't think they are stored on the server but rather on each individual client. So try executing something like this on the server: _allDead = False; while{!_allDead} do{ _players = if(isMultiplayer) then{ playableUnits } else{ switchableUnits }; _nDead = 0; { if(alive _x && captive _x) then{ _nDead = _nDead + 1; }; }forEach _players; //this will be true when all players are dead as well //since playableUnits returns an empty array when all are dead. if(_nDead == count _players) then{ _allDead = True; }; sleep 1; }; //put end mission stuff here Share this post Link to post Share on other sites
Drongo69 117 Posted February 11, 2015 My group used this in coop tonight and it worked very well. One thing I would love to see though would be an alternative to the action menu. For example, a dedicated key that presents you with a simple menu of the options when pressed near a downed player. Maybe this goes beyond your idea for a "simple" revive script, but it would be a great alternative to the scroll menu (can't believe we are still battling against that thing in 2015). At one point I ended up placing a satchel under a downed squadmate with a misclick. Alternatively a hotkey for revive and a hotkey for drag. Anyway, thanks for this script. Share this post Link to post Share on other sites
maquez 141 Posted February 11, 2015 how to disable the fatigue applied after revive ? :mad: Share this post Link to post Share on other sites
Imperator[TFD] 444 Posted February 12, 2015 G'day Monsoon. I currently use Farooq's revive in my coop hardcore missions however that is no longer supported and I'm looking around for revive scripts. As your work is still currently WIP do you have any plans to implement the following? 1: FAKs to stablise patient and halt/slow bleedout clock 2: Definable parameter to allow medic only revive 3: Consumption of FAK upon use 4: Loading of wounded into vehicles I like the applied high fatigue level after revive and think that adds an extra challenge to the wounded player. Share this post Link to post Share on other sites
Drongo69 117 Posted February 12, 2015 how to disable the fatigue applied after revive ? :mad: I haven't tested it, but I assume it is the line _unit setFatigue (0.7 + random 0.3); in SRS\Functions\fn_wakeUp.sqf. Share this post Link to post Share on other sites
mons00n 3 Posted February 13, 2015 My group used this in coop tonight and it worked very well. That's great to hear! Appreciate the feedback. One thing I would love to see though would be an alternative to the action menu. For example, a dedicated key that presents you with a simple menu of the options when pressed near a downed player. Maybe this goes beyond your idea for a "simple" revive script, but it would be a great alternative to the scroll menu (can't believe we are still battling against that thing in 2015). At one point I ended up placing a satchel under a downed squadmate with a misclick. Alternatively a hotkey for revive and a hotkey for drag. Anyway, thanks for this script. I agree that the action menu system is pretty horrific. I know they have a better solution on their road map, so let's hope they can come up with something clever. In regards to the dedicated keys I worry about conflicting with other mods and the such, but I'll take a look into it. how to disable the fatigue applied after revive ? :mad: Hi Maquez, I just implemented a variable to disable this in the latest version. Just set SRS_reviveFatigue = False; in the fn_init.sqf script. G'day Monsoon.I currently use Farooq's revive in my coop hardcore missions however that is no longer supported and I'm looking around for revive scripts. As your work is still currently WIP do you have any plans to implement the following? 1: FAKs to stablise patient and halt/slow bleedout clock 2: Definable parameter to allow medic only revive 3: Consumption of FAK upon use 4: Loading of wounded into vehicles I like the applied high fatigue level after revive and think that adds an extra challenge to the wounded player. 1) this is on my radar, but a low priority at the moment 2) Just updated the code to account for this, set SRS_medicsOnly = True; and only people with a Medikit should be able to revive. 3) I just implemented this in the latest commit. Should take a FAK away from the injured player first, if one is not present then it will remove one from the healer. 4) I do not have plans of implementing this, sorry =/ Share this post Link to post Share on other sites
Sausage 10 Posted February 15, 2015 I'm having massive issues trying to get your script to work. Following the readme text in the file I have achieved the following: ### Installation To include this script in your mission, add the following lines to your ``description.ext``: #include "SRS\GUI\SRSdialogs.hpp" class RscTitles { #include "SRS\GUI\SRSprogressBar.hpp" }; class CfgFunctions { #include "SRS\CfgFunctions.hpp" }; And this entry in your ``init.sqf`` so that it will execute on all clients: [] spawn SRS_fnc_init; -- However, where do I put the rest of the files? I've placed then alongside the init.sqf / mission.sqm in the mission folder, but nothing seems to trigger or work in game when ran in a MP game. Share this post Link to post Share on other sites