Home » MODDING HQ 1.13 » v1.13 Feature Requests » Decoupling damage from gun
Decoupling damage from gun[message #359323] Tue, 31 March 2020 00:40 Go to next message
CareBear

 
Messages:137
Registered:April 2016
Simple - add damage as round property, instead of gun property.Gun would only add modifier to ammo damage, given its barrel length. Also add penetration as a round property, not for ammo type across all ammos -9x19 AP will have different AP property than .308. Is it possible to make?
Re: Decoupling damage from gun[message #359326 is a reply to message #359323] Tue, 31 March 2020 14:05 Go to previous messageGo to next message
silversurfer

 
Messages:2760
Registered:May 2009
You can create ammo types as you please, for example 9x19mm AP, .308 AP, 7.62x51mm AP and so on. Then you need to assign them to the magazines.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: Decoupling damage from gun[message #359329 is a reply to message #359323] Tue, 31 March 2020 15:15 Go to previous messageGo to next message
CareBear

 
Messages:137
Registered:April 2016
But can you actually remove damage in weapons.xml and move it to ie. magazines.xml?
Re: Decoupling damage from gun[message #359330 is a reply to message #359329] Tue, 31 March 2020 15:26 Go to previous messageGo to next message
edmortimer

 
Messages:1361
Registered:January 2015
Location: Home Free
Quote:

But can you actually remove damage in weapons.xml and move it to ie. magazines.xml?

You would have to have a base damage assigned to the weapon, and have the ammotype modify it -- as it does now, but in a different formula to suit your intention. It will work as you intend. I've done a bit of what you suggest, making "medium" and "large" calibre ammotypes for HP, AP, etc, and grouping several calibre sizes within the original (now "small") and 2 new designations.







Re: Decoupling damage from gun[message #359332 is a reply to message #359330] Tue, 31 March 2020 20:27 Go to previous messageGo to next message
CareBear

 
Messages:137
Registered:April 2016
Will that interact properly with armors? For example i have armor with 25 protection, have a gun with 25 damage, and ammo with 200% damage modifier. Will it inflict 25 damage, or zero, since it's a modifier? Don't know if for armors, its calculated as an absolute value or as a modifier that is later applied?

Still that's how current system works, and sadly it doesn't take caliber into consideration. Guns need to have a baseline damage, and you can't set a specific caliber AP ammo to have better penetration or damage.
Why is that a problem? Suppose you have the basic kevlar vest[IIIA] with 25 protection. And you have your glock 17 with 25 damage, and fn fal with 40 damage. Both use AP ammo withy 0,75 armor nullifier. In real life that 9x19mm AP would go through the vest, but would have limited energy. So far so good, the calculations are pretty much correct -you will make something like 6 dmg on average. on the other hand 7.62x51 will go through the 3A vest like hot knife through butter, and should retain most of it's stopping power. Right now it will still lose almost half of its damage -18/19 dmg[25*0,75], and realistically speaking it should lose at most 20 of its energy, since .308 can easily go through 4-5 IIIA soft body armor stacked together.
Speaking of AP modifier, kevlar armor and plates should also have a coefficient that decrease the armor penetration -ceramic should be best, while kevlar worse.I would generally rework the system if i could. But it needs some changes in the code which i can't do[im not a programmer].

[Updated on: Tue, 31 March 2020 20:54]

Re: Decoupling damage from gun[message #359336 is a reply to message #359332] Tue, 31 March 2020 21:10 Go to previous messageGo to next message
edmortimer

 
Messages:1361
Registered:January 2015
Location: Home Free
Well, first someone with the knowledge has to publish the relevant formulas within the code for better understanding. I don't know them. I used trial and error.

In Weapons.XML we have these factors:

<ubBulletSpeed>
<ubImpact>
<usRange>

And in AmmoTypes.XML we have these:

<structureImpactReductionMultiplier>
<structureImpactReductionDivisor>
<armourImpactReductionMultiplier>
<armourImpactReductionDivisor>
<beforeArmourDamageMultiplier>
<beforeArmourDamageDivisor>
<afterArmourDamageMultiplier>
<afterArmourDamageDivisor>
<zeroMinimumDamage>
<canGoThrough>
<numberOfBullets>
<multipleBulletDamageMultiplier>
<multipleBulletDamageDivisor>
<highExplosive>
<explosionSize>
<antiTank>
<dart>
<knife>
<monsterSpit>
<acidic>
<ignoreArmour>
<lockBustingPower>
<tracerEffect>
<spreadPattern>

. . . which all have an effect on the end result, but not all factors are relevant to all ammotypes. But if you play with all these enough you may get what you want.

[Updated on: Tue, 31 March 2020 21:12]







Re: Decoupling damage from gun[message #359337 is a reply to message #359336] Tue, 31 March 2020 21:55 Go to previous messageGo to next message
CareBear

 
Messages:137
Registered:April 2016
The only solution is to make an entry for every caliber and ammo type in ammotypes.xml . That would be much more entries, its crude, but it gets the job done. 1.13 SDO has something like this, but in a simpler manner -you have FMJ low penetration, medium and high for different guns.

Edit: After tweaking a bit, i can say it won't do what i want sadly without resorting to some extra large numbers angry It's impossible to do this without tweaking the code in .cpp files. What i want is -for example 9x19 is stopped completely by a kevlar vest, while 7.62x51 goes through it uninterupted. But 9x19 can also go uninterrupted through some lesser jackets like flak jacket. The problem is -when you use very high armor piercing value, you then need very high armor tresholds between NIJ levels. For example a 25dmg bullet with 0,1 AP modifier, will go practically uninterrupted through kevlar vest with 25 protection. But then you would need 250 vest to stop it completely. Then you add FMJ rifle ammo with 50 base damage that has to go through that 250 vest with ease, and thus you need 0,01AP modifier. Then you need 5000 vest to stop the rifle bullet. Next you choose AP rifle ammo with 50 base damage, and you need to reliably go through that 5000 vest, you need 0,0005 AP modifier. That's only three levels of hierarchy, what if you wanted a whole NIJ level introduced? Or GOST levels? Very high numbers would be needed, which brings unnecessary strain to calculations.

And you also have that abysmal fluke modifier to damage with can change gun damage by -25 to +25 percent, which is insane, a 50dmg gun can either do 37,5 dmg or 62,5 dmg, which screw any armor treshold calculations.

[Updated on: Wed, 01 April 2020 03:20]

Re: Decoupling damage from gun[message #359593 is a reply to message #359337] Thu, 16 April 2020 22:15 Go to previous message
Greyfoot

 
Messages:59
Registered:November 2010
Location: Dublin
I am actually working on a weapon, ammo and armor re-balancing mod for over a week now. I spent lot of time researching and collecting data and during which time I found the formula I was looking for which will allow for a more or less realistic weapon damage and penetration combo. Stay tuned.
Previous Topic: All items without ordering for debug purposes?
Next Topic: JA 2 1.13 Wiki/Website Update
Goto Forum:
  


Current Time: Sat Nov 28 09:47:28 EET 2020

Total time taken to generate the page: 0.01253 seconds