Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: A change I feel compelled to make in Bomb.class  (Read 355 times)

0 Members and 1 Guest are viewing this topic.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6040
A change I feel compelled to make in Bomb.class
« on: May 08, 2024, 04:08:20 PM »

During a spell of testing bomb explosion effects against the land I was puzzled by the occasional instance of the effect generated obviously applying to a different bomb size. Specifically, when dropping 2,000lb bombs above a certain height it was frequently seen that instead of the expected effect set from the BOMB1000 folders being used, the effects would instead be drawn from the BOMB250 folders. Looking into the matter in Bomb.class revealed why.

When bombs impact, there are instances where the power and radius values are altered, which affects explosive effect and potentially the visual effects invoked:

- If the impact velocity against land is faster than 50m/s, both power and radius and reduced to 80% of the values set in the weapon's class. And this sets a boolean which results in the use of effects residing in "dig_in" folders for most bombs and rockets.

- If an object of class "House" is struck, power is increased to 140% and the radius is decreased to 70%.

- If a ship is hit, power is increased to 140% and the radius is decreased to 60%.

The fly in the ointment here is that the altered power value is used not just for the explosive damage incurred, but also to select the appropriate visual effects. In my case, the reduction of power to 80% of the value in the weapon class caused the use of effects designed for the smaller bomb sizes.

Now, for the fast fall speed on land which causes the invocation of effects from the "dig_in" folders the effects are designed with the bomb size in mind. It makes no real sense, then, to use effects for a smaller explosive. And for other events involving 'House' objects and ships I feel the same reasoning is equally valid. Because the effect sizing is very different, being much too large to be appropriate for a relatively smallalteration in the explosive power.

To address this, I've altered the code to use the value of power as set in the weapon's class for the selection of the visual effect. This DOES NOT alter the intended explosive damage effected upon objects; it merely 'restores' the selection of the visual explosion effects more appropriate for the weapon.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Whiskey_Sierra_972

  • Modder
  • member
  • Offline Offline
  • Posts: 6507
  • In memory of my beloved hero: Saburo SAKAI!
Re: A change I feel compelled to make in Bomb.class
« Reply #1 on: May 09, 2024, 10:29:00 AM »

This seem good....

But what I think is the difference between the specific bombs type in RL....

Taking in account the German general purpose bomb SC1200 where the mass/explosive is 1117/631 it have small penetration capacity so the explosive visual effect is anyway generated because the underground sinking or target structure resistance (ex a building) isn't so big to compress the energy development.....

BUT

Taking in account the German penetration bomb PC1400 where the mass/explosive is 1400/300 it have a big penetration capacity so the explosive visual effect is greatly reduced because the target structure (like a ship under decks hull) or the underground siniking in a concrete structure (like a bunker) should have the resistance to compress the energy development....if we also remeber that usually the explosive weight in this kind of bombs is (and in general for the penetration bombs , more or less) half what is inside the previous example SC1200....

SO

IMPO restoring the full effect for all bombs can be not so RL compatible , maybe if differenciating the effect in relation at bomb type (maybe only penetrating/not penetrating) could be more RL correct....
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6040
Re: A change I feel compelled to make in Bomb.class
« Reply #2 on: May 09, 2024, 11:06:43 AM »

Walter,
You raise good and important points.

To reiterate, the same power value for calculation of explosive force is used to select the effect group for the visual blast.

For lhigh vertical speed land hits power is reduced, logically due to the absorption of energy by the ground burying the bomb.

For both 'House' objects (that includes humans, animals paint buckets and most everything else in static.ini) and ship hits power is increased by factor 1.4. This goes even farther from the argument of diminished visual effect due to the explosion occurring inside when penetrating. It can result in the next larger explosion effects being called. And so in such cases my use of the original power value as set in the weapon class makes more sense.

And again, for utmost clarity, my changes concern ONLY the visual aspect; the power values as modified in the stock code and used for the calculated explosive force are kept as is.

This highlights the use of one property for more than one purpose. Perhaps it would have been better from the start to have created an additional property which deteines the visual effects to use, separating this entirely from the explosive power value for destruction.

