Inkompetent 0 Posted October 15, 2011 Well, the 'suppression effect' isn't the issue here. It's calculating what AI is close enough to the bullet path for them to detect the shot. There could be several ways to do it, but I can't really think of anything resource-efficient. If the AI would be forced into Combat mode as soon as someone from the opposing side fires a shot within X meters radius, then they'd be completely broken as far as maneuverability goes, and it's a pretty tough nut to crack. If hear shots that very well could be directed at them, then they *should* indeed react on them, but if they realize they are not engaged they should more or less ignore subsequent shooting from that same area until they actually are under fire. Complex things to code. Share this post Link to post Share on other sites
stubs 10 Posted October 15, 2011 (edited) Use SLX Suppression, it's part of the SLX pack. Solus has really nice suppression effects. Edit: Here is the text from the SLX readme... SLX_Suppression_Effects: When people are shot at close enough a lot they duck lower, breathe quickly, and their hands shake a little. Dependencies: SLX_NetCode. The two addons you need from SLX for the supression effects underlined in the above text. And just to help out, the effects of suppression on the player and ai are the same just magnified with an easier trigger (like bullets flying over your head). And anyone who is worried about the old bug where slx made you lay down when suppressed... It got sqaushed a long time ago!!! Edited October 15, 2011 by stubs Additional info Share this post Link to post Share on other sites
wiggum2 31 Posted October 15, 2011 Using a big mod that can/will break most missions is not a option for most people. Share this post Link to post Share on other sites
stubs 10 Posted October 15, 2011 Using a big mod that can/will break most missions is not a option for most people. I understand that, but you only need those two files from the mod, besides since SLX is up for grabs you might be able to make a script from it. Share this post Link to post Share on other sites
maturin 12 Posted October 15, 2011 Well, the 'suppression effect' isn't the issue here. It's calculating what AI is close enough to the bullet path for them to detect the shot. In my experience, the distances are quite similar. AI only respond to very near misses. You could just peg the shaky hands suppression effect to the same mechanic of them hearing a nearby sonic crack. Share this post Link to post Share on other sites
CarlGustaffa 4 Posted October 15, 2011 (edited) But CG, the AI hears sonic cracks when I shoot at them. If I fire a weapon, they won't hear it from 300m. If I send the round past their ear, they will acquire me as a target.Is this a Zeus feature or something? Because it seems like there must be some way BIS could figure it out. Haven't studied Zeus. But without it I can fire into the ground next to them and they don't even take notice until it impacts really close. AI is then on a search and destroy waypoint. I make up for this deafness by using fired EH that reveals the shooter based on distance and caliber, but area around shooter rather than line of fire. Also I prevent sending every shot to avoid overloading network traffic with this information (first shot, then wait 5 seconds until next message - too bad we can't send positional inaccuracies). I haven't got around to test this yet with the improved reveal, but it used to be enough to make them investigate the area. Edited October 15, 2011 by CarlGustaffa Share this post Link to post Share on other sites
wiggum2 31 Posted October 15, 2011 Would you be able to send me this script CarlGustaffa ? Maybe via PM or just post it here. Share this post Link to post Share on other sites
maturin 12 Posted October 15, 2011 Yep, the AI doesn't hear sonic cracks in the vanilla game. Zeus lets them hear them somehow, and Zeus wasn't crashing servers. Would be interesting to see how they he did it. Share this post Link to post Share on other sites
-Coulum- 35 Posted October 16, 2011 Would it be efficient for bi to create a whole other hit zone for all units that is maybe a metre radius around each unit. If this hit zone is hit the unit would become suppressed and react accordingly. I have no idea about the mechanics of the game but maybe this would not require as much CPU usage? Share this post Link to post Share on other sites
maturin 12 Posted October 16, 2011 Ace works around this problem by extending the AI's gunshot hearing out to at least 700m from a vanilla of 400m for the DMR. With the ACE tweak, at a range where you are likely to be putting accurate single rounds past their head (without hitting the ground near their feet), they will be alerted by the muzzle blast anyways. The only issue will be with supersonic rounds at extreme ranges, or with suppressed scoped weapons firing full power rounds from several hundred meters. Edit: And I am still quite attached to my lesser idea for player-only sonic snap suppression effects. Since the engine has to check the location of rounds in order to choose the correct sonic boom file, it shouldn't cost too much resources to fire a script at the same time as the sound. Share this post Link to post Share on other sites
CarlGustaffa 4 Posted October 17, 2011 (edited) Would you be able to send me this script CarlGustaffa ?Maybe via PM or just post it here. Whole EH-Fired script used in Domino (based on Domination) in spoiler: _unit = _this select 0; _weapon = _this select 1; _muzzle = _this select 2; _mode = _this select 3; _ammo = _this select 4; _magazine = _this select 5; //Not in use yet. _projectile = _this select 6; _vehtype = typeOf vehicle _unit; _shaketypes1 = ["HMMWV_M1151_M2_DES_EP1","HMMWV_M998A2_SOV_DES_EP1","HMMWV_MK19_DES_EP1","HMMWV_M1151_M2_CZ_DES_EP1"]; //Less stable platform _shaketypes2 = ["HMMWV_M998_crows_MK19_DES_EP1","HMMWV_M998_crows_M2_DES_EP1","M1126_ICV_M2_EP1","M1126_ICV_mk19_EP1","M1128_MGS_EP1","M2A2_EP1","M2A3_EP1","M6_EP1","M1129_MC_EP1"]; //More stable platform _flareammo = ["F_40mm_White","F_40mm_Green","F_40mm_Red","F_40mm_Yellow"]; _flaremagsw = ["FlareWhite_M203","FlareGreen_M203","FlareRed_M203","FlareYellow_M203"]; _flaremagse = ["FlareWhite_GP25","FlareGreen_GP25","FlareRed_GP25","FlareYellow_GP25"]; if (_unit == vehicle player) then { if (player != vehicle player) then { if (_vehtype in _shaketypes1) then { switch (_weapon) do { case "M2" : {if (player == gunner vehicle player) then {addCamShake [1.0,0.5,20]}}; //HMMWV GPK M2 case "M2BC" : {if (player == gunner vehicle player) then {addCamShake [0.8,0.5,20]}}; //??????? case "MK19" : { if (_vehtype == "HMMWV_M998A2_SOV_DES_EP1") then { if (player == vehicle player turretUnit [0]) then {addCamShake [4,0.7,20]}; //HMMWV SOV } else { if (player == gunner vehicle player) then {addCamShake [4,0.7,20]}; //Other HMMWV Mk19 }; }; case "M240_veh" : {if (player == gunner vehicle player) then {addCamShake [0.6,0.7,20]}}; //HMMWV SOV }; } else { if (_vehtype in _shaketypes2) then { switch (_weapon) do { case "M2" : { if (_vehtype == "M1128_MGS_EP1") then { if (player == vehicle player turretUnit [0]) then {addCamShake [0.2,0.35,20]}; //Stryker MGS M2 } else { if (player == gunner vehicle player) then {addCamShake [0.2,0.35,20]}; //HMMWV CROWE M2 WTF???? }; }; case "M2BC" : {if (player == gunner vehicle player) then {addCamShake [0.4,0.7,20]}}; //Stryker M2 and HMMWV CROWE M2 case "MK19" : {if (player == gunner vehicle player) then {addCamShake [2,0.35,20]}}; //CROWS case "MK19BC" : {if (player == gunner vehicle player) then {addCamShake [2,0.35,20]}}; //Stryker Mk19 case "M240_veh" : {if (player == gunner vehicle player) then {addCamShake [0.3,0.35,20]}}; //Bradley/Linebacker case "M242BC" : {if (player == gunner vehicle player) then {addCamShake [0.4,0.35,20]}}; //Bradley/Linebacker case "M68" : {addCamShake [6.0,1.5,10]}; //MGS 105mm, shake affects all onboard. }; }; }; } else { if (_weapon in ["M136","RPG18"]) then { [] spawn { waitUntil {(!alive player) || (secondaryWeapon player != currentWeapon player)}; player removeWeapon secondaryWeapon player; }; }; d_shottimer = time; _check = false; if (_ammo isKindOf "BulletBase") then { _check = true; } else { if (_ammo isKindOf "RocketBase") then { _check = true; } else { if (_ammo isKindOf "MissileBase") then { _check = true; }; }; }; if (d_shottimer > d_shottimerold && _check) then { _radius = 300; d_shottimerold = time + 5; _enemies = []; _speed = (getNumber (configFile >> "CfgMagazines" >> (currentMagazine player) >> "initSpeed")); _caliber = getNumber (configFile >> "CfgAmmo" >> _ammo >> "caliber"); if (_ammo isKindOf "BulletBase") then { _radius = (0.4 + (random 0.2)) * _speed * _caliber; //higher speed and caliber makes easier to detect due higher bang } else { //Gives Mk17 about 400, Mk17SD 150-200, Mk16 200-300, Mk16SD 70-100, M9 50-80, if (_ammo isKindOf "RocketBase") then { _radius = 12500 * sqrt(1/_speed); //slower speed makes easier to detect since can be observed for longer } else { //Gives M136 about 400, MAAWS about 800 if (_ammo isKindOf "MissileBase") then { _radius = 7500 * sqrt (1/_speed) //too slow speeds needs to reduce the factor, but still detects further away than rockets; }; //Gives stingers about 1200, Javelin and Dragon about 1600m }; }; _delay = (2 + random 4) * ((5-(_radius * 0.002)) max 1); _enemies = nearestObjects [player,["SoldierEB","StaticWeapon"],_radius]; sleep _delay; {_x reveal player} forEach _enemies; }; }; }; if (_unit != player) then { _restore = ""; if (_muzzle == "GP25Muzzle") then { switch (_ammo) do { case "F_40mm_White" : {_restore = "FlareWhite_GP25"}; case "F_40mm_Green" : {_restore = "FlareGreen_GP25"}; case "F_40mm_Red" : {_restore = "FlareRed_GP25"}; case "F_40mm_Yellow" : {_restore = "FlareYellow_GP25"}; }; } else { switch (_ammo) do { case "F_40mm_White" : {_restore = "FlareWhite_M203"}; case "F_40mm_Green" : {_restore = "FlareGreen_M203"}; case "F_40mm_Red" : {_restore = "FlareRed_M203"}; case "F_40mm_Yellow" : {_restore = "FlareYellow_M203"}; }; }; if (_restore != "") then {_unit addMagazine _restore}; }; if (_ammo in _flareammo) then { ["glflareclient", [_projectile]] call XNetCallEvent; ["glflareserver", [_projectile]] call XNetCallEvent; }; Hehe, noticed some not so good looking code, but you get how it works. Not checked if it still works, but I know it used to. There are scripts in some of my SP missions that no longer work after patches, but I haven't looked into it yet. Edited October 17, 2011 by CarlGustaffa Share this post Link to post Share on other sites