ALiVE friendly revive or auto medic?

  1. 8 years ago
    Edited 8 years ago by HeroesandvillainsOS

    Does anyone have a revive script or auto medic script they could share with me? What I'm basically looking for is some way for spawned AI medics to auto heal grouped teammates (and players) when hurt and/or a revive script so my AI teammates don't automatically die when hurt so I could at least have a chance to save them (and they could save me).

    I guess in a perfect world the script would be an all-in-one for the above but I'd take either or at this point. I'm very very tired of babysitting these AI dudes.

    I could have sworn @incontinenetia may have shared something a long time back? Having a hard time finding that or if I'm just misremembering. I spawn my AI in-game with Spyder's recruitment so the scripts available on BIS forums for auto medic wouldn't work for me.

  2. Edited 8 years ago by dev614

    There's Bardosy's Automedic script , but it has to have something ran in the units init for it to work. I'm sure somebody who knows what they're looking at could somehow make it to where virtualized/dynamically spawned medic units have the script ran when they spawn in. Davidoss has altered the script to support ACE 3 basic and advanced medical on page three, as well. Speaking of ACE 3, I'm pretty sure they just added support for AI healing with basic medical mode. I'm not sure if medics go around and heal injured units, but I know for sure units heal themselves. I feel like I may have seen a medic revive an unconscious soldier using ACE 3 during a test run on a mission, but I may be mistaken.

  3. Yeah I considered just using ACE for the new auto medic feature, but pretty sure it will open up a whole new world of problems for SP that I'd rather just add what I need rather than get what I need and a whole lot more.

  4. Edited 8 years ago by dev614

    @HeroesandvillainsOS  I spawn my AI in-game with Spyder's recruitment so the scripts available on BIS forums for auto medic wouldn't work for me.

    If you just want a recruitable AI medic in your squad for the time being, you can use Davidoss's Recruit Medic script for the Automedic script mentioned earlier. You just have to edit the recruit_medic.sqf with the loadout you want your medic to carry, and voila - an automedic group member appears. Here's one from one of my mission folders (you'll have to tweak it, my medic is suited up with ACE medical equipment and RHS weapons/gear)

    recruit_medic.sqf

    /* 
    recruit medic via addactions:
    put this inside some object init
    this addAction ["<t color='#0000FF'>Recruit Medic</t>", "scripts\recruit_medic.sqf",[],4.9,false,true,"","(_target distance _this) < 5"];
    addons required : ACE, RHS
    */
    
    private ["_unit", "_chief"];
    _chief = _this select 1;
    if (_chief != (leader group _chief)) exitWith {
    hint "Only team leader can recruit team members!";
    };
    hint "Recruiting Medic";
    _unit = group _chief createUnit ["B_medic_F", getPos _chief, [], 5, "PRIVATE"];
    removeAllWeapons _unit;
    removeAllItems _unit;
    removeAllAssignedItems _unit;
    removeUniform _unit;
    removeVest _unit;
    removeBackpack _unit;
    removeHeadgear _unit;
    removeGoggles _unit;
    _unit forceAddUniform "rhs_uniform_g3_m81";
    for "_i" from 1 to 10 do {_unit addItemToUniform "ACE_fieldDressing";};
    for "_i" from 1 to 3 do {_unit addItemToUniform "ACE_morphine";};
    for "_i" from 1 to 3 do {_unit addItemToUniform "ACE_epinephrine";};
    _unit addItemToUniform "ACE_NVG_Gen4";
    _unit addVest "rhsusf_spc_corpsman";
    for "_i" from 1 to 15 do {_unit addItemToVest "ACE_quikclot";};
    for "_i" from 1 to 2 do {_unit addItemToVest "ACE_CableTie";};
    _unit addItemToVest "rhsusf_acc_nt4_black";
    for "_i" from 1 to 2 do {_unit addItemToVest "rhs_mag_an_m8hc";};
    for "_i" from 1 to 2 do {_unit addItemToVest "rhs_mag_m18_red";};
    for "_i" from 1 to 2 do {_unit addItemToVest "rhs_mag_m18_green";};
    for "_i" from 1 to 8 do {_unit addItemToVest "rhs_mag_30Rnd_556x45_Mk318_Stanag";};
    _unit addItemToVest "rhs_mag_m67";
    _unit addBackpack "B_Carryall_Base";
    for "_i" from 1 to 50 do {_unit addItemToBackpack "ACE_fieldDressing";};
    for "_i" from 1 to 25 do {_unit addItemToBackpack "ACE_morphine";};
    for "_i" from 1 to 25 do {_unit addItemToBackpack "ACE_epinephrine";};
    for "_i" from 1 to 15 do {_unit addItemToBackpack "ACE_bloodIV";};
    for "_i" from 1 to 15 do {_unit addItemToBackpack "ACE_quikclot";};
    for "_i" from 1 to 2 do {_unit addItemToBackpack "ACE_bodyBag";};
    _unit addItemToBackpack "ACE_personalAidKit";
    _unit addHeadgear "rhsusf_mich_bare_norotos_alt_headset";
    _unit addWeapon "rhs_weap_m4a1_blockII_grip2_KAC";
    _unit addPrimaryWeaponItem "rhsusf_acc_anpeq15_light";
    _unit addPrimaryWeaponItem "rhsusf_acc_eotech_552";
    _unit addWeapon "Laserdesignator";
    _unit linkItem "ItemMap";
    _unit linkItem "ItemCompass";
    _unit linkItem "ACE_Altimeter";
    _unit linkItem "ItemGPS";
    _unit enableFatigue false;
    dummy = [_unit, units (group _unit)] execVM "scripts\automedic.sqf";
    hint "Medic joined your team";
  5. I appreciate it man but there's so much "ACE" in both his scripts, with my ability to fill out code and arrays, I probably won't even bother.

    Thanks anyway man. I'd prefer a vanilla solution if one exists. I'm not much of an ACE fan TBH and don't have the skill to edit any of this.

  6. Oh no, Bardosy's original script is for vanilla Arma healing. The only ACE things you'd have to change would be the medical items in the script above. Instead of the ACE morphine, bandages, bodybags, etc you would just put "FirstAidKit" or "Medkit" (or whatever the classnames are) and whatever else you want your medic suited up with (weapon, uniform, gear, ammo, etc.)

  7. Edited 8 years ago by HeroesandvillainsOS

    Ah ok. I thought you were referring to this as a companion to Davidoss's auto medic script for ACE, not Bardosy's. It sounds like it would be exactly what I'm looking for then.

    If you don't mind, this code goes in an object init and nothing else? No mission sqf files needed to call it from, aside from the auto medic script itself?

    EDIT: Sorry I see the line at the bottom calling the auto medic script. Disregard. Thanks!

  8. Edited 8 years ago by HeroesandvillainsOS

    Oh haha! I made a post back in January in that thread saying Bardosy's script was only working in SP and not in MP. Lol

    Oh well.

    I mean I guess I could try it again. Have you used it on a dedicated server at all in the recent past or just Davidoss's?

  9. Yes sir, I use it on a local dedi for single player sessions. It seems to work fine for the most part, may have some trouble after respawn with existing automedic. Nothing that can't be remedied someway or another.

  10. Edited 8 years ago by HeroesandvillainsOS

    @dev614 Yes sir, I use it on a local dedi for single player sessions. It seems to work fine for the most part, may have some trouble after respawn with existing automedic. Nothing that can't be remedied someway or another.

    You can confirm Bardosy's original non-ACE script currently works on a dedicated server the way it sits without any editing? The one in his first post? I can't see any reason why it suddenly would be now, when it wasn't a year ago and hasn't been updated.

    If so I'll give it a whirl. I spent quite a bit of time with it last January come to think of it and could never get it working on a dedicated server. I know Davidoss has given it a lot of love but it has the ACE requirement.

  11. My mistake, I've been using Davidoss' script. I can't vouch for Bardosy's original one.

  12. Thanks for clarifying. Just curious. Why bother with it now that ACE has an auto medic built in now?

    Maybe I should just go with ACE and be done chasing this and hope that only adding the medical PBO's won't break other AI functions such as engineers repairing (etc). In the past ACE caused havoc when controlling an AI squad. But the missions I tried used a crap ton of ACE modules.

  13. The ACE medical AI feature only supports basic medical mode, I use Davidoss' script for the advanced mode. I'm not sure if just using the ACE medical is possible, but it's worth a shot. If it does work out, let me know.

  14. Edited 8 years ago by HeroesandvillainsOS

    Ah yes that makes sense.

    I'm curious too if just the medical module only gives me basic medical and auto medic and nothing else. I have a feeling running ACE with just the one (or necessary) module(s) will add ACE interaction and a bunch of other things I don't want but I'll have to test and see.

  15. C2 by mad cheese do also got auto heal++a whole bunch of usefull ai command functions.

  16. Edited 8 years ago by HeroesandvillainsOS

    Great suggestion.

    That might be my best bet all things considered. He solves some of my other issues with the game with his mod too.

  17. @HeroesandvillainsOS:

    Since I play the majority of my ALiVE sessions either alone or with just one human buddy, I have looked for the same kind of script like you for pretty much the same reasons: I want to have AI medics doing their job and I want those tense gameplay situations where you yell: "Hold on, buddy, we're going to get you out of this alive!"

    Besides ACE systems in conjunction with Bardosy's script+Davidoss improvements which I got to work, I have recently tried out alternatives to ACE because while I really like the realism oriented medical system, I don't want to be dependent on a mod that due to it's complexity and plethora of additional features might break a perfectly well running persistent ALiVE mission after the next update of either framework.

    C2 is worth installation already for it's key purpose, the tactical commanding of AI - especially if you play your ALiVE missions alone. And it gets even better: C2 supports also the A3Wounding system from Psychobastard, which IMHO is the best compromise between BIS vanilla Revive and ACE sytems. But you can ofc use A3 Wounding System without/independently of C2.

    A3 Wounding System:

    - It works even in SP! Or MP with only 1 active player!

    - It makes AI medics automatically heal their squadmates (including the player)

    - It enables you to order them, even without C2, to heal any other wounded soldiers, including such miserable guys that are NOT members of your squad! (Those must've been set to playable units, though, but hey - that is a small chore to do, isn't it?)

    - It offers you the possibility to set who and with what equipment is able to do the revive!

    - But whatever setting you choose: ALL playable soldiers, first and foremost your AI squadmates, can temporarily stop the bleeding that A3 Wounding includes, by pressing on the wound! And you can even ORDER them to do so on any downed unit while you call in a medic! Remember, in ALiVE you can let some medics be inserted via logistics and have them join your squad temporarily...

    - The ONLY real drawback is the fact that with A3Wounding active, your player unit will start to "shiver" when going closer than about 3 meters to an open fire like BIS or CUP campfires and burning metal barrels. In earlier versions of A3 Wounding System you took health damage, but that at least is fixed - just the weird "shivering" remains...

    - Also if for some reason or another you are using the code snippet from AliVE WIKI that makes scripts wait for persistence initialization (most likely to be placed in the init.sqf) , you will have to perform the following circle once:

    play - make a player save & then make a server save - quit client - restart server - load persistence mission&player data from WarRoom - play - enjoy!

    - But after this, it works flawlessly in persistent ALiVE missions. Plus, note that the same cycle is necessary for other player-based (revive) scripts to work in a persistent ALiVE environment like Heros Survive (a primary needs + ambient temperature system for all player units working out of the box + LOTS of other features to pick, set & choose like an alternative repair system or lockable doors+quest items) or Farooq Revive; the two of them I also have tested & used & approved for ALiVE "MILSIM-Style Immersion" thoroughly...

    - BTW, Farooq revive doesn't have the "campfire damages health" problem, but also is more simple and has no SP and AI automedic revive functionality.

    - As you can imagine, I really really like both scripts, but A3Wounding has a tad more to offer! ;-)

  18. @tourist thanks for the detailed reply!

 

or Sign Up to reply!