Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 XML Customization » inbetweenImpactReductionMultiplyDivisor (Trying to make sense of "AmmoTypes.xml")
icon5.gif  inbetweenImpactReductionMultiplyDivisor[message #361385] Sat, 26 September 2020 16:50 Go to next message
Kurt

 
Messages:411
Registered:March 2004
I've been trying to make sense of AmmoTypes.xml for over 10 years now, and while trial and error (much error) has gotten me something I considered as "acceptable till I find better" in 3356, I'm wary to start all over again with 8796, which clearly uses a different calculation (copying values apparently doesn't cut it). I admit I'm not really a fan of the "monkeys + typewriters" type of technique...


The parts I'm having trouble with are those pairs:
<structureImpactReductionMultiplier>x</structureImpactReductionMultiplier>

<structureImpactReductionDivisor>y</structureImpactReductionDivisor>
<armourImpactReductionMultiplier>x</armourImpactReductionMultiplier>

<armourImpactReductionDivisor>y</armourImpactReductionDivisor>
<beforeArmourDamageMultiplier>x</beforeArmourDamageMultiplier>

<beforeArmourDamageDivisor>y</beforeArmourDamageDivisor>
<afterArmourDamageMultiplier>x</afterArmourDamageMultiplier>

<afterArmourDamageDivisor>y</afterArmourDamageDivisor>
The comments in the beginning of the file are significantly unhelpful since they mix each pair of settings into one mongrel ("<structureImpactReductionMultiplier>x<structureImpactReductionDivisor>"). Could as well just say "Pertains to differences between ammo types"...

Looking at the values used doesn't yield any logical cause-effect explanation.

Does somebody has some clue as to what those 8 settings really do?

Re: inbetweenImpactReductionMultiplyDivisor[message #361386 is a reply to message #361385] Sat, 26 September 2020 17:35 Go to previous messageGo to next message
sevenfm

 
Messages:2355
Registered:December 2012
Location: Russian Federation
Should be obvious from names, actually.
If bullet is hitting somebody:
First, if using highExplosive ammo, damage is modified by beforeArmourDamageMultiplier/beforeArmourDamageDivisor.
Next, if target wears armour, it's ubProtection is modifed by armourImpactReductionMultiplier/armourImpactReductionDivisor.
Finally, if not hitting armed vehicle, damage is modified by afterArmourDamageMultiplier/afterArmourDamageDivisor.

If bullet is hitting structure, then structure's ubArmour is modified by structureImpactReductionMultiplier/structureImpactReductionDivisor.

Multiplier/Divisor pair was used probably because someone couldn't use float type tags.

If you need more details, open BulletImpact in Weapons.cpp and HandleBulletStructureInteraction in LOS.cpp in the game sources.

[Updated on: Sat, 26 September 2020 17:36]




7609+AI (r1792) | Experimental project | Unofficial Modpack | Youtube | Trunk (r8916) | 1.13 Starter Docs | 1.13 How to get

Кто в Москве не бывал, красоты не видал.


Re: inbetweenImpactReductionMultiplyDivisor[message #361388 is a reply to message #361386] Sun, 27 September 2020 16:29 Go to previous messageGo to next message
Kurt

 
Messages:411
Registered:March 2004
sevenfm wrote on Sat, 26 September 2020 16:35
Should be obvious from names, actually.
Indeed, and there is (was?) a Wiki page describing the general idea of AmmoTypes.xml pretty well.
I'm sorry, I didn't clarify what I already know, and what I wanted information on.

I do know that "beforeArmourDamage" is only for explosive ammo and is supposed to simulate the damage to armor - somehow.
I do know that "armourImpactReduction" is supposed to simulate the efficiency of armor - somehow.
I suppose that "afterArmourDamage" is supposed to simulate residual damage capacity of a bullet having gone through armor - somehow.

What I want is confirmation of the "somehow" parts, not necessarily the exact formula, just the general ideas, like for instance (I'm inventing here), "exploding bullets apply to the armor the same damage the bullet would do to an unarmored person, modified by the 'beforeArmourDamage' value" (Yes, I know this isn't true, but what is?).

What's the point in having "armourImpactReduction" and "afterArmourDamage"? I can think of some very specific cases where the bullet will be a little more damaging after having been deformed going through armor, but is this really worth having a special value? I'm clearly missing something here.
Also, I've seen a couple "0" values down the list (Pepper spray). Wouldn't anything multiplied by 0 give 0? Is that even an option? not sure


sevenfm wrote on Sat, 26 September 2020 16:35
If bullet is hitting structure, then structure's ubArmour is modified by structureImpactReductionMultiplier/structureImpactReductionDivisor.
Interesting. According to the old Wiki article (and the file comment), "structureImpactReduction" is the modification of a bullet's efficiency after going through solid objects. Has that changed?


sevenfm wrote on Sat, 26 September 2020 16:35
Multiplier/Divisor pair was used probably because someone couldn't use float type tags.
Thanks, that was one of the things I needed confirmation on, given most of the types use both Multiplier and Divisor values at the same time.
So you can mix and match at will, to get specific fractions. Good to know.


sevenfm wrote on Sat, 26 September 2020 16:35
If you need more details, open BulletImpact in Weapons.cpp and HandleBulletStructureInteraction in LOS.cpp in the game sources.
Yes, thanks, but that's not an option... big grin
I know it sounds strange to you developer guys, but not everybody can read C++, and I'm of those exotic people who can't...
Re: inbetweenImpactReductionMultiplyDivisor[message #361389 is a reply to message #361388] Sun, 27 September 2020 16:39 Go to previous messageGo to next message
sevenfm

 
Messages:2355
Registered:December 2012
Location: Russian Federation
Kurt wrote on Sun, 27 September 2020 18:29
Interesting. According to the old Wiki article (and the file comment), "structureImpactReduction" is the modification of a bullet's efficiency after going through solid objects. Has that changed?
I don't know about the wiki, but here's the code where it is used in LOS.cpp, HandleBulletStructureInteraction():
if (PreRandom( 100 ) < pStructure->pDBStructureRef->pDBStructure->ubDensity)
{
	iCurrImpact = pBullet->iImpact;
	iImpactReduction = gubMaterialArmour[ pStructure->pDBStructureRef->pDBStructure->ubArmour ];
	iImpactReduction = StructureResistanceIncreasedByRange( iImpactReduction, pBullet->iRange, pBullet->iLoop );

	iImpactReduction = (INT32) (iImpactReduction * AmmoTypes[ubAmmoType].structureImpactReductionMultiplier / max(1,AmmoTypes[ubAmmoType].structureImpactReductionDivisor));
		
	pBullet->iImpactReduction += iImpactReduction;
...
}
Where iImpactReduction is structure's armour value, modified by range, and later it's multiplied by ammo's structureImpactReductionMultiplier and divided by structureImpactReductionDivisor.
pBullet->iImpactReduction is the value by which bullet impact is lowered later because of all structures it hits before reaching the final target.
So you can guess by yourself what it actually does.



7609+AI (r1792) | Experimental project | Unofficial Modpack | Youtube | Trunk (r8916) | 1.13 Starter Docs | 1.13 How to get

Кто в Москве не бывал, красоты не видал.


Re: inbetweenImpactReductionMultiplyDivisor[message #361394 is a reply to message #361389] Sun, 27 September 2020 23:11 Go to previous messageGo to next message
Kurt

 
Messages:411
Registered:March 2004
sevenfm wrote on Sun, 27 September 2020 15:39
here's the code where it is used in LOS.cpp, HandleBulletStructureInteraction()
Well as I already said this is Chinese to me, so I'll take your word for it. happy

It would seem this has changed since 3356. Maybe when the "anti-material ammo blows holes in walls" change was introduced?

Anyway.
My problem is that I want to recreate the effect I had in 3356, where 12.7 x 108 mm ammunition went through walls, like in real life.
Now it is stopped by anything, which I'm sorry to say is rather ridiculous: Arulco's brick walls (and even thin concrete) shouldn't be any better than silk paper against such a round. In real life you can even punch through lightly armored vehicles (0.5 cm steel) with it, so obviously body armor shouldn't protect you from that caliber.

So, I've made a new AmmoType and tried to play around with settings I thought would give me back that behavior, but nothing does, anything stronger than a glass pane keeps stopping my bullets. Best thing I can achieve with it is to blow 2x2 m holes in walls, which is kind of over the top, and, till eventually a hole is made, the shooting doesn't affect the people behind the wall either.

Re: inbetweenImpactReductionMultiplyDivisor[message #361607 is a reply to message #361394] Sun, 18 October 2020 18:05 Go to previous messageGo to next message
Greyfoot

 
Messages:59
Registered:November 2010
Location: Dublin
Kurt wrote on Sun, 27 September 2020 23:11
sevenfm wrote on Sun, 27 September 2020 15:39
here's the code where it is used in LOS.cpp, HandleBulletStructureInteraction()
Well as I already said this is Chinese to me, so I'll take your word for it. happy

It would seem this has changed since 3356. Maybe when the "anti-material ammo blows holes in walls" change was introduced?

Anyway.
My problem is that I want to recreate the effect I had in 3356, where 12.7 x 108 mm ammunition went through walls, like in real life.
Now it is stopped by anything, which I'm sorry to say is rather ridiculous: Arulco's brick walls (and even thin concrete) shouldn't be any better than silk paper against such a round. In real life you can even punch through lightly armored vehicles (0.5 cm steel) with it, so obviously body armor shouldn't protect you from that caliber.

So, I've made a new AmmoType and tried to play around with settings I thought would give me back that behavior, but nothing does, anything stronger than a glass pane keeps stopping my bullets. Best thing I can achieve with it is to blow 2x2 m holes in walls, which is kind of over the top, and, till eventually a hole is made, the shooting doesn't affect the people behind the wall either.

Try setting <structureImpactReductionMultiplier> to 1 then <structureImpactReductionDivisor> say 10. This will result rounds going through one or two full houses made of aluminium easily.

Edit>>Nevermind, setting to 10 will result rounds going through 4 brick houses in a row lol, go lower according to taste.

[Updated on: Sun, 18 October 2020 18:09]

Re: inbetweenImpactReductionMultiplyDivisor[message #361616 is a reply to message #361607] Mon, 19 October 2020 17:45 Go to previous message
Kurt

 
Messages:411
Registered:March 2004
Thanks, I've found a setting (don't recall right now, something like Multiplier 1 Divisor 1 IIRC) which simulates more or less what it was like in 3356, meaning the bullet goes through one standard brick wall, but not through two. It's not realistic, but it's easier to handle, because without that the anti-materiel rifles would be useless to the player in inhabited sectors (and that's where the combats usually take place). Obviously the AI doesn't mind shooting civilians...

I've also upped the damage to armored vehicles from 0.75 to 1.0: No way a lightly armored Hummer can resist a HMG AP round; Its armor is only against infantry weapons and shrapnel.
I've yet to decide on tanks though. Deidranna's tanks are most certainly light recon tanks, not heavily armored main battle tanks. Recon tanks are lightly armored but heavily armed, and rely on their agility for protection since their task is not to slug it out with enemy tanks. I've settled on 0.5 so far, since a hit to the treads would immobilize the tank, but I've yet to test it on the field long enough (haven't yet met too many tanks).
So far I think I'm going to lower it, most certainly, since I've added HMGs to the game, and they would make it way too easy to kill tanks (availability of 12.7 ammo provided).
What I need it to make sure is that militia never gets its mitts on a HMG, because a "suppression" fire volley of 12.7mm would most likely clean out all the other militia present and most of the sector's civilians...
Previous Topic: A Serious of Questions
Next Topic: RecoilX VS RecoilY
Goto Forum:
  


Current Time: Sat Dec 05 07:06:31 EET 2020

Total time taken to generate the page: 0.01357 seconds