Jump to content
Sign in to follow this  
noubernou

Secondary Explosion Effects

Recommended Posts

Explosions right now are simulated very basically in terms of damage. It would be nice in ArmA3 that indirect damage is calculated using more variables than just a decreasing value across a range, but to actually simulate fragmentation probabilities based on parameters you can define about the round (something similar to the explosive property in CfgAmmo).

Right now you have to make explosions overly damaging to compensate for the probability of being killed by fragmentation. This creates unrealistic damage for other objects that would not take as much damage by a certain round.

I have been thinking of ways to do this for ACE, but most things are thing that would be too intensive to implement in scripting, or there isn't enough information coming back from the game to really do it efficiently.

Share this post


Link to post
Share on other sites

That would be cool. What about some kind of frag "round" propagation? Could also be used for things like grenades, mines, flechettes, canisters, etc?

Share this post


Link to post
Share on other sites

Pragmatically, there's no real difference between simulating fragmentation damage and applying randomised damage. As a practical solution I might suggest a randomised damage based on the armour of the item being damaged.

Share this post


Link to post
Share on other sites

I'd hate to be the guy that dies 100m away from a blast because of a tiny piece of shrapnel in the eye & brain :(

I would like this kind of damage for some explosions (eg. FRAG grenades) and HE (high explosive) damage as well though.

Edited by vinc3nt

Share this post


Link to post
Share on other sites
Pragmatically, there's no real difference between simulating fragmentation damage and applying randomised damage. As a practical solution I might suggest a randomised damage based on the armour of the item being damaged.

Pretty much. As long as it obeys the current damage limiting caused by obstructions (as in, you wont randomly get hit by frag when you are inside a concrete bunker) it would be fine being pretty much random (based on parameters like I mentioned).

Pretty much something like config values for the range of fragmentation, and maybe the average size of fragmenting pieces, as well as the total amount of fragmentation (either a count, or even better a surface area of the fragmenting case that the size uses to get a number).

Share this post


Link to post
Share on other sites
Pretty much. As long as it obeys the current damage limiting caused by obstructions (as in, you wont randomly get hit by frag when you are inside a concrete bunker) it would be fine being pretty much random (based on parameters like I mentioned).

Pretty much something like config values for the range of fragmentation, and maybe the average size of fragmenting pieces, as well as the total amount of fragmentation (either a count, or even better a surface area of the fragmenting case that the size uses to get a number).

Hmm yeah, so not a purely random event :)

Perhaps... a random event that drives a gunfire at the unit from the origin of the explosion, so that normal fire blocking geometry can block the round?

So the idea would be that the randomised damage script would decide who/what in the vicinity gets damaged, and then instead of simply applying that damage it actually fires a round toward it. So no unnecessary rounds are fired, and fire block geometry can be used as cover.

Share this post


Link to post
Share on other sites
Hmm yeah, so not a purely random event :)

Perhaps... a random event that drives a gunfire at the unit from the origin of the explosion, so that normal fire blocking geometry can block the round?

So the idea would be that the randomised damage script would decide who/what in the vicinity gets damaged, and then instead of simply applying that damage it actually fires a round toward it. So no unnecessary rounds are fired, and fire block geometry can be used as cover.

Yes, I've considered this as a potential solution in ArmA2 even. Getting units within a certain distance of an explosion, then applying a series of functions to determine if, one they should even be fired at with "fragmentation" and two, how much probability would it be if there was fragmentation "fired" at them would it hit, etc, the firing it.

Share this post


Link to post
Share on other sites

Couldn't there just be actual bullet entities shot out of the secondary explosion at a random trajectory/velocity? I'm sure that would be infinitely easier to implement and be more reliable, efficient and effective. I think you guys are over complicating this...

Share this post


Link to post
Share on other sites
Couldn't there just be actual bullet entities shot out of the secondary explosion at a random trajectory/velocity? I'm sure that would be infinitely easier to implement and be more reliable, efficient and effective. I think you guys are over complicating this...

