Special Aircraft Service

Please login or register.

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

Author Topic: Modifying Infantry  (Read 1690 times)

0 Members and 1 Guest are viewing this topic.

genXgamer

  • member
  • Offline Offline
  • Posts: 1332
Modifying Infantry
« 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?
Logged
Go in quickly - Punch hard - Get out!

PO_MAK_249RIP

  • CMON U SPURS!
  • member
  • Offline Offline
  • Posts: 2087
Re: Modifying Infantry
« Reply #1 on: March 31, 2022, 06:26:54 AM »

I suspect WxTech will get this sorted lol
Logged
Corsair Carbide case, Intel core i5 4690 3.5ghz with Arctic Cooler, Asus Rock H97 performance, MSI Ventus XS OC 1660GTX 6GB DDR6, 32GB Patriot Viper 1600Mhz, 256GB/500GB Crucial SSDs, Windows 10 64bit.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6013
Re: Modifying Infantry
« Reply #2 on: March 31, 2022, 05:14:40 PM »

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.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

genXgamer

  • member
  • Offline Offline
  • Posts: 1332
Re: Modifying Infantry
« Reply #3 on: April 01, 2022, 01:17:51 AM »

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.
Logged
Go in quickly - Punch hard - Get out!

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6013
Re: Modifying Infantry
« Reply #4 on: April 01, 2022, 01:49:38 AM »

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.  ;)
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: 6013
Re: Modifying Infantry
« Reply #5 on: April 01, 2022, 02:08:37 AM »

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.

Code: [Select]
        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;
        }
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: 6013
Re: Modifying Infantry
« Reply #6 on: April 01, 2022, 03:41:33 AM »

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.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Epervier

  • 4.09 Guardian Angel !
  • SAS Team
  • member
  • Offline Offline
  • Posts: 9529
  • I'm French and Rebel_409! Nobody is perfect!
    • Some tinkering here
Re: Modifying Infantry
« Reply #7 on: April 01, 2022, 06:11:36 AM »

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
Logged
If your results do not live up to your expectations, tell yourself that the great oak was once an acorn too. - Lao Zi -

genXgamer

  • member
  • Offline Offline
  • Posts: 1332
Re: Modifying Infantry
« Reply #8 on: April 01, 2022, 06:34:53 AM »

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.
Logged
Go in quickly - Punch hard - Get out!

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6013
Re: Modifying Infantry
« Reply #9 on: April 01, 2022, 07:00:34 AM »

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.

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: 6013
Re: Modifying Infantry
« Reply #10 on: April 01, 2022, 07:05:08 AM »

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.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Epervier

  • 4.09 Guardian Angel !
  • SAS Team
  • member
  • Offline Offline
  • Posts: 9529
  • I'm French and Rebel_409! Nobody is perfect!
    • Some tinkering here
Re: Modifying Infantry
« Reply #11 on: April 01, 2022, 07:33:24 AM »

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 !  :)
Logged
If your results do not live up to your expectations, tell yourself that the great oak was once an acorn too. - Lao Zi -
Pages: [1] 2   Go Up
 

Page created in 0.047 seconds with 24 queries.