Jump to content

Recommended Posts

On 2.01.2014 at 4:10 PM, Psychobastard said:

// by Psychobastard
// AIS REVIVE Setup-File

//__________________________________________________________________________________________________________________________________________________________________
// v v v v v v v v v v v v  --- Main Settings --- v v v v v v v v v v v v

AIS_REVIVE_INIT_UNITS              =     "allPlayables"; // Auto-Init a group of units: "allPlayers" , "allPlayables" , "allUnits", "allUnitsBLUFOR", "allUnitsOPFOR", "allUnitsINDFOR", "allUnitsCIVILIAN"
                                                                                     // Warning: I didn't recomment to use "allUnits" if you play with a lot of AI units! AIS is mainly created for players and/or their AI group.
AIS_MEDICAL_EDUCATION         =     0;                    // Who can revive an unconscious unit? 0 == Everybody, 1 == Everybody with a First Aid Kit or Medkit, 2 == Only Medics (this affects both, AI and players!).
AIS_REVIVE_GUARANTY             =     true;               // If true you will fall everytime in uncoscious mode, regardless how strong the impact of damage was.
AIS_MEDEVAC_STATIONS           =    [];                    // Add one or more objects and a radius to activate the medevac feature. If enabled revive is only at this place(s) possible. Empty array []  means feature is disabled.
                                                                                   // Syntax: f.e.: [ [myMedevacVehicle, 15], [myMedicTent, 10] ]    --> make sure the variable name is avalible at gamestart. Otherwise call it later in a function.


//__________________________________________________________________________________________________________________________________________________________________
//    v v v v v v v v v v v v  --- Optional Settings --- v v v v v v v v v v v v 

AIS_DAMAGE_TOLLERANCE_FACTOR =     1;                 // A higher value means more damage tolerance. 1 is Vanilla. 0.8 mean all damage will reduce to 80% of Vanilla.
AIS_BLEEDOUT_TIME                         =     300;             // Basic life time in seconds until the unit bleed out and die.. The real life time depends on the real damage of the unit. (can be less or more time from the basic value)
AIS_REVIVETIME                                 =     30;                // Basic revive time in seconds. The real revive time depends on the real damage of the unit. (can be less or more time from the basic value)
AIS_STABILIZETIME                            =     20;                // Basic stabilize time in seconds to stop the bleeding of a unconscious unit. The real revive time depends on the real damage of the unit. (can be less or more time from the basic value)
AIS_REVIVE_HEAL                              =     false;            // If set to true the injured unit get completely healed after the revive. (casual gameplay without a medic)
AIS_TOGGLE_RADIO                          =     true;             // If set to true, unconscious players cannot use his TFAR or ACRE radios.
AIS_NO_CHAT                                     =     true;             // If set to true, a injured player cannot use text chat during he is uncoscious.
AIS_AI_HELP_RADIUS                        =     100;             // Number, Radius in metres. Units in this radius will help to revive if no group member is able to revive. Max value is 200 metres.
AIS_DISABLE_RESPAWN_BUTTON    =    30;                // Time in seconds while the respawn button is disabled (Esc Menu). Set to 0 to enable the respawn button everytime.

 

//__________________________________________________________________________________________________________________________________________________________________
//    v v v v v v v v v v v v  --- Visual Settings --- v v v v v v v v v v v v 

AIS_SHOW_UNC_MARKERS            =     true;             // If set to true, a marker will show injured units on the map.
AIS_SHOW_UNC_MESSAGE_TO     =     "Group";         // "None", "Side", "Group" --> who read the message about wounded units.
AIS_SHOW_UNC_3D_MARKERS     =      true;             // If set to true, an in-game visible 3D-icon shows you the position of injured units (within a range of 20 metres and 35 metres for medics).
AIS_IMPACT_EFFECTS                    =     true;             // Set to true to enable impact effects. (simple simluation of supressing effects)
AIS_SHOW_COUNTDOWN               =     true;             // If set to true, an unconscious unit will be able to see the bleed out timer.
AIS_SHOW_DIARYINFO                    =     true;             // If set to true, a diary entry with some informations about the AIS (Credits, features, How to) is added.

Share this post


Link to post
Share on other sites

@davidoss you guys who help on these forums  Rock.  I messed around with all that.

 

There's nothing there to prevent the incapacitated unit to move or shoot.

 

There's nothing there to prevent the unit from dying once they're in the incapacitated state. Which I understand if you can't prevent the unit from moving you don't want a guy be able to move around shoot that can't be killed ?

 

Team switch function works fine in multiplayer as long as the unit is not in incapacitated state. Once you been wounded the team switch function is no longer available for the player to switch into a new unit. That sucks. In my opinion it takes out the whole functionality of team switch.

 

I am going to bash Bohemia a little here.  The medical system is very lacking in the vanilla game. This script and a few others including Ace Ed's basic functionality to the whole medical system that should have been in the vanilla game. The last download content idap should have really focused on Medical Systems within the vanilla Arma game we see what it can really be like with certain mods and Scripts.

 

Share this post


Link to post
Share on other sites

Everything can be changed. But there are also some reasons why the script handle some things like it does.

 

I cant help you to change the hole system. If you want to do it, fine. But you have also to know HOW to do it by your own. :P

 

 

regards

Share this post


Link to post
Share on other sites

Only a few things that I really want to change is the ability of the incapacitated unit to shoot and not take full damage when incapacitated. I am having a very hard time finding the code to change that. If you could help with just that it would be greatly appreciated avibird. Most my missions are for fire team to squad level 4-15 units. With a trigger to end game when all units are incapacitated. 

Share this post


Link to post
Share on other sites
[] spawn {

	while {true} do {

		waitUntil {sleep 1; player getVariable ["AIS_unconscious", false]};
		
		private _loadout = getUnitLoadout player;
		player allowDammage false;
		removeAllWeapons player;
		
		waitUntil {sleep 1; !(player getVariable ["AIS_unconscious", false]) || !alive player};
		
		player allowDammage true;
		
		if (alive player) then {	
			
			player setUnitLoadout _loadout;
		};

	};
};

 

  • Like 1

Share this post


Link to post
Share on other sites

Hey davidoss I will give it a go hopefully tonight. How can I call in the code into the game. By game logic mission.sqf ect  I still get a little confused on that ?

 

My missions have very limited med packs in the mission so most of the time the players who go down will be spectating or being transported around while the other players are playing or looking for med packs.

 

Having the ability to still crawl but can't shoot or get killed is the best spectating mode for my gameplay Style. I always have a trigger to end my mission when all playable units are incapacitated. 

 

Thank you for the help and psychobastard for the awesome script that should have really been in the vanilla game.

Share this post


Link to post
Share on other sites

@davidoss TY you brother it works well  with a few small exceptions

 

 The player's ability to crawl around is no longer valid due to the removeAllWeapons   I attempted to replace it with the removeMagazines  {player removemagazine _x} forEach Magazines player;  

 

The playableUnits + switchableUnits that are not players still can get killed when in the incapacitated state. I attempted to replace player with playableUnits + switchableUnits  within your codeblock above with no lock.  Avibird

Share this post


Link to post
Share on other sites

I don't know if anyone cares  I mostly found a fix to this.  I Need a little more testing in different game situations ie MP dedicated server JIP ect.

What I am attempting to do is use this awesome script that really should have been in the vanilla base game.  Bohemia really dropped the ball with the whole new revive system but its really more for player vs player game modes Then coop play with AI. 

 

