PDA

View Full Version : Nice_Boat Tank Damage System



Nice_Boat
Aug 23 2009, 10:30
UPDATE - PUBLIC ALPHA 3

This version is mostly for testing purposes - if you want to play instead or providing feedback, you're probably better off using 2.1 alpha instead.

use: Place the NBTanks.sqs and NBRandomizer.sqs in your mission folder. Run NBRandomizer ONCE (for example [] exec "NBRandomizer.sqs" in the init field) and NBTanks for EVERY supported unit (this addEventHandler ["handledamage", {_this exec "NBTank.sqs"}] in the init field).

supported units: M1A1, M1A2 TUSK, Shilka, Tunguska, T34, T72, T90, AAV, BMP2, BMP3, BRDM2, BTR90, LAV25

This system introduces a new damage model, based on penetration rather than hitpoints. Kinetic munitions now penetrate less efectively over 1000m and more effectively under 1000m. Different armor values are used against KE and CE as well as for side, rear and top hits.
This version has debug mode enabled, returning the penetration and armor value used when a hit occurs. It is also quite laggy (will be fixed when I release a .sqf version), so if you want to play instead of testing please use alpha2.

This time I'd also like to collect your suggestions as far as the armor/penetration values are concerned - you can spot them easily if you open "NBTanks.sqs".

Bugfixes and changes:

- code rewritten, the system now runs independent of the addon config
- KE munitions are less effective over long distances
- different armor values for KE and CE
- damage accumulation abandoned
- randomization depending on the munition used
- runs independent of config values, everything is script based now

Download link:
http://www.sendspace.com/file/k9lcmf



version: public Alpha2.1

instalation: Place the NBTanks.pbo in your AddOns folder.

This is a small and simple addon (or should I say fix?) modifying the armor values of the APCs/IFVs and tanks to more realistic levels and introducing new damage system based on penetration rather than hit points. The system features modified config values for armored vehicles and AT armament, as well as an attrition system if the tank was damaged earlier.

Bugfixes and changes:

public Alpha2
- some vehicles used to be invincible; this is no longer the case
- added modified weapon config values
- armor config tweaks
- slight randomization, allowing for up to 25% more penetration to keep things interesting
- introduced damage accumulation if the vehicle was hit hard enough earlier
public Alpha2.1
- fixed critical bug allowing to easily kill a damaged tank with any weapon

The purpose of this release is still gathering feedback and finding bugs.

Download link:
http://www.sendspace.com/file/bo2ors
Armaholic mirror:
Tank Damage System v2.1 Alpha (http://www.armaholic.com/page.php?id=6968)

A better mirror would again be very appreciated :p

M4Mkey
Aug 23 2009, 11:45
I just tried a little bit... maybe not enough but it seems that the M1A2 is now just invincible...
Rpg7 soldiers don't even try to launch rockets on me. I Still destroy T72 and even T90 with two shots. The T90 don't do anything against the Abrams.

Is it supposed to be like this ?

EDIT : I tried with X4 compression time against a T90... My crew started to get injured but the tank still seems perfectly fine. I tried with M1A1 and got same results.

Alex72
Aug 23 2009, 11:58
The purpose of this release is to gather feedback and find bugs.

Its for testing as he stated in his post. Testing and bring back results to him so he can do further work.

M4Mkey
Aug 23 2009, 12:13
Well, i'm giving feedback :P

Smaw and Javelin are useless on T90, T72 can be damaged after some time BMP3 quite fast damaged. But still not any tanks exploded. Crew died before.

NeMeSiS
Aug 23 2009, 12:18
I generally quite like it, except that i cannot destroy possibly destroy a M1A1 with anything.
You may also with to change the damageresistance (http://community.bistudio.com/wiki/CfgVehicles_Config_Reference#damageResistance) value so the AI doesnt engange you with their AKM's instead of their RPG7's anymore. It seems like it would fit your mod.

Simon C
Aug 23 2009, 13:55
Having tested this after removing the new armour values to see if that would make any difference, just leaving the script, I can genuinely say I'm pleased. The T-90 recieved no damage after hitting it with 1200 M240 and 500 M2 rounds, but was destroyed by the main gun of the Abrams in the first hit. The Abrams however now seems invulnerable to anything less than 4 main gun rounds from another Abrams, maybe needs the armour value lowering? RPGs can now only inflict mobility kills, which is realistic and very pleasing. The Javelin can 1-hit destroy the T-90 as in real life, as it is also meant to 1-hit destroy an Abrams, as that's what they tested it on. All in all, I like this, seems to be what people have been asking for for a very long time. Just needs some minor tweaking to get the Abrams to be a bit more vulnerable and it's perfect. 9/10 marks. :D

Nice_Boat
Aug 23 2009, 16:13
New version uploaded. This one seems to be quite playable.

Simon C
Aug 23 2009, 16:24
Ah, I see you've added exclusions for specialised AT weapons, very nice. :D
May I suggest you add the Metis to that list to? I'm not sure how well it stands up against the Javelin, but I'd assume it's meant to be about the same sort of power. :)

EDIT: Oh, and Tank Sabot Rounds, they should cause more damage to the M1A2, as it stands it takes about 6/7 from the 125mm gun of the T90. Not sure whether GBUs have been affected either, or whether they cause normal damage.

Nice_Boat
Aug 23 2009, 16:55
I'm not that sure about SABOT rounds - as it stands, 1 good hit may render Abrams ineffective (mobility kill and/or gun damage), but it should require a bit more to actually blow it up. I'm not quite happy with the way high-damage AT weapons work, but I guess I'm going to find a way to fix it in the next release. Remember it's still in the alpha stage :)

Monkwarrior
Aug 23 2009, 16:56
- introduced damage accumulation if the vehicle was hit hard enough earlier

Could you explain this one a bit more ?
It sounds like hitpoints which is basicly not a realistic feature of tankbattles.
Tanks can be hit 200 times in almost the same spot without penetration or lethal damage.

Nevertheless, good job, Monk.

Inkompetent
Aug 23 2009, 16:57
Could you explain this one a bit more ?
It sounds like hitpoints which is basicly not a realistic feature of tankbattles.
Tanks can be hit 200 times in almost the same spot without penetration or lethal damage.

It is very realistic actually, depending on implementation. If a tank is hit with a sabot that penetrates halfway through the armour and causes great damage on the armour plating at that spot, then succeeding rounds will have an easier time to penetrate.

Simon C
Aug 23 2009, 17:01
Tested the new version, the Javelin does now destroy the Abrams in the first shot as per reality. I'm really liking the way this mod is turning out, it seems to be what nearly everyone wants and has been asking for.

Nice_Boat
Aug 23 2009, 17:19
It is based on hit points system, but it still checks if the penetration occured (ie. hit value of the munition was higher then the armor value of the vehicle). It's meant to prevent things like "invincible Abrams" or "I've been shooting at that APC with 25mm APFSDS for 10 minutes and it's still not going down". I don't know if there's a better way - if the script gets too big, it's going to cause SERIOUS lag every time someone fires a machinegun at a vehicle :j: The thing I'm most concerned about is how do missile weapons and bombs deal with the heavier tanks in this release - because I'm getting mixed results myself. On the other hand, cannon and autocannon rounds seem to work just fine.

Monkwarrior
Aug 23 2009, 17:40
Oh, ah well, we are aiming for a more realistic approach ;)
An invincible tank doesn't exist, a bad tactic does however.
I understand where you'r coming from, we just prefer something else.

Good luck with the script, Monk.

MQ-9 Reaper
Aug 23 2009, 18:16
Awesome mod, thank you !

I have noticed, if a tank (M1A2 or M1A1, and maybe others) has received a hit, it is still possible to achieve a catastrophic kill with a few machine gun rounds (from T90 commander position or from PKP machine gun, for example).

Nice_Boat
Aug 23 2009, 18:27
Fixed, should be ok in the next release. Thanks for the report!
EDIT: Uploaded fixed version. You shouldn't encounter this bug anymore.

tom_48_97
Aug 23 2009, 18:38
Nice job, thanks for this needed addition ;)

Mirored on Armaholic.com with a news
http://www.armaholic.com/page.php?id=6969

Haystack15
Aug 23 2009, 18:40
This is something BIS should have put into Arma system.

NoRailgunner
Aug 23 2009, 18:45
Did you implement some extra armor value for Shtora + Kontakt-5 ERA protection systems?
MBTs with different armor level eg
low ---> high
T72 -> M1A1/Russian T72* --> M1A2TUSK -> T90
*dont know if its possible to increase the armor value only for one faction

Nice_Boat
Aug 23 2009, 19:23
ERA was taken into account in the config. I'm not sure if I want to take it into account in the scripts (maybe by increasing the "armor attrition" rate for ERA-equipped tanks?). The difference between CE and KE munitions was taken into account by increasing the damage done by KE by 33% (as the armor value represents RHA equivalent against CE warheads). Javelin and A-10 cannon are working outside the system - basically as insta-kill weapons. Future releases may incorporate the decrease in performance of KE rounds over longer distances - although this feature doesn't have high priority as of now since there are no popular desert maps and I think that the current engagement ranges pretty much justify allowing all weapons to deal maximum damage. Next big release if no serious bugs are found will focus on introducing proper loadouts and designations, as well as code optimalisation (gotta learn to do .sqf someday... :D).

Munger
Aug 23 2009, 20:59
This addon looks really promising, nice job.

Million dollar question... is there a way to make vehicles have different armour strengths at different points, e.g. MBT's have very strong frontal/glacis, weaker sides and even weaker rears?

Simon C
Aug 23 2009, 21:05
Ah, found another issue. To replicate, place yourself in a tank (I used an M1A2) and put down 4 groups of Insurgents surrounding your tank. There should be a guy with an RPG-7 in each group. They spot you immediately, and open up with the RPGs. After about 8 hits, your character dies, even though the tank is perfectly fine. I'm guessing this is an engine problem, or an attempt to replicate spall damage. I don't know if there's anything that you can do fix this, but it'd sure beat randomly dying in a perfectly healthy tank.

Nice_Boat
Aug 23 2009, 21:59
Simon C - vehicle armor tends to fragment inside IRL even if it's not breached. This applies more to KE than CE, but it's there - so it's not that much of an issue. And you're right - I guess it's an enigne thingie, so I can't do much about it. As far as I know I can increase the lethality of attack in terms of crew damage, but I can't decrease it via script.
Munger - yes, it can depend on the exact part hit - although I have no knowledge in terms of modelling, so I'm not going to dwell there. I could make the effects of hit increase if the vehicle was hit from side or rear, but I'm not sure it's really necessary. BIS stuff seems to work just fine in terms of multiplying the damage per the location hit.

Simon C
Aug 23 2009, 22:01
Ah, thought so... Never thought a PG7 was so lethal to Armoured Crews. Brilliant mod nonetheless, should be implemented by BIS imho.

Nice_Boat
Aug 23 2009, 22:25
Well, personally I don't think PG7 should cause casualties in M1A2 crews, but oh well... as I said before, it seems to be the engine thingie. It has a good side - it accounts for the psychological casualties. I think it's ok to assume that any tank hit by 5 AT weapons simultaneously wouldn't be able to continue the mission - so in terms of combat effectiveness the result is ok. But that's just my point of view.

Inkompetent
Aug 23 2009, 22:30
Well, personally I don't think PG7 should cause casualties in M1A2 crews

What kind of PG-7 is it that is being fired at it? A PG-7V, VL or VR?

If they hit an ERA plate the V shouldn't have much if any real effect at all. Dunno about VL since it (despite being a single-stage shaped charge) has over 500mm of penetration on RHA. I guess that could cause damage, even though not major, even if hitting ERA.

And well... A PG-7VR has scored a front armour kill on a British Challenger 2 tank. 'Nuff said.

Simon C
Aug 23 2009, 22:31
PG7VL I believe. Whatever the insurgent AT Specialist is given. :)

Nice_Boat
Aug 23 2009, 22:36
PG7V hit = 330
PG7VL hit = 500
PG7VR hit = 650

... here you go. The values I used - I'm not saying they're perfect - that's the point of releasing an open alpha. If you see something contradicting the RL effects - please post this stuff with sources. It's going to make this mod better.

Inkompetent
Aug 23 2009, 22:45
The sad thing with those values are that they don't have any special setting against ERA.

Since the V and VL are single-stage, and have appropriate values against RHA.

The VR also have appropriate values against RHA, but those are *after* defeating ERA armour, since it's s tandem warhead.

I dunno how one can replicate that in the game well without screwing things over one way or another :S

rstratton
Aug 24 2009, 01:19
doesnt work on a dedicated server

20:16:09 You cannot play/edit this mission; it is dependent on downloadable content that has been deleted.
swtanks

Apocal
Aug 24 2009, 02:22
doesnt work on a dedicated server

20:16:09 You cannot play/edit this mission; it is dependent on downloadable content that has been deleted.
swtanks

You did upload the addon to the server's ArmA2/Addons folder, yes? Sorry for asking such a basic question, but you'd be surprised what some people miss.

rstratton
Aug 24 2009, 02:27
yes its on the server

Sanek
Aug 24 2009, 10:48
Is it possible to make not removable wheels on trucks when you shoot it several times?

DJH
Aug 24 2009, 12:35
Just remove "swtanks" from the mission.sqm file, it should load fine after that

rstratton
Aug 24 2009, 17:14
Just remove "swtanks" from the mission.sqm file, it should load fine after that

thats the problm. the missions on the server have no been edited since the addon was uploaded. somehow its got the server thinking the mission is calling for swtanks

Kremator
Aug 24 2009, 18:59
Getting that error myself. I think it is an arma error carried over.

Munger
Aug 24 2009, 21:59
I could make the effects of hit increase if the vehicle was hit from side or rear, but I'm not sure it's really necessary. BIS stuff seems to work just fine in terms of multiplying the damage per the location hit.

Are you sure that BIS default config accounts for direction of hit? I thought this was what most people on the forum were so keen on BIS implementing in a patch/OA? :confused:

---------- Post added at 08:59 PM ---------- Previous post was at 08:51 PM ----------


And well... A PG-7VR has scored a front armour kill on a British Challenger 2 tank. 'Nuff said.

Do you have a source for this? Would be interested in reading about it. I'm aware of an RPG-29 penetration of the frontal armour of a C2 but not an actual kill from a RPG-7. Cheers.

Inkompetent
Aug 24 2009, 22:03
It was an RPG-29 indeed, but I was quite convinced the PG-7VR and PG-29V used the same 105mm tandem warhead, in which case it would only have been the firing platform that would have been the difference (irrelevant for the damage, although the PG-29V has much better range than the PG-7VR). Been contacted by others about the statement already though, and I checked it again, and it seems the PG-29V uses an upgraded tandem warhead (although in the same calibre) with about 100mm better armour penetration against RHA after ERA.

Munger
Aug 24 2009, 22:09
Ah right, thanks.

Remarkable how even a heavily armoured modern MBT can be busted from the FRONT by a lightweight, relatively cheap launcher with a decent warhead. The sword is always slightly stronger than the shield. :rolleyes:

DJH
Aug 24 2009, 22:13
@<hidden>

That does make things a bit more tricky... How about making your own swtanks addon? Just do a config with CfgPatches for an addon called SWTanks. You wouldn't need to put anything in the config [I don't think] just make it into a PBO

Not ideal I know, but that should satisfy the mission's checks for swtanks.

Something like this


class CfgPatches
{
class swtanks
{
units[]={};
weapons[]={};
requiredVersion = 1.000000;
requiredAddons[]={};
};
};

Baff1
Aug 28 2009, 16:20
Well, personally I don't think PG7 should cause casualties in M1A2 crews, but oh well... as I said before, it seems to be the engine thingie. It has a good side - it accounts for the psychological casualties. I think it's ok to assume that any tank hit by 5 AT weapons simultaneously wouldn't be able to continue the mission - so in terms of combat effectiveness the result is ok. But that's just my point of view.

There was that incident in Baghdad were the M1 crew all bailed out on fire in front of the TV cameras.
They should definitely be injured on penetrations.
The cabin should become an inferno.
The previously mentioned Challenger 2 penetration cut off the drivers foot.

DMarkwick
Aug 28 2009, 16:32
I think anything that makes the tanks less susceptible to ALWAYS having to blow up is a good idea :) Tanks should be rendered inoperable instead of destroyed by most weapons except those specifically designed to destroy tanks.

I say, good job :) :thumb:

DMarkwick
Aug 29 2009, 16:29
Nice_Boat, I wonder if you could think about this problem:
As you might know, I'm making a fire & smoke mod. It uses extended event handlers, and uses the "killed" event. When I use this tank addon, I don't get any of my effects applied. Instead, I get this in the .rpt file:

Error in expression <_target setDamage 1; exit // top hitting weapons>
Error position: </ top hitting weapons>
Error Invalid number in expression
Error in expression <exit // mg-kill bugfix>
Error position: </ mg-kill bugfix>
Error Invalid number in expression
Error in expression <// player sidechat format ["Target: %1 S>
Error position: <// player sidechat format ["Target: %1 S>
Error Invalid number in expression
Error in expression <_target setDamage 1; exit // top hitting weapons>
Error position: </ top hitting weapons>
Error Invalid number in expression
Error in expression <exit // mg-kill bugfix>
Error position: </ mg-kill bugfix>
Error Invalid number in expression
Error in expression <// player sidechat format ["Target: %1 S>
Error position: <// player sidechat format ["Target: %1 S>
Error Invalid number in expression
over and over hundreds of times. The only thing that was happening during this test was a M1 blowing up a BMP2.

Also, I have the SLX addons running. Dunno if that affects things, just thought I'd mention it :)
These errors went away when I lost the tank addon, I know that doesn't mean it's the problem, again, I'm just mentioning it :)

SoldierIsNotHistory
Sep 2 2009, 13:31
Hello there,

If I read correctly, you are using hitpoint, and "CAVS way" to increase KE hit to simulate effect again CE rounds. The question is, why not trying to use differents customs values in config.cpp to have KE and CE armor penetration for each parts?

What about:
- adding kind of ammo (KE,CE) and penetration capability in each ammo class
- adding maximum penetration protection for an ammunition type (KE,CE) in each hitpoint part of vehicle models.

By a handleDamage eventhandler, you can calculate the correct effect of the x ammunitions fired on y vehicle part.

We can find nice sources to get max penetration protection for the last 20 years MBT and APC, and an estimation of mm penetration for a lot of rounds.

Example:
T-72B W/K-5 penetration protection:
vs KE:
Turret: 420-750-920
Glacis: 670-710
Lower front hull: 240
vs CE:
Turret: 580-1050-1340
Glacis: 990-1070
Lower front hull: 380

M891A3 penetration (KE ammunition of aM1A2):
970mm@<hidden> (so 1020@<hidden> ?)
L-27 penetration (Challenger):
700mm@<hidden> (so 750@<hidden> ?)

So, a M1A2 can pierce a T-72B W/K-5 turret in 1 M891A3 round. A challenger with L-27 will not pierce the turret of this one.

It's a mathematic way to simulate an Armor Penetration system, and maybe we can add more parameter like "nato level protection" to have invulnerability against caliber, or something like that

MattXR
Sep 2 2009, 16:37
Ive fixed the server error for when you use the addon as a server addon :) so you can load missions :) you want me to upload?

rstratton
Sep 2 2009, 16:58
how did u fix it

MattXR
Sep 2 2009, 17:25
Under Cfg.patches Add this one..


class CfgAddons
{
class PreloadAddons
{
class SWTanks {list[]={"SWTanks"};};
};
};

Full Config looks like this:



class CfgPatches
{
class SWTanks
{
units[] = {};
weapons[] = {};
requiredVersion = 1.03;
requiredAddons[] = {"CATracked","CAWeapons","CAData"};
};
};
class CfgAddons
{
class PreloadAddons
{
class SWTanks {list[]={"SWTanks"};};
};
};

class DefaultEventhandlers;

class CfgVehicles
{
class AllVehicles;
class Land;
class LandVehicle;
class Tank;


class M1A1 : Tank
{
armor = 1320;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemTank.sqs""";
};

};

class M1A2_TUSK_MG : M1A1
{
armor = 1620;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemTank.sqs""";
};
};

class ZSU_Base : Tank
{
armor = 40;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemIFV.sqs""";
};
};

class 2S6M_Tunguska : Tank
{
armor = 40;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemIFV.sqs""";
};
};

class T34 : Tank
{
armor = 150;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemIFV.sqs""";
};
};

class T72_Base : Tank
{
armor = 490;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemIFV.sqs""";
};
};

class T90 : Tank
{
armor = 1350;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemTank.sqs""";
};
};

class Tracked_APC;

class AAV : Tracked_APC
{
armor = 120
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemIFV.sqs""";
};
};

class BMP2_Base : Tracked_APC
{
armor = 125;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemIFV.sqs""";
};
};

class BMP3 : Tracked_APC
{
armor = 175;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemIFV.sqs""";
};
};

class Car;
class Wheeled_APC;

class BRDM2_Base : Wheeled_APC
{
armor = 20;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemIFV.sqs""";
};
};

class BTR90_Base : Wheeled_APC
{
armor = 50;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemIFV.sqs""";
};
};

class LAV25_Base : Wheeled_APC
{
armor = 90;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemIFV.sqs""";
};
};
};


class CfgAmmo
{
class Default;
class MissileCore;
class RocketCore;
class BulletCore;
class ShellCore;
class GrenadeCore;

class ShellBase;

class Sh_120_HE : ShellBase
{
hit = 420;
indirectHit = 42;
indirectHitRange = 10;
explosive = 0.900000;
CraterEffects = "ExploAmmoCrater";
explosionEffects = "ExploAmmoExplosion";
}
class Sh_120_SABOT : ShellBase
{
hit = 1050; // KE, + 33%
}
class Sh_125_SABOT : ShellBase
{
hit = 745; // KE, + 33%
}
class Sh_85_AP : ShellBase
{
hit = 200; // KE, + 33%
}

class BulletBase;

class B_20mm_AP : BulletBase
{
hit = 160; // KE, + 33%
indirectHit = 0;
}
class B_25mm_APDS : BulletBase
{
hit = 110; // KE, + 33%
indirectHit = 0;
}
class B_30mm_AP : BulletBase
{
hit = 100; // KE, + 33%
indirectHit = 0;
}

class GrenadeBase;

class G_40mm_HE : GrenadeBase
{
hit = 50; // KE, + 33%
}


class RocketBase;

class R_M136_AT : RocketBase
{
hit = 400;
}
class R_RPG18_AT : RocketBase
{
hit = 375;
}
class R_PG7V_AT : RocketBase
{
hit = 330;
}
class R_PG7VL_AT : RocketBase
{
hit = 500;
}
class R_PG7VR_AT : RocketBase
{
hit = 650;
}
class R_PG9_AT : RocketBase
{
hit = 400;
}
class R_SMAW_HEAA : RocketBase
{
hit = 600;
}

class MissileBase;

class M_Javelin_AT : MissileBase
{
hit = 1600; // top-hitting weapon
}
class M_AT5_AT : MissileBase
{
hit = 650;
}
class M_AT13_AT : MissileBase
{
hit = 900;
}
class M_TOW_AT : MissileBase
{
hit = 700;
}
class M_TOW2_AT : MissileBase
{
hit = 1000;
}
class M_AT10_AT : MissileBase
{
hit = 650;
}
class M_Hellfire_AT : MissileBase
{
hit = 1500;
}
class M_Vikhr_AT : MissileBase
{
hit = 1400;
}
class M_Maverick_AT : MissileBase
{
hit = 2000;
}
class M_AT2_AT : MissileBase
{
hit = 500;
}
class M_AT6_AT : MissileBase
{
hit = 560;
}
class M_AT9_AT : MissileBase
{
hit = 800;
}
};




This addon running on a server, makes encountering tanks scary!! thank god for aircorps!! :P

Nice Boat Tanks alpha2.1b Download (http://www.gol-clan.net/downloads/ArmaII/MattRThings/Nice_Boat_Tanks_alpha2_1b.rar)

Alpha2.1b
- Fixed Error Message When Using this as a server side addon! when trying to load missions

I hope you dont mind my quick fix. :) But more servers should run this addon for there AI ;)

Maddmatt
Sep 2 2009, 22:04
Nice_Boat, I wonder if you could think about this problem:
As you might know, I'm making a fire & smoke mod. It uses extended event handlers, and uses the "killed" event. When I use this tank addon, I don't get any of my effects applied. Instead, I get this in the .rpt file:

You guys should both use CBA (XEH is part of it). Otherwise your stuff wont be compatible with other mods.

Edit: Never mind :o

DMarkwick
Sep 2 2009, 22:16
You guys should both use CBA (XEH is part of it). Otherwise your stuff wont be compatible with other mods.

Already do :)

Mandrake5
Sep 3 2009, 07:35
Under Cfg.patches Add this one..



Full Config looks like this:



class CfgPatches
{
class SWTanks
{
units[] = {};
weapons[] = {};
requiredVersion = 1.03;
requiredAddons[] = {"CATracked","CAWeapons","CAData"};
};
};
class CfgAddons
{
class PreloadAddons
{
class SWTanks {list[]={"SWTanks"};};
};
};

class DefaultEventhandlers;

class CfgVehicles
{
class AllVehicles;
class Land;
class LandVehicle;
class Tank;


class M1A1 : Tank
{
armor = 1320;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemTank.sqs""";
};

};

class M1A2_TUSK_MG : M1A1
{
armor = 1620;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemTank.sqs""";
};
};

class ZSU_Base : Tank
{
armor = 40;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemIFV.sqs""";
};
};

class 2S6M_Tunguska : Tank
{
armor = 40;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemIFV.sqs""";
};
};

class T34 : Tank
{
armor = 150;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemIFV.sqs""";
};
};

class T72_Base : Tank
{
armor = 490;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemIFV.sqs""";
};
};

class T90 : Tank
{
armor = 1350;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemTank.sqs""";
};
};

class Tracked_APC;

class AAV : Tracked_APC
{
armor = 120
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemIFV.sqs""";
};
};

class BMP2_Base : Tracked_APC
{
armor = 125;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemIFV.sqs""";
};
};

class BMP3 : Tracked_APC
{
armor = 175;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemIFV.sqs""";
};
};

class Car;
class Wheeled_APC;

class BRDM2_Base : Wheeled_APC
{
armor = 20;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemIFV.sqs""";
};
};

class BTR90_Base : Wheeled_APC
{
armor = 50;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemIFV.sqs""";
};
};

class LAV25_Base : Wheeled_APC
{
armor = 90;
class EventHandlers : DefaultEventhandlers
{
handledamage = "_this exec ""\NBTanks\NBArmorSystemIFV.sqs""";
};
};
};


class CfgAmmo
{
class Default;
class MissileCore;
class RocketCore;
class BulletCore;
class ShellCore;
class GrenadeCore;

class ShellBase;

class Sh_120_HE : ShellBase
{
hit = 420;
indirectHit = 42;
indirectHitRange = 10;
explosive = 0.900000;
CraterEffects = "ExploAmmoCrater";
explosionEffects = "ExploAmmoExplosion";
}
class Sh_120_SABOT : ShellBase
{
hit = 1050; // KE, + 33%
}
class Sh_125_SABOT : ShellBase
{
hit = 745; // KE, + 33%
}
class Sh_85_AP : ShellBase
{
hit = 200; // KE, + 33%
}

class BulletBase;

class B_20mm_AP : BulletBase
{
hit = 160; // KE, + 33%
indirectHit = 0;
}
class B_25mm_APDS : BulletBase
{
hit = 110; // KE, + 33%
indirectHit = 0;
}
class B_30mm_AP : BulletBase
{
hit = 100; // KE, + 33%
indirectHit = 0;
}

class GrenadeBase;

class G_40mm_HE : GrenadeBase
{
hit = 50; // KE, + 33%
}


class RocketBase;

class R_M136_AT : RocketBase
{
hit = 400;
}
class R_RPG18_AT : RocketBase
{
hit = 375;
}
class R_PG7V_AT : RocketBase
{
hit = 330;
}
class R_PG7VL_AT : RocketBase
{
hit = 500;
}
class R_PG7VR_AT : RocketBase
{
hit = 650;
}
class R_PG9_AT : RocketBase
{
hit = 400;
}
class R_SMAW_HEAA : RocketBase
{
hit = 600;
}

class MissileBase;

class M_Javelin_AT : MissileBase
{
hit = 1600; // top-hitting weapon
}
class M_AT5_AT : MissileBase
{
hit = 650;
}
class M_AT13_AT : MissileBase
{
hit = 900;
}
class M_TOW_AT : MissileBase
{
hit = 700;
}
class M_TOW2_AT : MissileBase
{
hit = 1000;
}
class M_AT10_AT : MissileBase
{
hit = 650;
}
class M_Hellfire_AT : MissileBase
{
hit = 1500;
}
class M_Vikhr_AT : MissileBase
{
hit = 1400;
}
class M_Maverick_AT : MissileBase
{
hit = 2000;
}
class M_AT2_AT : MissileBase
{
hit = 500;
}
class M_AT6_AT : MissileBase
{
hit = 560;
}
class M_AT9_AT : MissileBase
{
hit = 800;
}
};




This addon running on a server, makes encountering tanks scary!! thank god for aircorps!! :P

Nice Boat Tanks alpha2.1b Download (http://www.gol-clan.net/downloads/ArmaII/MattRThings/Nice_Boat_Tanks_alpha2_1b.rar)

Alpha2.1b
- Fixed Error Message When Using this as a server side addon! when trying to load missions

I hope you dont mind my quick fix. :) But more servers should run this addon for there AI ;)

