Search the Community
Showing results for tags 'suppression'.
Found 5 results
-
AI Accuracy Testing Script (with Suppression)
Er1807 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Have you ever felt like AI is too accurate? With this script, you can confirm your feelings. This script was developed to test if suppression was working on AI. This script uses ACE3 to display some status messages and copy it to the clipboard. You can remove the status messages and use the Arma 3 copyToClipboard function to achieve a vanilla variant. In the following configuration rhs units are used. This can be changed to vanilla units. The first 6 lines defines some settings you can change. distances: distances are all distances that should be tested suppressions: suppression are all suppression levels that should be checked shooterclass,targetclass: The classes used as shooter and target magazine: magazines are refilled to keep AI shooting at full speed shotsuntil: shoots for each round. The result are copied in an Excel format into you clipboard. (Testet with Google Sheets) This should be used in a VR-Map. The units are spawned near 0,0. distances = [50]; suppressions = [0]; shooterclass = "rhs_msv_emr_rifleman"; targetclass = "B_Survivor_F"; magazine = "rhs_30Rnd_545x39_7N10_AK"; shotsuntil = 300; fnc_startRound = { params["_distance"]; shot = 0; hit = 0; _grp = createGroup east; shooter = _grp createUnit [shooterclass, [0,0,0], [], 0, "FORM"]; _grp = createGroup west; target = _grp createUnit [targetclass, [_distance,0,0], [], 0, "FORM"]; shooter addEventHandler ["Fired", { params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"]; shot = shot + 1; }]; target removeAllEventHandlers "HandleDamage"; target addEventHandler ["HandleDamage", { params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"]; 0; }]; shooter removeAllEventHandlers "HandleDamage"; shooter addEventHandler ["HandleDamage", { params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"]; 0; }]; target addEventHandler ["Hit", { params ["_unit", "_source", "_damage", "_instigator"]; hit = hit +1; }]; shooter disableAI "PATH"; target disableAI "PATH"; shooter reveal target; target reveal shooter; }; fnc_saveToClipboard = { "ace_clipboard" callExtension _this; "ace_clipboard" callExtension "--COMPLETE--"; }; fnc_saveResults = { tab = toString [9]; output = ""; { { output = [output, (_x # 0) , tab , (_x # 1) , tab , (_x # 2) , tab , (_x # 3) , endl] joinString ""; } forEach _x; } forEach results; output call fnc_saveToClipboard; }; fnc_init = { call fnc_reset; ["Accuracy", {if (shot==0) exitwith{0}; (hit/shot);}, [false]] call ace_common_fnc_watchVariable; ["Suppression auf shooter", {getSuppression shooter}, [false]] call ace_common_fnc_watchVariable; ["shot", {}, [false]] call ace_common_fnc_watchVariable; ["hit", {}, [false]] call ace_common_fnc_watchVariable; ["distancebetween", {}, [false]] call ace_common_fnc_watchVariable; ["suppression", {}, [false]] call ace_common_fnc_watchVariable; }; fnc_reset = { shot = 0; hit = 0; results=[]; }; fnc_start = { { distancebetween = _x; resultForDistance = []; { suppression = _x; [distancebetween] call fnc_startRound; waitUntil {shooter setSuppression suppression; shooter addMagazine magazine; uiSleep 0.3; (shot>=shotsuntil);}; resultForDistance pushBack [distancebetween, suppression, hit, shot]; deleteVehicle target; deleteVehicle shooter; uiSleep 1; } forEach suppressions; results pushBack resultForDistance; } forEach distances; call fnc_saveResults; systemChat "Finished"; }; call fnc_init; run = [] spawn fnc_start; -
In dev. 135197 we have made some changes how suppress command works 1. select some units 2. press 3-9 3. some units will start shooting at given position / vehicle (there is new suppressTarget in datra) known issues - does not work for gunner in your vehicle (same issue as for artillery fire at position command)
-
This is the place to find latest info about suppression mechanic in Arma 3 and also the place to post feedback about it (mainly about features already implemented in the game). Suppression mechanics in the game Mechanics, rules and outcomes implemented in Arma 3 up to date AI looses good aim when under fire Basic info: AI gets suppressed by bullets flying by, nearby bullet impacts, explosions and by direct hits. Every single such "event" increases the AI suppression by small increments from 0.0 to 1.0. (it is possible to fully suppress the AI with about 5-10 bullets) The suppression continuously decreases in time. AI with higher skill recovers faster (at avg. skill it takes several seconds while @ skill 1.0 the recovery from suppression 1.0 is almost instant) The more powerful ammunition the bigger the beaten zone. (the more powerful ammo the slower the suppressive effect decreases with distance from the target when compared to a weaker ammo) The suppression doesn't have any immediate effect on units in vehicle turrets (incl. static weapons). But it still has an effect on units that are firing from the vehicle with personal weapons or units that have disembarked the vehicle. Configuration and script commands - AI prioritizes cover that is not suppressed Basic info: When selecting a new cover position the AI prefers a position that is "under control" of its own side It hasn't been under enemy fire recently It is not in the fire sector of a superior enemy force Feedback tracker: AI Suppression Player Suppression Known issues: Suppressive fire command doesn't work
- 22 replies
-
Hi all - just a quick question, I'm not sure if it's feasible - but... I was wondering if one can force a vehicle to move along the road despite a unit being on it. Essentially, I want to disable whatever it is that forces the object to stop, because it detects it will collide with another object. Ordinarily, I'd just use the unitCapture function, but as we all know, it doesn't work well on land based vehicles. The problem I'm trying to resolve, is to have a vehicle stop at a checkpoint when the AI's driving. Unfortunately, because there are units at the checkpoint, it is causing some odd behaviour and the vehicle does not stop very close to them. Either that, or the vehicle goes off the road, or veers to one side. Any ideas? :D Thanks as always, in advance guys!
-
* FOR OFP / CWA * DOWNLOAD v1.2.1: http://www.mediafire.com/download.php?7v5rc5rappo4rtg The linked file includes a template and a demo mission. The goal of this script pack is to provide an addon-free and easy to use way of including suppressive fire in user missions. Every time a shot is fired the position of the bullet will be checked at given intervals, until it disappears or impacts. If the bullet comes close enough to a unit the suppression level of that unit will raise. If the suppression level is high enough that unit will either have their fire rate reduced or immediately lay down and stop doing anything. Only the most skilled ones will have a chance to keep crawling or keep firing. In addition to this, units detecting an incoming grenade will try to run away from it. FEATURES Every single bullet is checked for suppression Two levels of suppression: moderate and full Suppressed units will fire at a considerable reduced rate Fully suppressed units are forced to lay down Only very skilled units will have a chance to return fire and/or move when fully suppressed Units will try to run away from incoming grenades, if they detect them While any weapon can suppress, MGs, LMGs and sniper rifles have a bigger suppression effect Secondary weapons won't suppress Specific units can be excluded from being suppressed, including players Vehicles and their crews are unaffected by suppression, but can inflict it Killing or damaging an enemy unit will raise the suppresion levels of its nearby allies Works both in SP and MP (optional) Very skilled units may have a chance of skipping suppression altogether (for that given bullet) (optional) Fleeing units can be automatically excluded from suppression (you might want to use this for compatibility with some missions) INSTRUCTIONS In order to use kSuppression in your mission follow these steps: Merge the template mission into yours. Copy all the folders and files in the template mission to that of your mission If you plan to only use this for single player you can skip the CoC NS 2 ones. So you could just copy: kSupp, kScustom and ofp_scriptlib If you have your own "stringtable.csv" copy/paste its contents to the end of your own. Adjust the options to your liking in the "kSupp_settings.sqf" file Add this line to the init of any empty vehicle (that includes static machine guns): [this] exec "kSupp\prepEmptyVeh.sqs" Advanced: NOTES Only MGs, LMGs and sniper rifles have a reliable suppression effect. Suppressing with ARs or pistols will require significantly more effort This pack only uses a single global variable, and a few others for functions, etc, so it shouldn't cause any savegame bug CoC NS 2 is only used if the mission is detected to be played in MP. In that environment this whole system won't start working until CoC NS 2 loads properly and the suppression scripts are initialized. For SP this wait will be significantly shorter, as CoC NS 2 won't be used. KNOWN ISSUES Sometimes units are caught between bullet position checks and aren't suppressed. That also applies to those near to bullet impact points. Empty vehicles will be assigned the fired EH twice if manned before being registered in the kSupp array Suppressive fire affects units of all sides but those belonging to the one of the suppressing unit. So, in situations where two sides are fighting together they may end up suppressing each other. CHANGELOG CREDITS Chain of Command team (for CoC NS 2, probably the best system for server/client synching) Vektorboson (for ofp_scriptlib, a varied, lighteweight and generally awesome pack of functions) Igor Drukov and his bro (for getrelpos.sqf) Drongo69 (for the script to register groups, and for support and inspiration in general) TPWC AI suppression system (the idea to use balls over units for debugging and different suppression levels comes from there) ECP (for using an array to store global values without creating SP savegame crash) SLX (for the simple yet effective way to detect null vars and general inspiration on suppression) Have in mind that those are the ones I've kept track of and/or remember. It's more than likely many others that should be credited here. If you feel that you or someone else should be added just let me know and I'll update the credits accordingly. DOWNLOAD v1.2.1: - http://www.mediafire.com/download.php?7v5rc5rappo4rtg Older versions: