Home   Help Search Login Register  

Author Topic: Request for help for weapon and ammo scripts for project  (Read 2103 times)

0 Members and 1 Guest are viewing this topic.

Offline DragoFire

  • Members
  • *
As some of you may or may-not know I been working on a weapon's standard for OFP:R. http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=fd39dff92c9b684b86b822b54048366b;act=ST;f=54;t=27360;st=0

In this I've worked out the realistic weapon damage, for FMJ, JHP, AP, HESH, HEAT and HE rounds. And have been working on an armour updated system, along with a options for rounds to be removed from one guns magazine to another's, providing they use the same caliber ammo rounds.

What I'm asking for is help to add a set of enhanced scripts to this project to calulate weapon damage (with use of an formula to calulated on factors like range, caliber dimensions/mass, target armour, rounds armour peneration rating at range, etc... ), to calulate time to unload and reload magazines.

This set of scripts will also include armour changes, like allowing armour material class (Steel plate, Kevlar, lead, glass, etc...). With these changes there will be changes to how armour damage is done.

Remember most of this is still in the testing stages, due to the very limited information from BIS on how weapon damage is calulated for armoured and unarmoured targets, it's a very slow process.

Oh!!    Before anyone says anything about the JAM projects and the MAAM project!

Yes I do know about them, and have followed what has been said. I've even been asked to merge the Weapon Standard project with one of them.

But till I'm happy with the finished product, I'll keep these offers and other things on the blackboard.

So please no comments about wasting time on this, when this is an actual realistic weapon effect and damage system upgrade for OFP:R, which covers weapons from pistols to 2000lb bombs.

I look forward to any help offered.

DragoFire

Cpt. Red Nain

  • Guest
Re:Request for help for weapon and ammo scripts for project
« Reply #1 on: 20 Oct 2004, 09:26:42 »
Very interesting idea!
Just one question: what are "HESH" rounds? The rest i know but that  ???

Offline DragoFire

  • Members
  • *
Re:Request for help for weapon and ammo scripts for project
« Reply #2 on: 20 Oct 2004, 09:37:46 »
Very interesting idea!
Just one question: what are "HESH" rounds? The rest i know but that  ???

The HEP-T (HESH-T) projectile consists of a thin walled steel cylindrical
body with a driving band, a relatively short ogive and a base plug to
which is secured the dual safety base detonating fuze and a tracer.
It is loaded with Composition A3 explosive. The projectile is assembled
to a brass cartridge case loaded with a cool burning, single base,
multi perforated, bagged type propelling charge.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Request for help for weapon and ammo scripts for project
« Reply #3 on: 23 Oct 2004, 01:20:33 »
Sounds like a great project, though I've only briefly glimpsed your official forums thread a while ago. OFP definately needs some standardized and reaslistic weapon configs.

I might be able to help you with scripting, except I'm not entirely clear on what you want. One thing I have noticed though, is that I have no friggin' idea how everything relates in terms of damage in ofp. I tried to find some relation between the value returned by the getdammage command, and the value returned in a dammaged eventhandler, and possibly some relation to a unit's armor in his config... but it frustrated the hell out of me, and I went mad after a while.

I wanted to make it so damage was realistically distributed for men, so that (a) you would be able to take less torso hits than leg hits (not true currently), and (b) getdammage would return a number related to how much total life a unit has left (also not always true).

But then to also throw in what effect the bullet's config has to do with it all, and to figure it out for vehicles as well.... oh... my... GOD! Figuring it all out would take more patience and dedication then I have. The info would be incredibly useful though.

So as long as you don't need me to find out that kind of info, I'd be willing to help. But again, I don't understand what you need.


And one last note. If he hasn't said anything in your thread yet, I'd strongly reccomend searching out/PMing a guy named Andrew B (on the official forums). He knows a hell of a lot about ballistics and weapon configs, and has been doing lots of work on his own to make realistic, standard configs. He seems like just the man to help with this kind of project.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline DragoFire

  • Members
  • *
Re:Request for help for weapon and ammo scripts for project
« Reply #4 on: 23 Oct 2004, 02:42:15 »
Sounds like a great project, though I've only briefly glimpsed your official forums thread a while ago. OFP definately needs some standardized and reaslistic weapon configs.

I might be able to help you with scripting, except I'm not entirely clear on what you want. One thing I have noticed though, is that I have no friggin' idea how everything relates in terms of damage in ofp. I tried to find some relation between the value returned by the getdammage command, and the value returned in a dammaged eventhandler, and possibly some relation to a unit's armor in his config... but it frustrated the hell out of me, and I went mad after a while.

I wanted to make it so damage was realistically distributed for men, so that (a) you would be able to take less torso hits than leg hits (not true currently), and (b) getdammage would return a number related to how much total life a unit has left (also not always true).