Sorry if i'm being slow, but could you give a step-by-step guide to making this mod work on a dedi server (i dont even know where cfg.patches is!)

cheers

Enforcer1975
Sep 3 2009, 15:13
I've waited long for this. I hope it's almost the same as the system introduced in the LIB mod for OFP.

The crew in armored vehicles shouldn't be injured by any impact that doesnt't penetrate. These things can withstand a nuke, ok not the direct impact though. ;)

Apocal
Sep 3 2009, 16:50
The crew in armored vehicles shouldn't be injured by any impact that doesnt't penetrate. These things can withstand a nuke, ok not the direct impact though. ;)

Eh, spall was a concern previously and sheer shock and concussion is still an issue. At it's heart, you're stuck inside a big metal box, getting tossed around like a ragdoll.

Also, I tested in editor and it appears that RPG-7-armed enemies will not engage an Abrams.

MattXR
Sep 3 2009, 18:50
Sorry if i'm being slow, but could you give a step-by-step guide to making this mod work on a dedi server (i dont even know where cfg.patches is!)

cheers

i included a download so you dont have to do the config edits.

Mandrake5
Sep 3 2009, 21:15
ah i see - thanks!

Just tested this in the editor - M1a1 withstands 5 direct hits from T90 before exploding, but M1A1 kills T90 with just 1 shot.... can this be right?

xclusiv8
Sep 3 2009, 21:50
ah i see - thanks!

Just tested this in the editor - M1a1 withstands 5 direct hits from T90 before exploding, but M1A1 kills T90 with just 1 shot.... can this be right?

not in a million years

Mandrake5
Sep 4 2009, 16:16
yeah... so does that mean this mod needs fixing?

MQ-9 Reaper
Sep 4 2009, 17:43
Just tested this in the editor - M1a1 withstands 5 direct hits from T90 before exploding, but M1A1 kills T90 with just 1 shot.... can this be right?


If you un-pbo the mod and open the config.cpp with a text editor, you can modify the damages done by each anti tank weapon and also modify the amount of armor for each tank. (You will need to recreate the pbo file before using it within ArmA 2)

Cionara
Sep 5 2009, 10:29
Metis is bugged with this Addon and the russian launchers are underpowered or the US ones overpowered =P

Without Addon I can destroy a M1A1 with two/three PG17 VR or two SMAW.
Now it's three SMAW and I shot 5 VR on it but nothing happened.

Mandrake5
Sep 5 2009, 13:33
the RPG7vr wont penetrate the m1's armour so it doesnt matter how many you fire - thats the point of this mod

shame you cant damage just the tracks with RPG7VR though (mobility kill), that would be a nice improvement...

Cionara
Sep 5 2009, 14:24
But Metis is buged..... you cant see the rocket coming out of launcher and theres an explosion high over the targeted vehicle in the air without hitting it.

Defunkt
Sep 5 2009, 19:18
Well it is posted as an Alpha though it is not clear if the OP is still working on it.

I think what's required is a small committee of (say 3) military 'experts' (we can't be short of these) to create a few matrices comparing all weapon classes and specific AT weapons to all vehicles in the game. In each case we'd need a probability of penetration and also a weapon damage modifier (applied once penetration is achieved).

I also think it needs to be done in script (without relying on config changes) so it can be included in and downloaded with missions. That's the only way to make it truly widespread (like Norrin's Revive is) and this script can then easily be turned into a standalone addon also.

Nosedive
Sep 9 2009, 12:57
Tanks really do take loads of shots don't they, and also does it dispense with the green diagnostic display in the upper left? I don't see any components taking damage

Mandrake5
Sep 9 2009, 17:20
you will still see damage on the diagnostic, just not from munitions which fail to penetrate. Try shooting an M1 with a sabot round, jump in it and you will see damage.

343rdBadger
Sep 20 2009, 19:06
Anyway to make this compatible with the Russian Armour pack? It seems to wipout the random number,smoke launching and ATGM defence system.Probably because its tied to the games original T-72.Kinda a drag having the numbers missing and the T-80's /90's behaving like T-72's in battle.Any thoughts?

LJF
Sep 23 2009, 01:53
Wow! This sounds awesome! Just what I've been waiting for! Can't wait to get home and try this out :D

Nice_Boat
Sep 27 2009, 13:30
New version uploaded for bugfixing and balancing purposes. It's quite different from the last one, so those of you who liked the previous one might want to try it out :)

Defunkt
Sep 27 2009, 22:50
- runs independent of config values, everything is script based now
Excellent move IMHO. There's far too much emphasis on addons in ArmA modding. Even if you can only realise 75% of a solution this way it's going to reach far more players if mission makers can include it and ensure everybody is still on the same playing field.

.kju [PvPscene]
Sep 28 2009, 07:10
There are no instructions how to get this to run. Only two scripts file and nothing in the readme.

To define the weapon and vehicle specific value in config and use getConfig(...) will
make the script way less complex and faster.

Simon C
Sep 28 2009, 14:55
There are no instructions how to get this to run. Only two scripts file and nothing in the readme.

Incorrect. The second line of the readme gives usage instructions.

ruskoz
Sep 30 2009, 02:45
Im with kju...how do you install this?

What mission folder (When you make a mission?) How do you run NBRandomizer.sqs? What is the init field? etc.

Im new to this type of moding in arma. Those instructions are not noob friendly at all. I do want to learn so i can try this mod.

thanks

froggyluv
Sep 30 2009, 02:53
Create a mission with your tanks.

Save and name said mission

Place the 2 scripts into your mission folder.

reopen mission in the editor

On any unit place in the init field

[] exec "NBRandomizer.sqs"

On every tank that you want this enabled place in it's init field


this addEventHandler ["handledamage", {_this exec "NBTank.sqs"}]

Resave misson

@<hidden>: Great addon but it seems that the crew still takes some damage even when the tank is not

Kalikorz
Oct 3 2009, 22:10
Missing Direct vs glance. The afore mention challenger kill was a direct shot where the kinetic energy is is being applied from an angle perpendicular to the armor. The same round fired from an angle of more than 45% off from perpendicular will have a marked decrease in penetration for two reasons. A the energy is not applied directly and B there is more armor to go through since it is at an angle. Shooting at say the right front corner of a tank from the right and front of the tank is a sure fire way to NOT kill that tank you must be in front, behind, or beside a tank to get a direct fire kill. The top is the most vulnerable area hence the javelin's design. It's a one hit kill because it is a top hit weapon with a LOT of punch.

Technically the most common kill of a tank is it's crew going down. A high penetration round puts a quarter sized hole in the tank but the round itself pings around the inside killing the crew. The other thing is that a high energy round can superheat the interior and suck the oxygen out of that lil hole hence the emerging burning crew we see so often. Usually though the tanks mobility and or engine is hit by an armor penetrating roung. For example the "Barry" 50 caliber rifle with specialized AP rounds is able to stop 2nd gen tanks by penetrating the engine block. the 3rd generation of tanks M1A1 and so on were a bit tougher to crack.

Mind you this is from my father the high school physics teacher. I have not verified all of what he has said.

GaGrin
Oct 26 2009, 18:23
Just wanted to chime in and say this is an excellent project.

BIS please take note: you're really shooting yourselves in the foot by not making this sort of system the default.

As a side question I don't suppose there's an easy way to play Harvest Red with this active seeing as it's scripted directly to the vehicles in the mission? Just curious incase I'm being a dunce and overlooking the obvious solution.

LJF
Nov 25 2009, 23:29
I'd love to see something like this implemented in Arrowhead. Brilliant mod :)

ruskoz
Dec 12 2009, 16:53
Excuse me for being dense about moding...this will not work in a general install/place and run the game will it? It will only run a missions made through the editor?

maturin
Dec 12 2009, 17:16
Javelin and A-10 cannon are working outside the system - basically as insta-kill weapons.

The A-10 shouldn't be insta-kill on MBTs. Maybe just make the GAU-8 operate on the old hitpoint system so it takes a lot of rounds to destroy a T-90?


the RPG7vr wont penetrate the m1's armour so it doesnt matter how many you fire - thats the point of this mod
Yes it can. An M1A1 was disabled by some sort of round a while ago and the two possible culprits were the VR or the RPG-22.

ruskoz
Dec 12 2009, 19:12
Is this compatible with ACE if not can somebody make it compatible with ACE?

TristanYockell
Jan 8 2010, 01:19
If I were to use this script with P85, could I just add in the P85 vehicles and their munitions names into the script and it would thus work with them as well?.

TristanYockell
Jan 8 2010, 03:29
If I were to use this script with P85, could I just add in the P85 vehicles and their munitions names into the script and it would thus work with them as well?.

Nevermind, after testing, it seems to make the tanks indestructable, yet the crews still bail out after a few shots. It is impossible to get the p85 tanks to explode under this script though for some reason.

Simon C
Jan 8 2010, 11:27
Nevermind, after testing, it seems to make the tanks indestructable, yet the crews still bail out after a few shots. It is impossible to get the p85 tanks to explode under this script though for some reason.

I would assume the P85 vehicles have an armour value that is too high then.

TristanYockell
Jan 8 2010, 17:51
Nope, I currently incorperated the T-55, T62 and M60A3 into the script.

The M60A3 has a hit damage of 530 for HEAT and 480 for APFSDS. The armour of the T-55 is 425. It will not make the T55 exploded, even after all ammunition is expended. It only damaged the tracks and engine.

Dimitri_Harkov
Jan 9 2010, 08:47
This seems to matter a great deal to you :)

Adding the P'85 tank armor values will not be enough (In NBtank.sqs after line 56). If you also use P'85 weapons, these need to be added to the section from line 65-130.

Furthermore, it's very likely that the selections of the P'85 tanks are not called 'VEZ', "ZBRAN" etc..., that means: You have to find out the names of the P'85 selection names and add them to the script where appropriate (e.g.: lines 144 and 145, or lines 11 to 20).

Maybe Vilas can tell you the names of the corresponding P'85 sections, or maybe you can get the names from the config.

Cheers,
D.

btw: this is a very nice damage system.

TristanYockell
Jan 9 2010, 15:18
This seems to matter a great deal to you :)

Adding the P'85 tank armor values will not be enough (In NBtank.sqs after line 56). If you also use P'85 weapons, these need to be added to the section from line 65-130.

Furthermore, it's very likely that the selections of the P'85 tanks are not called 'VEZ', "ZBRAN" etc..., that means: You have to find out the names of the P'85 selection names and add them to the script where appropriate (e.g.: lines 144 and 145, or lines 11 to 20).

Maybe Vilas can tell you the names of the corresponding P'85 sections, or maybe you can get the names from the config.

Cheers,
D.

btw: this is a very nice damage system.

Ok thanks a bunch, when I get home I will give it a try.
I already had the weapons and armour values in, I just don't know about the VEZ sections ect.

Anyway as for it being important to me, It just bugs me when my games are not as close to realistic as I can get them. I'm sick of BF2 style armoured warefare :).

Add too this, I have a sweet spot for vintage armour.

Vino3
Jan 10 2010, 12:24
hey sounds really good, you think this would be compatible with ace2? i REALLY hope so. If it is you should look at getting it included. Nice work!

Defunkt
Jan 10 2010, 18:26
Anyway as for it being important to me, It just bugs me when my games are not as close to realistic as I can get them.
This is a perfectly good armour upgrade in its own right but have you given up on consistency with the ACE system?

TristanYockell
Jan 10 2010, 18:28
This is a perfectly good armour upgrade in its own right but have you given up on consistency with the ACE system?

I just don't have the knowledge to merge with ACE 2 system, its quite complex and I don't have the coding skills yet.

This is idealy what I want, but when it will become a reality is anyones guess.

As it stands right now I don't think the p85 vehicle models don't have the right allocated damage sections.

Defunkt
Jan 10 2010, 18:40
I dare say it is complex (many different ACE modules at play) but you may as well work towards the end goal rather than some compromise IMHO.

I'm no config whizz but the following suggests to me both have the same selections available...

Vilas T-72 (inherited from vil_tank)

class HitHull {
armor = 1;
material = 0;
name = "telo";
visual = "telo";
passThrough = 1;
};

class HitLTrack {
armor = 0.15;
material = 0;
name = "pas_L";
visual = "pas_L";
passThrough = 1;
};

class HitRTrack {
armor = 0.15;
material = 0;
name = "pas_P";
visual = "pas_P";
passThrough = 1;
};

class HitEngine {
armor = 0.4;
material = 0;
name = "motor";
visual = "motor";
passThrough = 1;
};
ACE T-72

class HitEngine {
armor = 0.800000;
material = -1;
name = "motor";
passThrough = 1;
};

class HitHull {
armor = 0.840000;
material = -1;
name = "telo";
passThrough = 0;
};

class HitLTrack {
armor = 0.540000;
material = -1;
name = "pas_L";
passThrough = 0;
};

class HitRTrack {
armor = 0.540000;
material = -1;
name = "pas_P";
passThrough = 0;
};

...have you asked Vilas?

TristanYockell
Jan 10 2010, 18:50
...have you asked Vilas?

Yeah I have consulted him a few times, but he has been very busy. I'm waiting to hear back from him on weather or not all of the models are using the same damage sections.

It gets a little more confusing for me once I get into the turret parameters.

I need to learn the basics of the config layouts and how everything is linked together. When I look at the current config files, 75% of the coding I don't know what exactly it does, or how it is links to other coding in order to give vehicles/weapons certain parameters.


I mean, so far I can't even figure out how to change the ammo count to realistic values for the p85 tanks. I know where the values are, and change them, but it has no effect in game.

It's going to take me awhile to figure out what everything does and were all the little tid bits are hiding, that I am currently missing.

I have even toyed around with making seperated P85_tank damage values like you have posted above,

Say for example P85_tank1, P85_tank2 ect. ect. and telling the T55 for example to use P85_tank1 armour values, and the T-62 to use armour values under P85_tank2, but it ends up causing game unstability and doesnt really seem to work properly.

And then one gets into ACE, I don't even know what and where as to how they're systems work. I'v been trying to figure it out, but looking at the configs that are 2 miles long is quite the cluster F if you know what I mean.

Trying to get it so you can cause HULL damage and Turret Damage to show up on the damage indicators in game still evades me as well..... All p85 tanks only seem to take and show damage to the tracks or engine despite apparently having the same "sections" listed.

oxmox
Jan 12 2010, 00:28
WoW sounds nice, maybe you could work together with the ACE modder and their mod...such more realistic penetration system would be nice to see as a feature with ACE combined.

Is this maybe possible ?

TristanYockell
Jan 12 2010, 01:02
I have the script loaded up with all of the P85 vehicles and their weapon systems. Been doing tests with it on desert maps and I must say it is working quite well. The kinetic energy rounds are noticeably less effective past 1000 meters, its a nice touch of realism.

Its also really nice to actually notice the difference between wasting your rounds on frontal shots and getting the sweet kill shot side on.

It is a vast improvement over the vanilla system.

Dimitri_Harkov
Jan 12 2010, 09:00
Great, so you have managed to get them working?

Would you mind sharing your work with us?

King Homer
Jan 12 2010, 09:34
FYI: ACE2 / ACE1 armor is based on the CAVS. Search the forums for Common Armor Value System and you'll find a thread along with some data sheets explaing how it actually works. But ACE2 won't remain for long with CAVS because of the steadily growing complexity of Arma2's hitpoint system.
If you need any info on that, contact me via PM. I have no idea if the original authors of CAVS are still active in here or answer any related questions.

TristanYockell
Jan 12 2010, 13:11
I can post it after work if that is ok by Nice Boat?, I'm not sure if he would mind as its heavily edited and its his work.

Dimitri_Harkov
Jan 12 2010, 13:25
Well, you should ask him of course,
but as it's rather an addition to his work, or an expansion, I don't see why he should oppose.

jellyfish3
May 24 2010, 14:31
Is there any possibility this mod could be re-uploaded, specifically the v2.1 alpha? Download-links seem ot be down. I would love to have this modification.

Defunkt
May 25 2010, 00:48
Here you go: http://www.tacticaljihad.net/Nice_Boat_Tanks_alpha2.1.7z or Alpha3 can be got from: http://www.armaholic.com/page.php?id=6968

jellyfish3
May 25 2010, 05:58
A thousand thanks to you! This is really an underlooked mod.

TristanYockell
Jul 2 2010, 05:43
Hey everyone, sorry I didnt end up posting my P85 version of nice boats armour script, my computer died on me and I lost everything.

Well I'm back at it again, I have about 65% of the P85 vehicles/weapon systems in.

Now I have a question. Does anyone know about how exactly the NBRandomizer values effect the damage delt by a certain type of ammo.

For example I have the 115mm AP ammo for T-62 as follows:

? _ammo isKindOf "p85_AP115mm" : _penetration = 570 + NBRand200; goto "kinetic"

Now My question is, will it by chance tack on 200 penetration points randomly, or will it instead pick a random number between 1 and 200 to add on additionally.

See What I'm looking to do here is find a way to Randomly make this variable range of numbers that can be used to add additional penetration to a shot.

This will help simulate the possibility of getting a lucky strike on a foe that you normally wouldnt take out.

So does anyone know a way to make it so you can give the possibility of adding stopping power through a range of values.

For example I'd like it so I'm shooting at an M1 Abrams frontally, first shot my shell hits with 570 penetration points plus randomly another 57 points added with the randomizer script, it still glaces off.

Take another shot, 570 points plus another 190 points from randomizer script this time, it penetrates, M1this time goes boom.

Understand what I'm getting at?.

Once I have it working acceptably, I'll share it with everyone.

Defunkt
Jul 2 2010, 20:46
I would love to see this developed further as an addon-free solution that can be embedded in missions but it needs to move to SQF first. I'm a pretty gun scripter, if you're prepared to gather the data and do the testing I'd be happy to help.

TristanYockell
Jul 2 2010, 23:19
I would love to see this developed further as an addon-free solution that can be embedded in missions but it needs to move to SQF first. I'm a pretty gun scripter, if you're prepared to gather the data and do the testing I'd be happy to help.

Do you think you could figure out a way to make this variable damage work?.

I want the different ammos to have a set pentration value, but to have a small chance of them having a random added amount of damage added within a certain range of numbers.

For example If you fire 100mm AP at a M1, it has a very low chance of doing critical damage, but its not entirely impossible. Because we cannot really model all these different parts, we have to make do with randomization of damage values to simulate the off chance of scoring a good hit.

Do you think this is possible?, and I do agree that it needs to be converted to Sqf as right now its very laggy and gets bugged alot.

I'd be willing to do all the damage tables and testing. My favorite aspect of arma 2 is vehicle combat.

Defunkt
Jul 2 2010, 23:28
Yes, certainly that is possible, suggest we move this to PM.

TristanYockell
Jul 6 2010, 02:31
I cannot get this script to function properly.

The original intent was to have inferior ammunition to have damage amounts slighly less than armour amounts of foes. The you use the Random # to make it so you still have the possibility to get a kill shot with your less powered ammo.

Problem is as soon as you give a random number thats even 1 penetration point higher combined with ammo damage value than your foes armour value, it results in penetration 100% of the time.

Which makes absolutely no sense....

I'll keep experimenting.

Rydygier
Oct 14 2011, 21:35
I really like the concept of this script. It would be a pity that the subject had disappeared in the depths of oblivion, and from conversations with Nice_Boat I concluded, that he probably not planning to return to the subject. So I took the opportunity to finally learn the syntax (somehow easier for me to figure out in the SQS than SQF) and introduced numerous improvements according to my tastes and needs, such as matter of crew injuries, cases of non-lethal penetration, the way to a better representation of hits in the top armor, more complex model of damage support for more vehicles and weapons from selected addons or greater participation of random factor. My version is surely far from perfect, but it works. But I have some problem. Internet data about penetration and the thickness of the armor if they are not classified, that sometimes tend to be divergent. The values ​​vary depending on the source of up to several tens of percent. For example, reported for the Javelin ATGM ability to penetrate varies between 600 to 900 RHA ... In many cases I was forced to settle on values ​​taken from the game SP: MBT ... Does anyone know an online source of such information for any reason worthy of greater trust from the other?

thewood
Oct 15 2011, 00:26
Try this thread from BFC:

http://www.battlefront.com/community/showthread.php?t=90432

These guys seem to have a clue and a lot of inside info. You can probably filter through tanknet, but it will take you forever.

Also, look at the free game SPMBT at shrapnelgames.com. It uses simple armor angles, but has excellent data for relative armor and penetration.

