Search the Community
Showing results for tags 'morale'.
Found 1 result
-
A nice little self-contained surrender script thing for ACE
pognivet posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I made this little thing so that enemies will actually surrender sometimes and you're not forced to genocide them all. It was originally something that I saw Larrow use to make people sit in chairs until they detected an enemy, but I changed it to serve its current function. _h = this spawn { waitUntil {morale _this <= -0.5 && _this call BIS_fnc_enemyDetected}; _this action ["Eject", vehicle _this]; ["ace_captives_setSurrendered",[_this,true]] call CBA_fnc_globalEvent; }; You put it in any unit's init line. If they can see an enemy and their morale goes below -0.5 they will surrender. If they're in a vehicle they should also get out before doing so, but it might not work as expected. You can change the morale level check to to be whatever you want, but be warned: Arma's morale levels are really weird. You also cannot set a unit's morale or change it in any way except through indirect means. All you can do is check its value. Morale can fluctuate between -1.0 and 1.0. Everyone's morale seems to start at 0.8 no matter what their courage or stats are. Courage does, however, affect the rate at which morale recovers after a traumatic event. Courageous units will shake off suppression more quickly than cowardly units, but they will both be suppressed the same amount. If you shoot 30 rounds full auto all around a guy from a few feet away but don't hit him his morale will always drop to exactly 0.198438, at least when I tested it in virtual reality. Once it hits this number it doesn't seem to go any lower unless they get hurt or something else happens at which point it will start to go into the negatives i.e. -0.158. It may also go into the negatives if nearby friends are also suppressed. I don't know exactly what affects morale, but I assume the following: Helps morale: - Being healed - Healing someone else - Killing an enemy - Shooting at an enemy/suppressing an enemy - Nearby friendlies, especially heavy equipment - Large number of units in squad - Outnumbering the enemy and knowing it Hurts morale: - Friendlies dying or being hurt - Killing civilians - Being shot at/suppressed - Strong/powerful enemy units nearby such as tanks or airplanes - Being outnumbered by the enemy and knowing it - Enemies in extremely close proximity or in multiple directions (flanks) You should really edit it based on the units you're using with it. For a WW2 mission with battle-hardened soldiers I chose -0.75. They won't give up easily, but if you kill a lot of people in their squad, spray them with bullets for a long time or flank them really bad and cut them off from everyone else they'll give up. If you wanted something more like Saddam Hussein's army during the coalition invasion then maybe set it for -0.25 or -0.15. You have to experiment a little to find the sweet spot. This way, if you wanted to, you could end a battle without killing a single person just by having overwhelming superiority and firepower. I thought someone might find it useful so I'm posting it here. Obviously, you need ACE, but you can edit this little script to make the enemy surrender in another way that doesn't require ACE if you want to. It is possible that this can cause a weird form of script lag in missions with a large amount of units. This manifests itself as S.T.A.L.K.E.R.: Shadow Of Chernobyl-style microstutter. I believe this is because the engine will check every second for their morale levels until they either surrender or die which can overload the engine. This can seemingly be mitigated to an extent by using the NO LOGS parameter in the Arma 3 launcher.