Jump to content
Sign in to follow this  
NonWonderDog

Main Battle Tank Gun Ballistics, FCS, etc.

Recommended Posts

I've tried to make sure the code will work in multiplayer, but Bad Things will probably happen unless the server and everyone on it is using the mod. I've completely replaced the ammo loads of the tanks (single shell "magazines" for the main gun and much, much more machine gun ammo), and I have no idea what would happen if someone without the mod got into one of these tanks.

It might be better if I cloned the tanks instead of changing them, but that would be so annoying for single player.

I don't know what "realistic armor values" means in ArmA terms. What's a "realistic" number of hitpoints? What I'd really need is a penetration script, but that might be very hard to do. The basic idea would be to get the shell type that hit the tank and the relative angles between the firer and target, and add a number of hitpoints back to the target based on that. I think, though, that a killing shot would be a killing shot no matter how many hitpoints I added back.

If I made the shells do just enough damage to trigger the "hit" event and added damage based on the shell type, I'd have a host of other problems. I can't apply damage to tracks or the engine in script, for example, and any tank killed by the script wouldn't count as a kill for the firer.

And there's probably no way to make APFSDS darts do less damage to light targets.

Share this post


Link to post
Share on other sites

Have you heard about the OFP CAVS project

(Common Armour Value System). Their documentation and

research is very good!

WGL 5.1 has an almost complete implementation of the system.

I can send you the configs (which are commented for the CAVS

values), if you are interested.

Przezdzieblo made us a list of MBTs designations and ammo loadouts.

Could be interesting to you as well. Check out the thread and

more could be found in the WGL 5.1 configs again.

Hope that helps. smile_o.gif

Share this post


Link to post
Share on other sites

Hmm... I'm looking over that on the Wayback Machine, but it seems that HEAT rounds in CAVS do far too much damage. It seems like every HEAT round does as much or more damage than the equivalent KE round in that list.

It also gives M830A1 MPAT more damage than M830 HEAT. This is wrong. The M830A1 round is saboted, and much smaller than M830. It also uses half its charge for a radial fragmentation blast. There is no possible way it penetrates more armor than a full-size dedicated HEAT round, US Army boasts notwithstanding.

I just used KE armor penetration for damage, since that works pretty well with standard armor values. I also took the armor penetration of HEAT rounds and divided by 1.5 or so, since all modern MBTs have at 30-60% better protection against CE than KE. All this works very well with default armor values, even though I've lowered HEAT damage a bit.

Share this post


Link to post
Share on other sites

this is already above my expectation, take your time boss xmas_o.gif

Share this post


Link to post
Share on other sites
It doesn't really work like the real thing, but it works. In the real thing the gunner's handles move the reticle, and the sights float around to show proper lead. Unless I can find some way to rotate the turret in script, I won't be able to implement that in ArmA.

I've made a minor breakthrough on this front. If I apply setVectorDir to the tank, the turret comes along with it. I can easily rotate the tank to offset the reticle position at all times, and the gunner controls then move the reticle directly. I don't yet know how this affects AI or player drivers in multiplayer, but it's possible that--since the turret is completely and perfectly stabilized--I'll end up with direct turret control as the AI struggles to realign the tank.

This does actually work, and I've got it working now. Since the turret is perfectly stabilized in ArmA, it probably works while moving, too. However, it is currently impossible for the driver to rotate the tank while the gunner is using the lead computer. In addition, this confuses my method of lead calculation enough to result in damped oscillation of the main optics.

I think I'll be able to fix those problems, but it will probably take me a lot of time and cursing.

[uPDATE]

It now works no matter what the AI driver is doing, and I was able to cancel out the lead computer feedback pretty easily. biggrin_o.gif My only problem now is the laser -- it works perfectly in the T-72, but it's not well aligned with the sights in the M1A1. It's aimed a bit higher or lower than it should be depending on gun elevation, and I don't know why. I think this might be a model error, because my code creates the "laser bullets" just in front of the camera position and fires them along the weapon direction vector. I can't think of any reason the weapon direction and sight direction would be different.

Now, the real sights will compensate for own tank motion to "lock on" to a stationary target as your tank moves. If I try to do this, I'll probably just end up making your tank drive in circles. It's probably worth a shot anyway...

Share this post


Link to post
Share on other sites

Go Dog Go...this is a highly anticipated mod I hope you realise.MY question is though ,what happened to french points design?Are you guys working together on it or separately?And what did happen to their project??Kinda confusing. crazy_o.gif