@davidoss Thank you for the help but your code block had some issues with the overall function of the script. 1. The AI units would still get killed once in the incapacitated stated  2. The player once the weapon was removed during incapacitated stated lost the ability to crawl.  (Which was something I really wanted to keep as a modified spectator mode for the other players to watch but with the chance that the alive players could find a limited health pack within the mission to bring the incapacitated players/units back into the game. I have a trigger to end the game when all playable units are incapacitated. I like to refer to it as a last man standing game mode :don16:).  I don't like to play with respawns but if you have a mission that can last for a few hours and limited playable units this is a great compromise for me in my mission designs.  Burger King used to have a advertisement slogan saying HAVE YOUR WAY. This is ARMA people play the way that want we need to thank BOHEMIA for that and I thank all the modders of this community who give their hard work to  all of us to play this game and modify how we want to play this game.

 

After several days of messing around with Psychobastard script ( I have very limited understanding of what the hell I am doing lol)

 

in the Damage folder

  in the fn_goToDead.sqf at the end of the code

// dead... if some issues with the deadcam (shown killer) give the dead a deleay of 1 frame --> need testing AVIBIRD ADJUSTED it was 1 for full damage and death
_unit setDamage 0.89;

 

 

One major issues I was having was if the group leader was incapacitated he would order the units to self heal at times not just get support from medic but to heal self. AI units should not be able to use the med packs in their Inventory but that could if the group leader was down. This resulted in those units to invincible when they are healed that is a major problem lol.

 

in the system folder

in the fn_unconsciousAI.sqf under the remove medic equipment  I added disable radios

 

// remove medic euqipment from unconscious unit
[_unit] call AIS_System_fnc_removeFaks;

// disable radios// added
if (AIS_TOGGLE_RADIO) then {
 [false] call AIS_Effects_fnc_toggleRadio;

};

This seems to fix the issues and achieved what I was hoping for. I need to test more because we all know with ARMA nothing is a guarantee things will always work.

 

If there is a better solution please educate me.  @pyschobastard I don't know if you are done with this script but would you consider adding something like this to your script. Avibird.

Share this post


Link to post
Share on other sites

Good day sir the script works really good but, im having some issue's with fall damage any way i could change it so fall damage isn't so critical anymore as a little jump puts you in this stage? 

 

Besides that thank you for this amazing script! 

hopefully someone can help me 

Share this post


Link to post
Share on other sites

After a hour of some game testing and some adjustments and added codelines by @HazJ I have this script working exactly the way I want it that units will never die and the mission will end when all playable units are incapacitated. Thank you HazJ for the testing and hope to hook up soon again to play my  thevGreat Escape mission for real this time?

Share this post


Link to post
Share on other sites

Yes of course most of the changes I made already posted in the thread but the two significant changes that we made yesterday then make the script work I will post exactly what you need to do. There are only a few small changes you need to do to make it work the way I wanted it to work. For sure. You can always look for me on my  host servers AVIBIRD. I only like to play with a few people not into the whole big clan thing that's why I use a lot of AI when I play ?

Share this post


Link to post
Share on other sites

@Rockapes 

 

First you need to make a game trigger to end the mission

type - lose

Activation - none

condition -  {!(_x getVariable ["AIS_unconscious", false])} count (playableUnits + switchableUnits) == 0

on activtion - "END1" call BIS_fnc_endMissionServer;

 

in your playable units init put the - this setVariable ["AIS_noBleedOut", true]

 

Go to these folder in the script and look for the SQF

 

1. damage folder
   fn_handleDamage.sqf

look for  // remote Units

add this above the remote units just below the params
if (_unit getVariable "ais_unconscious") exitWith {0.75};         // Added AVIBIRD

 

  fn_goToDead.sqf

look for   // dead... if some issues with the deadcam (shown killer) give the dead a deleay of 1 frame --> need testing
        _unit setDamage 1;  change to   _unit setDamage 0.89;    //Added AVIBIRD