.kju [PvPscene]
Oct 15 2011, 05:11
Did you check ACE yet or maybe NonWonderDog also had some?
NWD TankFCS (http://www.armaholic.com/page.php?id=2217)

Kremator
Oct 15 2011, 07:38
Glad to see it is still alive, at least. If there is anything you need to test, just ask the community Rydygier.

Rydygier
Oct 15 2011, 10:38
PvPscene, with heavy addons, like ACE, I have a problem, which is called "3 GB per month transfer limit." Extras weigh 1 GB. So it is, as you live to middle of nowhere.

Kremator, in fact, I would grateful if someone will test it, point out mistakes and imperfections, etc. So I prepared a simple presentation with my version of this Nice_Boat's script (contains some debug):

TDS_test.utes (http://www.multiupload.com/VUILLMP2R1)

Below main "NBtank.sqs" script code itself, main question concerns RHA equivalent both for armor thickness values and projectiles penetration ability:


_worktime = _time
_target = _this select 0
_selection = _this select 1
_damage = _this select 2
_attacker = _this select 3
_ammo = _this select 4

_comm = commander _target
_drvr = driver _target
_gunn = gunner _target

_commH = damage _comm
_drvrH = damage _drvr
_gunnH = damage _gunn

;Script defines a unique global variables needed for storing damage of weapons, turret and traction.

~0.01
_varcomp = str (_target)

? (_target getvariable ("GCheck" + _varcomp) == 1) : goto "skipvar"
_target setvariable [("TRL" + _varcomp),0,true]
_target setvariable [("TRP" + _varcomp),0,true]
_target setvariable [("TUR" + _varcomp),0,true]
_target setvariable [("GUN" + _varcomp),0,true]

_target setvariable [("WL11" + _varcomp),0,true]
_target setvariable [("WL12" + _varcomp),0,true]
_target setvariable [("WL13" + _varcomp),0,true]
_target setvariable [("WL14" + _varcomp),0,true]

_target setvariable [("WL21" + _varcomp),0,true]
_target setvariable [("WL22" + _varcomp),0,true]
_target setvariable [("WL23" + _varcomp),0,true]
_target setvariable [("WL24" + _varcomp),0,true]

_target setvariable [("GCheck" + _varcomp),1,true]
#skipvar
_top = 0
_DT = damage _target

;Trying to persuade to target, to set the front to the attacker. Hmm.

_target doTarget _attacker
_target doWatch _attacker

_weapon = currentWeapon _attacker;

;traction damage check

? _damage > 0.7 and _selection == "PAS_P" and NBRand100 > 70 : _target setHit ["PAS_P", 1];_target setvariable [("TRP" + _varcomp),1,true]
? _damage > 0.7 and _selection == "PAS_L" and NBRand100B > 70 : _target setHit ["PAS_L", 1];_target setvariable [("TRL" + _varcomp),1,true]
? _damage > 0.4 and _selection == "wheel_1_1_steering" and NBRand100 > 60 : _target setHit ["wheel_1_1_steering", 1];_target setvariable [("WL11" + _varcomp),1,true]
? _damage > 0.4 and _selection == "wheel_1_2_steering" and NBRand100 > 60 : _target setHit ["wheel_1_2_steering", 1];_target setvariable [("WL12" + _varcomp),1,true]
? _damage > 0.4 and _selection == "wheel_1_3_steering" and NBRand100 > 60 : _target setHit ["wheel_1_3_steering", 1];_target setvariable [("WL13" + _varcomp),1,true]
? _damage > 0.4 and _selection == "wheel_1_4_steering" and NBRand100 > 60 : _target setHit ["wheel_1_4_steering", 1];_target setvariable [("WL14" + _varcomp),1,true]
? _damage > 0.4 and _selection == "wheel_2_1_steering" and NBRand100 > 60 : _target setHit ["wheel_2_1_steering", 1];_target setvariable [("WL21" + _varcomp),1,true]
? _damage > 0.4 and _selection == "wheel_2_2_steering" and NBRand100 > 60 : _target setHit ["wheel_2_2_steering", 1];_target setvariable [("WL22" + _varcomp),1,true]
? _damage > 0.4 and _selection == "wheel_2_3_steering" and NBRand100 > 60 : _target setHit ["wheel_2_3_steering", 1];_target setvariable [("WL23" + _varcomp),1,true]
? _damage > 0.4 and _selection == "wheel_2_4_steering" and NBRand100 > 60 : _target setHit ["wheel_2_4_steering", 1];_target setvariable [("WL24" + _varcomp),1,true]

; setting variables needed to determination of the vertical hit angle, and the targets "skew" angle to check if top armor was hit.

_highadv = ((getposASL _attacker) select 2) - ((getposASL _target) select 2);
? (damage _target >= 1) : _highadv = 1;
_distF = [(position _attacker) select 0,(position _attacker) select 1,(getposASL _target) select 2] distance (getposASL _target)
_Tpitch = ((vectordir _target) select 2)
_Tbank = vectorUP _target
_DHatan = _highadv atan2 _distF
? (_DHatan == -1) : _DHatan = 0
_TcheckA = 9/(1+ _DHatan)
_dX = ((getPos _attacker) select 0) - ((getPos _target) select 0)
_dY = ((getPos _attacker) select 1) - ((getPos _target) select 1)
? (_dX == 0) : _dX = 1
? (_dY == 0) : _dY = 1
? (_highadv == 0) : _highadv = 1
_EWroll = _Tbank select 0
_NSroll = _Tbank select 1

? ((abs _dX) > (abs _dY)) and (_dX > 0): _TcheckL = -_EWroll;goto "skip1"
? ((abs _dX) <= (abs _dY)) and (_dY > 0): _TcheckL = -_NSroll;goto "skip1"
? ((abs _dX) > (abs _dY)) and (_dX <= 0): _TcheckL = _EWroll; goto "skip1"
? ((abs _dX) <= (abs _dY)) and (_dY <= 0): _TcheckL = _NSroll

;Javelin case and elimination types of ammo, for which script should not do further calculations.

#Skip1
? _ammo isKindOf "M_Javelin_AT" : _top = 1
? _ammo isKindOf "B_30mmA10_AP" or _ammo isKindOf "B_20mm_AP" or _ammo isKindOf "B_20mm_AA" or _ammo isKindOf "B_23mm_AA" or _ammo isKindOf "B_23mm_HE" or _ammo isKindOf "B_23mm_AP" or _ammo isKindOf "B_23mm_APHE" or _ammo isKindOf "B_25mm_HE" or _ammo isKindOf "B_25mm_HEI" or _ammo isKindOf "B_25mm_APDS" or _ammo isKindOf "B_30mm_AP" or _ammo isKindOf "B_30mm_HE" or _ammo isKindOf "B_30mm_AA" or _ammo isKindOf "G_40mm_HE" : goto "checkSide"
? _ammo isKindOf "BulletCore" and !(_ammo isKindOf "VIL_B_30mm_ros") and !(_ammo isKindOf "ibr_aden30_gunpods"): goto "exit"

;determination of horizontal hit angle

#checkSide

_ang = _dX atan2 _dY
_dif = (_ang - getDir _target)

? (_dif < 0) : _dif = 360 + _dif
? (_dif > 180) : _dif = _dif - 360;
_difA = abs _dif

;below are lists of variables for attacker and target possible used weapon and armor. _surviv needed for no-lethal penetrations

? _target isKindOf "ibr_T55" : _armorCE = 215; _armorKE = 215; _surviv = 17; goto "checkAmmo"
? _target isKindOf "M1A2_TUSK_MG" : _armorCE = 1205; _armorKE = 780; _surviv = 30; goto "checkAmmo"
? _target isKindOf "M1A1" : _armorCE = 850; _armorKE = 465; _surviv = 26; goto "checkAmmo"
? _target isKindOf "ZSU_Base" : _armorCE = 20; _armorKE = 20; _surviv = 10; goto "checkAmmo"
? _target isKindOf "2S6M_Tunguska" : _armorCE = 25; _armorKE = 25; _surviv = 10; goto "checkAmmo"
? _target isKindOf "T34" : _armorCE = 95; _armorKE = 95; _surviv = 16; goto "checkAmmo"
? _target isKindOf "T72_Base" : _armorCE = 420; _armorKE = 345; _surviv = 20; goto "checkAmmo"
? _target isKindOf "T90" : _armorCE = 1100; _armorKE = 700; _surviv = 24; goto "checkAmmo"
? _target isKindOf "AAV" : _armorCE = 60; _armorKE = 50; _surviv = 12; goto "checkAmmo"
? _target isKindOf "BMP2_Base" : _armorCE = 40; _armorKE = 40; _surviv = 12; goto "checkAmmo"
? _target isKindOf "BMP3" : _armorCE = 170; _armorKE = 120; _surviv = 13; goto "checkAmmo"
? _target isKindOf "BRDM2_Base" or _target isKindOf "BRDM2_ATGM_base" or _target isKindOf "VIL_brdm_m96d": _armorCE = 25; _armorKE = 25; _surviv = 11; goto "checkAmmo"
? _target isKindOf "BTR90_Base" : _armorCE = 120; _armorKE = 70; _surviv = 12; goto "checkAmmo"
? _target isKindOf "LAV25_Base" : _armorCE = 40; _armorKE = 40; _surviv = 11; goto "checkAmmo"
? _target isKindOf "VIL_LEO2A4" : _armorCE = 905; _armorKE = 620; _surviv = 26; goto "checkAmmo"
? _target isKindOf "VIL_new_PT91" : _armorCE = 915; _armorKE = 625; _surviv = 24; goto "checkAmmo"
? _target isKindOf "VIL_t72M1_wp" : _armorCE = 515; _armorKE = 415; _surviv = 20; goto "checkAmmo"
? _target isKindOf "VIL_rosomak" : _armorCE = 150; _armorKE = 70; _surviv = 12; goto "checkAmmo"
? _target isKindOf "VIL_OSA_PLOT" : _armorCE = 35; _armorKE = 35; _surviv = 10; goto "checkAmmo"
? _target isKindOf "VIL_DANA" : _armorCE = 35; _armorKE = 35; _surviv = 8; goto "checkAmmo"
? _target isKindOf "VIL_2s1_PL" : _armorCE = 30; _armorKE = 30; _surviv = 8; goto "checkAmmo"
? _target isKindOf "VIL_bmp1_wp" : _armorCE = 35; _armorKE = 35; _surviv = 10; goto "checkAmmo"
? _target isKindOf "VIL_bwp2000_wp" : _armorCE = 55; _armorKE = 55; _surviv = 13; goto "checkAmmo"
? _target isKindOf "ibr_LEO1A5" : _armorCE = 380; _armorKE = 335; _surviv = 18; goto "checkAmmo"

#checkAmmo
? _ammo isKindOf "shellCore" : goto "checkShells"
? _ammo isKindOf "rocketCore" : goto "checkRockets"
? _ammo isKindOf "missileCore" : goto "checkMissiles"
? _ammo isKindOf "laserbombCore" : goto "checkbombs"

;Parameters of mines and explosive charges are set roughly, based on the weight of the explosive material. I did not find precise online data for this.

? _ammo == "mine" : _penetration = 70 + NBRand25; goto "explosive"
? _ammo == "mineE" : _penetration = 25 + NBRand10; goto "explosive"
? _ammo == "pipebomb" or _ammo == "timebomb" : _penetration = 100 + NBRand100; goto "explosive"
? _ammo isKindOf "B_20mm_AP" : _penetration = 120 + NBRand10; goto "kinetic"
? _ammo isKindOf "B_20mm_AA" : _penetration = 45 + NBRand10; goto "kinetic"
? _ammo isKindOf "B_23mm_AA" : _penetration = 50 + NBRand10; goto "kinetic"
? _ammo isKindOf "B_23mm_HE" : _penetration = 1 + NBRand10; goto "kinetic"
? _ammo isKindOf "B_23mm_AP" : _penetration = 80 + NBRand10; goto "kinetic"
? _ammo isKindOf "B_23mm_APHE" : _penetration = 55 + NBRand10; goto "kinetic"
? _ammo isKindOf "B_25mm_HE" : _penetration = 1 + NBRand10; goto "kinetic"
? _ammo isKindOf "B_25mm_HEI" : _penetration = 2 + NBRand10; goto "kinetic"
? _ammo isKindOf "B_25mm_APDS" : _penetration = 80 + NBRand10; goto "kinetic"
? _ammo isKindOf "B_30mm_AP" and _weapon == "2A42" : _penetration = 80 + NBRand10; goto "kinetic"
? _ammo isKindOf "B_30mm_AP" and _weapon == "2A72" : _penetration = 120 + NBRand10; goto "kinetic"
? _ammo isKindOf "B_30mmA10_AP" : _penetration = 90 + NBRand10; goto "kinetic"
? _ammo isKindOf "B_30mm_HE" : _penetration = 1 + NBRand10; goto "kinetic"
? _ammo isKindOf "B_30mm_AA" : _penetration = 80 + NBRand10; goto "kinetic"
? _ammo isKindOf "G_30mm_HE" : _penetration = 5 + NBRand10; goto "kinetic"
? _ammo isKindOf "G_40mm_HE" : _penetration = 6 + NBRand10; goto "kinetic"
? _ammo isKindOf "VIL_B_30mm_ros" : _penetration = 10 + NBRand10; goto "chemical"
? _ammo isKindOf "ibr_aden30_gunpods" : _penetration = 50 + NBRand10; goto "kinetic"

#checkShells
? _ammo isKindOf "Sh_105_HE" : _penetration = 30 + NBRand25; goto "explosive"
? _ammo isKindOf "Sh_100_HE" : _penetration = 30 + NBRand10; goto "explosive"
? _ammo isKindOf "Sh_120_HE" : _penetration = 30 + NBRand25; goto "explosive"
? _ammo isKindOf "Sh_120_SABOT" : _penetration = 1000 + NBRand50; goto "kinetic"
? _ammo isKindOf "Sh_122_HE" : _penetration = 30 + NBRand25; goto "explosive"
? _ammo isKindOf "Sh_125_HE" : _penetration = 30 + NBRand50; goto "explosive"
? _ammo isKindOf "Sh_125_SABOT" and _weapon == "D81" : _penetration = 550 + NBRand50; goto "kinetic"
? _ammo isKindOf "Sh_125_SABOT" and _weapon == "2A46M" : _penetration = 810 + NBRand50; goto "kinetic"
? _ammo isKindOf "Sh_85_HE" : _penetration = 10 + NBRand10; goto "explosive"
? _ammo isKindOf "Sh_85_AP" : _penetration = 160 + NBRand25; goto "kinetic"
? _ammo isKindOf "VIL_NPL_AP120mm" : _penetration = 600 + NBRand50; goto "chemical"
? _ammo isKindOf "VIL_NPL_SB120mm" : _penetration = 860 + NBRand50; goto "kinetic"
? _ammo isKindOf "VIL_NPL_HE120mm" : _penetration = 30 + NBRand10; goto "explosive"
? _ammo isKindOf "VIL_NPL_SB125mm" and _attacker isKindOf "VIL_tankERA" : _penetration = 670 + NBRand50; goto "kinetic"
? _ammo isKindOf "VIL_NPL_AP125mm" and _attacker isKindOf "VIL_tankERA" : _penetration = 800 + NBRand50; goto "chemical"
? _ammo isKindOf "VIL_NPL_HE125mm" : _penetration = 30 + NBRand10; goto "explosive"
? _ammo isKindOf "VIL_NPL_SB125mm" : _penetration = 430 + NBRand50; goto "kinetic"
? _ammo isKindOf "VIL_NPL_AP125mm" : _penetration = 500 + NBRand50; goto "chemical"
? _ammo isKindOf "VIL_NPL_AP125mm" : _penetration = 500 + NBRand50; goto "chemical"
? _ammo isKindOf "VIL_HE152mm" : _penetration = 40 + NBRand25; goto "explosive"
? _ammo isKindOf "VIL_HE122mm" : _penetration = 30 + NBRand25; goto "explosive"
? _ammo isKindOf "VIL_HEAT122mm" : _penetration = 460 + NBRand50; goto "chemical"
? _ammo isKindOf "vilas_AP73mm" : _penetration = 400 + NBRand25; goto "chemical"
? _ammo isKindOf "vilas_HE73mm" : _penetration = 20 + NBRand10; goto "explosive"
? _ammo isKindOf "VIL_NPL_sb60mm" : _penetration = 120 + NBRand25; goto "kinetic"
? _ammo isKindOf "VIL_NPL_he60mm" : _penetration = 5 + NBRand10; goto "explosive"
? _ammo isKindOf "VIL_NPL_Uni60mm" : _penetration = 85 + NBRand10; goto "chemical"
? _ammo isKindOf "VIL_NPL_ap60mm" : _penetration = 145 + NBRand25; goto "chemical"
? _ammo isKindOf "ibr_Sh_105_SABOT_leo" : _penetration = 530 + NBRand50; goto "kinetic"
? _ammo isKindOf "ibr_BM_8_100mm_HVAPDS" : _penetration = 220 + NBRand25; goto "kinetic"
? _ammo isKindOf "ibr_BK_17_100mm_HEAT" : _penetration = 280 + NBRand10; goto "chemical"
? _ammo isKindOf "ibr_OF_32_100mm_HE" : _penetration = 30 + NBRand10; goto "explosive"

#checkRockets
? _ammo isKindOf "R_Hydra_HE" : _penetration = 10 + NBRand10; goto "explosive"
? _ammo isKindOf "R_57mm_HE" : _penetration = 10 + NBRand10; goto "explosive"
? _ammo isKindOf "R_80mm_HE" : _penetration = 20 + NBRand10; goto "explosive"
? _ammo isKindOf "R_S8T_AT" : _penetration = 400 + NBRand50; goto "chemical"
? _ammo isKindOf "R_M136_AT" : _penetration = 420 + NBRand50; goto "chemical"
? _ammo isKindOf "R_RPG18_AT" : _penetration = 380 + NBRand50; goto "chemical"
? _ammo isKindOf "R_PG7VR_AT" : _penetration = 700 + NBRand50; goto "chemical"
? _ammo isKindOf "R_PG7VL_AT" or _ammo isKindOf "VIL_PG7M_ammo" : _penetration = 500 + NBRand50; goto "chemical"
? _ammo isKindOf "R_PG7V_AT" or _ammo isKindOf "VIL_PG7KO_ammo" : _penetration = 280 + NBRand50; goto "chemical"
? _ammo isKindOf "R_OG7_AT" : _penetration = 10 + NBRand10; goto "explosive"
? _ammo isKindOf "R_PG9_AT" : _penetration = 450 + NBRand50; goto "chemical"
? _ammo isKindOf "R_OG9_HE" : _penetration = 10 + NBRand10; goto "explosive"
? _ammo isKindOf "R_SMAW_HEAA" : _penetration = 600 + NBRand50; goto "chemical"
? _ammo isKindOf "R_SMAW_HEDP" : _penetration = 30 + NBRand10; goto "chemical"
? _ammo isKindOf "R_GRAD" : _penetration = 20 + NBRand100; goto "explosive"
? _ammo isKindOf "R_MLRS" : _penetration = 600 + NBRand100; goto "explosive"

#checkMissiles
? _ammo isKindOf "M_Javelin_AT" : _penetration = 800 + NBRand50; goto "chemical"
? _ammo isKindOf "M_Stinger_AA" : _penetration = 30 + NBRand10; goto "explosive"
? _ammo isKindOf "vil_Sidewinder_OSA" : _penetration = 220 + NBRand25; goto "explosive"
? _ammo isKindOf "M_Sidewinder_AA" or _ammo isKindOf "ibr_AIM9M_AA": _penetration = 90 + NBRand10; goto "explosive"
? _ammo isKindOf "M_Strela_AA" or _ammo isKindOf "VIL_grom_AA": _penetration = 20 + NBRand10; goto "explosive"
? _ammo isKindOf "M_Igla_AA" : _penetration = 25 + NBRand10; goto "explosive"
? _ammo isKindOf "M_AT5_AT" : _penetration = 800 + NBRand50; goto "chemical"
? _ammo isKindOf "M_AT13_AT" : _penetration = 900 + NBRand50; goto "chemical"
? _ammo isKindOf "M_TOW_AT" : _penetration = 600 + NBRand50; goto "chemical"
? _ammo isKindOf "M_TOW2_AT" : _penetration = 1000 + NBRand100; goto "chemical"
? _ammo isKindOf "M_AT10_AT" : _penetration = 850 + NBRand50; goto "chemical"
? _ammo isKindOf "M_AT11_AT" : _penetration = 750 + NBRand50; goto "chemical"
? _ammo isKindOf "M_Hellfire_AT" : _penetration = 1400 + NBRand100; goto "chemical"
? _ammo isKindOf "M_Vikhr_AT" : _penetration = 1000 + NBRand100; goto "chemical"
? _ammo isKindOf "M_Maverick_AT" or _ammo isKindOf "ibr_AGM65_AG" : _penetration = 1250 + NBRand100; goto "chemical"
? _ammo isKindOf "M_R73_AA" : _penetration = 90 + NBRand10; goto "explosive"
? _ammo isKindOf "M_Ch29_AT" : _penetration = 750 + NBRand50; goto "explosive"
? _ammo isKindOf "M_AT2_AT" : _penetration = 500 + NBRand100; goto "chemical"
? _ammo isKindOf "M_AT6_AT" : _penetration = 650 + NBRand50; goto "chemical"
? _ammo isKindOf "M_AT9_AT" : _penetration = 100 + NBRand50; goto "chemical"
? _ammo isKindOf "M_9M311_AA" : _penetration = 150 + NBRand25; goto "explosive"
? _ammo isKindOf "VILNPL_at3_sagger" : _penetration = 520 + NBRand50; goto "chemical"

;The case of air bombs separately, because of their much greater strength and manner of "application" it to battlefield.

#checkbombs
? _damage < 0.55 : goto "exit"
? _damage > 1 : _top = 1
? _ammo isKindOf "ibr_GBU12_LGB" : _penetration = 200 + NBRand25; goto "explosive"
? _ammo isKindOf "Bo_FAB_250" : _penetration = 200 + NBRand25; goto "explosive"
goto "exit"


#kinetic

_penetration = _penetration + ((((1000 - (_attacker distance _target))/100) * 0.02) * _penetration)

? _selection == "VEZ" and _penetration > (_armorKE * NBRand50*0.03) and NBRand100 > 85 : _target setvariable [("TUR" + _varcomp),1,true]
? _selection == "ZBRAN" and _penetration > (_armorKE * NBRand50B*0.03) and NBRand100B > 85 : _target setvariable [("GUN" + _varcomp),1,true]

;Eliminating further calculations for other, particular parts of target in order to Event Handler counted damage only once per hit.

? !(_selection == "") : goto "exit"

; calculating possibly crew injuries

_commH = _commH + _damage * NBrand100/70
_drvrH = _drvrH + _damage * NBrand100B/70
_gunnH = _gunnH + _damage * NBrand100C/70

; Using a random factor to the armor to simulate the angle of hit or hits in the weaker spots

_armorKE = _armorKE + (NBrand25 * (_armorKE/20) - NBrand10 * (_armorKE/20))

;effect of angle of hit to final value of the targets armor

? _difA > 45 and _difA <= 135 : _armorKE = _armorKE / 3
? _difA > 135 : _armorKE = _armorKE / 5
? (_dif >= -45) and (_dif < 45) and (_Dhatan > 20) and (_Tpitch < (_DHatan/120)) and (NBRand100C > 1) : _top = 1;
? (((_dif > -180) and (_dif <= -135)) or ((_dif > 135) and (_dif <= 180))) and (_Dhatan > 20) and (_Tpitch > -(_DHatan/120)) and (NBRand100C > 20) : _top = 1;
? (((_dif >= 45) and (_dif < 135)) or ((_dif > -135) and (_dif <= -45))) and (_Dhatan > 20) and (_TcheckL < (_DHatan/120)) and (NBRand100C > 20) : _top = 1;
? _top == 1 : _armorKE = _armorKE / 6

; crew gets some injuries
~0.01
? ((_penetration > _armorKE) and (NBRand100 > 50)) or (NBRand100 > 95) : commander _target setdamage _commH;driver _target setdamage _drvrH;gunner _target setdamage _gunnH
~0.01

;penetration check with some random factor, 1% for "luck" hit, and small debug

? _penetration < _armorKE and NBRand100 < 99 : player sideChat format["TRG: %1 Arm: KE %2 Pen: SABOT %3 Dmg: %5",_target,_armorKE,_penetration,_damage,_DT];goto "exit0"

; finally target get some damage. Note _surviv variable influence. This damage value is removed from actual target's hit points only, if penetration occured. In many cases it means instant kill, but sometimes, especially for modern MBT's, non-lethal penetration may occurs and damage will be less than 1.

_target setDamage _DT + _damage*(_penetration/_armorKE)*(NBRand50/(3*_Surviv));

;because damage is applied also for gun, turret and traction, below script restores its hit values remembered for that parts by global variables. Its neccesary to avoid miraculous recovery of malfunctioning parts

? (_target getvariable ("TRP" + _varcomp) == 1) : _target setHit ["PAS_P", 1]
? (_target getvariable ("TRL" + _varcomp) == 1) : _target setHit ["PAS_L", 1]

? (_target getvariable ("TUR" + _varcomp) == 1) : _target setHit ["VEZ", 1]
? (_target getvariable ("GUN" + _varcomp) == 1) : _target setHit ["ZBRAN", 1]

? (_target getvariable ("WL11" + _varcomp) == 1) : _target setHit ["wheel_1_1_steering", 1]
? (_target getvariable ("WL12" + _varcomp) == 1) : _target setHit ["wheel_1_2_steering", 1]
? (_target getvariable ("WL13" + _varcomp) == 1) : _target setHit ["wheel_1_3_steering", 1]
? (_target getvariable ("WL14" + _varcomp) == 1) : _target setHit ["wheel_1_4_steering", 1]
? (_target getvariable ("WL21" + _varcomp) == 1) : _target setHit ["wheel_2_1_steering", 1]
? (_target getvariable ("WL22" + _varcomp) == 1) : _target setHit ["wheel_2_2_steering", 1]
? (_target getvariable ("WL23" + _varcomp) == 1) : _target setHit ["wheel_2_3_steering", 1]
? (_target getvariable ("WL24" + _varcomp) == 1) : _target setHit ["wheel_2_4_steering", 1]
_DT = damage _target
player sideChat format["TRG: %1 Arm: KE %2 Pen: SABOT %3 Dmg: %5",_target,_armorKE,_penetration,_damage,_DT]
goto "exit0"



#chemical

? _selection == "VEZ" and _penetration > (_armorCE * NBRand50*0.03) and NBRand100 > 85 : _target setvariable [("TUR" + _varcomp),1,true]
? _selection == "ZBRAN" and _penetration > (_armorCE * NBRand50B*0.03) and NBRand100B > 85 : _target setvariable [("GUN" + _varcomp),1,true]
? !(_selection == "") : goto "exit"

_commH = _commH + _damage * NBrand100/70
_drvrH = _drvrH + _damage * NBrand100B/70
_gunnH = _gunnH + _damage * NBrand100C/70

_armorCE = _armorCE + (NBrand25 * (_armorCE/20) - NBrand10 * (_armorCE/20))


? _difA > 45 and _difA <= 135 : _armorCE = _armorCE / 3
? _difA > 135 : _armorCE = _armorCE / 5

? (_dif >= -45) and (_dif < 45) and (_Dhatan > 20) and (_Tpitch < (_DHatan/120)) and (NBRand100C > 1) : _top = 1;
? (((_dif > -180) and (_dif <= -135)) or ((_dif > 135) and (_dif <= 180))) and (_Dhatan > 20) and (_Tpitch > -(_DHatan/120)) and (NBRand100C > 20) : _top = 1;
? (((_dif >= 45) and (_dif < 135)) or ((_dif > -135) and (_dif <= -45))) and (_Dhatan > 20) and (_TcheckL < (_DHatan/120)) and (NBRand100C > 20) : _top = 1;
? _top == 1 : _armorCE = _armorCE / 6
~0.01
? ((_penetration > _armorCE) and (NBRand100 > 50)) or (NBRand100 > 95) : commander _target setdamage _commH;driver _target setdamage _drvrH;gunner _target setdamage _gunnH
~0.01

? _penetration < _armorCE and NBRand100 < 99 : player sideChat format["TRG: %1 Arm: CE %2 Pen: HEAT %3 Dmg: %5",_target,_armorCE,_penetration,_damage,_DT];goto "exit0"
_target setDamage _DT + _damage*(_penetration/_armorCE)*(NBRand50/(3*_Surviv));

? (_target getvariable ("TRP" + _varcomp) == 1) : _target setHit ["PAS_P", 1]
? (_target getvariable ("TRL" + _varcomp) == 1) : _target setHit ["PAS_L", 1]

? (_target getvariable ("TUR" + _varcomp) == 1) : _target setHit ["VEZ", 1]
? (_target getvariable ("GUN" + _varcomp) == 1) : _target setHit ["ZBRAN", 1]

? (_target getvariable ("WL11" + _varcomp) == 1) : _target setHit ["wheel_1_1_steering", 1]
? (_target getvariable ("WL12" + _varcomp) == 1) : _target setHit ["wheel_1_2_steering", 1]
? (_target getvariable ("WL13" + _varcomp) == 1) : _target setHit ["wheel_1_3_steering", 1]
? (_target getvariable ("WL14" + _varcomp) == 1) : _target setHit ["wheel_1_4_steering", 1]
? (_target getvariable ("WL21" + _varcomp) == 1) : _target setHit ["wheel_2_1_steering", 1]
? (_target getvariable ("WL22" + _varcomp) == 1) : _target setHit ["wheel_2_2_steering", 1]
? (_target getvariable ("WL23" + _varcomp) == 1) : _target setHit ["wheel_2_3_steering", 1]
? (_target getvariable ("WL24" + _varcomp) == 1) : _target setHit ["wheel_2_4_steering", 1]
_DT = damage _target

player sideChat format["TRG: %1 Arm: CE %2 Pen: HEAT %3 Dmg: %5",_target,_armorCE,_penetration,_damage,_DT]
goto "exit0"

#explosive
? _selection == "VEZ" and _penetration > (_armorKE * NBRand50*0.03) and NBRand100 > 85 : _target setvariable [("TUR" + _varcomp),1,true]
? _selection == "ZBRAN" and _penetration > (_armorKE * NBRand50B*0.03) and NBRand100B > 85 : _target setvariable [("GUN" + _varcomp),1,true]


_armorKE = _armorKE + (NBrand25 * (_armorKE/20) - NBrand10 * (_armorKE/20))

; below mines, bombs and satchel charges cases

? (_ammo == "mine") or (_ammo == "mineE") : _armorKE = _armorKE / 8;
? (_ammo == "mine") or (_ammo == "mineE") (_ammo == "pipebomb") or (_ammo == "timebomb") : goto "topskip"
? (_ammo isKindof "laserbombcore") : goto "topskip0"
? (_dif >= -45) and (_dif < 45) and (_Dhatan > 20) and (_Tpitch < (_DHatan/120)) and (NBRand100C > 1) : _top = 1;
? (((_dif > -180) and (_dif <= -135)) or ((_dif > 135) and (_dif <= 180))) and (_Dhatan > 20) and (_Tpitch > -(_DHatan/120)) and (NBRand100C > 20) : _top = 1;
? (((_dif >= 45) and (_dif < 135)) or ((_dif > -135) and (_dif <= -45))) and (_Dhatan > 20) and (_TcheckL < (_DHatan/120)) and (NBRand100C > 20) : _top = 1;

#topskip0
? _top == 1 : _armorKE = _armorKE / 6
#topskip
? (_ammo == "mine") and _selection == "PAS_P") and NBRand100 > 20 : _target setHit ["PAS_P", 1]; _target setHit ["PAS_P", 1];_target setvariable [("TRP" + _varcomp),1,true]
? (_ammo == "mine") and _selection == "PAS_L") and NBRand100B > 20 : _target setHit ["PAS_L", 1]; _target setHit ["PAS_L", 1];_target setvariable [("TRL" + _varcomp),1,true]

? (_ammo == "mine") and (_selection == "wheel_1_1_steering") and (NBRand100 > 10) : _target setHit ["wheel_1_1_steering", 1];_target setvariable [("WL11" + _varcomp),1,true]
? (_ammo == "mine") and (_selection == "wheel_1_2_steering") and (NBRand100 > 10) : _target setHit ["wheel_1_2_steering", 1];_target setvariable [("WL12" + _varcomp),1,true]
? (_ammo == "mine") and (_selection == "wheel_1_3_steering") and (NBRand100 > 10) : _target setHit ["wheel_1_3_steering", 1];_target setvariable [("WL13" + _varcomp),1,true]
? (_ammo == "mine") and (_selection == "wheel_1_4_steering") and (NBRand100 > 10) : _target setHit ["wheel_1_4_steering", 1];_target setvariable [("WL14" + _varcomp),1,true]
? (_ammo == "mine") and (_selection == "wheel_2_1_steering") and (NBRand100 > 10) : _target setHit ["wheel_2_1_steering", 1];_target setvariable [("WL21" + _varcomp),1,true]
? (_ammo == "mine") and (_selection == "wheel_2_2_steering") and (NBRand100 > 10) : _target setHit ["wheel_2_2_steering", 1];_target setvariable [("WL22" + _varcomp),1,true]
? (_ammo == "mine") and (_selection == "wheel_2_3_steering") and (NBRand100 > 10) : _target setHit ["wheel_2_3_steering", 1];_target setvariable [("WL23" + _varcomp),1,true]
? (_ammo == "mine") and (_selection == "wheel_2_4_steering") and (NBRand100 > 10) : _target setHit ["wheel_2_4_steering", 1];_target setvariable [("WL24" + _varcomp),1,true]

? (_ammo == "mineE") and _selection == "PAS_P") and NBRand100 > 25 : _target setHit ["PAS_P", 1]; _target setHit ["PAS_P", 1];_target setvariable [("TRP" + _varcomp),1,true]
? (_ammo == "mineE") and _selection == "PAS_L") and NBRand100B > 25 : _target setHit ["PAS_L", 1]; _target setHit ["PAS_L", 1];_target setvariable [("TRL" + _varcomp),1,true]

? (_ammo == "mineE") and (_selection == "wheel_1_1_steering") and (NBRand100 > 15) : _target setHit ["wheel_1_1_steering", 1];_target setvariable [("WL11" + _varcomp),1,true]
? (_ammo == "mineE") and (_selection == "wheel_1_2_steering") and (NBRand100 > 15) : _target setHit ["wheel_1_2_steering", 1];_target setvariable [("WL12" + _varcomp),1,true]
? (_ammo == "mineE") and (_selection == "wheel_1_3_steering") and (NBRand100 > 15) : _target setHit ["wheel_1_3_steering", 1];_target setvariable [("WL13" + _varcomp),1,true]
? (_ammo == "mineE") and (_selection == "wheel_1_4_steering") and (NBRand100 > 15) : _target setHit ["wheel_1_4_steering", 1];_target setvariable [("WL14" + _varcomp),1,true]
? (_ammo == "mineE") and (_selection == "wheel_2_1_steering") and (NBRand100 > 15) : _target setHit ["wheel_2_1_steering", 1];_target setvariable [("WL21" + _varcomp),1,true]
? (_ammo == "mineE") and (_selection == "wheel_2_2_steering") and (NBRand100 > 15) : _target setHit ["wheel_2_2_steering", 1];_target setvariable [("WL22" + _varcomp),1,true]
? (_ammo == "mineE") and (_selection == "wheel_2_3_steering") and (NBRand100 > 15) : _target setHit ["wheel_2_3_steering", 1];_target setvariable [("WL23" + _varcomp),1,true]
? (_ammo == "mineE") and (_selection == "wheel_2_4_steering") and (NBRand100 > 15) : _target setHit ["wheel_2_4_steering", 1];_target setvariable [("WL24" + _varcomp),1,true]

? _difA > 45 and _difA <= 135 : _armorKE = _armorKE / 3
? _difA > 135 : _armorKE = _armorKE / 5
? !(_selection == "") : goto "exit"
_commH = _commH + _damage * NBrand100/70
_drvrH = _drvrH + _damage * NBrand100B/70
_gunnH = _gunnH + _damage * NBrand100C/70

~0.01
? ((_penetration > _armorKE) and (NBRand100 > 50)) or (NBRand100 > 95) : commander _target setdamage _commH;driver _target setdamage _drvrH;gunner _target setdamage _gunnH
~0.01

? _penetration < _armorKE and NBRand100 < 99 : player sideChat format["TRG: %1 Arm: KE %2 Pen: EXPL %3 Dmg: %5",_target,_armorKE,_penetration,_damage,_DT];goto "exit0"
_target setDamage _DT + _damage*(_penetration/_armorKE)*(NBRand50/(3*_Surviv));

? (_target getvariable ("TRP" + _varcomp) == 1) : _target setHit ["PAS_P", 1]
? (_target getvariable ("TRL" + _varcomp) == 1) : _target setHit ["PAS_L", 1]

? (_target getvariable ("TUR" + _varcomp) == 1) : _target setHit ["VEZ", 1]
? (_target getvariable ("GUN" + _varcomp) == 1) : _target setHit ["ZBRAN", 1]

? (_target getvariable ("WL11" + _varcomp) == 1) : _target setHit ["wheel_1_1_steering", 1]
? (_target getvariable ("WL12" + _varcomp) == 1) : _target setHit ["wheel_1_2_steering", 1]
? (_target getvariable ("WL13" + _varcomp) == 1) : _target setHit ["wheel_1_3_steering", 1]
? (_target getvariable ("WL14" + _varcomp) == 1) : _target setHit ["wheel_1_4_steering", 1]
? (_target getvariable ("WL21" + _varcomp) == 1) : _target setHit ["wheel_2_1_steering", 1]
? (_target getvariable ("WL22" + _varcomp) == 1) : _target setHit ["wheel_2_2_steering", 1]
? (_target getvariable ("WL23" + _varcomp) == 1) : _target setHit ["wheel_2_3_steering", 1]
? (_target getvariable ("WL24" + _varcomp) == 1) : _target setHit ["wheel_2_4_steering", 1]
_DT = damage _target
player sideChat format["TRG: %1 Arm: KE %2 Pen: EXPL %3 Dmg: %5",_target,_armorKE,_penetration,_damage,_DT]

#exit0

_commH = damage _comm
_drvrH = damage _drvr
_gunnH = damage _gunn
_dT = _time - _worktime