If it was implemented at a native level, yes, that would be the best, actual fragmentation.

On the other hand that is a LOT of overhead. It is not hard to try for yourself.

I was using this as a test for the M109:

FRAG_func = {
_pos = (_this select 0) select 0;
_fragCount = (_this select 0) select 1;
_fragPF = (_this select 0) select 2;
_fragCurrent = (_this select 0) select 3;


//_pos set[2, 1];
_ammo = ["B_20mm_AP"];
if(_fragCurrent == 0) then {
	"SA_155mm_m795_m782_exp" createVehicle _pos;
};
if(_fragCurrent < _fragCount) then {
	_fragCurrent = _fragCurrent + _fragPF;
	(_this select 0) set[3, _fragCurrent];
	for "_i" from 1 to _fragPF do {
		_xr = -1+(random 2);
		_yr = -1+(random 2);
		_zr = (-1+(random 2)+0.75) min 0.125;

		_speed = 200+(random 150);

		_vel = [_xr*_speed, _yr*_speed, _zr*_speed];

		_b = (_ammo select (round (random ((count _ammo)-1)))) createVehicle [(_pos select 0)+_xr, (_pos select 1)+_yr, (_pos select 2)+_zr];
		_b setVelocity _vel;
		/*
		[_b] spawn {
			private ["_bbb"];
			_bbb = _this select 0;

			waitUntil {
				if(alive _bbb) then {
					drop ["\Ca\Data\Cl_basic","","Billboard",1,5,(getPos _bbb),[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""];
					_marker = createMarkerLocal [format["m%1", random(1000)+time], (getPos _bbb)];
					_marker setMarkerTypeLocal "Dot";
					_marker setMarkerColorLocal "ColorRed";

					_marker setMarkerSizeLocal [0.1, 0.1];
				};
				(!alive _bbb)
			};
			//_marker setMarkerText format["g:%1", (_this select 2)];
			_marker setMarkerColorLocal "ColorGreen";
			_marker setMarkerSizeLocal [0.6, 0.6];
		};
		*/
	};
} else {
	[(_this select 1)] call CBA_fnc_removePerFramehandler;
	//player sideChat format["f: %1", diag_tickTime-NS];
};
};
//setAccTime 0.05;
[] spawn {
for "_i" from 1 to 5 do {
	_pos = getPosATL boomPos;
	_pos set[0, (_pos select 0) + (random 20)];
	_pos set[1, (_pos select 1) + (random 20)];
	_pos set[2, (_pos select 2) + (random 10)+1];

	[FRAG_func, 0, [_pos, 1000, 100, 0]] call CBA_fnc_addPerFramehandler;
	sleep 3+(random 1);
};
};

Getting any decent number of fragmentation out (1500-2000 pieces per 155mm round) over the course of many seconds essentially halts the game. :p

Share this post


Link to post
Share on other sites

Well then don't use so many... Jeeze. That is a TON. Try quartering that...

Edit:

I imagine that creates a wall of death. Good grief, how could you NOT get hit?

Share this post


Link to post
Share on other sites
Well then don't use so many... Jeeze. That is a TON. Try quartering that...

Then you run into an issue of effectivness. :p Even at 500, performance drops considerably when you have multiple shells detonating within a few seconds of each other. You quickly add up to thousands of objects being tracked in the game.

Not to mention that with createVehicleLocal spawning the instances across the network, the solution is far from ideal. :(

*edit*

Just saw your edit, its actually not that much of a wall of death, even at 2000. :p

Share this post


Link to post
Share on other sites

Well, if it was limited to say -5deg to +45 deg vertically, 250 - 500 would work. And it shouldn't be about effectiveness as much as the chance that you COULD get hit, so you should be careful. Anything more than 360 would mean at least one piece of shrapnel per degree.

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
Sign in to follow this  

×