Related to this is the horrible scheme whereby one powerType property is used for napalm, phosphorous and incendiary ordnance. These are differentiated by use of power and powerRadius (which I've improved upon), where dedicated powerType values would have made far more sense. And like the other bombs, these types of ordnance were subject to the same alterations of power, risking the selection of the entirely wrong visual effect (my new napalm, phosphorous and incendiary effects are quite different to each other.)

There is room for a significant overhaul.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6040
Re: A change I feel compelled to make in Bomb.class
« Reply #3 on: May 09, 2024, 11:18:15 AM »

To illustrate my refined treatment of napalm/phosphorous/incendiary ordnance, here's the relevant part of Explosions.generate(). From the weapon class, property powerType=2 applies here, which is variable i. Note the numerous new methods I've created with which to generate the dedicated new effects.

Code: [Select]
if (i == 2)  //if "NAPALM" (all incendiary, including phosphorous and other fire starting ordnance)
{
if (f == 0.0F && f1 == 0.0F)  //0, 0 for small incendiary bomblets ONLY...
{
generateIncendiaryBomblet(actor, point3d);  //for individual bomblets in a cluster munition
return;  //this keeps land/water effects from being reached below...
}
if (f1 > 0.0F && f1 < 3.0F)  //if f1 powerRadius < 3.0, phosphorous
{
if (f < 1.0F)  //f = power
{
generateWPBurstSmall(actor, point3d);  //WP rockets
f = 4.0F;  //to use Explode10Kg effects, below...
}
else  //if (f >= 1.0F)
{
generateWPBurstLarge(actor, point3d);  //WP bombs
f = 15.0F;  //to use RS82 effects, below...
}
}
if (f1 >= 3.0F && f1 < 50F)  //if f1 powerRadius 3 to < 50, incendiary
{
if (f < 4.0F)  //if power < 4 (was 10), small incendary effects;  (should NOT include land/water hit effects, below?...)
{
generateIncendiarySmall(actor, point3d);  //not for individual bomblets
f = 0.5F;  //to use CannonBigExp effects, below...
}
else  //if (f >= 4.0F)
{
generateIncendiaryLarge(actor, point3d);  //not for individual bomblets
f = 4.0F;  //to use Explode10Kg effects, below...
}
}
if  (f1 >= 50.0F)  //if f1 powerRadius 50+, napalm
{
generateNapalm(actor, point3d);
return;  //this keeps land/water effects from being reached below...
}
}

Here's the stock scheme:

Code: [Select]
if(i == 2)
{
if(f1 < 3F)
{
switch(World.rnd().nextInt(1, 2))
{
case 1: // '\001'
Eff3DActor.New(actor, null, rel, 1.0F, "3DO/Effects/Fireworks/Termit1W.eff", 10F);  //4.12: splat.mat, 3.5m
break;

case 2: // '\002'
Eff3DActor.New(actor, null, rel, 1.0F, "3DO/Effects/Fireworks/Termit1SM.eff", -1F);  //4.12: smoke, 3 particles, live 6s, 19.5-55.5m
break;
}
} else
{
Vector3d vector3d = new Vector3d();
for(int j = 0; j < 36; j++)
{
vector3d.set(World.rnd().nextDouble(-20D, 20D), World.rnd().nextDouble(-20D, 20D), World.rnd().nextDouble(3D, 20D));
float f2 = World.rnd().nextFloat(3F, 15F);
BallisticProjectile ballisticprojectile = new BallisticProjectile(point3d, vector3d, f2);
Eff3DActor.New(ballisticprojectile, null, null, 1.0F, "3DO/Effects/Fireworks/PhosfourousFire.eff", f2);  //4.12: fire, live 1s, 16/s, 2.5-56m
}

}
return;
}
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Whiskey_Sierra_972

  • Modder
  • member
  • Offline Offline
  • Posts: 6507
  • In memory of my beloved hero: Saburo SAKAI!
Re: A change I feel compelled to make in Bomb.class
« Reply #4 on: May 09, 2024, 01:29:54 PM »

Ok , I was thinking that I was focusing wrong!

As the explosion effect is what you're looking for I can only agree with you!

And a expanded effect variation is more than welcomed too!

I can only hope to see it also in 422....
Logged
Pages: [1]   Go Up
 

Page created in 0.034 seconds with 25 queries.