Share this post


Link to post
Share on other sites

The "Realistic Tank Firing System" project is defunct, but they offered me their code after I'd gotten some ways into this. I haven't needed to use it, since theirs was a mission script based solution. Mine works as an addon.

My mod is focused a bit more on accurate simulation, too, and I'm trying to simulate the internal logic of the FCS as well as the results. It might have a bit of a framerate hit because of that, but I can't tell on my overclocked 3.2 GHz Core2 Duo (it's an E6420 on stock cooling--I got a lucky one. biggrin_o.gif).

I need some suggestions on key bindings, though. Right now, the "vehLockTargets" action (Tab key by default) fires the laser, the "lookAround" action (Alt key) dumps the lead, and the "binocular" action (B key) switches to battlesight mode in the M1A1. None of these do anything by default when you're a tank gunner. In addition, I've overridden the "toggleWeapons" action to switch the FCS to coax mode in the M1A1 as well as changing weapons.

All of these key bindings will work with your mouse or joystick with one exception: dynamic lead on the T-72M requires that you hold the vehLockTargets key down for ~1.5 seconds in order to get an accurate result. If you try to use the mouse or joystick, it will only average lead over 0.1 seconds, and there's no way you will get an accurate firing solution.

I don't have keys bound to changing FCS ammo mode, minimum laser range, or laser range logic.

Share this post


Link to post
Share on other sites

I've uploaded a crappy little video if the M1A1 FCS in action here: http://www.youtube.com/watch?v=VvtrcHSo1sI

No fancy production values, just a 30 second clip to show that it does indeed work as advertised. I didn't have a joystick hooked up, so it's a bit jerky and annoying.

I've lost track of what I was supposed to be adding next, so I'll clean out the debug messages, package it up, and put out a beta tomorrow.

Share this post


Link to post
Share on other sites
Quote[/b] ]I've lost track of what I was supposed to be adding next
Reticle scaling! Sorry I couldn't help myself biggrin_o.gif

Can't wait man.

Share this post


Link to post
Share on other sites

That looks fantastic, NWD! I can't wait till tommorow.

I have one suggestion, if I may. Since ArmA has the new fangled ability to activate scripts via keypresses, don't you think it'd be nice (and helpful) to clear out the action menu, and have each command bound to a button?

Share this post


Link to post
Share on other sites
That looks fantastic, NWD! I can't wait till tommorow.

I have one suggestion, if I may. Since ArmA has the new fangled ability to activate scripts via keypresses, don't you think it'd be nice (and helpful) to clear out the action menu, and have each command bound to a button?

No, I don't. ArmA has the ability to bind functions to individual keyboard keys, but not to mouse or joystick buttons.

To get around that, I added actions to the action menu and gave them "shortcuts." Pressing the tab key does the exact same thing as selecting the "LASE" action in the action menu, because I've told the lase action that it should overwrite the functionality of the "vehLockTargets" action. Unlike if I bound it to a key, this will work no matter if "vehLockTargets" is called from the keyboard, mouse, or joystick. Unfortunately, it also means that it clutters up the action menu.

The exception is the T-72 lead computer, as I've said before. If you use the mouse or joystick it will behave as if you only tapped the lase button--it will only average lead over 0.1 seconds and will be wildly inaccurate. If you use the keyboard, it will average lead for as long as you hold the tab key down (with a 1.5 second memory). My Russian is too poor to know if that's exactly the way it works in the real thing, but it sounds reasonable.

Share this post


Link to post
Share on other sites

Ah. That's basically what I meant.

I was afraid of having to fumble around with the action menu while under fire. This way is just as good as my suggestion. Thanks!

Share this post


Link to post
Share on other sites

As far as the lase goes...wouldn't it be determined on weither or not your joystick had keyboard emulation?...programable key function like on a hotas??

Share this post


Link to post
Share on other sites

Ack, that would work. I don't know why I didn't think of that. Right now you don't actually need to, because I haven't programmed in any random error -- the lead will actually be very good averaged over 0.1 seconds if you're using a joystick.

Anyway, the beta is released here

Share this post


Link to post
Share on other sites

Would it be possible to check the angle of a shell impact and where on the tank and then adjust the deflection value of the shell ammo, if this is possible you could have bad shots not penetrating and proper shots doing tons of damage with the same ammo.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×