But then to also throw in what effect the bullet's config has to do with it all, and to figure it out for vehicles as well.... oh... my... GOD! Figuring it all out would take more patience and dedication then I have. The info would be incredibly useful though.

So as long as you don't need me to find out that kind of info, I'd be willing to help. But again, I don't understand what you need.

I've got the config's sorted, what I've got problems with is getting a few scripts made to tie in with the project. One is to calulate the damage based on the targets range and armour. The other is to move ammo rounds from one magizine to another.

The project has a standard magizine set for each manufactor (eg. M4's & M16's have a standard mag. for the both of them, and the M234 SAW can also these mag.'s plus it's 100rd ammo box). And the required script will allow rounds from H&K magizine to another manufactors mag.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Request for help for weapon and ammo scripts for project
« Reply #5 on: 24 Oct 2004, 02:19:03 »
Quote
One is to calulate the damage based on the targets range and armour.
I still don't understand what you mean by this. You mean if unit A shoots unit B, you want a script to calculate how much damage is done to unit B? Why not just use getdammage or an eventhandler? Especially since range has no effect on damage in OFP... And there is no way to "get" a unit's armor config values via scripting. So you'll really need to expand on this one, cause I have no idea what the point of it is.

Quote
The other is to move ammo rounds from one magizine to another.
Well... I guess this would be possible, but I don't think it would be worth doing. You would basically need to config 30 different m16 magazines, for example; one with 30 rounds, one with 29, one with 28, etc. Then the script would basically go "ok, he's got a 15 round m16 mag giving a round into a 21 round g36 mag, so now I need to remove both mags and give him back a 14 round m16 mag and a 22 round g36 mag." Anyway, it would be a hassle to script and a hassle to config, and most likely a hassle to use for the player as well. And for what? How often do you really need to swap rounds between mags anyway?

But on the other hand, you could also make a good weapon jamming script using those 30 different magazines I spoke of. So for that, it might actually be worth it.... but again, it would be a big hassle, IMO.

EDIT

Quote
M4's & M16's have a standard mag. for the both of them, and the M234 SAW can also these mag.'s plus it's 100rd ammo box
Love the idea of having a SAW that can actually use m16 mags! Doing this can cause jamming (or worse, the weapon blowing up) though, since the rounds are different, which would be good to reflect in a weapon jamming script, if you use one.

But don't you mean a 200rd ammo box?
« Last Edit: 24 Oct 2004, 02:32:56 by General Barron »
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline DragoFire

  • Members
  • *
Re:Request for help for weapon and ammo scripts for project
« Reply #6 on: 24 Oct 2004, 04:35:16 »
I still don't understand what you mean by this. You mean if unit A shoots unit B, you want a script to calculate how much damage is done to unit B? Why not just use getdammage or an eventhandler? Especially since range has no effect on damage in OFP... And there is no way to "get" a unit's armor config values via scripting. So you'll really need to expand on this one, cause I have no idea what the point of it is.

Yes OFP doesn't support damage changes due to range, but the idea behind the script is the script is to add this feature to the game. Thus as the round goes farther away from the firing point it's speed decreases and the damage is reduced. So depending on the round and the weapon will effect the starting point of the damage reduction and lose of armour peneration. Hopefully the ballistics effects will add a few extra features.
Quote
Well... I guess this would be possible, but I don't think it would be worth doing. You would basically need to config 30 different m16 magazines, for example; one with 30 rounds, one with 29, one with 28, etc. Then the script would basically go "ok, he's got a 15 round m16 mag giving a round into a 21 round g36 mag, so now I need to remove both mags and give him back a 14 round m16 mag and a 22 round g36 mag." Anyway, it would be a hassle to script and a hassle to config, and most likely a hassle to use for the player as well. And for what? How often do you really need to swap rounds between mags anyway?


It shouldn't be to hard to do as I'm sure there an ammo count in the engine of the game. As to why anyone might want to take ammo from one gun to be used in another here's one example;
A Sniper using a M21 finds he's down to he's last 5rounds and is to far from base(or an nearby ammo crate) to get more ammo, but he knows that a couple of he's squad members is using H&K G3's, and asks both for a mag. and he gets 2x 20rd mag's of 7.62mm NATO rounds, he then spends @90sec's unloading both mag's and @180sec's reloading 2x mag.s for he's M21. Now the squad has a Sniper with 45 shoots.

Quote
But on the other hand, you could also make a good weapon jamming script using those 30 different magazines I spoke of. So for that, it might actually be worth it.... but again, it would be a big hassle, IMO.

EDITLove the idea of having a SAW that can actually use m16 mags! Doing this can cause jamming (or worse, the weapon blowing up) though, since the rounds are different, which would be good to reflect in a weapon jamming script, if you use one.

But don't you mean a 200rd ammo box?