2. system folder
  fn_Revive.sqf

 look for  // healing if enabled
                if (AIS_REVIVE_HEAL) then {
                  _injured setDamage 0;
                 _injured allowDammage true;                           //Added AVIBIRD
                 _injured setVariable ["ais_fireDamage", 0];

 

  fn_ReviveAI.sqf

look  for // healing if enabled
              if (AIS_REVIVE_HEAL) then {
               _injured setDamage 0;
               _injured allowDammage false;                          //Added AVIBIRD
              _injured setVariable ["ais_fireDamage", 0];

 

  

 

 

 

Now this will allow the script to never have the playable units die only stay incapacitated.  The units will never bleed out or become invincible when healed. That was a major issues I had when I first started to mess with the script.

The mission will end when all playable units are incapacitated. This is how I enjoy to play. A  last man standing game mode IF YOU WISH.  If one playable unit is still up there's a chance the party can continue lol. I usually limit the number of medical supplies in a mission it makes for a good time transporting your wounded units to find medical help. Like in old OFP days when we had no health packs and you would crawl for miles to a health tent :f: This may not be for everyone but I don't play with respawns or a large group of players just not my cup of tea.  Hope this helps gods knows the numerous people who have help me over the years with scripting/coding for this game. Avibird if you have issues look for me on my host server.

 

 

Share this post


Link to post
Share on other sites
11 hours ago, avibird 1 said:

@Rockapes 

 

First you need to make a game trigger to end the mission

type - lose

Activation - none

condition -  {!(_x getVariable ["AIS_unconscious", false])} count (playableUnits + switchableUnits) == 0

on activtion - "END1" call BIS_fnc_endMissionServer;

 

in your playable units init put the - this setVariable ["AIS_noBleedOut", true]

 

Go to these folder in the script and look for the SQF

 

1. damage folder
   fn_handleDamage.sqf

look for  // remote Units

add this above the remote units just below the params
if (_unit getVariable "ais_unconscious") exitWith {0.75};         // Added AVIBIRD

 

  fn_goToDead.sqf

look for   // dead... if some issues with the deadcam (shown killer) give the dead a deleay of 1 frame --> need testing
        _unit setDamage 1;  change to   _unit setDamage 0.89;    //Added AVIBIRD


2. system folder
  fn_Revive.sqf

 look for  // healing if enabled
                if (AIS_REVIVE_HEAL) then {
                  _injured setDamage 0;
                 _injured allowDammage true;                           //Added AVIBIRD
                 _injured setVariable ["ais_fireDamage", 0];

 

  fn_ReviveAI.sqf

look  for // healing if enabled
              if (AIS_REVIVE_HEAL) then {
               _injured setDamage 0;
               _injured allowDammage false;                          //Added AVIBIRD
              _injured setVariable ["ais_fireDamage", 0];

 

  

 

 

 

Now this will allow the script to never have the playable units die only stay incapacitated.  The units will never bleed out or become invincible when healed. That was a major issues I had when I first started to mess with the script.

The mission will end when all playable units are incapacitated. This is how I enjoy to play. A  last man standing game mode IF YOU WISH.  If one playable unit is still up there's a chance the party can continue lol. I usually limit the number of medical supplies in a mission it makes for a good time transporting your wounded units to find medical help. Like in old OFP days when we had no health packs and you would crawl for miles to a health tent :f: This may not be for everyone but I don't play with respawns or a large group of players just not my cup of tea.  Hope this helps gods knows the numerous people who have help me over the years with scripting/coding for this game. Avibird if you have issues look for me on my host server.

 

 

Thanks @avibird 1 appreciated 

Share this post


Link to post
Share on other sites

Good day sir the script works really good but, im having some issue's with fall damage any way i could change it so fall damage isn't so critical anymore as a little jump puts you in this stage? 

 

Besides that thank you for this amazing script! 

hopefully someone can help me 

 

Share this post


Link to post
Share on other sites

Hey, did you play with modded units?

 

Dont tested with actual version. But at the moment i have build up the scripts a fall from round about 5 metres broke your legs with a random chance. After the second fall from the same altitude you go in unconscious mode. Maybe you can make a short video which is showing your circumstances.

 

 

regards

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for the fast respond!

no i have not playing with moded units

it does work with the 5 meter fall damage just breaking your legs but it also does it for way less for example 2 meter which is in my eyes a really low jump any chance we could change this or even disable this second fall from altitude that makes you go in the wounded stage? i'll get a video up running if this information doesn't help enough. 

 

Thank you for helping!

Share this post


Link to post
Share on other sites

or any chance we could make it so its not the second time but like the 3-4 time you go wounded 

 

Share this post


Link to post
Share on other sites

Hey PsychoBastard, outstanding work here mate, thanks a lot for this script. Unfortunately I have a nasty bug lately - once the unit got unconscious it still can recive damage and die eventyally. Tested it with and without mods, but the problem is still there. Any ideas?

Share this post


Link to post
Share on other sites

@domian blackwood that is not a bug that was by his design. The unit has the ability to still slowly crawl and grossly shoot it's remaining rounds however once you shoot your weapon the opposing forces will then shoot you to kill you for good so don't shoot your weapon if you don't want to die ?.

 

By script design you will bleedout in 2 minutes if you don't get stabilized and you die. I think psychoBastard develop the script with more Focus on player vs player in mind then player with only AI play. That's why he disabled the team switch function when you are in the wounded state.

 

However I modified his script as best that I could and I have it that the playable units will never bleedout even if you don't get stabilized and you will not take additional damage once you are in the wounded state however if you shoot your weapon and take more damage or receive additional damage your ability to slowly crawl will be stopped. 

 

I posted a detail list of what you need to change in the SQF's to make it work this why.  I asked psychoBastard to assist me or if he would make a official option for this but he has no desire for something like this so I did best.  It works well for my needs playing with mostly AI and only a few other players. Just look back a few posts and you will see the list Avibird ?

Share this post


Link to post
Share on other sites

Hello

I missed the medi equipment spawning when AI revives. I inserted " [_healer, _injured] call AIS_Effects_fnc_medEquip; " in the fn_ReviveAI.sqf. This works and I hope it gives no side effects. :-)

Would it be possible to implement randomly calls for help while the AI is laying around injured? I know this from the btc_quickRevive system. Played around a bit but couldn't get it work like it does in btc revive system.

In AIS if a unit goes down, she calls for help once, is it possible that she does this call again from time to time while it is injured?

 

Thanks for your work, script is great so far!!! :-)

Share this post


Link to post
Share on other sites

Hey,

 

random help screams are simply possible. There is already a functionm implemented: [_unit] call AIS_Effects_fnc_helpScream;

You can add this to an existing loop. (for example in fn_bleeding.sqf) I dind't implement it cause some people dont like this help screams.

 

Med-eqip didnt spawn by AI's cause in my opinion its a ambient thing for the medic himself to see some medic stuff while "working". But AI doesnt need ambient. ;) 

 

 

greeets

Share this post


Link to post
Share on other sites

Hi @Psychobastard

 

Is there anyway i can get this to work with this mod/script : 

when your script and it are running,i die instantly,though AI are ok...

an error pops up about line 34 in the fn_quote.sqf :  

 

    _text = parseText  _myText;
    _cntrl = _display displayCtrl 1793;
    _cntrl ctrlSetStructuredText _text;
    _cntrl ctrlCommit 0;
    sleep _duration;
};

_layer cutfadeout 0;

 

im no good at scripting though i have messed around with it for a while and cannot get it to work. Any chance you might guide me getting them both to work together? Or even someway to disable your script if the player is in a vehicle/heli?

 

 

 

Thanks

 

EDIT this error above is unrelated,sorry. it pops up regardless when player dies.I figured out a way to make them work together,the other mod has a setting for handling damage,it seems to make them work together.

 

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×