Special Aircraft Service
Battlefield - Airborne - Tactical (BAT) => BAT Lounge => Topic started by: genXgamer on March 31, 2022, 01:30:23 AM
-
Hi Guys
What do you recommend I edit in the Technics.ini to prevent infantry exploding into an almighty fireball when strafed.
Like seriously it's as though I've hit a fuel tanker.
Should I just increase the damage needed to destroy them?
-
I suspect WxTech will get this sorted lol
-
A lot of the humans have been given the Body type "FuelSmall" in static.ini. In my own game I've changed a good many to "WoodSmall", which is the least prominent of the effects for the Body types.
If you look in
Effects/Explodes/Objects/House/
You will see these folders:
Fuel
FuelSmall
Rock
RockMiddle
Wood
WoodSmall
The effects contained in each folder are assigned to the static objects as set I static.ini. An entry of
Body FuelSmall
Could be altered to
Body WoodSmall //FuelSmall
In static.ini, for each object is a Panzer value, which very crudely can (?) be thought of as armor thickness in meters. If you don't want particular object to be so easily destructible, you could go from
Panzer 0.005
To
Panzer 0.05 //0.005
Or whatever. The acceptable range is, I believe, 0.001 to 9.99. When I make changes, I keep the original as a 'comment' by placing preceding "//" characters.
I don't recall if I included in my effects pack the additional folder, "Flesh", which is not currently utilized but is mooted as a Body type to implement in future in some static.ini entries. As is "Cloth". Such additional types would provide further flexibility in the assignment of effects beyond the relatively limited set we now have. This will require the alteration of code in some number of classes.
-
Thanks mate
With the benefit of the above information and an early Friday knockoff, it's been sorted.
It had nothing to do with Stationary Infantry - Allies Infantry Standing as I had thought.
It was static soldiers having Body FuelSmall, the thing that threw me is changing to WoodSmall made no difference until I realised in amongst the 30 odd soldiers were 4 different soldiers still with FuelSmall.
Who thought of having humans that explode like fuel drums was a good idea!?
Thanks for your help, another mission ticked off.
-
There are oodles of objects that have nonsensical Body type assignments!
It would be a worthwhile project to introduce a couple additional types, such as Cloth and Flesh, perhaps, and go through the whole object list and rationalize it.
Furthermore, there are a good many small objects that I would consider as 'set dressing', yet have collision boxes and hence emit fire/smoke effects when destroyed. For instance, a lousy little wheel chock, or a log with an axe in it, or a small stack of steel pipes are destructible effect emitters. For missions having 'busy clutter' of this sort clumped about an airfield, when stuff gets blowed up real good there can be lots of superfluous, resource-consuming effect particles being generated. I would suggest to make such flotsam and jetsam non destructible. ;)
-
I decided to look a bit deeper into this. In both the 4.12 and B.A.T. House.class we have the method I include below. It appears that the Body type "Flesh" is already supported. I'll do some experimenting to verify this. Of great interest are the algorithms which calculate the minimum and maximum TNT values required for destruction. I'll work up a spreadsheet of a table of values, and post it.
private static Properties LoadHouseProperties(SectFile sectfile, String s, String s1, String s2)
{
Properties properties = new Properties();
properties.SoftClassInnerName = s2;
properties.FingerOfFullClassName = Finger.Int(s1);
String s3 = sectfile.get(s, "equals");
if(s3 == null || s3.length() <= 0)
s3 = s;
properties.MESH0_NAME = getS(sectfile, s, "MeshLive");
properties.MESH1_NAME = sectfile.get(s, "MeshDead");
if(properties.MESH1_NAME == null)
getS(sectfile, s, "MeshDead");
if(properties.MESH1_NAME.equals(""))
properties.MESH1_NAME = null;
properties.ADD_HEIGHT_0 = getF(sectfile, s3, "AddHeightLive", 0.0F, -100F, 100F);
properties.ADD_HEIGHT_1 = getF(sectfile, s3, "AddHeightDead", 0.0F, -100F, 100F);
properties.ALIGN_TO_LAND_NORMAL = getF(sectfile, s3, "AlignToLand", 0.0F, 0.0F, 1.0F) > 0.0F;
properties.ALIGN_TO_LAND_NORMAL = getF(sectfile, s3, "AlignToLand", 0.0F, 0.0F, 1.0F) > 0.0F;
properties.IGNORE_SHADOW_DATA = false;
if(sectfile.get(s, "IgnoreShadowData") != null)
properties.IGNORE_SHADOW_DATA = true;
properties.PANZER = getF(sectfile, s3, "Panzer", 0.0001F, 50F);
String s4 = getS(sectfile, s3, "Body");
if(s4.equalsIgnoreCase("WoodSmall"))
{
properties.MAT_TYPE = 0;
properties.EFF_BODY_MATERIAL = 3;
properties.EXPL_TYPE = 0;
properties.MIN_TNT = 0.25F * (properties.PANZER / 0.025F);
properties.MAX_TNT = properties.MIN_TNT * 2.0F;
properties.PROBAB_DEATH_WHEN_EXPLOSION = 0.01F;
} else
if(s4.equalsIgnoreCase("WoodMiddle"))
{
properties.MAT_TYPE = 0;
properties.EFF_BODY_MATERIAL = 3;
properties.EXPL_TYPE = 1;
properties.MIN_TNT = 5F * (properties.PANZER / 0.15F);
properties.MAX_TNT = properties.MIN_TNT * 1.7F;
properties.PROBAB_DEATH_WHEN_EXPLOSION = 0.01F;
} else
if(s4.equalsIgnoreCase("RockMiddle"))
{
properties.MAT_TYPE = 1;
properties.EFF_BODY_MATERIAL = 4;
properties.EXPL_TYPE = 2;
properties.MIN_TNT = 6F * (properties.PANZER / 0.12F);
properties.MAX_TNT = properties.MIN_TNT * 1.7F;
properties.PROBAB_DEATH_WHEN_EXPLOSION = 0.01F;
} else
if(s4.equalsIgnoreCase("RockBig"))
{
properties.MAT_TYPE = 1;
properties.EFF_BODY_MATERIAL = 4;
properties.EXPL_TYPE = 3;
properties.MIN_TNT = 12F * (properties.PANZER / 0.24F);
properties.MAX_TNT = properties.MIN_TNT * 1.7F;
properties.PROBAB_DEATH_WHEN_EXPLOSION = 0.05F;
} else
if(s4.equalsIgnoreCase("RockHuge"))
{
properties.MAT_TYPE = 1;
properties.EFF_BODY_MATERIAL = 4;
properties.EXPL_TYPE = 4;
properties.MIN_TNT = 30F * (properties.PANZER / 0.48F);
properties.MAX_TNT = properties.MIN_TNT * 1.7F;
properties.PROBAB_DEATH_WHEN_EXPLOSION = 0.05F;
} else
if(s4.equalsIgnoreCase("FuelSmall"))
{
properties.MAT_TYPE = 2;
properties.EFF_BODY_MATERIAL = 2;
properties.EXPL_TYPE = 5;
properties.MIN_TNT = 0.2F * (properties.PANZER / 0.002F);
properties.MAX_TNT = properties.MIN_TNT * 1.7F;
properties.PROBAB_DEATH_WHEN_EXPLOSION = 0.01F;
} else
if(s4.equalsIgnoreCase("FuelBig"))
{
properties.MAT_TYPE = 2;
properties.EFF_BODY_MATERIAL = 2;
properties.EXPL_TYPE = 6;
properties.MIN_TNT = 0.8F * (properties.PANZER / 0.008F);
properties.MAX_TNT = properties.MIN_TNT * 1.7F;
properties.PROBAB_DEATH_WHEN_EXPLOSION = 0.01F;
} else
if(s4.equalsIgnoreCase("Flesh"))
{
properties.MAT_TYPE = 3;
properties.EFF_BODY_MATERIAL = 3;
properties.EXPL_TYPE = 0;
properties.MIN_TNT = 0.01F * (properties.PANZER / 0.002F);
properties.MAX_TNT = properties.MIN_TNT * 1.7F;
properties.PROBAB_DEATH_WHEN_EXPLOSION = 0.1F;
} else
{
System.out.println("House: Undefined Body type in class '" + s1 + "'");
System.out.println("Allowed body types are:WoodSmall,WoodMiddle,RockMiddle,RockBig,RockHuge,FuelSmall,FuelBig,Flesh");
throw new RuntimeException("Can't register house object");
}
return properties;
}
-
In further perusing the code in House.class, we see that for MAT_TYPE = 3, which is "Flesh", there is no invocation of the method HouseExplode in Explosions.class. This would seem to imply that no effects are generated; the object simply adopts its dead mesh, if one is assigned.
This will be settled by experimentation to come...
If this turns out to be the case, I wonder if it wouldn't be better to assign a smoke effect. I ponder this because the "Flesh" type could be used for all kinds of objects such as clotheslines, pup tents, chairs, tables, etc., etc. This might require to add a new method to Explosions.class, or alter the existing HouseExplode method therein.
More stuff to mull over and ruminate upon.
-
The original request was, unless I am mistaken, for stationary objects.
And now you are talking, unless I am mistaken, about static objects!
But in the technics.ini (for stationary objects) I don't see any line "Body xxx" for the infantry.
I do not understand your approach to the subject... sorry ! :-X
-
G'day Epervier
Yes my original post did mention Stationery Infantry as I thought this was the culprit for causing the fireball.
Further investigation proved it was the static soldiers that was causing it.
So that is why the topic has shifted to static objects.
-
Here's a quick table put together using algorithms in House.class. It turns out that the largest permissible Panzer value for 'House' objects is 50. The table shows the minimum TNT value by Panzer value, for all of the House Body types. This applies for explosions, which furthermore are modified by distance. There are separate calculations for the determination of penetration by projectiles.
(https://i.imgur.com/XG7SQpl.jpg)
-
And I've verified that as currently implemented "Flesh" Body type objects, when destroyed, are not accompanied by any effects; they simply adopt the destroyed mesh, if one has been assigned.
I'm seriously tempted to assign a simple smoke effect for the "Flesh" types, and if so likely with no fire.
-
Yes my original post did mention Stationery Infantry as I thought this was the culprit for causing the fireball.
Further investigation proved it was the static soldiers that was causing it.
So that is why the topic has shifted to static objects.
Interesting!
I didn't think these objects interacted with the static objects they were made of!
Thanks ! :)
-
Of related interest, a topic of mine in the Superschool:
https://www.sas1946.com/main/index.php?topic=68698
-
My left hand is cramped because I've just changed in static.ini many hundreds of object Body types to Flesh. Featuring prominently are camo nets, walls, flags, boxes, humans, animals, wells, empty barrels and damaged objects.
-
G'day WxTech
This is all very interesting and another example of improving what we already have.
When it comes to humans I prefer the Flesh option with no effects, although the WoodSmall option in my scenario also worked.
-
The WoodSmall effects include fire and small blast particles. The new Flesh effect is only the smoke, which is of less that half the density, is smaller, and lasts 1/3 as long. Therefore less obvious in all respects.
The stock code in House.class treats the Flesh Body type as supremely fragile, where in many instances it seems a single bullet can destroy the object. I've altered this, treating Flesh like the other Body types (such as WoodSmall), which requires more hits, making it more widely suitable.
For instance, I just now gave trees the Flesh Body type. And so now when a dense crowd of trees are taken out by a big bomb, instead of a great host of fires and smoke from the previous Wood or WoodSmall effects there is now a much subtler smoke only. It's always bugged me over the years when acres of trees would ignite from a single bomb blast, whereas in reality there would be essentially just stripping of foliage and branches--no major forest fire set off instantaneously.