Jamming would be an idea for later on.

The SAW uses the same rounds as a M4 and M16 series of Assault rifiles; 5.56mm NATO.

The M16 used a 5.56mm (.223 cal.) cartridge in 20- or 30-round magazines.
5.56mm NATO standard SS 109 type (M855) ammunition which is also fired from the M249 Squad Automatic Weapon (SAW).

And yes it's a linked ammunition in a pre-loaded 200-round plastic magazines., not a 100, type-o! :P

And as a side note, the fireteam SAW soldier normally carries 600rds of ammo due to the weight and has a assault rifle as a backup weapon. And he is also has a support soldier who carries another couple of 200rd magazines along with his own assault rifle and ammo.

I know this as I used to be one of two plattoon two man fireteams, and I carried a SAW, loaded with one mag and two other mags, and has a Steyr AUG which I had 4 mags for. My support carries 3  200rd mags and his own Steyr AUG and ammo.

I hope this makes it easier for you to understand the scripts I'm after.

DragoFire

Cpt. Red Nain

  • Guest
Re:Request for help for weapon and ammo scripts for project
« Reply #7 on: 24 Oct 2004, 15:54:53 »
Drago's right: a m249 can use stanag magazines of 5,56x45mm NATO bullets!

One thing that could be interesting would be to be able to pick up mags of AK74 (5,45x45mm) and use them with the M16. There u could use jamming scripts.
I think..  ;D

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Request for help for weapon and ammo scripts for project
« Reply #8 on: 25 Oct 2004, 23:54:34 »
Quote
Yes OFP doesn't support damage changes due to range, but the idea behind the script is the script is to add this feature to the game. Thus as the round goes farther away from the firing point it's speed decreases and the damage is reduced. So depending on the round and the weapon will effect the starting point of the damage reduction and lose of armour peneration. Hopefully the ballistics effects will add a few extra features.
I've considered adding in something like this to the ECP, but haven't done it yet for a few reasons. First off, you can't change the damage a bullet does via scripting. Its speed has no effect on its damage. The only possible workaround I can see would be to delete the old bullet, and create a new, weaker bullet, every 100 meters of travel or something. It might work, but it seems crude and likely to act funny with lots of bullets flying around...

Making bullets slow down due to drag would be possible though, but there are still problems. First off, the AI wouldn't know how to compensate when they are aiming, so their shots would fall consistently short at long ranges. Secondly, such a script could cause massive drain on the CPU. You would need a constant loop for every bullet fired, that would reduce that bullet's velocity by a certain amount every loop cycle. Actually "catching" each bullet fired to start the loop would require a nearestobject call, which is an expensive function. Multiply that by however many bullets are in the air at any given time, and you could have serious lag.

Now, with that said, I haven't actually tried it, so I may be overestimating how much lag it would really cause. And there may be ways to config the AI so they compensate for the bullet drop. Or you could just make it run for the player's bullets, which would cut down greatly on the lag, and would eliminate the problem with the AI.

As a side note, a system could also be scripted to allow you to adjust your sights for elevation, so you don't have to use "kentucky windage" to get your shots on target.

Quote
It shouldn't be to hard to do as I'm sure there an ammo count in the engine of the game.
True, there is a way to see how many bullets are in the magazine the player currently has loaded (the "ammo" command). However, there is no way to SET how many bullets are in a given magazine. You can only add full magazines to a unit, or remove an entire magazine from the unit. There is also no way to see how many bullets are in other magazines a unit is carrying that are not loaded into the weapon; nor is there a way to "pick" which m16/whatever magazine you remove from that unit (you always get the one loaded in the weapon, I believe), as far as I know.


About the SAW... my SNCOIC, who is the batallion armorer for my Reserve unit, told me that the SAW and the M16 use different bullets. Both 5.56 of course, but with different amounts of powder. This came up because one of our other sites had a SAW blow up on the range, because they were using M16 mags. That is why, in the USMC at least, you are only authorized to do that in combat, NOT in training. It would make sense to me, at least, because the the SAW bolt is heavier than the m16's.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline DragoFire

  • Members
  • *
Re:Request for help for weapon and ammo scripts for project
« Reply #9 on: 26 Oct 2004, 02:25:54 »
The SAW ammo things really a side note at the moment. But do remember there are two 5.56mm NATO rounds available.

The standard 5.56mm NATO used by most weapons, and the 5.56mm NATO reduced load round. I'd say that if a reduced round was used in the SAW it could cause some major problems (eg.. first round not clearing barrel before the next being fired).

As for the Ammo damage, problem. Well!!!!  :P
The idea I've been playing with is the place the script call in the ammo damage itself and have the script call on the data it requires from the weaponconfig, modelconfig and target range.

I'm hoping to have  a play around with the idea soon, but remeber I'm no master scriptor.

DragoFire