project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 Community Modding
27 May 2018, 00:00:00 (PRT)
Register Forum RulesDeveloper Blogs Project Reality Members List Search Today's Posts Mark Forums Read
PR:BF2 Community Modding Making or wanting help making your own asset? Check in here

Reply
 
Thread Tools Display Modes
Old 03-09-2008, 02:51 PM   #1
Jonny
Default [Coding] Balistics/zeroing [WIP]

also read these:

http://www.realitymod.com/forum/f10-...etre-size.html

http://www.realitymod.com/forum/f18-...ng-rifles.html

http://www.realitymod.com/forum/f18-...ope-lines.html

Quote:
Originally Posted by myself
The ballistics in PR are currently non-existant.

In the guide I see claims of rifles being zeroed, but in the files I see values for gravity modifiers set WAY too low. Some of the values are 0.3 and 0.1, there is no way in hell you can EVER claim this is realistic because the lowest values acceptable are about 0.67, which would give a value close to gravity on earth. If you then try to approximate drag this value should be higher to compensate, not lower.

So the current 'ballistics' are basically taking the piss. I have re-done them from scratch, including drag in my model.

The equations for the velocities and displacements of the bullets can actually be found on wikipedia. I have used the same equations, and actual values of bullet masses, diameters and the loss of velocity at 300m of a certain kind of bullet to get all of them to act more realistically.

This means, that with my model:

heavier bulets travel further than lighter bullets
drag exists
wider bullets feel more drag than thinner bullets
all bullets follow realistic and believable ballistic tragectories
all rifles can be zeroed to any distance they can be fired to
sniper rifles can be zeroed to several different ranges

To zero a rifle the user must be made to aim the barrel slightly above the target, to let the bullet rise and then fall onto it at the range it is zeroed to. To accomplish this the sights must be moved down by a few tenths/hundredths of a degree so that when they are lined up on a target the rifle will be zeroed correctly. This angle is very small, it only causes a rise of 10-20 cm at the highest point, but you will be able to say that the rifles are actually zeroed and that the ballistics are realistic. I was also told by a friend who was in (I think) the army cadets that they are told to aim for the neck, not the head. I think this shows why that is.


The current model used is a parabolic tragectory (red line), which follows a totally different path to a ballistic tragectory (blue line):
This particular graph shows the L85 projectile with and without drag fired at the same angle with the same mass and the same velocity. With drag it reaches 600m, without it reaches over 1000.
graph

DEVS:
To add this model to the mod you must set ALL gravity modifiers to 0.666 (9.81/14.73), ALL weapons MUST have a drag modifer of 1 in the same section as the tracers, Masses must be set to the values listed in the tables page of the spreadsheet I have PMed to dbzao, and the velocities must be set to the values shown on the table (which I believe are the correct values, they can be changed without affecting the mass except the L85, which is used to calibrate everything else).

The new masses given are almost all less than 1 kg, which is the default mass for projectiles I think, so will only help stop bodies flying around.

I still need some data for UGLs and all tank rounds used in the game.

The tables also contain data for recoil and damage (kinetic and explosive) which dbzao has already asked for.
Quote:
Originally Posted by myself
ObjectTemplate.drag is a value that affects drag according to the equations:
x = mvcosθ/k(1 - e^(-kt/m))
y = mvsinθ/k(1 - e^(-kt/m)) - gm^2k^-2(e^(-kt/m) + kt/m -1)

where:
k ~ 0.064
m = objects mass (kg)
v = initial velocity (m/s)
g = acceleration due to gravity (m/s/s)
e ~ 2.718281828
θ = angle above horizontal the thing was fired at
t = time since fired (s)

Split into horizontal/vertical vectors and particle has no acceleration (its not a rocket or powered vehicle). Is not applicable to anything on the ground.
Post away!
Jonny is offline Reply With Quote
Old 03-09-2008, 03:02 PM   #2
Jonny
Default

Weapons reqd.

Priority:
High
Mid
Low
Done

US:
M40 (400)
M14 (400)
M16 (200 - 300)
M4 (100 - 300)
M249 (200)
M9 (25)
P226N (25)

GB:
L86 DMR (400)
L115A1 (500)
L85A2 (200 - 300)
Minimi (200)
L119A1 (100)
P226N (25)
L9 (25)

PLA:
QBU88 (400)
SV98 (500)
QBZ95 (200 - 300)
QBB95 (200)
QBZ95B (100)
QSZ92 (25)

MEC:
Dragunov SVD (400)
SSG69 (500)
G3A3 (200 - 300)
AK101 (200)
HK21E (200)
HK53A3 (100)
MP5 (100)
MR444 (25)