;debug to rpt - time work of script for efficiency testing

diag_log format ["script work time: %1",_dt]
#exit

exit
"NBRandomizer.sqs":


#loop
NBRand10 = random 10
NBRand25 = random 25
NBRand50 = random 50
NBRand50B = random 50
NBRand100 = random 100
NBRand100B = random 100
NBRand100C = random 100
~0.01
goto "loop"

"crewnodamage.sqs", to make crew not died from a few unsuccessful hits:


;method for avoid normal (but far too big) damage applied to crew of hitted tank. Main script will handle this for its own. "Allow damage false" do not works for some reason.
;This will cause problems, if non-vehicle (typeof "man" i think) units are with some other EH "handledamge". It will remove this EH from them.

_ix = 0
_tanks = []
_i = 0
#loop0
? (_i == "tank" counttype vehicles) : goto "loop1"
? (vehicles select _i) isKindOf "tank" : _tanks = _tanks + [vehicles select _i]
_i = _i + 1
goto "loop0"
#loop1
;diag_log _tanks
? (_i == 0) : goto "exit"

#loop
? ("tank" counttype vehicles == 0) : goto "exit"
{{_x removeallEventHandlers "Handledamage";} foreach crew _x} foreach allunits;
{{_x removeallEventHandlers "Handledamage";_ix = _x addEventHandler ["Handledamage", ""]} foreach crew _x} foreach _tanks;

~0.5
goto "loop"
#exit
exit



and simple tank counter:


#loop1
_tanksumW = west countSide vehicles
_tanksumE = east countSide vehicles
~1
hintsilent format ["West %1 - East %2",_tanksumW,_tanksumE]
goto "loop1"

init of every armored unit remains unchanded:


this addEventHandler ["handledamage", {_this exec "NBTank.sqs"}];

but to abrams tanks I added this, found somewhere on this forum, to remove loader, who always get killed because of his stupidity:


tankCrew = crew this; crewLoader = (tankCrew select 3); moveOut crewLoader; deleteVehicle crewLoader;

Also init of one of units or trigger activation field should contains this:


[] exec "NBRandomizer.sqs";[] exec "counterT.sqs";[] exec "crewnodamage.sqs"

(counter is optional of course)

In the files I put some comments and discussed some problems. Today I will try perhaps more effective way to attacked lined up in front towards the attacker.

.kju [PvPscene]
Oct 15 2011, 11:00
@<hidden> Rydygier
The idea was to check their configs. You can do that via the SIX config browser or
just download ACE core. It only has a few MB.

Rydygier
Oct 15 2011, 11:23
In that case I'll check it out. Thanks for the advice. I hope that their config is based on reliable sources.

Rydygier
Oct 17 2011, 14:55
As I mentioned before, I tried various ways to persuade a tank to set up front to the nearest or currently firing enemy vehicle, if it is kind of "tank". There are problems. Script is nearly finished except itself turning procedure. "Setdir" works, but only on level ground, because this command sets vehicle horizontally regardless of the slope. Also this needs missing animations and sound of tracks. "Sendsimplecommand" (preffered) works for "left" or "right". "Stop", even though the commander says this order, does not stop turning and tank rotates like carousel, endless. "Forward" also doesn't work. This isn't dependent on presence of player in crew. "doStop" does nothing too. Are there some other "simplecommands" or it just doesn't work? Has anyone any idea? Here it is presentation of "setdir" version on flat ground (but try to move tank on nearest slope, and watch then...):

TDS_test2.utes (http://www.multiupload.com/E2J4XCTPL4)

Kremator
Oct 17 2011, 16:47
Sounds like a promising update .... will download and test now mate !

Keep up the good work.

EDIT: Tested and it does a GOOD job turning the tank towards the enemy. When ammo is enabled it takes a T72 between 3-5 shots now to disable an M1A1 TUSK. The movement between positions is very rapid however. I hope someone is able to help with other commands that will help turn a tank in a realistic fashion.

Will also have to get you to code in SQF :)

Rydygier
Oct 17 2011, 18:09
T(h)anks for testing. Changed file to new one, there are some minor fixes, but still this piece of code is WIP and messy. BTW. I think, there is still too big chance for track damage. Too easy enemy can disable any tank, including Abrams, that way. AI's abandon vehicle in that case even, if they still can shoot with main gun and destroy attacker. Outside they quickly die by KM's, of course... Unfortunately I'm unfamiliar with AI behavior scrips, so can't do anything about those suicidal tendencies.

TristanYockell
Oct 17 2011, 18:26
I will test this all out as soon as possible, I don't have the skills you do in regards to SQF however you have implimented everything I wanted to do and then some.

Thanks a bunch for improving this script, it will make tanking 100 times better, I also cannot wait to use it with the upcomming LOBO iraq war release.

Rydygier
Oct 17 2011, 18:55
Thanks, I'm just trying to continue great idea of Nice_boats. It is without a doubt worth the efforts if folks will to enjoy it as I do.

EDIT: However, to be able to use the script with any new vehicles and weaponry from addons, I will first have to expand list of vehicles and weapons with those.

Kremator
Oct 17 2011, 19:31
Now what about a demo that combines test1 and test2 now (with ammo) :)

Rydygier
Oct 17 2011, 20:26
I will try to prepare something, still "setdir" version suffers mentioned bug, when tank is turning on non-level, sloped ground. It may give quite funny effect. :)

---------- Post added at 08:26 PM ---------- Previous post was at 07:43 PM ----------

Here you go:

TDS_test3 (http://www.multiupload.com/PO1QOWHZ04)

Some explanations:

- Script will not start (and will stop) when a vehicle is moving to not interfere with his driving.

- It may be noted that changing direction is followed unevenly. This is due to random factors associated with driver skill factor (selfcontrol under fire, reflex).

- Vehicle does not change direction because of air units and infantrymen, even if they have antitank weapons. I'll think about whether to change or leave.

- Ability to match towards work in two ways: when crew noticing enemy tank (requires presence of commander and driver, both AI), and when the tank is hit (only AI driver required he will not wait for order in this circumstance, I think).

- Of course, when tank is under attack from many sides, crew must choose to which opponent will turn tank. Here reigns rule "the last word matters."

PS Reduced chance of breaking track by 10 percent.

Kremator
Oct 17 2011, 20:33
Good work mate ! Testing now.

Perhaps post in the Editing section under configs and scripting to see if anyone knows of any other alternatives to setdir?

EDIT: Tested but am not seeing that BLUFOR turning to face the enemy. I have only really see one T90 turn to face in battle so far. Battles so last much longer however.

Rydygier
Oct 17 2011, 21:52
I guess it is beacause BLUEFOR is more advancing there, and continually in moving, I deployed some still T-90 on airfield for demonstration purposes. Maybe try several times from different points of view. I will look at this issue closer tommorow.

---------- Post added at 09:52 PM ---------- Previous post was at 09:20 PM ----------

...Or even today. :) In this version better you can see how does it work and what limitations it has. M1A2 platoon is fighting for life.

TDS_test3b (http://www.multiupload.com/RGNMB31ZDO)

Shortened pause between each script executions and improved drivers' reflex. Good night.

TristanYockell
Oct 18 2011, 06:40
Thanks, I'm just trying to continue great idea of Nice_boats. It is without a doubt worth the efforts if folks will to enjoy it as I do.

EDIT: However, to be able to use the script with any new vehicles and weaponry from addons, I will first have to expand list of vehicles and weapons with those.

Yes this is ok, I will attempt to do this for myself, don't worry about that. I already implimented all of the Project 85 vehicles before, I'm sure I can do it again.

If I hit a little road block I may contact you for help however if that is ok?.

Rydygier
Oct 18 2011, 07:14
Of course, thats OK, I will help gladly, as far as I could. Although I'm not a big coder...

galzohar
Oct 18 2011, 08:50
PvPscene, with heavy addons, like ACE, I have a problem, which is called "3 GB per month transfer limit." Extras weigh 1 GB. So it is, as you live to middle of nowhere.
If you use Six Updater at least it'll save you a lot of downloading on updates, so you basically download the extras once and then every update is a relatively small download. Or as PvPscene said you can just download the core, without the extras.

Rydygier
Oct 18 2011, 09:46
Downloaded core. It seems that I know too little about config files to properly translate values ​​used in ACE's config.bin to RHA equivalent used in the TDS script. Unless ACE core contains separate file with corresponding values, which I simply missed. In addition, I am not sure whether ACE developers certainly have used more reliable source than me.

BTW. In fact, I believe that we are largely stuck with guesswork, since key parameters modern equipment are simply kept secret, which is fully understandable. Therefore I see no chance for substantive resolution of endless and fruitless Internet wars such as, "M1A2 against T-90".

Sickboy
Oct 18 2011, 09:55
Hence it's a good idea to check the actual documentation rather than trying to guess it from binarized configs that have comments stripped :)

http://ace.dev-heaven.net/wagn/Vehicle_Damage_System
See (Coding) Notes section.


And yes, guess work is part of the equation, yet we have done extensive research; several books, several online sources, several people with experience etc.

Rydygier
Oct 18 2011, 10:12
Thanks a lot. Will study this. :)

Rydygier
Oct 18 2011, 12:47
Studied and benefited. I found armor values (sometimes surprising, it seems that T90's have thicker armor than M1A2's (with ERA) and M1A1 has the same armor as M1A2 TUSK minus side hull ERA.); also found penetration ability for Javelin, rockets, etc... Shellcore Ammo for tanks main guns has a parameter ACE_hit (in which .pbo I find relevant config.bin?) or is based on default values​​?

Now will try to modify learned values. TDS does not define separate variables for side, rear, etc.. armor, but instead divides by constant number value of frontal armor which in addition is only arithmetic average of turret and hull armor. It is some simplification, because chances for hit hull or turret aren't equal nor constant. However, will try to add a variable for proportion, to fit differences in the armor thickness proportion of the various types of tanks and will check out impact on working time of script.

Sickboy
Oct 18 2011, 12:51
You can find the relevant configs incl comments in:
http://dev-heaven.net/projects/ace-mod2/repository/revisions/develop/show/Addons/c_vehicle
and
http://dev-heaven.net/projects/ace-mod2/repository/revisions/develop/show/Addons/sys_vehicledamage

Some supplemental vehicles are defined in the ACEX modfolders.

Rydygier
Oct 18 2011, 14:20
Thanks again, Sickboy. I found all, what needed.

Rydygier
Oct 18 2011, 19:10
OK, so once again, same presentation as before, but with new NBTank2.sqs this time. Changes: balance of default Arma 2 vehicles and weapons taken from ACE configs. Currently, T90 has thicker armor than M1A2 and almost equal to Abrams penetration ability of his gun. By the way added missing vehicles: MRLS and Vodnik. I was surprised very high value "ace_hit" for ammunition Sh_120_HE (HE penetrates 580 mm RHA?) but perhaps that is good for some reason. To all units added seven variables defining exact proportions between armor side, rear, top or bottom and front (KE and CE, only KE for bottom). There is no visible script slowdown, as it seems.

TDS_test3b2 (http://www.multiupload.com/BJ813LC1FV)

Kremator
Oct 18 2011, 19:18
Cool ... will test.

Is the plan to have an addon (server only or server/client) eventually that will apply to all tested vehicles, instead of a script version ?

Further, I notice that the tank tends to turn it's front to the closest vehicle, whereas sometimes the threat is a lot farther away in a different direction. Is there a way to scan for main threat and turn to that ?

Rydygier
Oct 18 2011, 19:34
Addon instead script would be great, but I have no idea how to do addons at all, and how to convert to addon this particular script. It is therefore a request for someone better in these matters, to which I join enthusiastically. Second issue is an interesting challenge. And not easy. Assessment of risks is sometimes very complex and not necessarily rational thought processes. It seems to me that game is used for AI purposes a parameter of risk degree, but I'm not sure where I saw it and whether it can be applied here. I'll think about it.

Kremator
Oct 18 2011, 19:55
Just came across this command ... any use in making the turn more believeable?

http://www.ofpec.com/COMREF/index.php?action=details&id=1386&game=Arma2OA

Rydygier
Oct 18 2011, 20:09
Unfortunately, this command appears only in the OA, which I do not have, so I can not try. However, I see a similar command, simpler, "setvelocity". Perhaps it is useful. Thanks for the clue.

EDIT: "setvelocity" changes only motion vector, not affect orientation, so can't use them, but try in editor to put yourself as car driver, and put this into its init field: "this setVelocity [-5, 20, 10]" or "this setVelocity [120, 120, 120]". Enjoy. I really have to find some use for this wonderful command. :)

Kremator
Oct 18 2011, 20:44
I've seen a problem with the latest version in that, when an enemy is detected the hull turns as expected, and the turret turns as well. The moment that that tank is hit (or fires) the turret returns to its original position (in demo side on to enemy) and tank invariably dies.

Any idea why this snapping back happens? Could it be to do with the latest BIS beta ?

EDIT2: I have not yet had a battle when West has won! Damn Refleks are too good :)

Rydygier
Oct 18 2011, 21:14
Turret I did not notice this, but removed two lines from the script: "_target doTarget _attacker" and "_target doWatch _attacker". Here is:

TDS_test3b3 (http://www.multiupload.com/6NVZY9CELB)

Is there any difference in behaviour?

Reflex is easy to adjust, if needed. :)

Kremator
Oct 18 2011, 21:34
Testing now :)

EDIT: Seems like some of the problem rests with the newest beta, the rest is a conflict with one of my normal addons (sorry!) With 1.59 patch the tanks turn as they should, with the newest OA beta, although they turn and engage, they do like to return their turrets to the original direction ! Wierd !

Rydygier
Oct 18 2011, 22:32
In Arma 2 1.10 M1A2 usually just turns towards enemies and shoots. Without "dowatch" and "dotarget" script in no way affects behavior of turrets. Well, it's BETA patch...

Rydygier
Oct 19 2011, 10:22
Added to "towardA.sqs" this code:


#start
_enemies = []
~1

? ((_tank countenemy [_tank findnearestenemy _tank]) == 0) : goto "exit"
_neartanks = nearestObjects [_tank, ["Tank"], 1500]

_j = -1

#scanloop
_j = _j + 1
? ((_j+1) > (count _neartanks)) : goto "exitscan"
_tankJ = _neartanks select _j
? (((side _tankJ) getFriend (side _tank)) >= 0.6) or ((_tank knowsabout _tankJ) < 0.5) or (str (gunner _tankJ) == "<NULL-OBJECT>") or !(canFire _tankJ) : goto "scanloop"
_enemies = _enemies + [_tankJ]

~0.01
goto "scanloop"
#exitscan

? ((count _enemies) == 0) : goto "exit"

_Cenem = count _enemies

_rndm = (round (random _Cenem)) - 1
? (_rndm < 0) : _rndm = 0

_enemyT = _enemies select _rndm

Here's how it now works:

- is created list of all tanks within a radius of 1500 meters;
- Are removed from this list those vehicles, of which crew does not know or know too little, those that are not hostile, and those in which gunner place is empty (eg immobilised, therefore abandoned, or when gunner get killed) and those, whose gun and/or turret is disabled (i don't know, if it works, if MG's are still operational);
- Other vehicles are added to list of "_enemies", in order from nearest, containing potential threats known to the crew
- An element of that "_enemies" list, toward which tank hull will turn is randomized (irrational factor, variant with some predominance of choice nearest enemy, eg for two enemies on list, three times in four attempts (75%) to be selected closest enemy, if I am not mistaken, for 3 foes on list 50% and so on)
- Irrespective of this, tank also rotates toward vehicle, that hit him.
- "doWatch" and "doTarget" are back, this time in "towardsA.sqs", but script still does not affect, that to what tank shoots
Here is demonstration, such as before and second, requiring "Duala Isle" map, but better presenting, how script works on a vast plain:

TDS_test4 Utes & Duala (http://www.multiupload.com/IE4UD0CS0B)

Tested on Arma 2 1.10 without addons and with Duala Isle addon.

(On duala BLUFOR propably loses, is outnumbered)

EDIT: I suppose that because of circumstances of command "knowsabout" (KnowsAbout (http://community.bistudio.com/wiki/knowsAbout)) tank stops rotating towards enemies after two minutes from death of commander because of loss of knowledge about enemies. Unless something has changed since commented on this command in the wiki.

Rydygier
Oct 28 2011, 21:49
Thanks to knowledge derived here:

http://forums.bistudio.com/showthread.php?t=124589

I've prepared an addon version of TDS (requires CBA). This is a test version, I will be grateful if anyone will test, how it works with some tank battle scenario. Addon doesn't contain component "towards" which at this stage does not work well enough because of the above-mentioned problems with rotating tanks. It contains file "NBTank2.sqs" with debug (sidechat). If after hitting tank debug didn't appear, it means that addon is not working (for me it works). TDS addon needs some (5-7) seconds to initialize.

"NBT_TDS" currently support tanks and other armored vehicles from original game, vehicles from "Duala Isle" addon (both afrenian and molatian army) and from addon "Modern Polish Army and Police" by Vilas.

There isn't a ".bisign" file, because procedure described here ("step nine"):

http://community.bistudio.com/wiki/Mondkalb%27s_Addon_Tutorial

for me not working. Maybe it's some OS (Vista 64-bit) issue.

Here it is:

NBT_TDS (http://www.multiupload.com/WJCNV9J7PD)

Kremator
Oct 29 2011, 15:46
Excellent news. Will try this out and get back to you mate.

Thanks for your hard work on this.

Rydygier
Oct 29 2011, 17:33
Also recently explored SQF syntax enough to prepare, probably crude, version SQF (NBTank.sqf, CrewDS.sqf, NBRandomizer.sqf, "towards" wait until "turning problems" are resolved, and I have no idea, what else can I do with that... :/ There is no respose in my forum topic about this problem). This is mission with two tanks, for illustrative purposes and for testing. If will not be detected any errors, finally version of "addon" will be based on these files in place of SQS.

TDS_test5.utes (http://www.multiupload.com/BYS5XUAS6G)

Beneath code:

NBTank.sqf:


/*
Sqf version of Nice_Boat's Tank Damage System by Rydygier

Init for each armored vehicle, for which TDS should to handle damage:

this addEventHandler ["handledamage", {null = _this execVM "NBTank.sqf"}]

Also needed initialized NBRandomizer.sqf (crucial) and, for best effect, CrewDS.sqf.
*/
_selection = _this select 1;

if not ((_selection == "") or (_selection == "PAS_P") or (_selection == "PAS_L") or (_selection == "wheel_1_1_steering") or (_selection == "wheel_1_2_steering") or (_selection == "wheel_1_3_steering") or (_selection == "wheel_1_4_steering") or (_selection == "wheel_2_1_steering") or (_selection == "wheel_2_2_steering") or (_selection == "wheel_2_3_steering") or (_selection == "wheel_2_4_steering") or (_selection == "VEZ") or (_selection == "ZBRAN")) exitwith {};

_target = _this select 0;
_damage = _this select 2;
_attacker = _this select 3;
_ammo = _this select 4;

_comm = commander _target;
_drvr = driver _target;
_gunn = gunner _target;

_commH = damage _comm;
_drvrH = damage _drvr;
_gunnH = damage _gunn;

_varcomp = str (_target);

if (_target getvariable ("GCheck" + _varcomp) != 1) then
{
_target setvariable [("PAUSE" + _varcomp),0,true];
_target setvariable [("TRL" + _varcomp),0,true];
_target setvariable [("TRP" + _varcomp),0,true];
_target setvariable [("TUR" + _varcomp),0,true];
_target setvariable [("GUN" + _varcomp),0,true];

_target setvariable [("WL11" + _varcomp),0,true];
_target setvariable [("WL12" + _varcomp),0,true];
_target setvariable [("WL13" + _varcomp),0,true];
_target setvariable [("WL14" + _varcomp),0,true];

_target setvariable [("WL21" + _varcomp),0,true];
_target setvariable [("WL22" + _varcomp),0,true];
_target setvariable [("WL23" + _varcomp),0,true];
_target setvariable [("WL24" + _varcomp),0,true];

_target setvariable [("GCheck" + _varcomp),1,true]
};

_top = 0;
_DT = damage _target;
_weapon = currentWeapon _attacker;

if ((_damage > 0.7) and (_selection == "PAS_P") and (NBRand100 > 90)) then {_target setHit ["PAS_P", 1];_target setvariable [("TRP" + _varcomp),1,true]};
if ((_damage > 0.7) and (_selection == "PAS_L") and (NBRand100B > 90)) then {_target setHit ["PAS_L", 1];_target setvariable [("TRL" + _varcomp),1,true]} else
{if ((_damage > 0.6) and (_selection == "wheel_1_1_steering") and (NBRand100 > 80)) then {_target setHit ["wheel_1_1_steering", 1];_target setvariable [("WL11" + _varcomp),1,true]};
if ((_damage > 0.6) and (_selection == "wheel_1_2_steering") and (NBRand100 > 80)) then {_target setHit ["wheel_1_2_steering", 1];_target setvariable [("WL12" + _varcomp),1,true]};
if ((_damage > 0.6) and (_selection == "wheel_1_3_steering") and (NBRand100 > 80)) then {_target setHit ["wheel_1_3_steering", 1];_target setvariable [("WL13" + _varcomp),1,true]};
if ((_damage > 0.6) and (_selection == "wheel_1_4_steering") and (NBRand100 > 80)) then {_target setHit ["wheel_1_4_steering", 1];_target setvariable [("WL14" + _varcomp),1,true]};
if ((_damage > 0.6) and (_selection == "wheel_2_1_steering") and (NBRand100 > 80)) then {_target setHit ["wheel_2_1_steering", 1];_target setvariable [("WL21" + _varcomp),1,true]};
if ((_damage > 0.6) and (_selection == "wheel_2_2_steering") and (NBRand100 > 80)) then {_target setHit ["wheel_2_2_steering", 1];_target setvariable [("WL22" + _varcomp),1,true]};
if ((_damage > 0.6) and (_selection == "wheel_2_3_steering") and (NBRand100 > 80)) then {_target setHit ["wheel_2_3_steering", 1];_target setvariable [("WL23" + _varcomp),1,true]};
if ((_damage > 0.6) and (_selection == "wheel_2_4_steering") and (NBRand100 > 80)) then {_target setHit ["wheel_2_4_steering", 1];_target setvariable [("WL24" + _varcomp),1,true]}};

_bullexc = ["B_30mmA10_AP","B_20mm_AP","B_20mm_AA","B_23mm_AA","B_23mm_HE","B_23mm_AP","B_23mm_APHE","B_25mm_HE","B_25mm_HEI","B_25mm_APDS","B_30mm_AP","B_30mm_HE","B_30mm_AA","G_40mm_HE","VIL_B_30mm_ros","ibr_aden30_gunpods"];
{if (_ammo isKindof _x) exitwith {_except = 1}} foreach _bullexc;
if ((_ammo isKindof "BulletCore") and (_except != 1)) exitwith {};

_bullexc = nil;

_highadv = ((getposASL _attacker) select 2) - ((getposASL _target) select 2);
if (damage _target >= 1) then {_highadv = 1};
_distF = [(position _attacker) select 0,(position _attacker) select 1,(getposASL _target) select 2] distance (getposASL _target);
_Tpitch = ((vectordir _target) select 2);
_Tbank = vectorUP _target;
_DHatan = _highadv atan2 _distF;
if (_DHatan == -1) then {_DHatan = 0};
_TcheckA = 9/(1+ _DHatan);
_dX = ((getPos _attacker) select 0) - ((getPos _target) select 0);
_dY = ((getPos _attacker) select 1) - ((getPos _target) select 1);
if (_dX == 0) then {_dX = 1};
if (_dY == 0) then {_dY = 1};
if (_highadv == 0) then {_highadv = 1};
_EWroll = _Tbank select 0;
_NSroll = _Tbank select 1;

if (((abs _dX) > (abs _dY)) and (_dX > 0)) then {_TcheckL = -_EWroll} else
{if (((abs _dX) <= (abs _dY)) and (_dY > 0)) then {_TcheckL = -_NSroll} else
{if (((abs _dX) > (abs _dY)) and (_dX <= 0)) then {_TcheckL = _EWroll} else
{if (((abs _dX) <= (abs _dY)) and (_dY <= 0)) then {_TcheckL = _NSroll}}}};

_ang = _dX atan2 _dY;
_dif = (_ang - getDir _target);

//if (_selection == "") and ((_target getvariable ("PAUSE" + _varcomp)) != 1) and ((driver _target) != player) then {[_ang, _target,_attacker,_varcomp] exec "towards.sqs"};

if (_dif < 0) then {_dif = 360 + _dif};
if (_dif > 180) then {_dif = _dif - 360};
_difA = abs _dif;
_armorCE = 0; _armorKE = 0; _surviv = 0; _sidePKE = 0;_sidePCE = 0;_rearPKE = 0;_rearPCE = 0;_topPKE = 0;_topPCE = 0;_bottomPKE = 0;
if (_target isKindOf "ibr_T55") then {_armorCE = 215; _armorKE = 215; _surviv = 17; _sidePKE = 0.53;_sidePCE = 0.53;_rearPKE = 0.28;_rearPCE = 0.28;_topPKE = 0.14;_topPCE = 0.14;_bottomPKE = 0.25} else
{if (_target isKindOf "M1A2_TUSK_MG") then {_armorCE = 1035; _armorKE = 720; _surviv = 30;_sidePKE = 0.54;_sidePCE = 0.62;_rearPKE = 0.11;_rearPCE = 0.17;_topPKE = 0.06;_topPCE = 0.04;_bottomPKE = 0.42} else
{if (_target isKindOf "M1A1") then {_armorCE = 1035; _armorKE = 720; _surviv = 26; _sidePKE = 0.44;_sidePCE = 0.43;_rearPKE = 0.1;_rearPCE = 0.08;_topPKE = 0.06;_topPCE = 0.04;_bottomPKE = 0.28} else
{if (_target isKindOf "ZSU_Base") then {_armorCE = 9.5; _armorKE = 9.5; _surviv = 10; _sidePKE = 1;_sidePCE = 1;_rearPKE = 1;_rearPCE = 1;_topPKE = 1;_topPCE = 1;_bottomPKE = 0.74} else
{if (_target isKindOf "2S6M_Tunguska") then {_armorCE = 15; _armorKE = 15; _surviv = 10; _sidePKE = 0.93;_sidePCE = 0.93;_rearPKE = 0.93;_rearPCE = 0.93;_topPKE = 0.73;_topPCE = 0.73;_bottomPKE = 0.93} else
{if (_target isKindOf "T34") then {_armorCE = 85; _armorKE = 75; _surviv = 16; _sidePKE = 0.63;_sidePCE = 0.56;_rearPKE = 0.27;_rearPCE = 0.24;_topPKE = 0.27;_topPCE = 0.24;_bottomPKE = 0.53} else
{if (_target isKindOf "T72_Base") then {_armorCE = 490; _armorKE = 390; _surviv = 20; _sidePKE = 0.24;_sidePCE = 0.38;_rearPKE = 0.18;_rearPCE = 0.16;_topPKE = 0.1;_topPCE = 0.08;_bottomPKE = 0.51} else
{if (_target isKindOf "T90") then {_armorCE = 1165; _armorKE = 815; _surviv = 24; _sidePKE = 0.48;_sidePCE = 0.73;_rearPKE = 0.11;_rearPCE = 0.08;_topPKE = 0.11;_topPCE = 0.21;_bottomPKE = 0.25} else
{if (_target isKindOf "AAV") then {_armorCE = 27.5; _armorKE = 27.5; _surviv = 12; _sidePKE = 1.16;_sidePCE = 1.16;_rearPKE = 0.82;_rearPCE = 0.82;_topPKE = 0.91;_topPCE = 0.91;_bottomPKE = 1.1} else
{if (_target isKindOf "BMP2_Base") then {_armorCE = 36.5; _armorKE = 36.5; _surviv = 12; _sidePKE = 0.51;_sidePCE = 0.51;_rearPKE = 0.48;_rearPCE = 0.48;_topPKE = 0.44;_topPCE = 0.44;_bottomPKE = 0.82} else
{if (_target isKindOf "BMP3") then {_armorCE = 41.5; _armorKE = 41.5; _surviv = 13; _sidePKE = 0.61;_sidePCE = 0.61;_rearPKE = 0.45;_rearPCE = 0.45;_topPKE = 0.39;_topPCE = 0.39;_bottomPKE = 1.2} else
{if ((_target isKindOf "BRDM2_Base") or (_target isKindOf "BRDM2_ATGM_base") or (_target isKindOf "VIL_brdm_m96d")) then {_armorCE = 10.5; _armorKE = 10.5; _surviv = 11; _sidePKE = 0.67;_sidePCE = 0.67;_rearPKE = 0.67;_rearPCE = 0.67;_topPKE = 0.67;_topPCE = 0.67;_bottomPKE = 0.67} else
{if (_target isKindOf "BTR90_Base") then {_armorCE = 34; _armorKE = 34; _surviv = 12; _sidePKE = 0.6;_sidePCE = 0.6;_rearPKE = 0.6;_rearPCE = 0.6;_topPKE = 0.6;_topPCE = 0.6;_bottomPKE = 0.59} else
{if (_target isKindOf "LAV25_Base") then {_armorCE = 32.5; _armorKE = 32.5; _surviv = 11; _sidePKE = 0.62;_sidePCE = 0.62;_rearPKE = 0.55;_rearPCE = 0.55;_topPKE = 0.62;_topPCE = 0.62;_bottomPKE = 0.62} else
{if (_target isKindOf "VIL_LEO2A4") then {_armorCE = 905; _armorKE = 620; _surviv = 26; _sidePKE = 0.27;_sidePCE = 0.46;_rearPKE = 0.13;_rearPCE = 0.22;_topPKE = 0.08;_topPCE = 0.13;_bottomPKE = 0.4} else
{if (_target isKindOf "VIL_new_PT91") then {_armorCE = 915; _armorKE = 625; _surviv = 24; _sidePKE = 0.47;_sidePCE = 0.4;_rearPKE = 0.17;_rearPCE = 0.17;_topPKE = 0.1;_topPCE = 0.1;_bottomPKE = 0.4} else
{if (_target isKindOf "VIL_t72M1_wp") then {_armorCE = 515; _armorKE = 415; _surviv = 20; _sidePKE = 0.45;_sidePCE = 0.51;_rearPKE = 0.21;_rearPCE = 0.17;_topPKE = 0.12;_topPCE = 0.1;_bottomPKE = 0.4} else
{if (_target isKindOf "VIL_rosomak") then {_armorCE = 150; _armorKE = 70; _surviv = 12; _sidePKE = 0.8;_sidePCE = 0.67;_rearPKE = 0.7;_rearPCE = 0.5;_topPKE = 0.4;_topPCE = 0.13;_bottomPKE = 0.8} else
{if (_target isKindOf "VIL_OSA_PLOT") then {_armorCE = 10; _armorKE = 10; _surviv = 10; _sidePKE = 1;_sidePCE = 1;_rearPKE = 1;_rearPCE = 1;_topPKE = 1;_topPCE = 1;_bottomPKE = 1} else
{if (_target isKindOf "VIL_DANA") then {_armorCE = 35; _armorKE = 35; _surviv = 8; _sidePKE = 0.57;_sidePCE = 0.57;_rearPKE = 0.57;_rearPCE = 0.57;_topPKE = 0.57;_topPCE = 0.57;_bottomPKE = 0.57} else
{if (_target isKindOf "VIL_2s1_PL") then {_armorCE = 30; _armorKE = 30; _surviv = 8; _sidePKE = 0.67;_sidePCE = 0.67;_rearPKE = 0.33;_rearPCE = 0.33;_topPKE = 0.33;_topPCE = 0.33;_bottomPKE = 0.5} else
{if (_target isKindOf "VIL_bmp1_wp") then {_armorCE = 35; _armorKE = 35; _surviv = 10; _sidePKE = 0.71;_sidePCE = 0.71;_rearPKE = 0.57;_rearPCE = 0.57;_topPKE = 0.29;_topPCE = 0.29;_bottomPKE = 1} else
{if (_target isKindOf "VIL_bwp2000_wp") then {_armorCE = 55; _armorKE = 55; _surviv = 13; _sidePKE = 0.5;_sidePCE = 0.5;_rearPKE = 0.1;_rearPCE = 0.1;_topPKE = 0.1;_topPCE = 0.1;_bottomPKE = 0.4} else
{if (_target isKindOf "ibr_LEO1A5") then {_armorCE = 380; _armorKE = 335; _surviv = 18; _sidePKE = 0.3;_sidePCE = 0.42;_rearPKE = 0.21;_rearPCE = 0.17;_topPKE = 0.09;_topPCE = 0.08;_bottomPKE = 0.3} else
{if (_target isKindOf "MLRS") then {_armorCE = 17.5; _armorKE = 17.5; _surviv = 8; _sidePKE = 0.57;_sidePCE = 0.57;_rearPKE = 0.57;_rearPCE = 0.57;_topPKE = 0.57;_topPCE = 0.57;_bottomPKE = 0.57} else
{if (_target isKindOf "GAZ_Vodnik") then {_armorCE = 10.5; _armorKE = 10.5; _surviv = 10; _sidePKE = 0.67;_sidePCE = 0.67;_rearPKE = 0.67;_rearPCE = 0.67;_topPKE = 0.67;_topPCE = 0.67;_bottomPKE = 0.95} else
{if (_target isKindOf "GAZ_Vodnik_HMG") then {_armorCE = 10.5; _armorKE = 10.5; _surviv = 10; _sidePKE = 0.67;_sidePCE = 0.67;_rearPKE = 0.67;_rearPCE = 0.67;_topPKE = 0.67;_topPCE = 0.67;_bottomPKE = 0.95}}}}}}}}}}}}}}}}}}}}}}}}}}};

_kinetic = false;
_chemical = false;
_explosive = false;
_penetration = 0;
switch true do
{
case (_ammo isKindOf "shellCore") :
{
if (_ammo isKindOf "Sh_105_HE") exitwith {_penetration = 62.5 + NBRand25; _explosive = true};
if (_ammo isKindOf "Sh_100_HE") exitwith {_penetration = 70 + NBRand10; _explosive = true};
if (_ammo isKindOf "Sh_120_HE") exitwith {_penetration = 567.5 + NBRand25; _explosive = true};
if (_ammo isKindOf "Sh_120_SABOT") exitwith {_penetration = 805 + NBRand50; _kinetic = true};
if (_ammo isKindOf "Sh_122_HE") exitwith {_penetration = 30 + NBRand25; _explosive = true};
if (_ammo isKindOf "Sh_125_HE") exitwith {_penetration = 81.5 + NBRand50; _explosive = true};
if ((_ammo isKindOf "Sh_125_SABOT") and (_weapon == "D81")) exitwith {_penetration = 515 + NBRand50; _kinetic = true};
if ((_ammo isKindOf "Sh_125_SABOT") and (_weapon == "2A46M")) exitwith {_penetration = 785 + NBRand50; _kinetic = true};
if (_ammo isKindOf "Sh_85_HE") exitwith {_penetration = 35 + NBRand10; _explosive = true};
if (_ammo isKindOf "Sh_85_AP") exitwith {_penetration = 82.5 + NBRand25; _kinetic = true};
if (_ammo isKindOf "VIL_NPL_AP120mm") exitwith {_penetration = 575 + NBRand50; _chemical = true};
if (_ammo isKindOf "VIL_NPL_SB120mm") exitwith {_penetration = 835 + NBRand50; _kinetic = true};
if (_ammo isKindOf "VIL_NPL_HE120mm") exitwith {_penetration = 87.5 + NBRand25; _explosive = true};
if ((_ammo isKindOf "VIL_NPL_SB125mm") and (_attacker isKindOf "VIL_tankERA")) exitwith {_penetration = 645 + NBRand50; _kinetic = true};
if ((_ammo isKindOf "VIL_NPL_AP125mm") and (_attacker isKindOf "VIL_tankERA")) exitwith {_penetration = 775 + NBRand50; _chemical = true};
if (_ammo isKindOf "VIL_NPL_HE125mm") exitwith {_penetration = 97.5 + NBRand25; _explosive = true};
if (_ammo isKindOf "VIL_NPL_SB125mm") exitwith {_penetration = 405 + NBRand50; _kinetic = true};
if (_ammo isKindOf "VIL_NPL_AP125mm") exitwith {_penetration = 475 + NBRand50; _chemical = true};
//if (_ammo isKindOf "VIL_NPL_AP125mm") exitwith {_penetration = 500 + NBRand50; _chemical = true};
if (_ammo isKindOf "VIL_HE152mm") exitwith {_penetration = 112.5 + NBRand25; _explosive = true};
if (_ammo isKindOf "VIL_HE122mm") exitwith {_penetration = 102.5 + NBRand25; _explosive = true};
if (_ammo isKindOf "VIL_HEAT122mm") exitwith {_penetration = 435 + NBRand50; _chemical = true};
if (_ammo isKindOf "vilas_AP73mm") exitwith {_penetration = 375.5 + NBRand25; _chemical = true};
if (_ammo isKindOf "vilas_HE73mm") exitwith {_penetration = 55 + NBRand10; _explosive = true};
if (_ammo isKindOf "VIL_NPL_sb60mm") exitwith {_penetration = 107.5 + NBRand25; _kinetic = true};
if (_ammo isKindOf "VIL_NPL_he60mm") exitwith {_penetration = 15 + NBRand10; _explosive = true};
if (_ammo isKindOf "VIL_NPL_Uni60mm") exitwith {_penetration = 80 + NBRand10; _chemical = true};
if (_ammo isKindOf "VIL_NPL_ap60mm") exitwith {_penetration = 132.5 + NBRand25; _chemical = true};
if (_ammo isKindOf "ibr_Sh_105_SABOT_leo") exitwith {_penetration = 505 + NBRand50; _kinetic = true};
if (_ammo isKindOf "ibr_BM_8_100mm_HVAPDS") exitwith {_penetration = 207.5 + NBRand25; _kinetic = true};
if (_ammo isKindOf "ibr_BK_17_100mm_HEAT") exitwith {_penetration = 275 + NBRand10; _chemical = true};
if (_ammo isKindOf "ibr_OF_32_100mm_HE") exitwith {_penetration = 70 + NBRand10; _explosive = true}
};

case (_ammo isKindOf "rocketCore") :
{
if (_ammo isKindOf "R_Hydra_HE") exitwith {_penetration = 15 + NBRand10; _explosive = true};
if (_ammo isKindOf "R_57mm_HE") exitwith {_penetration = 5 + NBRand10; _explosive = true};
if (_ammo isKindOf "R_80mm_HE") exitwith {_penetration = 25 + NBRand10; _explosive = true};
if (_ammo isKindOf "R_S8T_AT") exitwith {_penetration = 405 + NBRand50; _chemical = true};
if (_ammo isKindOf "R_M136_AT") exitwith {_penetration = 395 + NBRand50; _chemical = true};
if (_ammo isKindOf "R_RPG18_AT") exitwith {_penetration = 350 + NBRand50; _chemical = true};
if (_ammo isKindOf "R_PG7VR_AT") exitwith {_penetration = 625 + NBRand50; _chemical = true};
if ((_ammo isKindOf "R_PG7VL_AT") or (_ammo isKindOf "VIL_PG7M_ammo")) exitwith {_penetration = 475 + NBRand50; _chemical = true};
if ((_ammo isKindOf "R_PG7V_AT") or (_ammo isKindOf "VIL_PG7KO_ammo")) exitwith {_penetration = 305 + NBRand50; _chemical = true};
if (_ammo isKindOf "R_OG7_AT") exitwith {_penetration = 5 + NBRand10; _explosive = true};
if (_ammo isKindOf "R_PG9_AT") exitwith {_penetration = 275 + NBRand50; _chemical = true};
if (_ammo isKindOf "R_OG9_HE") exitwith {_penetration = 19 + NBRand10; _explosive = true};
if (_ammo isKindOf "R_SMAW_HEAA") exitwith {_penetration = 505 + NBRand50; _chemical = true};
if (_ammo isKindOf "R_SMAW_HEDP") exitwith {_penetration = 55 + NBRand10; _chemical = true};
if (_ammo isKindOf "R_GRAD") exitwith {_penetration = 20 + NBRand100; _explosive = true};
if (_ammo isKindOf "R_MLRS") exitwith {_penetration = 550 + NBRand100; _explosive = true}
};

case (_ammo isKindOf "missileCore") :
{
if (_ammo isKindOf "M_Javelin_AT") exitwith {_penetration = 775 + NBRand50; _chemical = true};
if (_ammo isKindOf "M_Stinger_AA") exitwith {_penetration = 25 + NBRand10; _explosive = true};
if (_ammo isKindOf "vil_Sidewinder_OSA") exitwith {_penetration = 207.5 + NBRand25; _explosive = true};
if ((_ammo isKindOf "M_Sidewinder_AA") or (_ammo isKindOf "ibr_AIM9M_AA")) exitwith {_penetration = 85 + NBRand10; _explosive = true};
if ((_ammo isKindOf "M_Strela_AA") or (_ammo isKindOf "VIL_grom_AA")) exitwith {_penetration = 15 + NBRand10; _explosive = true};
if (_ammo isKindOf "M_Igla_AA") exitwith {_penetration = 20 + NBRand10; _explosive = true};
if (_ammo isKindOf "M_AT5_AT") exitwith {_penetration = 625 + NBRand50; _chemical = true};
if (_ammo isKindOf "M_AT13_AT") exitwith {_penetration = 925 + NBRand50; _chemical = true};
if (_ammo isKindOf "M_TOW_AT") exitwith {_penetration = 775 + NBRand50; _chemical = true};
if (_ammo isKindOf "M_TOW2_AT") exitwith {_penetration = 950 + NBRand100; _chemical = true};
if (_ammo isKindOf "M_AT10_AT") exitwith {_penetration = 625 + NBRand50; _chemical = true};
if (_ammo isKindOf "M_AT11_AT") exitwith {_penetration = 875 + NBRand50; _chemical = true};
if (_ammo isKindOf "M_Hellfire_AT") exitwith {_penetration = 1350 + NBRand100; _chemical = true};
if (_ammo isKindOf "M_Vikhr_AT") exitwith {_penetration = 950 + NBRand100; _chemical = true};
if ((_ammo isKindOf "M_Maverick_AT") or (_ammo isKindOf "ibr_AGM65_AG")) exitwith {_penetration = 1750 + NBRand100; _chemical = true};
if (_ammo isKindOf "M_R73_AA") exitwith {_penetration = 85 + NBRand10; _explosive = true};
if (_ammo isKindOf "M_Ch29_AT") exitwith {_penetration = 4150 + NBRand100; _explosive = true};
if (_ammo isKindOf "M_AT2_AT") exitwith {_penetration = 450 + NBRand100; _chemical = true};
if (_ammo isKindOf "M_AT6_AT") exitwith {_penetration = 535 + NBRand50; _chemical = true};
if (_ammo isKindOf "M_AT9_AT") exitwith {_penetration = 895 + NBRand50; _chemical = true};
if (_ammo isKindOf "M_9M311_AA") exitwith {_penetration = 137.5 + NBRand25; _explosive = true};
if (_ammo isKindOf "VILNPL_at3_sagger") exitwith {_penetration = 495 + NBRand50; _chemical = true}
};

case (_ammo isKindOf "laserbombCore") :
{
if (_damage < 0.6) exitwith {};
if (_damage > 1) then {_top = 1};
if (_ammo isKindOf "ibr_GBU12_LGB") exitwith {_penetration = 2950 + NBRand100; _explosive = true};
if (_ammo isKindOf "Bo_FAB_250") exitwith {_penetration = 3350 + NBRand100; _explosive = true}
};

default
{
if (_ammo == "mine") exitwith {_penetration = 687.5 + NBRand25; _explosive = true};
if (_ammo == "mineE") exitwith {_penetration = 245 + NBRand10; _explosive = true};
if ((_ammo == "pipebomb") or (_ammo == "timebomb")) exitwith { _penetration = 100 + NBRand100; _explosive = true};
if (_ammo isKindOf "B_20mm_AP") exitwith { _penetration = 20 + NBRand10; _kinetic = true};
if (_ammo isKindOf "B_20mm_AA") exitwith { _penetration = 20 + NBRand10; _kinetic = true};
if (_ammo isKindOf "B_23mm_AA") exitwith { _penetration = 24 + NBRand10; _kinetic = true};
if (_ammo isKindOf "B_23mm_HE") exitwith { _penetration = 12 + NBRand10; _kinetic = true};
if (_ammo isKindOf "B_23mm_AP") exitwith { _penetration = 24 + NBRand10; _kinetic = true};
if (_ammo isKindOf "B_23mm_APHE") exitwith { _penetration = 18 + NBRand10; _kinetic = true};
if (_ammo isKindOf "B_25mm_HE") exitwith { _penetration = 13 + NBRand10; _kinetic = true};
if (_ammo isKindOf "B_25mm_HEI") exitwith { _penetration = 13 + NBRand10; _kinetic = true};
if (_ammo isKindOf "B_25mm_APDS") exitwith { _penetration = 23 + NBRand10; _kinetic = true};
if ((_ammo isKindOf "B_30mm_AP") and (_weapon == "2A42")) exitwith { _penetration = 57 + NBRand10; _kinetic = true};
if ((_ammo isKindOf "B_30mm_AP") and (_weapon == "2A72")) exitwith { _penetration = 80 + NBRand10; _kinetic = true};
if (_ammo isKindOf "B_30mmA10_AP") exitwith { _penetration = 64 + NBRand10; _kinetic = true};
if (_ammo isKindOf "B_30mm_HE") exitwith { _penetration = 16 + NBRand10; _kinetic = true};
if (_ammo isKindOf "B_30mm_AA") exitwith { _penetration = 16 + NBRand10; _kinetic = true};
if (_ammo isKindOf "G_30mm_HE") exitwith { _penetration = 5 + NBRand10; _kinetic = true};
if (_ammo isKindOf "G_40mm_HE") exitwith { _penetration = 6 + NBRand10; _kinetic = true};
if (_ammo isKindOf "VIL_B_30mm_ros") exitwith {_penetration = 10 + NBRand10; _chemical = true};
if (_ammo isKindOf "ibr_aden30_gunpods") exitwith {_penetration = 50 + NBRand10; _kinetic = true}
}
};
switch true do
{
case (_kinetic) :
{
_penetration = _penetration + ((((1000 - (_attacker distance _target))/100) * 0.02) * _penetration);
if ((_selection == "VEZ") and (_penetration > (_armorKE * NBRand50*0.03)) and (NBRand100 > 90)) then {_target setvariable [("TUR" + _varcomp),1,true]};
if ((_selection == "ZBRAN") and (_penetration > (_armorKE * NBRand50B*0.03)) and (NBRand100B > 90)) then {_target setvariable [("GUN" + _varcomp),1,true]};
if not (_selection == "") exitwith {};
_commH = _commH + _damage * NBrand100/70;
_drvrH = _drvrH + _damage * NBrand100B/70;
_gunnH = _gunnH + _damage * NBrand100C/70;
_armorKE = _armorKE + (NBrand25 * (_armorKE/20) - NBrand10 * (_armorKE/20));
if ((_dif >= -45) and (_dif < 45) and (_Dhatan > 20) and (_Tpitch < (_DHatan/120)) and (NBRand100C > 1)) then {_top = 1} else
{if ((((_dif > -180) and (_dif <= -135)) or ((_dif > 135) and (_dif <= 180))) and (_Dhatan > 20) and (_Tpitch > -(_DHatan/120)) and (NBRand100C > 20)) then {_top = 1} else
{if ((((_dif >= 45) and (_dif < 135)) or ((_dif > -135) and (_dif <= -45))) and (_Dhatan > 20) and (_TcheckL < (_DHatan/120)) and (NBRand100C > 20)) then {_top = 1}}};
if (_top == 1) then {_armorKE = _armorKE * _topPKE};
if ((_top != 1) and (_difA > 45) and (_difA <= 135)) then {_armorKE = _armorKE * _sidePKE};
if ((_top != 1) and (_difA > 135)) then {_armorKE = _armorKE * _rearPKE};
if (((_penetration > _armorKE) and (NBRand100 > 50)) or (NBRand100 > 95)) then {commander _target setdamage _commH;driver _target setdamage _drvrH;gunner _target setdamage _gunnH};
if ((_penetration < _armorKE) and (NBRand100 < 99)) exitwith
{
player sideChat format["TRG: %1 Arm: KE %2 Pen: SABOT %3 Dmg: %5",_target,_armorKE,_penetration,_damage,_DT];
_commH = damage _comm;
_drvrH = damage _drvr;
_gunnH = damage _gunn
};
_target setDamage _DT + _damage*(_penetration/_armorKE)*(NBRand50/(3*_Surviv));
if (_target getvariable ("TRP" + _varcomp) == 1) then { _target setHit ["PAS_P", 1]};
if (_target getvariable ("TRL" + _varcomp) == 1) then { _target setHit ["PAS_L", 1]};

if (_target getvariable ("TUR" + _varcomp) == 1) then { _target setHit ["VEZ", 1]};
if (_target getvariable ("GUN" + _varcomp) == 1) then { _target setHit ["ZBRAN", 1]};

if (_target getvariable ("WL11" + _varcomp) == 1) then { _target setHit ["wheel_1_1_steering", 1]};
if (_target getvariable ("WL12" + _varcomp) == 1) then { _target setHit ["wheel_1_2_steering", 1]};
if (_target getvariable ("WL13" + _varcomp) == 1) then { _target setHit ["wheel_1_3_steering", 1]};
if (_target getvariable ("WL14" + _varcomp) == 1) then { _target setHit ["wheel_1_4_steering", 1]};
if (_target getvariable ("WL21" + _varcomp) == 1) then { _target setHit ["wheel_2_1_steering", 1]};
if (_target getvariable ("WL22" + _varcomp) == 1) then { _target setHit ["wheel_2_2_steering", 1]};
if (_target getvariable ("WL23" + _varcomp) == 1) then { _target setHit ["wheel_2_3_steering", 1]};
if (_target getvariable ("WL24" + _varcomp) == 1) then { _target setHit ["wheel_2_4_steering", 1]};
_DT = damage _target;
if true exitwith
{
player sideChat format["TRG: %1 Arm: KE %2 Pen: SABOT %3 Dmg: %5",_target,_armorKE,_penetration,_damage,_DT];
_commH = damage _comm;
_drvrH = damage _drvr;
_gunnH = damage _gunn
}
};

case (_chemical) :
{
if ((_selection == "VEZ") and (_penetration > (_armorCE * NBRand50*0.03)) and (NBRand100 > 90)) then {_target setvariable [("TUR" + _varcomp),1,true]};
if ((_selection == "ZBRAN") and (_penetration > (_armorCE * NBRand50B*0.03)) and (NBRand100B > 90)) then {_target setvariable [("GUN" + _varcomp),1,true]};
if not (_selection == "") exitwith {};
_commH = _commH + _damage * NBrand100/70;
_drvrH = _drvrH + _damage * NBrand100B/70;
_gunnH = _gunnH + _damage * NBrand100C/70;
_armorCE = _armorCE + (NBrand25 * (_armorCE/20) - NBrand10 * (_armorCE/20));
if ((_dif >= -45) and (_dif < 45) and (_Dhatan > 20) and (_Tpitch < (_DHatan/120)) and (NBRand100C > 1)) then {_top = 1} else
{if ((((_dif > -180) and (_dif <= -135)) or ((_dif > 135) and (_dif <= 180))) and (_Dhatan > 20) and (_Tpitch > -(_DHatan/120)) and (NBRand100C > 20)) then {_top = 1} else
{if ((((_dif >= 45) and (_dif < 135)) or ((_dif > -135) and (_dif <= -45))) and (_Dhatan > 20) and (_TcheckL < (_DHatan/120)) and (NBRand100C > 20)) then {_top = 1}}};
if (_ammo isKindOf "M_Javelin_AT") then {_top = 1};
if (_top == 1) then {_armorCE = _armorCE * _topPCE};
if ((_top != 1) and (_difA > 45) and (_difA <= 135)) then {_armorCE = _armorCE * _sidePCE};
if ((_top != 1) and (_difA > 135)) then {_armorCE = _armorCE * _rearPCE};
if (((_penetration > _armorCE) and (NBRand100 > 50)) or (NBRand100 > 95)) then {commander _target setdamage _commH;driver _target setdamage _drvrH;gunner _target setdamage _gunnH};
if ((_penetration < _armorCE) and (NBRand100 < 99)) exitwith
{
player sideChat format["TRG: %1 Arm: CE %2 Pen: HEAT %3 Dmg: %5",_target,_armorCE,_penetration,_damage,_DT];
_commH = damage _comm;
_drvrH = damage _drvr;
_gunnH = damage _gunn
};
_target setDamage _DT + _damage*(_penetration/_armorCE)*(NBRand50/(3*_Surviv));
if (_target getvariable ("TRP" + _varcomp) == 1) then { _target setHit ["PAS_P", 1]};
if (_target getvariable ("TRL" + _varcomp) == 1) then { _target setHit ["PAS_L", 1]};

if (_target getvariable ("TUR" + _varcomp) == 1) then { _target setHit ["VEZ", 1]};
if (_target getvariable ("GUN" + _varcomp) == 1) then { _target setHit ["ZBRAN", 1]};

if (_target getvariable ("WL11" + _varcomp) == 1) then { _target setHit ["wheel_1_1_steering", 1]};
if (_target getvariable ("WL12" + _varcomp) == 1) then { _target setHit ["wheel_1_2_steering", 1]};
if (_target getvariable ("WL13" + _varcomp) == 1) then { _target setHit ["wheel_1_3_steering", 1]};
if (_target getvariable ("WL14" + _varcomp) == 1) then { _target setHit ["wheel_1_4_steering", 1]};
if (_target getvariable ("WL21" + _varcomp) == 1) then { _target setHit ["wheel_2_1_steering", 1]};
if (_target getvariable ("WL22" + _varcomp) == 1) then { _target setHit ["wheel_2_2_steering", 1]};
if (_target getvariable ("WL23" + _varcomp) == 1) then { _target setHit ["wheel_2_3_steering", 1]};
if (_target getvariable ("WL24" + _varcomp) == 1) then { _target setHit ["wheel_2_4_steering", 1]};
_DT = damage _target;
if true exitwith
{
player sideChat format["TRG: %1 Arm: CE %2 Pen: HEAT %3 Dmg: %5",_target,_armorCE,_penetration,_damage,_DT];
_commH = damage _comm;
_drvrH = damage _drvr;
_gunnH = damage _gunn
}
};

case (_explosive) :
{
if ((_selection == "VEZ") and (_penetration > (_armorKE * NBRand50*0.03)) and (NBRand100 > 90)) then {_target setvariable [("TUR" + _varcomp),1,true]};
if ((_selection == "ZBRAN") and (_penetration > (_armorKE * NBRand50B*0.03)) and (NBRand100B > 90)) then {_target setvariable [("GUN" + _varcomp),1,true]};

if ((_ammo == "mine") and (_selection == "PAS_P") and (NBRand100 > 20)) then {_target setHit ["PAS_P", 1]; _target setHit ["PAS_P", 1];_target setvariable [("TRP" + _varcomp),1,true]};
if ((_ammo == "mine") and (_selection == "PAS_L") and (NBRand100B > 20)) then {_target setHit ["PAS_L", 1]; _target setHit ["PAS_L", 1];_target setvariable [("TRL" + _varcomp),1,true]} else

{if ((_ammo == "mine") and (_selection == "wheel_1_1_steering") and (NBRand100 > 10)) then {_target setHit ["wheel_1_1_steering", 1];_target setvariable [("WL11" + _varcomp),1,true]};
if ((_ammo == "mine") and (_selection == "wheel_1_2_steering") and (NBRand100 > 10)) then {_target setHit ["wheel_1_2_steering", 1];_target setvariable [("WL12" + _varcomp),1,true]};
if ((_ammo == "mine") and (_selection == "wheel_1_3_steering") and (NBRand100 > 10)) then {_target setHit ["wheel_1_3_steering", 1];_target setvariable [("WL13" + _varcomp),1,true]};
if ((_ammo == "mine") and (_selection == "wheel_1_4_steering") and (NBRand100 > 10)) then {_target setHit ["wheel_1_4_steering", 1];_target setvariable [("WL14" + _varcomp),1,true]};
if ((_ammo == "mine") and (_selection == "wheel_2_1_steering") and (NBRand100 > 10)) then {_target setHit ["wheel_2_1_steering", 1];_target setvariable [("WL21" + _varcomp),1,true]};
if ((_ammo == "mine") and (_selection == "wheel_2_2_steering") and (NBRand100 > 10)) then {_target setHit ["wheel_2_2_steering", 1];_target setvariable [("WL22" + _varcomp),1,true]};
if ((_ammo == "mine") and (_selection == "wheel_2_3_steering") and (NBRand100 > 10)) then {_target setHit ["wheel_2_3_steering", 1];_target setvariable [("WL23" + _varcomp),1,true]};
if ((_ammo == "mine") and (_selection == "wheel_2_4_steering") and (NBRand100 > 10)) then {_target setHit ["wheel_2_4_steering", 1];_target setvariable [("WL24" + _varcomp),1,true]}};

if ((_ammo == "mineE") and (_selection == "PAS_P") and (NBRand100 > 25)) then {_target setHit ["PAS_P", 1]; _target setHit ["PAS_P", 1];_target setvariable [("TRP" + _varcomp),1,true]};
if ((_ammo == "mineE") and (_selection == "PAS_L") and (NBRand100B > 25)) then {_target setHit ["PAS_L", 1]; _target setHit ["PAS_L", 1];_target setvariable [("TRL" + _varcomp),1,true]} else

{if ((_ammo == "mineE") and (_selection == "wheel_1_1_steering") and (NBRand100 > 15)) then {_target setHit ["wheel_1_1_steering", 1];_target setvariable [("WL11" + _varcomp),1,true]};
if ((_ammo == "mineE") and (_selection == "wheel_1_2_steering") and (NBRand100 > 15)) then {_target setHit ["wheel_1_2_steering", 1];_target setvariable [("WL12" + _varcomp),1,true]};
if ((_ammo == "mineE") and (_selection == "wheel_1_3_steering") and (NBRand100 > 15)) then {_target setHit ["wheel_1_3_steering", 1];_target setvariable [("WL13" + _varcomp),1,true]};
if ((_ammo == "mineE") and (_selection == "wheel_1_4_steering") and (NBRand100 > 15)) then {_target setHit ["wheel_1_4_steering", 1];_target setvariable [("WL14" + _varcomp),1,true]};
if ((_ammo == "mineE") and (_selection == "wheel_2_1_steering") and (NBRand100 > 15)) then {_target setHit ["wheel_2_1_steering", 1];_target setvariable [("WL21" + _varcomp),1,true]};
if ((_ammo == "mineE") and (_selection == "wheel_2_2_steering") and (NBRand100 > 15)) then {_target setHit ["wheel_2_2_steering", 1];_target setvariable [("WL22" + _varcomp),1,true]};
if ((_ammo == "mineE") and (_selection == "wheel_2_3_steering") and (NBRand100 > 15)) then {_target setHit ["wheel_2_3_steering", 1];_target setvariable [("WL23" + _varcomp),1,true]};
if ((_ammo == "mineE") and (_selection == "wheel_2_4_steering") and (NBRand100 > 15)) then {_target setHit ["wheel_2_4_steering", 1];_target setvariable [("WL24" + _varcomp),1,true]}};
if not (_selection == "") exitwith {};
_armorKE = _armorKE + (NBrand25 * (_armorKE/20) - NBrand10 * (_armorKE/20));

if ((_dif >= -45) and (_dif < 45) and (_Dhatan > 20) and (_Tpitch < (_DHatan/120)) and (NBRand100C > 1)) then {_top = 1};
if ((((_dif > -180) and (_dif <= -135)) or ((_dif > 135) and (_dif <= 180))) and (_Dhatan > 20) and (_Tpitch > -(_DHatan/120)) and (NBRand100C > 20)) then {_top = 1};
if ((((_dif >= 45) and (_dif < 135)) or ((_dif > -135) and (_dif <= -45))) and (_Dhatan > 20) and (_TcheckL < (_DHatan/120)) and (NBRand100C > 20)) then {_top = 1};
if ((_top != 1) and (_difA > 45) and (_difA <= 135)) then {_armorKE = _armorKE * _sidePKE};
if ((_top != 1) and (_difA > 135)) then {_armorKE = _armorKE * _rearPKE};
if ((_ammo == "mine") or (_ammo == "mineE")) then {_armorKE = _armorKE * _bottomPKE};
if ((_top == 1) and not ((_ammo == "mine") or (_ammo == "mineE") or (_ammo == "pipebomb") or (_ammo == "timebomb"))) then {_armorKE = _armorKE * _topPKE};

_commH = _commH + _damage * NBrand100/70;
_drvrH = _drvrH + _damage * NBrand100B/70;
_gunnH = _gunnH + _damage * NBrand100C/70;
if (((_penetration > _armorKE) and (NBRand100 > 50)) or (NBRand100 > 95)) then {commander _target setdamage _commH;driver _target setdamage _drvrH;gunner _target setdamage _gunnH};
if ((_penetration < _armorKE) and (NBRand100 < 99)) exitwith
{
player sideChat format["TRG: %1 Arm: KE %2 Pen: EXPL %3 Dmg: %5",_target,_armorKE,_penetration,_damage,_DT];
_commH = damage _comm;
_drvrH = damage _drvr;
_gunnH = damage _gunn
};
_target setDamage _DT + _damage*(_penetration/_armorKE)*(NBRand50/(3*_Surviv));
if (_target getvariable ("TRP" + _varcomp) == 1) then { _target setHit ["PAS_P", 1]};
if (_target getvariable ("TRL" + _varcomp) == 1) then { _target setHit ["PAS_L", 1]};

if (_target getvariable ("TUR" + _varcomp) == 1) then { _target setHit ["VEZ", 1]};
if (_target getvariable ("GUN" + _varcomp) == 1) then { _target setHit ["ZBRAN", 1]};

if (_target getvariable ("WL11" + _varcomp) == 1) then { _target setHit ["wheel_1_1_steering", 1]};
if (_target getvariable ("WL12" + _varcomp) == 1) then { _target setHit ["wheel_1_2_steering", 1]};
if (_target getvariable ("WL13" + _varcomp) == 1) then { _target setHit ["wheel_1_3_steering", 1]};
if (_target getvariable ("WL14" + _varcomp) == 1) then { _target setHit ["wheel_1_4_steering", 1]};
if (_target getvariable ("WL21" + _varcomp) == 1) then { _target setHit ["wheel_2_1_steering", 1]};
if (_target getvariable ("WL22" + _varcomp) == 1) then { _target setHit ["wheel_2_2_steering", 1]};
if (_target getvariable ("WL23" + _varcomp) == 1) then { _target setHit ["wheel_2_3_steering", 1]};
if (_target getvariable ("WL24" + _varcomp) == 1) then { _target setHit ["wheel_2_4_steering", 1]};
_DT = damage _target;
if true exitwith
{
player sideChat format["TRG: %1 Arm: KE %2 Pen: EXPL %3 Dmg: %5",_target,_armorKE,_penetration,_damage,_DT];
_commH = damage _comm;
_drvrH = damage _drvr;
_gunnH = damage _gunn
}
};
default {if true exitwith {}};
};


NBRandomizer.sqf:


/*
sqf version of Nice_boat's NBRandomizer by Rydygier

init (to initialize only once, at the beginning):
null = [] execVM "NBRandomizer.sqf";
*/
while {true} do
{
NBRand10 = random 10;
NBRand25 = random 25;
NBRand50 = random 50;
NBRand50B = random 50;
NBRand100 = random 100;
NBRand100B = random 100;
NBRand100C = random 100;
sleep 0.01
};


and CrewDS.sqf:


/*
sqf version of Crew Damage System by Rydygier

init (to initialize only once, at the beginning):
null = [] execVM "CrewDS.sqf";
*/


_i = 0;

while {true} do
{
_tcount = ("tank" counttype vehicles);
_tanks = [];
_ix = 0;
for [{_i = 0},{(_i <= _tcount-1)},{_i = _i + 1}] do
{
if ((vehicles select _i) isKindOf "tank") then {_tanks = _tanks + [vehicles select _i]}
};

{{_x removeallEventHandlers "Handledamage"} foreach crew _x} foreach allunits;
{{_x removeallEventHandlers "Handledamage";_ix = _x addEventHandler ["Handledamage", ""]} foreach crew _x} foreach _tanks;
sleep 0.5
};


As you can see, there is a problem. Do not invent better way to protect crew from injury, which has received even without armor penetration ("allowdamage false" here fails, so script checks two times per second, who is currently sitting in vehicle and gives him an empty EH "handledamage", which makes it immune to normal damage, but instead wound "assigns" to the crew NBtank.sqf). CrewDS.sqf must also remove EH's from all those who got out of vehicle. Unfortunately, this removes EH along with all other "handledamage" type EH's. Maybe someone knows way to remove only chosen EH of specific type from unit, even though index of EH is not constant?

Rydygier
Oct 29 2011, 22:41
I did some tests, it looks like that SQF scripts work fine. So here's version of addon based on SQF files:

NBT_TDS (http://www.multiupload.com/LZSBG9DZXR)

In addition to folder "addons" there are two more: "lessoneshotkill" and "moreoneshotkill". Each of them contains .pbo of the same name (so be careful to not mix them, I suggest simply copy preferred file to folder "addons" overwriting previous one), but in the second case has been greatly increased chance of destroying a tank after first armor penetration (reduced chance for non-killing penetration by tripling average final damage in case of succesful armor penetration). It seems to me that this version is more realistic, but case that someone preferred previous one, in folder "lessoneshotkill" I left a file with old values. By default in folder "addons" is version "more". I think this is enough for now. Must sometimes play this game, not only write scripts for it...

For now wish you good fun with this addon. Report here, please, any comments and ideas.

Rydygier
Nov 13 2011, 21:31
Think I succeeded somewhat overcome problems with "Towards Enemy System". This time used waypoints dynamically placed about 6 meters from vehicle towards enemy. As waypoints are assigned to the group, system works good for ungrouped tanks. For missions with tanks grouped eg. in platoons recommended first version, without "TES". It does not replace waypoints designated by the AI, so if AI chooses to relocate tank, it will not rotate towards enemy until fills this order, so can still happen that a sensitive sides or back will be under fire. Also removed some minor problems from main file. It contains debug and no-debug versions.

Here are two versions of addon in one package:

NBT_TDS (http://www.multiupload.com/YG1OWGTO50)

TDS differs from TDS2 only that is not equipped with "Towards Enemy System". It is, I think, final version of Nice_Boat's TDS, unless show up any new bug reports, comments or ideas. Was tested on Arma 2 1.10. Addon requires CBA (http://www.armaholic.com/page.php?id=6231).

Thanks for help and testing. Have a nice tanking.

TristanYockell
Jan 28 2012, 05:41
None of the links work unfortunately, could you please supply use with the file again?.

IT would be much appreciated.

Rydygier
Jan 28 2012, 09:02
Sure:

NBT_TDS (http://www34.zippyshare.com/v/3659186/file.html)

It's been a long time since I looked in this code, I remember that remained a problem with lag when tank is under rapid fire (because each hit fires an eventhandler), there is also no support for ARTY_ amunition used with BIS_ARTY module. There is some chance, that I will return to this project, now I have some new knowledge, that may helps with these lags a bit, although seems, that only a few people are interested in this addon.

Kremator
Jan 28 2012, 15:59
Talking as a noob - can this be preprocessed ? Would that reduce lag ?

Rydygier
Jan 28 2012, 17:20
Talking as a noob - can this be preprocessed ? Would that reduce lag ?

Seems, that I'm equally noobish, because you said exactly what I mean. :) Preprocess and compile then only spawn instead of execVM.

Kremator
Jan 28 2012, 17:38
Good to see we're on the same page :)

TristanYockell
Jan 28 2012, 22:48
I will likely keep the battles smaller in size in order to reduce the performace hit.

1v1 tank platoons ect.

Thanks for posting it again!.

Rydygier
Jan 29 2012, 23:18
Well. Found some time, so...

Nice_Boat's Tank Damage System 2 (http://www5.zippyshare.com/v/42097031/file.html)

News:

- lags reduced or even removed (I hope so);
- no more juggling with pbo versions: see readme to know, how to on/off debug and Towards Enemy System (TES is based on temporary waypoint assigment, so effects may be imperfect, when tank already has waypoint assigned) with two simply config variables;
- script version added (see readme, how to init);
- added handling of ARTY module ammo, but untested, so effects unknown.

TristanYockell
Jan 30 2012, 01:02
Thank you sir, I will test it out tommorow.

Rydygier
Feb 4 2012, 15:20
Found enough time and did some short tests with ARTY ammo. Fixes was needed and are done. Now TDS really handles ARTY ammo... I hope. :)

Howitzer and mortar ARTY ammo attacks top armor at direct hit only (so SADARM always). Rocket ARTY ammo never.

Also found listed somewhere "ARTY_SADARM_NET" and "ARTY_SADARM_BURST" classnames, but honestly I haven't idea, what uses and when these classes of SADARM.

Anyway:

Nice_Boat's Tank Damage System 2a (http://www37.zippyshare.com/v/91473864/file.html)

Nice_Boat's Tank Damage System 2.01 (experimental) (http://www17.zippyshare.com/v/32205095/file.html)

Kremator
Feb 4 2012, 17:32
Cool ... thanks for the update mate ! Will test this immediately!

Rydygier
Feb 5 2012, 08:35
Useful info:

Found new, introduced in OA 1.60, command:

allowCrewInImmobile (http://community.bistudio.com/wiki/allowCrewInImmobile)

Can't implement this into TDS, because this must be Arma2 only compatibile, but this may be in easy way used externally, by init field or separate script... This should to stop this suicidal behavior, when crew leaves immobilized tank with still operational armament regardless of situation, so even under heavy fire with many hostiles nearby, that may be easily destroyed by tank gun.

Munger
Feb 5 2012, 12:54
Hi Rydygier. I have a few questions about TDS. :)

Can I assume that this isn't compatible with ACE, since ACE has it's own integrated armour penetration system?

Does this addon work for all vehicles or just certain ones that it is configured for?

Lastly, could you clarify what you mean above re ARTY ammo? Do you mean that you got the BIS SADARM arty rounds to work with this mod?

Cheers.

Rydygier
Feb 5 2012, 13:24
1. Yep, it isn't compatibile with ACE units, in fact in TDS are used armor and penetration values taken from ACE armor configs, so, for exampe, T-90 is surprisingly resistant (better than Abrams) and Abrams HE ammo works as HEAT...

2. TDS recognizes only certain, and configured vehicles, but there is possibility to add new (and to remove not used to make script more light, if needed), quite simply, if only someone do not afraid some code editing :) and know real armour/ammo parameters of these vehicles. Currently are supported generic Arma 2 only armoured vehicles (OA and so on not covered, haven't any of later released Arma 2 expansions, so can't test), vehicles from Duala, and some other from Vilas' Polish army addon, but older version. If someone needs some assistance with this - I will by glad to help.

This is typical line for tank armor config:


{if (_target isKindOf "M1A2_TUSK_MG") then {_armorCE = 1035; _armorKE = 720; _surviv = 30;_sidePKE = 0.54;_sidePCE = 0.62;_rearPKE = 0.11;_rearPCE = 0.17;_topPKE = 0.06;_topPCE = 0.04;_bottomPKE = 0.42}

_armorCE it is base RHA armor value against HEAT ammo, _armorKE - against kinetc/explosive ammo. _surviv is divisor of taken damage if penetration occurs, rest are multipliers of base KE/CE armor for hits from sides/rear/top/bottom;

And ammo config example:


if (_ammo isKindOf "Sh_120_SABOT") exitwith {_penetration = 805 + NBRand50; _kinetic = true}

Contains ammo class name, base RHA penetration with some random factor (from + 0 to + 50 in this case) and kind of hit.

If penetration is greater, than armor value (also with some randomization) then, and only then, overall damage (after some re-calculations) is applied. Often this means instant kill, but if weapon is weak and/or _surviv variable high, there may occur "non-kill" penetration with damage less than 1. Then also crew gets injuries (normal crew injuries, that are to high and that occurs even without penetration are overrided by TDS, otherwise crew die quickly inside not damaged tank...). TDS supports also mines and independent crew, gun, turret, tracks and wheel damage...

3. About working SADARM (creating submunition when fired from gun with ARTY module synchronized and above vehicle target) just replied in blackace's thread, it is separate thing, here I did, that TDS recognizes SADARM submunition classname and calculate proper (well... up to about 130 mm RHA penetration, that info I found for US SADARM and there is same classname for RU SADARM, so it is equally effective in TDS) penetration/damage for it. Before this change SADARM hits was just ignored by TDS (no penetration, 0 damage, nothing, only boom).

This is SADARM config:


if (_ammo isKindOf "ARTY_SADARM_PROJO") exitwith {_penetration = 110 + NBRand25;_explosive = true;_top = 1;_arty = true}

_top = 1 guarantees top hit, _arty is unused for now, is keeped "just in case". _explosive means, that KE armor value will be used, but without drop of penetrator kinetic energy with distance growth, characteristic for SABOT ammo. _explosive is used, when kinetc hit occurs, but projectile do not flies all the way from attacker's vehicle but is emmited nearby target (eg debris from HE round explosion).

Das Attorney
Feb 5 2012, 13:30
Useful info:

Found new, introduced in OA 1.60, comand:

allowCrewInImmobile (http://community.bistudio.com/wiki/allowCrewInImmobile)

Can't implement this into TDS, because this must be Arma2 only compatibile, but this may be in easy way used externally, by init field or separate script... This should to stop this suicidal behavior, when crew leaves immobilized tank with still operational armament regardless of situation, so even under heavy fire with many hostiles nearby, that may be easily destroyed by tank gun.

Good find! - Just tried using this in a trigger for a jackal with no front tyre and it looks like its working well. Seet bool to true using the trigger and my men could get in. Running CO 1.60.

Kremator
Feb 6 2012, 21:54
This is working well! Still finding that AI drivers are turning a little to face threat but not the whole way. Im using the addon version. I do hear the commander telling them to 'move 50m east',where threat is , but they dont move all the way around.

Rydygier
Feb 6 2012, 22:16
Yeah. It is not perfect. But this is probably all, that can be achieved by a method based on the waypoints (there are in fact placed only few meters from tank, so tank should only to rotate and not to move towards). It's a shame that "sendsimplecommand" does not work as it should and drivers not cease to rotate tank on "STOP" command. This would be optimal, so nice solution.

Kremator
Feb 7 2012, 20:37
I've placed this on my server and it is making tank encounters MUCH more deadly (and longlasting!)

Shame that they wont turn any further around - I take it that they are given a waypoint, so could extending that WP a few more metres make a difference ?

Rydygier
Feb 10 2012, 09:33
I had no internet few days, but I'm back... Tried make distance between tank and WP as small as possible, because when is placed further towards enemy, tank, true, will turn, but also will move some meters at least in this direction, and this is rather no good...

EDIT: there are still some small issues to repair, also with "Towards Enemy System", that should be fixed as soon, as I will have time for this.

Kremator
Feb 10 2012, 12:12
Good to have you back! Even moving a metre would be fine (although as commander, some message to say that the driver is turning toward a threat would help) if it means not getting damaged! Will test if you need further edits.

I have installed it onto my server and am using it in a HUGE AI environment with no problems.

Rydygier
Feb 10 2012, 17:19
So you can try this version:

Nice_Boat's Tank Damage System 2.01 (http://www17.zippyshare.com/v/32205095/file.html)

EDIT: Nice_Boat's Tank Damage System 2.02 (http://www63.zippyshare.com/v/12559099/file.html)

- WP is now 8 meters from tank, not 5.6 and seems, that turning is better now. Still I'm not fully happy. This "WP" method causes, that tanks with own waypoints or when commander issues own move orders tanks often do not turn proper, but are doing weird pirouettes with annoying tendency to set their rear towards the enemy;

- "== player" changed with "isPlayer" to make TDS a bit more MP friendly (except debug mode, here is still "player" command used);

- when player is leader of crew and tank is hit from side or rear there is groupchat alert. If player is crew leader (effectiveCommander), there is no automated turning on near enemy notice, so there is also no turning notification;

- added new config variable: NT_Damage (default 1). This is overall multiplier of final damage applied to vehicle. Useful for tweak frequency of non-kill penetrations occurence. The bigger value the more deadly is each penetration hit and bigger chance for "one shot kill";

- eliminated some rare bug: when on battlefield are not only armoured vehicles, no all crews of armored vehicles received Crew Damage System from TDS (logical error in code), script is now lighter a bit for this reason, but also a bit more heavy for CPU, but I hope, that this is too small change to be even noticed;

- eliminated (I hope) very rare bug (I saw this only once), when passangers after disembark still was immune to damage allocated in normal way (so they was simpy immortal).

Kremator
Feb 10 2012, 17:24
Cheers mate..... testing now :) Will let you know if I see CPU problems

Edit: Hmmmmm now having problems killing ANY armour - even pointblank (in an M1A2 TUSK against a BMP). May need a little looking at values :(

Rydygier
Feb 10 2012, 17:55
Hmm... Let me see. It must be something with this new multiplier.

EDIT: not sure, where is problem. Just destroyed T-72 with default NT_Damage (not defined in init). Will do more tests.

With NT_Damage = 5 instant kill... and destroyed BMP-3 with default and 0.5 value. Hmm. Are you defined this value or left it default?

Kremator
Feb 10 2012, 18:21
I left it as default. Going to try in editor to see if the same thing happens. Using the addon version.

Hmmm something is up. Had it running on server AND client at same time and have problems (run with CBA and ASR_AI), but running on local tanks can die. They arent turning to face enemy however. Testing more.

Rydygier
Feb 10 2012, 19:50
Well. It wasn't tested in MP. Can't tell, how addon will behave then. RPT is clear? Earier version worked fine in MP? If so, then problems with no damage must be related with NT_Damage. Making TDS MP compatibile will be tricky for me. Still I'm aware about "publicVariable" command, so can try to use this for config TES and Damage variables and we will see then. Still there are also other global variables used, which shouldn't be public, because their values are changing 100 times per second. Must be reconfigured all randomizer system to avoid this... Let's check, if this will help with no damage issue. Replaced last link, so you can re-download and try again. (I made config TES and Damage variables values to be public over net and removed other global variables used for randomization (replaced with simply random command))...

EDIT: About not turning... Maybe it is ASR_AI conflict? Did tests, and turning occurs for me, although is imperfected, as described before.

Rydygier
Jun 16 2012, 12:13
Today finished a new version, so for these few, that use this, here you go:

Nice_Boat's TDS 2.03 (http://www8.zippyshare.com/v/73348708/file.html)

What's new:

- for performance tuning removed content from custom addons (if someone needs it, give me a word, will try to prepare special version);
- added hopefully all OA content;
- some code tweaks for better performance;
- now "towards enemy system" is turned off by default because is highly unreliable, especially in heavy scripted mission (see below explanation);
- For OA 1.60 (and above) users: crew will not abandon immobilized vehicle so easily;
- NT_Damage is now be default equal 1.5, not 1. It is for bigger chance for "one penetration - one kill" - every successful penetration means now bigger recalculated damage.

There are two versions now - "a" and "b". Difference is only one, but important. In "a" version main hit code is called form EH, while in "b" is spawned from EH. Because of specificity of sqf and EHs handling "a" version should be fully reliable even in heavy scripted mission, while "b" version suffers sometimes huge exec delays (so in heavy scripted missions often tanks seems tu be indestructible, and indeed they are :) or effect of hit is applied with big delay, even a minute or so). So what for "b" version? Well. I highly recommend "a", but its reliability have a cost - in massive tank battles, especially with rapid fire weapons, may occur some lags (just because code called (not spawned) from EH is calculated immediatelly, may overload CPU sometimes). "B" is more lag-free. With light scripting and not so intense tank battle both versions should perform equally good. As for "TES" - it can't be called, must be spawned, so regardless of version will be unreliable in heavy scripted missions (it is anyway rather unreliable :/ ).

As always I'm grateful for any bug hunting, ideas and opinions.

Kremator
Jun 16 2012, 13:42
Thanks for this Rydygier! Thought about using the new LOS / eyedirection stuff in here? Would that help the scripts ?

Rydygier
Jun 16 2012, 14:30
Not sure. For now don't know, how that can be used in TDS... Haven't much hope, but working with "TES", maybe will be able to achieve some improvement...

Mjolnir66
Dec 6 2012, 17:14
Is there any chance of this being updated? I'd like it if the expansion units (BAF, ACR) were added to the lists. Also, mines need to be more powerful, otherwise it takes dozens to detrack an MBT, same with satchel charges. It'd also be nice if multiplayer functionality is built in.

Rydygier
Dec 6 2012, 17:43
I have BAF lite, so BAF equipment present in lite should be already added along with OA, unless I missed something. ACR I can add only, if someone, who has ACR will list here all armored and anti-armor effective equipment (real names and classnames), as I haven't ACR. I long time not touched this, but if there is some interest - update is possible. As for mines and satchels - tried to be accurate with data found on internet and, in my tests, usualy one mine is enough to at least break the track. Unless something was changed in vehicles till my last test. I'll check this again.

As for MP - If only there is someone, that have knowledge about MP scripting, probably may try to adapt this, I think. I haven't such knowledge, so will not do this.

Rydygier
Dec 10 2012, 12:37
It looks, like somehow direct setHit for tracks (probably also wheels, tower and gun) was broken. I'll try to do something about that, maybe also will check whole code for possible improvements.

Kremator
Dec 10 2012, 19:08
Good news mate .... still following this!

Mjolnir66
Dec 11 2012, 08:31
A couple of things to maybe edit while you're looking at this:
1. More randomness in penetration. As is A 2A46M will always penetrate an M1s front armour.
2. T72s are significantly underarmoured. Maybe if you give the CDF and Takistani T-72s lower armour than the Russian ones, but modern uptodate non export model T72s are world class tanks (the ones slaughtered in Desert Storm were either T55s, local builds or export models, all inferior in armour and other areas to ones given to the Russian Army).
3. Maybe add Hummvees and Jackels, with Jackels having extra IED protection. Also, Strikers could do with some form of extra IED protection. Maybe change it so that vehicles have bottom armour too, so you can do this.
4. IEDs and satchels/mines could have massive randomisation on penetration. So you could have a large IED that only damages the wheels of a Humvee, or a small one that completely KOs an MBT.

Rydygier
Dec 11 2012, 10:14
Cars, as humvee, are not under TDS at all. Only armoured, means tanks, APCs and such. This rather will stay that way.

RHA values I can change only, if you will provide hard, numerical data (in millimeters of RHA) from reliable source other, that I found and used. Data in the net is not complete and sometimes contradictory. As for newest tanks, where data is often classified, it is mainly guessing. Part of the problem is, that many vehicles, eg mentioned T-72 have many versions, and it is not sure to me, parameters of which should be used for Arma models.

More randomization is doable, so I'll think about.

Rydygier
Dec 11 2012, 15:58
For now discovered, that at least with mines setHits doesn't work in TDS, when script is called from within EH (not scheduled), version b, where is spawned from EH, works fine. Not sure, but his may be something about that:


HandleDamage can trigger "twice" per damage event. Once for direct damage, once for indirect damage (explosive damage).
This can happen even in the same frame, but is unlikely.
Each HandleDamage event show the current damage from the damage source. NOT cumulative or the current "damage level" (health) of the target unit.
So a second HandleDamage event can nullify/overwrite the damage of the first event, IF they are in the same frame (or time slice the engine uses the update the damage status of an unit).

http://community.bistudio.com/wiki/ArmA_2:_Event_Handlers#HandleDamage

So perhaps just only setHits will be spawned? Ugly, but may prove to be neccessary.


1. More randomness in penetration. As is A 2A46M will always penetrate an M1s front armour.

Yep. Most values are same, as in ACE. I was quite suprised, as T-90 has there better armor than M1 and gun, that with SABOT will penetrate M1 front armor often (kinetic M1 front armor RHA value varies between 360 and 1260 (av. 990), and 2A46M SABOT penetration for 1000 meters varies between 785 and 835 (av. 815) - in general the more value, the bigger randomness). Still - until I'll have another reliable data - this will stay, as is, because I do not want to guess blindly and change values every time I'll have suspition, that something is not right. Such approach leads nowhere. For now - experimetal version after code revision, with extended randomness for satchels (mines should be again deadly for tracks/wheels).

Nice_Boat's TDS 2.04a (http://www71.zippyshare.com/v/85458281/file.html)

PS. This was always - as there is still not getHit command, TDS, as for broken tracks/gun/turret/wheels is not comaptibile with any repair. I guess, that eg currently "repaired" tracks will be again broken after next hit. Only known to me alternative is, that after first repair given part will be unbreakable, so I prefer first option...

Archbishop Lazarus
Dec 12 2012, 13:10
and 2A46M SABOT penetration for 1000 meters varies between 785 and 835 (av. 815)

Is that in mm? Then it is overly optimistic, the most advanced 3BM42M projectile penetrates avg 600-650mm @<hidden> 2km. Certified penetration is unknown, but lower, not more than 600mm.

Rydygier
Dec 12 2012, 13:50
Yeah, mm of RHA, 1000 meters however. For me also this looks a bit too good, but, like I said, decided to rely on source, that seems to be reliable (ACE team, as far, as I know, did good research). Any other at least equally reliable sources of such data are appreciated and my have impact on addon's values. Truth is, that in many cases internet provides contradictory info. Hard to know, which source is best. So, if certified data is uknown, how do we know, that is lower, and not bigger than 600mm on 2000?

boota
Dec 12 2012, 14:32
Modern APFSDS rounds lose little of their power per km (heavier lose less obviously). I remember DM-53 lose 3% of its velocity per km, old BM-42 6%, even older BM-9 8%, so decrease in penetration is minimal for modern rounds, probably well within error margin, and even for older rounds isn't that important.

Damian90
Dec 12 2012, 14:51
Yeah, mm of RHA, 1000 meters however. For me also this looks a bit too good, but, like I said, decided to rely on source, that seems to be reliable (ACE team, as far, as I know, did good research).

If I am correct, ACE use two values for penetration, let me check this in configs.

Yup, there are two values in the config, standard value "hit" and "ace_hit" value, so it's look like this:


simulation = "shotShell";
ace_hit = 950;
hit = 1000;
indirectHit = 10;
indirectHitRange = 0.100000;
typicalSpeed = 1545;
airFriction = -0.000038;
explosive = 0.050000;
deflecting = 0;
tracerScale = 4;
tracerEndTime = 4;
model = "\ca\Weapons\Data\bullettracer\tracer_red";
explosionEffects = "ExploAmmoExplosion";
timeToLive = 42;
irLock = 1;


This is for M829A3.

The Sh_125_SABOT which seems to be 3BM42 have such values.


ace_hit = 540;
hit = 702;

And 3BM42M have such:


ace_hit = 650;
hit = 910;
typicalSpeed = 1750;
airFriction = -0.000040;
deflecting = 0;

So the "ace_hit" is the penetration value as in real life, while "hit" value seems to be there for some other reason.


So, if certified data is uknown, how do we know, that is lower, and not bigger than 600mm on 2000?

Certyfied data is always lower, I will ask my friend, he have some documents about this.

Rydygier
Dec 12 2012, 14:58
OK then, it is quite possible, that I'm just not read configs properly, and used eg hit instead of ACE_hit. Not remember for sure though, this was a year ago, but for sure then I knew about any config even less, than now. That's even better, I'll gladly lower this value in such case, as had similar feelings about it (only feelings, I'm not specialist at all). Hmm. So, I suppose I need to read all configs again. Now, where I hid them?

Archbishop Lazarus
Dec 12 2012, 15:55
Check the page below, and look for APFSDS rounds. It is the best and most reliable source available. And if you need help with armor values, I can help.

http://www.russianarmor.info/

boota
Dec 12 2012, 16:22
Quite possible, I remember ACE_hit for BM42M is exactly 650.
You might be intrested in this (http://collinsj.tripod.com/protect.htm). Some kind soul gathered data from tank-related forums to create database for wargaming.

Sources: Mainly from posts on Tanknet the premier source of tank discussion online. Also from Stephen Zaloga's various works on Russian MBTs, GSPO forum, BTVT, Vasiliy Fofanov's Russian MBT site, Hilmes' books, Hunnicutt Patton and Abrams, Janes IDR and the NII Stali website.

Maybe using these values plus random 50% to simulate armor's weak spots would do the trick. For example BM42M would be 650 + (random 0 to 325) = 650 to 975 (5% less per km), with M1A1HC frontal armor 880 turret and 650 hull would give like 33% chance to penetrate turret and almost certain hull penetration. While this could be exploited in ACE with their awesome FCSs, this shouldn't be a problem with vanilla aiming, since it's damn hard to precisely hit moving target at 1km+, while lock-on missiles and AI gunners that never miss will aim at turret anyway.
But that's just me thinking

Archbishop Lazarus
Dec 12 2012, 16:35
Yes, I also recommend that site. Good source. However, a few things need to be corrected, like T-55 armor values. I researched it quite extensively. Glacis should be 205-210 instead of 190 due to good quality steel, while turret should be ~280-300 instead of the usual 203mm. Reason, is the shape of the turret. If you look at the tank from the front, effective protection is around 200mm in the vicinity of the gun, but it quickly rises to 250, and around the sides it reaches 400mm. Average is 280-300. It is confirmed by israeli reports from various wars. At longer ranges, early 105mm APDS (up to M728) often failed to penetrate the turret front.
It is the same with M-60A1/A3 tanks, (OK, I know we dont have them in the game) where the usual 254mm is again false thanks to the excellent turret shape. Reality is 330-620mm.

Rydygier
Dec 12 2012, 16:48
Thanks, guys. I'll study this. TDS from the beginning, I think, didn't distinguished between hull and turret hit. RHA of both armor is currently averaged, and chances for hit in weak spot, or, on the contrary, stronger, is simulated statistically, via armor values randomisation with some formula (same for simulating different thickness to penetrate beacuse of impact angle). To determine, which side was hit, matters only hull direction (in 3D), not turret. Separatelly randomized is also penetrating power of the projectile with simply manner: minimum value + some random value.

There is also not touched by me till now formula for calculating penetrating power of SABOT ammo with the distance. Data, that you provided about very low such loss means, that probably I'll need to change that formula, as with it penetrating power loss is bigger. Currently it looks like here:


_penetration = _penetration + ((((1000 - (_attacker distance _target))/100) * 0.02) * _penetration);


Means, that eg if penetration at 1000 meters is 500, then at 2000 will be 400 (20% loss), and for 500 meters - 550 mm RHA (10% gain).

Looks, like 0.02 multiplier should be about four times smaller, so we get 5% loss between 1000 and 2000 meters. Is that correct?

Mjolnir66
Dec 12 2012, 19:28
Another little problem. This makes the crew members of a turned out tank invincible. Just a little thing really, but quite annoying.

Damian90
Dec 12 2012, 21:48
You might be intrested in this. Some kind soul gathered data from tank-related forums to create database for wargaming.

This site is not reliable, many vehicles are overestimated, some types of ammunition also. But this is only me, some random guy who actually works hard to be closer to the whole business.:rolleyes:


However, a few things need to be corrected, like T-55 armor values. I researched it quite extensively. Glacis should be 205-210 instead of 190 due to good quality steel, while turret should be ~280-300 instead of the usual 203mm. Reason, is the shape of the turret. If you look at the tank from the front, effective protection is around 200mm in the vicinity of the gun, but it quickly rises to 250, and around the sides it reaches 400mm. Average is 280-300. It is confirmed by israeli reports from various wars.

It is immposible to properly simulate variable armor thickness of cast structures in games with such simple armor simulation as ArmA2. The only really good simulation of it I can think of is SB Pro PE. So it is better to stick with avarage or fixed and accepted armor values.


For example BM42M would be 650 + (random 0 to 325) = 650 to 975 (5% less per km), with M1A1HC frontal armor 880 turret and 650 hull would give like 33% chance to penetrate turret and almost certain hull penetration.

In reality protection is higher, also for front hull (both glacis and "beak", however as "beak" is easier to simulate in ArmA2, the glacis is a bit more tricky, as it's involves not only protection of probably HHS plate, 50mm thick at 80 degrees inclination, but also additional protection from fuel tanks, yes fuel tanks, the research from "Burlington" program, says that fuel tanks are excellent addition for armor, they can add from ~100mm up to approx ~200mm of protection messured in RHAe).

But then again, this are things more known to tank nuts like me, more interested in the small details and such things. ;)

So as such sites might be helpfull, there is also a lot of bullcrap there, so be carefull with estimations.

Rydygier
Dec 12 2012, 22:05
Crew is not easy matter. Normally crew gets damage even without penetration, so in earlier versions most often scenario was not scratched tank full of dead people after a few hits. So I was forced to make crew immune on normal damage, and instead damage for them is calculated via same Event Handler, that controls tank damage. And this may be side effect of such solution. Currently I don't know, how to via script distinguish crew member, that is turned out, from hidden inside. Have some small theory and will test that.

EDIT:

LOS checks failed, but suceed with animationState method. Nearly always animationstate of turned out crew member ends with "out". The only found for now exception is M1A2's loader position, that cannot turn in (this is nasty, I prefer just to remove loaders from my M1A2). In that case animationstate indicates humvee gunner state. So this way solution is possible, I think.

Archbishop Lazarus
Dec 13 2012, 11:34
It is immposible to properly simulate variable armor thickness of cast structures in games with such simple armor simulation as ArmA2. The only really good simulation of it I can think of is SB Pro PE. So it is better to stick with avarage or fixed and accepted armor values.


I also suggested using average (~300mm) values. Look at the turret from the front. On the right side of the gun, 3/4 to 4/5 of the turret is over 300mm LOS, on the left side, 2/3. (its because the gun is offset to the right) Only 1/10 of the frontal aspect is under 250mm. Not bad for a turret that is originally designed to defeat only the 8.8cm L/71.


additional protection from fuel tanks, yes fuel tanks, the research from "Burlington" program, says that fuel tanks are excellent addition for armor, they can add from ~100mm up to approx ~200mm of protection messured in RHAe).


Hehehe... Its the same with the rear doors of BMP1/2. A common western misbelief is that storing fuel in their rear doors is terribly dangerous for the troops. In reality, fuel made the rear doors immune to .50cal HMGs.

boota
Dec 13 2012, 15:04
@<hidden>
Of course, exact numbers will vary from source to source for many reasons, primary different standards and conditions or lack of more reliable sources.
Database was made for wargamers (thus the name) to provide them with some base values for more realistic ballance.

Everything after quote is just idea how could it be used gameplay-wise, not real-life results. Obviously ArmA can't do this level of realism, even ACE, despite great improvement, isn't close to SB Pro.

Damian90
Dec 13 2012, 17:16
I also suggested using average (~300mm) values. Look at the turret from the front. On the right side of the gun, 3/4 to 4/5 of the turret is over 300mm LOS, on the left side, 2/3. (its because the gun is offset to the right) Only 1/10 of the frontal aspect is under 250mm. Not bad for a turret that is originally designed to defeat only the 8.8cm L/71.

Yeah, but You need to be carefull with overarmoring.


Hehehe... Its the same with the rear doors of BMP1/2. A common western misbelief is that storing fuel in their rear doors is terribly dangerous for the troops. In reality, fuel made the rear doors immune to .50cal HMGs.

It is partially truth, however believe me, fuel tanks in M1 series are designed to add protection, not put there because there was space for them. Did you know that even their internal design is classified, even their external design is classified, I only seen one very weak quality photo of rear right sponson fuel tank taken out from damaged tank, but no details were visible due to real poor quality. I read some interesting documents, although only in Polish unfortunetaly, about work of Dr. Harvey who designed "Burlington" armor, there was also a lot informations about fuel tanks he designed, their design is far more complex than these rear doors in BMP-1 and BMP-2. Although I agree that these rear doors might add some protection.


Of course, exact numbers will vary from source to source for many reasons, primary different standards and conditions or lack of more reliable sources.
Database was made for wargamers (thus the name) to provide them with some base values for more realistic ballance.

This is why own research is also important. For example that site says that front hull "beak" armor of the M1 series is ~800-900mm RHAe vs CE ammunition. I know that this part of tank was at least one time, hit by RPG-29 that is reported to have penetration capability of ~750mm RHA after ERA, and did not perforated "beak" armor even if it is not protected by ERA, which means that CE protection of "beak" is more than RPG-29 can penetrate RHA without ERA protection.

Not to mention that actually RHAe values are very... well not precise when it comes to composite armor, because composite armor projectile defeating mechanism is closer to... ERA than passive armors.

I also have unofficial information about F-F incident where M1A1HA was hit in to front turret armor by AGM-114 Hellfire (which AFAIK have penetration levels estimated as approx ~1,200mm RHA or more), and guess what, not only it did not perforated armor, but we know that armor was perforated approx 50% to 70% of it's LOS thickness. Although as I said, it is not official, so I can't use as a very hard proof.

But the protection levels of modern tanks, are most probably higher than these provided in the internet.


Everything after quote is just idea how could it be used gameplay-wise, not real-life results. Obviously ArmA can't do this level of realism, even ACE, despite great improvement, isn't close to SB Pro.

Believe me, even SB pro is not perfect, I know, developers talk about this a lot.

Archbishop Lazarus
Dec 13 2012, 18:09
It is partially truth, however believe me, fuel tanks in M1 series are designed to add protection, not put there because there was space for them.

Correct me if Im wrong, but I heard that they are primarily vs. HEAT.


This is why own research is also important. For example that site says that front hull "beak" armor of the M1 series is ~800-900mm RHAe vs CE ammunition. I know that this part of tank was at least one time, hit by RPG-29 that is reported to have penetration capability of ~750mm RHA after ERA, and did not perforated "beak" armor even if it is not protected by ERA, which means that CE protection of "beak" is more than RPG-29 can penetrate RHA without ERA protection.

Probably the gunner was inexperienced, and hit the armor at an angle. Challenger-2 hull front, protected by ERA was penetrated by this weapon in an another case.


also have unofficial information about F-F incident where M1A1HA was hit in to front turret armor by AGM-114 Hellfire (which AFAIK have penetration levels estimated as approx ~1,200mm RHA or more), and guess what, not only it did not perforated armor, but we know that armor was perforated approx 50% to 70% of it's LOS thickness. Although as I said, it is not official, so I can't use as a very hard proof.


As far as I know it really happened. But M1A1HA's front turret is 1080-1320 vs. CE, so the chance of surviving a Hellfire hit is quite high. It is why the effectiveness of russian GL ATGMs, like the Refleks or Invar are overestimated. HEAT warheads arent effective anymore against turret front armor of contemporary tanks. Its OK that you can fire the missiles far beyond the reach the 120mm guns, but so what? They are ineffective, especially against the M1A2, Chally-2 or Leo-2A5/6.

Damian90
Dec 13 2012, 19:18
Correct me if Im wrong, but I heard that they are primarily vs. HEAT.

Yes, but they can add a significant protection also again KE, M1 front fuel tanks are nearly 1,000mm long, if you would transfer this in to armor this is a lot of thickness (there is also a lot of physics here, like hydrodynamics, because modern ammunition when penetrating armor, interacts with armor exactly on the basis of hydrodynamics) + the lower front hull "beak" is a ~650-700mm thick composite armor module.

However for example the British light tank Contentious, that was never inducted in to service, also had behind front armor a fuel tank designed as addon armor, this fuel tank increased front hull protection to the level of some medium and heavy tanks, seriously.


Probably the gunner was inexperienced, and hit the armor at an angle. Challenger-2 hull front, protected by ERA was penetrated by this weapon in an another case.

No, not because that, it hit directly in the the "beak". As for Challenger 2, the "beak" in CR2 is simple, approx ~100mm thick homogeneus steel plate, nothing more, a weak spot inherited from Challenger 1. This is why it was protected by ERA and after this incident with RPG-29, ERA had been replaced with thick, bolt on addon Dorchester composite armor, to be honest, crew had incredible luck that shaped charge did not hit ammunition properlant charges racks, it could end with another Challenger 2 with flying turret. I know that British guys will kill me but, Challenger 2 is not that good armored. It's front turret armor have cast backplates. Soviet sources says that they calculated that cast armor plate is from 5% to 15% weaker than it's rolled analog. Which means that Dorchester armor used by Challenger 2 have very weak backplates, and sometimes, life or death depends on these backplates. Other tanks like M1 or Leo2 use rolled backplates. By the way, did You ever saw Challenger 1 turret without Burlington armor installed? It is nothing else than slightly redesigned, Chieftain cast turret! :D I have even a photo... somewhere in my archieves.

The only reasons why Challenger 2 had fewer losses was because British had less capable enemy, there was less CR2's in the theater, and after conventional war phase, these tanks were operated more rare than M1's by Americans, in more calm sector and in even fewer numbers.


As far as I know it really happened. But M1A1HA's front turret is 1080-1320 vs. CE, so the chance of surviving a Hellfire hit is quite high. It is why the effectiveness of russian GL ATGMs, like the Refleks or Invar are overestimated. HEAT warheads arent effective anymore against turret front armor of contemporary tanks. Its OK that you can fire the missiles far beyond the reach the 120mm guns, but so what? They are ineffective, especially against the M1A2, Chally-2 or Leo-2A5/6.

There is theory that GLATGM's were designed not to defeat tanks, but for several other reasons. First was to please Khrushchev (the whole history is very interesting, with the missile tanks program and such things), second such GLATGM might be usefull against low flying attack helicopters, and third that it might compensate problems with stabilization and FCS and provide long range, precise guided ammunition that can be used against enemy tank destroyers armed with ATGM's + it is still efficent against older tanks.

Archbishop Lazarus
Dec 13 2012, 19:31
Hmmm, then those fuel tanks are quite well designed then!


it could end with another Challenger 2 with flying turret.

Another??? Challenger 2 ever suffered catastrophic ammo explosion? I didnt know that. Could you tell me the details, Im really interested!


By the way, did You ever saw Challenger 1 turret without Burlington armor installed? It is nothing else than slightly redesigned, Chieftain cast turret! I have even a photo... somewhere in my archieves.


Thats also interesting! Please, could you upload it?


There is theory that GLATGM's were designed not to defeat tanks, but for several other reasons. First was to please Khrushchev (the whole history is very interesting, with the missile tanks program and such things), second such GLATGM might be usefull against low flying attack helicopters, and third that it might compensate problems with stabilization and FCS and provide long range, precise guided ammunition that can be used against enemy tank destroyers armed with ATGM's + it is still efficent against older tanks.

Well, originally the design philosophy was what you described. But recently, russians advertising these missiles as "Abrams and Leopard killers", which give the T-90 huge advantage against western tanks, due to the long range. What a BS. They try to distract attention from the weak (at least compared to modern western ammo, but up to the end of cold war, 125mm was significantly more potent than NATO 120mm.) APFSDS for 125mm guns.

Damian90
Dec 13 2012, 19:50
Another??? Challenger 2 ever suffered catastrophic ammo explosion? I didnt know that. Could you tell me the details, Im really interested!

It was in 2003, a Friendly Fire incident, realy nasty. A Challenger 2 crew decided to stop and do some R&R in the field, two crew members got outside and two stay in tank, some distance away another Challenger 2 from other unit identified their tank as a bunker or APC, and fire a HESH in their direction, the round had such trajectory that it hit the commander cupola and hatch and exploded, making some fire inside and igniting ammunition propelant charges... this safe ammunition storage eh? But I think that image says more than a thousand words.

http://img687.imageshack.us/img687/6517/hull3jc3.jpg (http://imageshack.us/photo/my-images/687/hull3jc3.jpg/)

The only survivors where these two lucky guys that were outside, two crew members died. :(


Thats also interesting! Please, could you upload it?

http://img838.imageshack.us/img838/8120/chltrrt.jpg (143 kB) (http://imageshack.us/photo/my-images/838/chltrrt.jpg/)

You can see that it is the same shape as Chieftain, although a bit more smooth. On the side you can see opening in the armor for TOGS optical channels.


Well, originally the design philosophy was what you described. But recently, russians advertising these missiles as "Abrams and Leopard killers", which give the T-90 huge advantage against western tanks, due to the long range. What a BS. They try to distract attention from the weak (at least compared to modern western ammo, but up to the end of cold war, 125mm was significantly more potent than NATO 120mm.) APFSDS for 125mm guns.

I know reasonable Russians, they are nice fellows, and damn well informed also, you can bet that they do not think that way, it is just a PR to please goverment and as a use to promote equipment.

Rydygier
Dec 14 2012, 13:16
So checked values with ACE configs again. Seems, that too high penetration for T-90 sabot was the only mistake with configs reading. As for too weak T72 armor - I can only say, that ACE has same values for T72_Base class. If not acceptable - T72_RU (russian) can be distinguished with own values, but not sure, what exactly values should be used. Crew should be vulnerable now when turned out, but this was only slightly tested. Lack of working turning towards attacker is still not healed pain. This may need very deep AI change anyway, as after such turning vehicle will not stay on place/with such direction, but will return to its normal behavior. Here is new version for tests:

NBT_TDS 2.05a (http://www46.zippyshare.com/v/20711019/file.html)

And, as I can see, you, guys, are pretty knowledgeable, so here is also values table for penetration and armor if you would like to check. Anything wrong? Any corrections? I have some suspitions eg about Stryker MGS ammo, in ACE ammo has bigger values, but also seems to be of another kind instead of OA version...

Averaged (base) front armor. Other sides calculated via multiplication this value by such number, so result correspond with averaged ACE values (including ERA):



"T55_TK_EP1", "T55_TK_GUE_EP1" : _armorCE = 215; _armorKE = 215;
"M1A2_TUSK_MG" : _armorCE = 1035; _armorKE = 720;
"M1A1" : _armorCE = 1035; _armorKE = 720;
"ZSU_Base", "ZSU_TK_EP1" : _armorCE = 9.5; _armorKE = 9.5;
"2S6M_Tunguska" : _armorCE = 15; _armorKE = 15;
"T34" : _armorCE = 85; _armorKE = 75;
"T72_Base" : _armorCE = 490; _armorKE = 390;
"T90" : _armorCE = 1165; _armorKE = 815;
"AAV" : _armorCE = 27.5; _armorKE = 27.5;
"BMP2_Base" : _armorCE = 36.5; _armorKE = 36.5;
"M2A2_EP1", "M6_EP1" : _armorCE = 130; _armorKE = 130;
"M2A3_EP1" : _armorCE = 170; _armorKE = 130;
"BAF_FV510_D", "BAF_FV510_W" : _armorCE = 165; _armorKE = 115;
"BMP3" : _armorCE = 41.5; _armorKE = 41.5;
"BRDM2_Base", "BRDM2_ATGM_base" : _armorCE = 10.5; _armorKE = 10.5;
"BTR90_Base" : _armorCE = 34; _armorKE = 34;
"BTR40_MG_TK_INS_EP1", "BTR40_MG_TK_GUE_EP1", "BTR40_TK_GUE_EP1", "BTR40_TK_INS_EP1" : _armorCE = 12; _armorKE = 12;
"BTR60_TK_EP1" : _armorCE = 9; _armorKE = 9;
"M113_UN_EP1", "M113_TK_EP1" : _armorCE = 38; _armorKE = 38;
"LAV25_Base" : _armorCE = 32.5; _armorKE = 32.5;
"M1128_MGS_EP1" : _armorCE = 20; _armorKE = 20;
"M1130_CV_EP1", "M1135_ATGMV_EP1", "M1129_MC_EP1", "M1126_ICV_mk19_EP1", "M1126_ICV_M2_EP1" : _armorCE = 600; _armorKE = 20;
"MLRS", "MLRS_DES_EP1" : _armorCE = 17.5; _armorKE = 17.5;
"GAZ_Vodnik" : _armorCE = 10.5; _armorKE = 10.5;
"GAZ_Vodnik_HMG" : _armorCE = 10.5; _armorKE = 10.5;



Penetration (minimal + random). Kinetic - should be counted KE armor, distance affects penetration; chemical - CE armor counted; explosive - KE armor counted, distance of attacker doesn't matter:


"120mmHE_M120" : _penetration = 40 + (random 10); _explosive = true;
"Sh_100_HEAT" : _penetration = 350 + (random 50); _chemical = true;
"Sh_100_HE" : _penetration = 70 + (random 10); _explosive = true;
"Sh_105_APDS" : _penetration = 270 + (random 50); _kinetic = true;
"Sh_105_HESH" : _penetration = 175 + (random 50); _chemical = true;
"Sh_105_HE", "ARTY_Sh_105_HE" : _penetration = 62.5 + (random 25); _explosive = true;
"Sh_120_HE" : _penetration = 567.5 + (random 25); _explosive = true;
"Sh_120_SABOT" : _penetration = 805 + (random 50); _kinetic = true;
"Sh_122_HE", "ARTY_Sh_122_HE" : _penetration = 30 + (random 25); _explosive = true;
"Sh_125_HE" : _penetration = 81.5 + (random 50); _explosive = true;
"Sh_125_SABOT" ("D81") :_penetration = 515 + (random 50); _kinetic = true;
"Sh_125_SABOT" ("2A46M") : _penetration = 625 + (random 50); _kinetic = true;
"Sh_85_HE" : _penetration = 35 + (random 10); _explosive = true;
"Sh_85_AP" :_penetration = 82.5 + (random 25); _kinetic = true;
"ARTY_Sh_81_HE", "Sh_81_HE" : _penetration = 40 + (random 10); _explosive = true;
"ARTY_Sh_82_HE", "Sh_82_HE" : _penetration = 40 + (random 10); _explosive = true;
"ARTY_R_120mm_HE" : _penetration = 20 + (random 100); _explosive = true;
"ARTY_R_227mm_HE" : _penetration = 550 + (random 100); _explosive = true;

"R_MEEWS_HEAT" : _penetration = 400 + (random 100); _chemical = true;
"R_MEEWS_HEDP" : _penetration = 125 + (random 50); _chemical = true;
"ARTY_SADARM_PROJO" : _penetration = 110 + (random 25);_explosive = true;
"R_Hydra_HE" : _penetration = 15 + (random 10); _explosive = true;
"R_57mm_HE" : _penetration = 5 + (random 10); _explosive = true;
"R_80mm_HE" : _penetration = 25 + (random 10); _explosive = true;
"R_S8T_AT" : _penetration = 405 + (random 50); _chemical = true;
"R_M136_AT" : _penetration = 395 + (random 50); _chemical = true;
"R_RPG18_AT" : _penetration = 350 + (random 50); _chemical = true;
"R_PG7VR_AT" : _penetration = 625 + (random 50); _chemical = true;
"R_PG7VL_AT" : _penetration = 475 + (random 50); _chemical = true;
"R_PG7V_AT" : _penetration = 305 + (random 50); _chemical = true;
"R_OG7_AT" : _penetration = 5 + (random 10); _explosive = true;
"R_PG9_AT" : _penetration = 275 + (random 50); _chemical = true;
"R_OG9_HE" : _penetration = 19 + (random 10); _explosive = true;
"R_SMAW_HEAA" : _penetration = 505 + (random 50); _chemical = true;
"R_SMAW_HEDP" :_penetration = 55 + (random 10); _chemical = true;
"R_GRAD" : _penetration = 20 + (random 100); _explosive = true;
"R_MLRS" : _penetration = 550 + (random 100); _explosive = true;

"M_CRV7_AT" : _penetration = 350 + (random 50); _explosive = true;
"M_47_AT_EP1" : _penetration = 400 + (random 100); _chemical = true;
"M_Javelin_AT" : _penetration = 775 + (random 50); _chemical = true;
"M_Stinger_AA" : _penetration = 25 + (random 10); _explosive = true;
"M_Sidewinder_AA" : _penetration = 85 + (random 10); _explosive = true;
"M_Strela_AA" : _penetration = 15 + (random 10); _explosive = true;
"M_Igla_AA" : _penetration = 20 + (random 10); _explosive = true;
"M_AT5_AT" : _penetration = 625 + (random 50); _chemical = true;
"M_AT13_AT" :_penetration = 925 + (random 50); _chemical = true;
"M_TOW_AT" : _penetration = 775 + (random 50); _chemical = true;
"M_TOW2_AT" : _penetration = 950 + (random 100); _chemical = true;
"M_AT10_AT" : _penetration = 625 + (random 50); _chemical = true;
"M_AT11_AT" :_penetration = 875 + (random 50); _chemical = true;
"M_Hellfire_AT" :_penetration = 1350 + (random 100); _chemical = true;
"M_Vikhr_AT" :_penetration = 950 + (random 100); _chemical = true;
"M_Maverick_AT" :_penetration = 1750 + (random 100); _chemical = true;
"M_R73_AA" :_penetration = 85 + (random 10); _explosive = true;
"M_Ch29_AT" :_penetration = 4150 + (random 100); _explosive = true;
"M_AT2_AT" :_penetration = 450 + (random 100); _chemical = true;
"M_AT6_AT" :_penetration = 535 + (random 50); _chemical = true;
"M_AT9_AT" :_penetration = 895 + (random 50); _chemical = true;
"M_9M311_AA" :_penetration = 137.5 + (random 25); _explosive = true;
"M_NLAW_AT" :_penetration = 450 + (random 100); _chemical = true;

"Bo_Mk82", "Bo_GBU12_LGB" : _penetration = 2950 + (random 100); _explosive = true;
"Bo_FAB_250" : _penetration = 3350 + (random 100); _explosive = true;

"Mine" : _penetration = 687.5 + (random 25); _explosive = true;
"MineE" : _penetration = 245 + (random 10); _explosive = true;
"PipeBomb","TimeBomb","BAF_ied_v1","BAF_ied_v2","BAF_ied_v3","BAF_ied_v4" : _penetration = 50 + (random 250); _explosive = true;

"Sh_40_SABOT" : _penetration = 125 + (random 50); _kinetic = true;
"Sh_40_HE" :_penetration = 10 + (random 10); _explosive = true;
"B_145x115_AP" : _penetration = 15 + (random 10); _kinetic = true;
"B_20mm_AP" : _penetration = 20 + (random 10); _kinetic = true;
"B_20mm_AA" : _penetration = 20 + (random 10); _kinetic = true;
"B_23mm_AA" : _penetration = 24 + (random 10); _kinetic = true;
"B_23mm_HE" : _penetration = 12 + (random 10); _kinetic = true;
"B_23mm_AP" : _penetration = 24 + (random 10); _kinetic = true;
"B_23mm_APHE" : _penetration = 18 + (random 10); _kinetic = true;
"B_25mm_HE" : _penetration = 13 + (random 10); _kinetic = true;
"B_25mm_HEI" : _penetration = 13 + (random 10); _kinetic = true;
"B_25mm_APDS" : _penetration = 23 + (random 10); _kinetic = true;
"B_30x113mm_M789_HEDP" : _penetration = 50 + (random 10); _kinetic = true;
"B_30mm_AP" : _penetration = 25 + (random 10); _kinetic = true;
"B_30mmA10_AP" : _penetration = 64 + (random 10); _kinetic = true;
"B_30mm_HE" : _penetration = 16 + (random 10); _kinetic = true;
"B_30mm_AA" : _penetration = 16 + (random 10); _kinetic = true;
"G_30mm_HE" : _penetration = 5 + (random 10); _kinetic = true;
"G_40mm_HE" : _penetration = 6 + (random 10); _kinetic = true;


Vehicle is considered as invulnerable on other kinds of "BulletCore" ammunition except tracks and wheels if damage is big enough - lowest fully counted caliber is 14.5 mm. This can be changed, but has a reason. The more hits calculated, the bigger CPU load, especially for rapid-fire weaponry (eg .50 CKM can be deadly here also for CPU, I suppose).

Damian90
Dec 14 2012, 13:41
"T55_TK_EP1", "T55_TK_GUE_EP1" : _armorCE = 215; _armorKE = 215;
"M1A2_TUSK_MG" : _armorCE = 1035; _armorKE = 720;
"M1A1" : _armorCE = 1035; _armorKE = 720;
"ZSU_Base", "ZSU_TK_EP1" : _armorCE = 9.5; _armorKE = 9.5;
"2S6M_Tunguska" : _armorCE = 15; _armorKE = 15;
"T34" : _armorCE = 85; _armorKE = 75;
"T72_Base" : _armorCE = 490; _armorKE = 390;
"T90" : _armorCE = 1165; _armorKE = 815;
"AAV" : _armorCE = 27.5; _armorKE = 27.5;
"BMP2_Base" : _armorCE = 36.5; _armorKE = 36.5;
"M2A2_EP1", "M6_EP1" : _armorCE = 130; _armorKE = 130;
"M2A3_EP1" : _armorCE = 170; _armorKE = 130;
"BAF_FV510_D", "BAF_FV510_W" : _armorCE = 165; _armorKE = 115;
"BMP3" : _armorCE = 41.5; _armorKE = 41.5;
"BRDM2_Base", "BRDM2_ATGM_base" : _armorCE = 10.5; _armorKE = 10.5;
"BTR90_Base" : _armorCE = 34; _armorKE = 34;
"BTR40_MG_TK_INS_EP1", "BTR40_MG_TK_GUE_EP1", "BTR40_TK_GUE_EP1", "BTR40_TK_INS_EP1" : _armorCE = 12; _armorKE = 12;
"BTR60_TK_EP1" : _armorCE = 9; _armorKE = 9;
"M113_UN_EP1", "M113_TK_EP1" : _armorCE = 38; _armorKE = 38;
"LAV25_Base" : _armorCE = 32.5; _armorKE = 32.5;
"M1128_MGS_EP1" : _armorCE = 20; _armorKE = 20;
"M1130_CV_EP1", "M1135_ATGMV_EP1", "M1129_MC_EP1", "M1126_ICV_mk19_EP1", "M1126_ICV_M2_EP1" : _armorCE = 600; _armorKE = 20;
"MLRS", "MLRS_DES_EP1" : _armorCE = 17.5; _armorKE = 17.5;
"GAZ_Vodnik" : _armorCE = 10.5; _armorKE = 10.5;
"GAZ_Vodnik_HMG" : _armorCE = 10.5; _armorKE = 10.5;

T-90 have too much armor. We should remember that T-90 represented in ArmA2 is a basic T-90 which in reality is just T-72B on steroids. What it means? It is just the same protection level as for example T-72B Model 1990 with 4S22 Kontakt-5 ERA. So T-90 is overarmored. While M1 series seems to be underarmored.

As basic vehicles in ArmA2 represents XXI century period, the American tanks use 3rd generation Heavy Armor Package. This is a very complex armor package, from what I could dig out and after discussions with guys that are close to the armor buisness, we can approx made a model of this armor package. The outer shell of the tank is probably made from the high hardness steel or eventually from double or even triple hardness steel. However I do not remember how much more protection they gave for HHS, DHS or THS compared to RHA. The internal structure of the armor is a NERA (Non Energetic Reactive Armor) like array with a depleted uranium alloy plates, encased in something called a graphite coat, I was researching this, and it seems that a name is misleading because basic graphite have no visible advantages for armor protection. I concluded that graphite coating have something to do with carbon fiber, that indeed is used for composite structures, because more advanced cabron based materials are still probably not used in armor protection, I did not considered them.

Such DUA and Carbon Fiber are then encased inbetween steel plates, the most logical would be to encase them in HHS, DHS or THS steel plates to combine their high hardness, with properties of Carbon Fiber and high density of DUA. Uknown is only how many such layers are inside armor cavity, and how thick is each layer.

The backplate for such array should be a RHA or SHS plate, most probably ~100mm thick (as some reports says), it can't be too hard to not spall in case of armor perforation, but it needs to be more flexible.

However do not ask me about estimation, but the M1A1 and M1A2 should have significantly better protection, against both KE and CE threats.

As for T-90, because it's turret is exactly the same as T-72B turret, the general conclusion is that the armor configuration is same which means it looks like this:

http://img27.imageshack.us/img27/968/t72bbazakolorki.jpg (148 kB)

The turret base structure is cast not rolled like in case of M1 series. What it means? It is important to know that Soviet sources says that cast armor is by 5% to 15% weaker than it's rolled analog, so the outer layer and inner layer (backplate) is by 5% to 15% weaker. The array we see inside is a simple NERA like armor. I know that a Russian sources close to the UKBTM (design bureau that designed T-72 and T-90) and UVZ (a company that manufactures them), claimed that also most modern variant used by Russian Military the T-90A, use very similiar armor array, only that cast turret was replaced by welded turret from rolled plates.

The 4S22 Kontakt-5 ERA also do not add as much protection as most often claimed. It is immposible to properly calculate in RHAe how much protection it adds, also it is not efficent against modern APFSDS ammunition like American M829A2 (Russian language sources claimed that Kontakt-5 will be ineffective against M829A2 even at range of 6,000m, which is a bit odd, but then again, these are still Russian language sources), M829A3, M829E4/A4 or German ammunition like DM53 and DM63. As well it is not efficent against tandem HEAT warheads.

So considering this, I recommend to weaken T-90 by 5% to 15% (best would be something inbetween) due to it's cast turret and much simpler armor array, compared to M1 series, which should be stronger by these 5% to 15%.

If we also consider the image I postem made by my friend, and we know that T-90 will have exactly the same level of protection, we can then assume that T-90 with Kontakt-5 will have such protection values:

Vs APFSDS - ~470-540mm + Kontakt-5 (~250mm) = ~670-740mm RHAe vs KE.
Vs HEAT - ~530-600mm + Kontakt-5 (~600mm) = ~1,130-1,200mm RHAe vs CE.

Above estimation is for turret front of course, for front hull will be lower.

And please remember, this conclusions are made after several years of my own research in this subject.


"120mmHE_M120" : _penetration = 40 + (random 10); _explosive = true;
"Sh_100_HEAT" : _penetration = 350 + (random 50); _chemical = true;
"Sh_100_HE" : _penetration = 70 + (random 10); _explosive = true;
"Sh_105_APDS" : _penetration = 270 + (random 50); _kinetic = true;
"Sh_105_HESH" : _penetration = 175 + (random 50); _chemical = true;
"Sh_105_HE", "ARTY_Sh_105_HE" : _penetration = 62.5 + (random 25); _explosive = true;
"Sh_120_HE" : _penetration = 567.5 + (random 25); _explosive = true;
"Sh_120_SABOT" : _penetration = 805 + (random 50); _kinetic = true;
"Sh_122_HE", "ARTY_Sh_122_HE" : _penetration = 30 + (random 25); _explosive = true;
"Sh_125_HE" : _penetration = 81.5 + (random 50); _explosive = true;
"Sh_125_SABOT" ("D81") :_penetration = 515 + (random 50); _kinetic = true;
"Sh_125_SABOT" ("2A46M") : _penetration = 625 + (random 50); _kinetic = true;
"Sh_85_HE" : _penetration = 35 + (random 10); _explosive = true;
"Sh_85_AP" :_penetration = 82.5 + (random 25); _kinetic = true;
"ARTY_Sh_81_HE", "Sh_81_HE" : _penetration = 40 + (random 10); _explosive = true;
"ARTY_Sh_82_HE", "Sh_82_HE" : _penetration = 40 + (random 10); _explosive = true;
"ARTY_R_120mm_HE" : _penetration = 20 + (random 100); _explosive = true;
"ARTY_R_227mm_HE" : _penetration = 550 + (random 100); _explosive = true;

The problem is that there are no real life ammunition designation codes, which means we need to assume about what ammunition we are talking about.

The "Sh_120_HE" might be anything, if we assume that it is M830 HEAT, then it's penetration values should be ~600-650mm, my Friend had some access to German documents, and the same value is provided for DM12 HEAT, both rounds are actually one and the same because M830 is just American version of DM12.

If this is M830A1 MPAT then if I remember correct it's penetration values should be ~400-450mm.

The M908 HEOR which is a variant of M830A1 for HE round role should have lower performance, but I do not think that round in A2 is a M908.

The other rounds used by US Military like M1028 Cannister, MPHE (DM11) or AMP (still in R&D phase) are not simulated in basic A2 (M1028 only in ACE2 AFAIK).

The Sh_120_SABOT is probably M829A3, so the values in your config seems legit.

The same problem will be with M1128 MGS, I will try to dig it up a bit. Although IRCC, the most popular ammunition used by this vehicle would be M900 APFSDS, M456 HEAT and M393 HEP.

Rydygier
Dec 14 2012, 14:19
Several years? Wow. Personally never even tried to do such deep and extended research. Found no reason, I guess. Anyway - great & thanks. So let's say T-90's armor goes 10% down, M1's 10% up...

"Sh_120_HE" - so HEAT perhaps? Penetration should be higher, as I see, and "chemical" not "explosive"...

Damian90
Dec 14 2012, 14:24
Several years? Wow. Personally never even tried to do such deep and extended research. Found no reason, I guess.

Well, if you want to be a proffesional military journalist and write even some books, you need to sacrifice several years for deep research. I started to be interested in the subject when I had 10 or 15, now I have 22, so this is 7-12 years of education in this subject.


"Sh_120_HE" - so HEAT perhaps? Penetration should be higher, as I see, and "chemical" not "explosive"...

Yeah, most probably M830 HEAT.

Oh BTW.

Sh_125_HE is a bit tricky thing here. Because we do not know if this is HEAT round or HE/HEF round.

In Russian tanks the combat load of ammunition is mostly more HE/HEF and HEAT instead of APFSDS. The basic ArmA2 gives just only two types of ammunition, which is not correct.

In such case more logical is HEAT round, as it is more multipurpose than HE/HEF. The most popular HEAT rounds in Russia are 3BK18 with 630mm RHA penetration, 3BK21 with 760mm and 3BK29 with 630mm RHA penetration.

Rydygier
Dec 14 2012, 14:45
And chemical means explosive in world of ammunition, because explosion is chemical reaction.

That's clear. I just found relevant variables named that way when I started work with this great addon, sadly left alone, and not changed it, as their name isn't so important as long, as code gives fine results.

So, thank you for very valuable help again, and here is most recent version (untested yet) including 3BK21 instead of HE for 125mm:

NBT_TDS 2.06a (http://www48.zippyshare.com/v/44991613/file.html)

Damian90
Dec 14 2012, 14:52
That's clear. I just found relevant variables named that way when I started work with this great addon, sadly left alone, and not changed it, as their name isn't so important as long, as code gives fine results.

Yeah, I just recently found out it is for code purpose.

Więc przepraszam za zrobienie zamętu. ;)


So, thank you for very valuable help again

No problem, if any help will be needed, or question, I will try to provide some informations.

Rydygier
Dec 14 2012, 14:57
Więc przepraszam za zrobienie zamętu.

:) No problemo (Nie ma problema).


I will try to provide some informations.

Great. MGS ammo is not clear, and there was objection about T-72 armor, but this is same, as in ACE, so do not know...

Damian90
Dec 14 2012, 15:00
You know, I am also from Poland, so no need to translate what both of us understand perfectly. ;)

BTW the question about T-72 you asked, I think there is no reason to change current values, as models in basic ArmA2 are only T-72A (Russia and Chernarus as ex Soviet Republic) and T-72M/M1 (Takistan - others), the more modern T-72B variant was created by Dractyum (dunno if I wrote properly his nick) and is included in ACE2 if I am correct.

Rydygier
Dec 14 2012, 15:03
You know, I am also from Poland, so no need to translate what both of us understand perfectly.

This was for our Forum Lords, as technically we both broke the rule "English only". :)


the question about T-72 you asked, I think there is no reason to change current values

OK then. Thanks.

Damian90
Dec 14 2012, 15:09
Oh, ok then.

No let's get back to M1128 MGS Stryker.

The M900 APFSDS in avaiable sources is estimated to be capable of penetrating ~520mm of RHA. The M456 HEAT is estimated for ~390mm RHA, and M393 HEP is a problem, because it is HEP/HESH type ammunition, it does not penetrate armor, but cause spalling of the armor internal surface. In such case it is difficult to simulate it as it is only effective against homogeneus armor, and will not be effective against modern tanks with composite or even lighter vehicles with ERA.

So I think more logical is to use only M900 and M456.

Oh and one more thing. American sources said that efficency of slat cages on Strykers, are 50%, which means sometimes it works, sometimes not, especially against more capable RPG rounds. Efficency against ATGM and tank fired HEAT rounds is questionable.

Rydygier
Dec 14 2012, 15:28
In-game reload action and ammo classname for MGS indicates HESH and APDS. HESH is in game effective against infantry, so for this one probably should be chosen an ammo of same anti personel effectiveness? Therefore maybe should stay with low penetration as HESH indeed?

Exact simulation of SLAT is currently beyond complexicity of this addon. Different efficiency dependent on kind of HEAT must be implemented first. It is doable, but, to be honest, I never had ambitions to make this addon such accurate simulation (do not know, what ambitions had Nice_Boat though). Some things are simplified, eg mentioned averaged armor, where exact hit spot (or even turret/hull) isn't important, only side, then armor value is randomized. There is also a cost of code complexicity, means cost of CPU usage, important here, when calculations must be quick, do not cause too big lag, even for rapid fire weaponry.

Damian90
Dec 14 2012, 15:47
In-game reload action and ammo classname for MGS indicates HESH and APDS. HESH is in game effective against infantry, so for this one probably should be chosen an ammo of same anti personel effectiveness? Therefore maybe should stay with low penetration as HESH indeed?

Exact simulation of SLAT is currently beyond complexicity of this addon. Different efficiency dependent on kind of HEAT must be implemented first. It is doable, but, to be honest, I never had ambitions to make this addon such accurate simulation (do not know, what ambitions had Nice_Boat though). Some things are simplified, eg mentioned averaged armor, where exact hit spot (or even turret/hull) isn't important, only side, then armor value is randomized. There is also a cost of code complexicity, means cost of CPU usage, important here, when calculations must be quick, do not cause too big lag, even for rapid fire weaponry.

So perhaps yes, it is better to leave it as HEP/HESH (it is obsolete yet still efficent in anti personel and anti structural ammunition), same for Slat armor.

Archbishop Lazarus
Dec 14 2012, 17:16
Hi!

I also suggest little change:

T-55: 250 KE&CE
T-34: 90 KE&CE (in fact no need to average protection because both glacis and turret front are 90mm LOS. :)

Penetration:

100mm HEAT: 380
PG-9: 300-400-550? problem is we dont know the exact type ingame.
AT10: what the hell it that btw?
Vihr: 1200mm
Javelin: 2000 (to simulate top attack maybe)

@<hidden> Damian90:

Thx for the pictures!
Now I remember that frinedly fire incident with the Challenger-2. But I saw that photo the first time! Horrible destruction...
Regarding Challenger-1 armor, hehehe funny. Really looks like a Chieftain! :)

Rydygier
Dec 14 2012, 18:09
AT-10 "Stabber" (http://www.globalsecurity.org/military/world/russia/at-10.htm)

Top hits are simulated already. There is top armor distiguished. Top hit may be generated by two ways: some kinds of ammo have guaranteed top hit (Javelin amongst them, also arty ammo, if direct hit occured), rest - by geometric calculations in 3D, where reference points are positions of attacker and target but also pitch/bank of target because of terrain. If angle is proper - top hit is granted.

Damian90
Dec 14 2012, 18:20
@<hidden> Archbishop Lazarus


Regarding Challenger-1 armor, hehehe funny. Really looks like a Chieftain!

Well, in some sence Challenger 1 is redesigned and slightly improved Chieftain.

And there is interesting story about Chieftain/Challenger replacement program in late 1980's and early 1990's. British Army initialy decided that replacement for Chieftain and Challenger would be M1A1 eventually M1A2, Leopard 2 had been rejected due to as British Army named it "low armor integrity". But the prime minister Margaret Thatcher convienced army to rethink their decision and support domestic tank design, so decision was changed giving chance VDS and Challenger 2 borned.

If you are interested more in to the tank subject, we should not talk in to such thread, but insted PM me if you would want to ask something or chit chat about tin cans. ;)

Archbishop Lazarus
Dec 14 2012, 18:22
AT-10 "Stabber"

Top hits are simulated already. There is top armor distiguished. Top hit may be generated by two ways: some kinds of ammo have guaranteed top hit (Javelin amongst them, also arty ammo, if direct hit occured), rest - by geometric calculations in 3D, where reference points are positions of attacker and target but also pitch/bank of target because of terrain. If angle is proper - top hit is granted.

Thx!

Damned NATO codenames... I hate them all.
Then it also needs change, 9M117M1 Arkan missile penetrates 850mm armor.


If you are interested more in to the tank subject, we should not talk in to such thread, but insted PM me if you would want to ask something or chit chat about tin cans.

Yes, agree!

Rydygier
Dec 14 2012, 20:29
Then it also needs change, 9M117M1 Arkan missile penetrates 850mm armor.

But, if I understood correctly, this is Bastion (9M117 or 9M116-3), not Arkan?


100mm HEAT: 380

Well, current 350 + random 50 on average gives such value.


Vihr: 1200mm

OK... So 1150 + random 100 should be fine, I think.

Archbishop Lazarus
Dec 15 2012, 13:36
But, if I understood correctly, this is Bastion (9M117 or 9M116-3), not Arkan?


Lets clear things up. First, 9M116 is the missile of 9K115 Metis system. What you are referring to is the 9K116 missile system. But it has many variations: 9K116 Kastet is for 100mm MT-12 AT guns, 9K116-1 Bastion is for 100mm D-10 tank guns (T-55AM/AMV), 9K116-2 Sheksna is for 115mm 2A20 tank gun (T-62M/MV), and finally, the 9K116-3 Basnya is for 100mm 2A70 guns (BMP-3, BMD-4).
BMP-3 uses the 3UBK23-3 round, with 9M117M1 Arkan missile.

Muecke
Dec 15 2012, 13:41
Guys this sounds complex but interesting.
Can we expect any update release ?

Rydygier
Dec 15 2012, 14:00
Lets clear things up.

Thanks! So, after last corrections:

NBT_TDS 2.07a (http://www11.zippyshare.com/v/81269656/file.html)

(So here you go Muecke, it is the only update release form possible now, when Nice_Boat, author of the idea and first versions, is not there any more, I'm only humble continuator, that tries to save this addon from oblivion)

fluttershy
Dec 15 2012, 14:16
if its fine, i would like to offer my personal config changes. Useable for ACE² including all real-tec data that i was possible to gather over time.
Also added some 50 cal rounds to the script - therefor your able to penetrate light armored vehicles with your sniper rifle.

Rydygier
Dec 15 2012, 14:30
Anyone's work, I guess, is at least as fine, as mine, and for sure will be appreciated. :)

dalber24
Dec 15 2012, 14:51
Thanks! So, after last corrections:

NBT_TDS 2.07a (http://www11.zippyshare.com/v/81269656/file.html)

(So here you go Muecke, it is the only update release form possible now, when Nice_Boat, author of the idea and first versions, is not there any more, I'm only humble continuator, that tries to save this addon from oblivion)

So now, you are the man.
Thanks for your work, testing!!!!

Damian90
Dec 15 2012, 16:19
I think this might be interesting for you all, the Soviet Ground Forces, made their own, more proffesional estimations based on real intelligence data for the M1 series.

http://img29.imageshack.us/img29/7894/80e517fe5f78.jpg (2707 kB) (http://imageshack.us/photo/my-images/29/80e517fe5f78.jpg/)

What is interesting is that Steven J. Zaloga in one of his more recent books M1 Abrams vs T-72 Ural, provides very similiar data, it is hard to accuse Zaloga of being anti-russian, as he is very well known for his russophilia, and he had some access to more reliable russian sources.

http://img72.imageshack.us/img72/2710/nowyobrazmapybitowej14.png (http://imageshack.us/photo/my-images/72/nowyobrazmapybitowej14.png/)

Muecke
Dec 15 2012, 16:21
Well thank you Rydygier for your effort.
I downloaded it and installed it. Forgive me for asking but whats the main aim for this ?
Make tanks stronger or make them more realistic?
And is there a list of what is changed and why ? This would help out to explain to others.

Has someone any information on lags for MP or any performance issues ?
If this addon makes no problems this could be something very special.
Thank you guys for not letting it die.

Archbishop Lazarus
Dec 15 2012, 17:36
What is interesting is that Steven J. Zaloga in one of his more recent books M1 Abrams vs T-72 Ural, provides very similiar data, it is hard to accuse Zaloga of being anti-russian, as he is very well known for his russophilia, and he had some access to more reliable russian sources.


Yes. And he is very well known for his incompetence about russian equipment. He writes tons upon tons of bullshit. Im in contact with people who actually operated russian made equipment, and everybody agrees that Zaloga's books arent recommended for anybody who is doing professional research.
The table above is overly optimistic about the armor strenght of the Abrams. M1A1 hull & turret is no more than 450mm vs. KE, while M1A1 HA turret is around 660-680. More recent estimations from NII Stali also lower than those (530-660 vs. KE)

Damian90
Dec 15 2012, 18:30
@<hidden> Archbishop Lazarus


Yes. And he is very well known for his incompetentence about russian equipment. He writes tons upon tons of bullshit. Im in contact with people who actually operated russian made equipment, and everybody agrees that Zaloga's books arent recommended for anybody who is doing professional research.

He is not the most accurate, neither the worst, and his more recent books are more accurate, you should understand that his older books were written in times when access to more accurate data was immposible.


The table above is overly optimistic about the armor strenght of the Abrams. M1A1 hull & turret is no more than 450mm vs. KE, while M1A1 HA turret is around 660-680. More recent estimations from NII Stali also lower than those (530-660 vs. KE)

This is useless propaganda, far from reality. And NII Stali does not know anything about Burlington. Actually Russians seems to know very little about composite armors, as their designs are incredibly primitive in that manner, mostly due to the ridicoulus requirements to keep weight below 50 tons.

What is interesting and you probably do not know this, composite armors of such tanks like T-64, T-80 and pre T-72B variants, were more similiar to rejected western designs like SCA (siliceous core armor), not the Burlington or later developments like Dorchester or Heavy Armor Package.

It is also unbelivable to me how simplified and naive are their estimations data. For example they only consider in them pure DU, and do not provide any estimations for other used materials like different steel types and nonmetalic materials.

I strongly recommend you to change sources, as these above were long time ago considered as pure propaganda, not close to reality, reasonable estimations.

Oh BTW, actually western data on Soviet tanks protection levels is very accurate. For example British BRIXMIS agents were able to get inside a motorpool full of T-64's, collect data, and even stole a complete documentation of it's armor protection. I twas later sent to CIA. Also USA with UK were capable to steal a complete T-80U in 1990/1991 from Soviet Army stocks, and USA purchased 4 more T-84's from Ukraine in 2000's.

Soviet Union, neither Russia, never accomplished so much, especially when it comes to the NATO 3rd generation MBT's.

But as I suggested earlier, we should discuss such matters in private.

Rydygier
Dec 15 2012, 18:47
Well thank you Rydygier for your effort.
I downloaded it and installed it. Forgive me for asking but whats the main aim for this ?
Make tanks stronger or make them more realistic?
And is there a list of what is changed and why ? This would help out to explain to others.

Has someone any information on lags for MP or any performance issues ?
If this addon makes no problems this could be something very special.
Thank you guys for not letting it die.

The purpose of this addon is to replace vanilla, HP-based, damage system for armored vehicles, with custom, that will try to emulate in some extend more realistic consequences of hitting a tank by a projectile.

To achieve this goal each armored vehicle on map receives own HandleDamage EventHandler, that every hit executes a code, that is "a heart" of this addon. This code checks, what was hit by what, and from which side. With such data script applies pretending to be realistic armor and penetration values for given hit circumstancies to determine, if penetration occured (with some statistical simplification and randomization). Also is checked chance for damaging of track/wheels, turret and main gun (if relevant parts was indeed hit). Only, if penetration occured, recalculated damage is applied with various, but in general big chance of "one-shot-kill", however there is also chance, especially for most modern MBT, for "non-kill" penetration. Chances for this are customizable. In case of penetration independently are checked chances of wounds for the crew.

So with this on board should be changed some vanilla habits from combating armored vehicles. With Arma's vanilla damage system you can destroy any tank even with Makarov pistol, if you only have heap of ammo and enough free time and patience. There is also no real difference, from which side tank was hit. Every hit brings closer an inevitable end for the tank and crew by lowering hitpoints of their "selections"/parts.

With TDS it is vital, from which side tank is attacked, and by what weaponry. If weapon is too weak to have any chance for penetrate tank's armor, you can shoot whole day - chances to do any harm will be near zero or equal to zero for pistols/rifles and such.

There also was attempt of implementing some logical consequences of that change for tank's AI (so should try to set vehicle front towards most serious threat and keep it that way), but till now are failing and there is no big hope for any progress here.

As for MP - have no idea, if and how this will work. Anyway lags are possible, it is dependent on number of simultanously fighting vehicles and hits to handle. I guess, that many, eg 40 vehicles per side aligned, each with rapid fire weapon is good method for massive lag. There will be lag, no execution delays, because code is executed outside scheduler. Otherwise in heavy scripted missions, as some from Harvest Red, this addon will suffer big delays between hit and applying of damage in some cases making the tanks simply invicible.

Supported should be all A2 + OA armored vehicles (not the cars, cars are left with vanilla damage system) and anti-armor effective weaponry.

FLv*VeNoM*
Dec 19 2012, 11:14
Good sirs!

I ran into a little trouble while trying to add P85s tanks to the addon. So for example I added this line to your 'NBTank.sqf':

case ((_target isKindOf "p85_LEO2_base") or (_target isKindOf "P85_LEO2A4g") or (_target isKindOf "P85_LEO2A4c")) : {_armorCE = 710; _armorKE = 550; _surviv = 0; _sidePKE = 0.30;_sidePCE = 0.40;_rearPKE = 0.1;_rearPCE = 0.08;_topPKE = 0.04;_topPCE = 0.04;_bottomPKE = 0.28};

(Don't know how correct the figures are, they are for testing purpose mainly)
so I threw a Leo in the editor and let a T90 engage it, and I was a bit surprised to see that the T90 spent all its ammo without destryoing the Leo from a distance of less than 500 metres. However the crew was killed maingun and turret took hits (red icons). Can someone show me what I'm doing wrong?
And in a second step: does anyone have data on the armor of the tanks in that mod? Like 'how strong is the side armor on a Leopard I / II ?

thanks in advance guys. This addon has so much potential thanks for not letting it die!

Rydygier
Dec 19 2012, 12:09
First: try to change _surviv value. Has to be greater than zero. It is used in main "applying damage" formula, that looks like:


_target setDamage (_DT + (NT_Damage * _damage * (_penetration/_armorKE) * ((random 50)/(3 * _Surviv))));

As you can see, when _surviv is equal to zero, denominator also becomes zero, what obviously isn't allowed.

Check this value for other vehicles to know, what values are "typical" for this script.

BTW this variable determines, how big is chance for given vehicle for surviving penetration (_surviv reduces damage, by analyzing above formula you can know the exact dependence between this variable and final applied damage). All used values are my pure guessing.

FLv*VeNoM*
Dec 19 2012, 14:24
Thanks for the fast answer!

okay, the _surviv > 0 explains a lot! I thought it had something to do with crew survivability, that's why I lowered the value. Gonna check it out right now and thanks for your advice!
Tested it and it works like a charm. Many thanks!

Panimala
Dec 20 2012, 02:39
So Nice_Boat hasnt updated the first post since 2009, so I'm curious how this thread is still active. How well does this mod currently do and how does it work with ACE? I can't really be arsed with looking through 23 pages.

Rydygier
Dec 20 2012, 07:45
Newest update and some info about addon's situation (seems, that first page will be never updated):

Link (http://forums.bistudio.com/showthread.php?84673-Nice_Boat-Tank-Damage-System&p=2264681&viewfull=1#post2264681)

Shortly - author of the mod left community (at least is inactive very long time), but never officially renounced own author's rights to this project.

It handles vanilla, A2 + OA equipment. Of course anyone can add own entries with custom made equipment, vehicles and anti armor effective ammo, if only have very basic knowledge about scripting (as few posts above). Of course each additional entry makes code a bit heavier. As such script needs to be quick, and is launched every hit, this is important factor. Can't tell however, how many added new entries will have real impact on effectivenes. Probably many.

Anyway it uses mostly values used also in ACE's damage system (more complex and config-based, so only for ACE equipment), so I think, that ACE simply do not need TDS.

How well it works? This is a question for users. As for me - quite well, despite some difficulties (AI will not take into consideration armor and penetration parameters from this addon, so eg will not turn own tank front towards threat).

KeyCat
Dec 20 2012, 17:26
Thanks for the update Rydygier!

It will work a tad better after next patch when AI stop using it's coax MG to engage other tanks. Anyone found a way to stop AI using HE ammo when engaging other tanks?

Try it with latest beta patch and latest version of A2CCP...

http://forums.bistudio.com/showthread.php?141732-ARMA-2-Community-Configuration-Project-(A2CCP)

Edit: I in A2CCP roadmap that AI use of HE is WIP so crossing my fingers that Santa brings this fix in coming days.

https://dev-heaven.net/issues/63053

/KC

KeyCat
Dec 20 2012, 20:45
Noticed that the eventhandler is still active after target is destroyed, maybe can save some CPU cycles if removed...

/KC

Rydygier
Dec 21 2012, 12:05
Good point. So here is such version (+ some minor changes, in general, I hope, this version has slightly improved performance, not sure, if noticeable though):

NBT_TDS 2.09 (http://www5.zippyshare.com/v/63201336/file.html)

Archbishop Lazarus
Dec 21 2012, 14:01
Rydygier!

I have an idea for hull/turret armor difference. There would be two values for front, and the script would choose between them based on a preset chance. For example 2/3 - 1/3 chance for turret and hull hit. I know almost nothing about scripts, so I dont know if it would be possible to implement. What do you think?

Rydygier
Dec 21 2012, 14:37
It is possible.

More - now, when I think about it, it is possible to make it quite exact, by checking name of hit selection. At least teoretically, beacuse there may be a problem (or problems): not only exact hits in turret will return this selection. Usually each hit returns several selections (all affected by any damage, direct and indirect, I guess, so nearly every hit eventhandler is launched several times, one per affected selection). There also will be troubles with assigning overall damage for turret penetrations. So, hmm, I think, that exact way may prove too complex and yours idea may be more doable.

Here the only problem is - current lack of time. Time is needed mainly for re-check all armor RHA values again, also for implementation necessary code changes. And seems, that awaits me very busy Winter... Can't promise anything right now, if I get some free time, will do some tests about this, if I get more free time, I'll be able to check separate values for hull/turret.