Militia:
Dragunov SVD (400)
Mosin Nagant (400)
SKS (200)
AK47 (200)
AK101 (200)
PKM (300)
Bizon (100)
PPsH41 (100)
Skorpion (25)

INS:
Dragunov SVD (400)
Mosin Nagant (400)
SKS (200)
AK47 (200)
PKM (200)

RUS:
Dragunov SVD (400)
SV98 (500)
PKM (200)
AK74M (300)
AKS74 (300)
MR443 (25)

NL:
HK 417 (400)
AWM (500)
C7A2 (200 - 300)
Minimi (200)
P90 (50)
Glock 17 (25)

AUS:
Minimi (300)
SR-98 (500)
F88S-A1 (300 - 400)
F88 (200)
M4A1 (100)
Browning HP/L9 (25)
H&K USP (25)

CAN:
C3A1 (500)
C8CT (400)
C7A2 (200 - 300)
C9 (200)
C8 SFW (100)
L9 (25)
P226N (25)

GER:
Please dont use slot #2 for a main weapon. Thats a really bad idea.
L115A1 (500)
G3SG1 (400)
G36K (100)
G36 (200 - 300)
MG3(200)
MG4 (200)
G36C (100)
MP7 (100)
P226N (25)

POL:
Dragunov SWD (400)
TRG 22 (500)
PK (200)
Wist-94 (25)
wz.96/04 Beryl (300?)
wz.96/05 Beryl (200?)
wz.96/06 Beryl (100?)

IDF:
SR99 Galil (400)
M24 (500)
CTAR (300?)
TAR (200?)
Micro Galil (100)
Negev (300)
M16A1 (50)

MISC:
Jonny is offline
Last edited by Jonny; 05-12-2008 at 12:16 PM..
Reply With Quote
Old 03-09-2008, 03:08 PM   #3
Mosquill
Retired PR Developer
Supporting Member

Mosquill's Avatar
Default

So.. Jonny.. have you tried replacing dragunov's .baf files with the one's from svd-zeroed-v2-300m.rar before checking if it's zeroed at 300m? ha-ha-ha, sry, but this is so funny.
Mosquill is offline Reply With Quote
Old 03-09-2008, 03:24 PM   #4
Mosquill
Retired PR Developer
Supporting Member

Mosquill's Avatar
Default

Ok, it's not funny anymore. All those guns... You even want me to zero the m9().
Mosquill is offline Reply With Quote
Old 03-09-2008, 03:26 PM   #5
Jonny
Default

at some point...

in the far future...

a large number are duplicates anyway, there are only 8 sniper/mksmn rifles.
Jonny is offline Reply With Quote
Old 03-09-2008, 03:33 PM   #6
Mosquill
Retired PR Developer
Supporting Member

Mosquill's Avatar
Default

I didn't know there is a Netherlands forces mod.

Anyway, maybe you should write at what distance those guns should be zeroed at right next to them?
Mosquill is offline Reply With Quote
Old 03-09-2008, 03:44 PM   #7
Jonny
Default

300m one works now, mast have copied it onto the earlier one.

netherlands = dutch.
Jonny is offline Reply With Quote
Old 03-09-2008, 03:54 PM   #8
Mosquill
Retired PR Developer
Supporting Member

Mosquill's Avatar
Default

Quote:
Originally Posted by Jonny View Post
300m one works now, mast have copied it onto the earlier one.

netherlands = dutch.
Oh yeah, right, I knew that, English is not my native laguage you know...

1 more LOL on the 'copied into wrong place' subject . That was the last one.
Mosquill is offline Reply With Quote
Old 03-09-2008, 03:56 PM   #9
ZZEZ
Retired PR Developer

ZZEZ's Avatar
Default

Umm..what do you want posted from the IDF community mod?
ZZEZ is offline Reply With Quote
Old 03-09-2008, 03:57 PM   #10
Jonny
Default

I assume its my turn for an immature comment now.

Your mum!

anyway, I'm gonna look through the other comunity mods to find some more rifles for you. Most probably wont need doing until 0.8 or later though.

EDIT:

Post your factions rifles, please, zzez!
Jonny is offline Reply With Quote
Reply


Tags
balistics or zeroing, boombastic ballistics, coding, confusing df, confusion pandomoneum, jonny going mad, rico being confusing, wip
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 05:49 PM.


Powered by: vBulletin. ©vBulletin Solutions, Inc.
All Content Copyright ©2004 - 2018, Project Reality