Wilson [29th ID]
12-17-2007, 07:10 AM
All right, I went and figured out everything I could about the pdata offsets of weapons. Some weapons have a lot more than others, but generally none go above 150.
I based this on the garand, which only has a few, relative to something like the mg42 which is more complex. Below is what I found, but there are a few offsets that are clearly meaningful that I cannot figure out.
In addition to these offsets, there are a bunch of longs that I cannot figure out. I've tried to see what bytes they are made of but it just doesn't add up.
See if you can figure out the pattern. If you'd like to see it for yourself or try it with different weapons, use FM Research - it's very quick and easy to test this stuff with it (available in developer's plugins forum).
Weapon Offsets
91 - Weapon ID
93 - Spawn Origin X
94 - Spawn Origin Y
95 - Spawn Origin Z
100 - Unknown (Possibly the Owner)
103 - Attack 1 Delay
104 - Attack 2 Delay
105 - Unknown (Revolving float - see below)
106 - Ammo 1 Type
107 - Ammo 2 Type
108 - Clip Ammo
109 - Unknown (Always Matches Offset 108)
110 - Active Weapon (Boolean)
116 - MG Overheat Percentage
117 - Unknown (Some sort of ID - see below)
118 - Unknown (Only certain weapons set this - see below)
Offset 105 Patterns
-Garand regularly loops from roughly 6.0 down to 0.0 and back up again
-MG42 goes up to roughly 13.5 after firing and goes down to -0.001 and stays until firing)
-Other weapons tested act like Garand
Offset 117 Patterns
knife - 0
luger - 0
webley - 0
handgren - 0 (handgren_ex also)
stickgren - 0 (stickgren_ex also)
thompson - 1
m1carbine - 2 (folding carbine also)
garand - 3
scopedkar - 4
spring - 6
colt - 7
kar - 9
stg44 - 10
mp40 - 11
mg42 - 12
mg34 - 14
30cal - 15
bar - 16
greasegun - 17
fg42 - 18 (scoped fg42 also)
k43 - 19
sten - 22
bren - 23
bazooka - 25
pschreck - 26
piat - 27
enfield - 1376276 (scoped endfield also)
Offset 118 Patterns
webley - 24
gren_ex - -1.0 (same as stick_ex)
mg42 - 13
All other weapons - 0
Any insight on the patterns? Recognise anything?
I based this on the garand, which only has a few, relative to something like the mg42 which is more complex. Below is what I found, but there are a few offsets that are clearly meaningful that I cannot figure out.
In addition to these offsets, there are a bunch of longs that I cannot figure out. I've tried to see what bytes they are made of but it just doesn't add up.
See if you can figure out the pattern. If you'd like to see it for yourself or try it with different weapons, use FM Research - it's very quick and easy to test this stuff with it (available in developer's plugins forum).
Weapon Offsets
91 - Weapon ID
93 - Spawn Origin X
94 - Spawn Origin Y
95 - Spawn Origin Z
100 - Unknown (Possibly the Owner)
103 - Attack 1 Delay
104 - Attack 2 Delay
105 - Unknown (Revolving float - see below)
106 - Ammo 1 Type
107 - Ammo 2 Type
108 - Clip Ammo
109 - Unknown (Always Matches Offset 108)
110 - Active Weapon (Boolean)
116 - MG Overheat Percentage
117 - Unknown (Some sort of ID - see below)
118 - Unknown (Only certain weapons set this - see below)
Offset 105 Patterns
-Garand regularly loops from roughly 6.0 down to 0.0 and back up again
-MG42 goes up to roughly 13.5 after firing and goes down to -0.001 and stays until firing)
-Other weapons tested act like Garand
Offset 117 Patterns
knife - 0
luger - 0
webley - 0
handgren - 0 (handgren_ex also)
stickgren - 0 (stickgren_ex also)
thompson - 1
m1carbine - 2 (folding carbine also)
garand - 3
scopedkar - 4
spring - 6
colt - 7
kar - 9
stg44 - 10
mp40 - 11
mg42 - 12
mg34 - 14
30cal - 15
bar - 16
greasegun - 17
fg42 - 18 (scoped fg42 also)
k43 - 19
sten - 22
bren - 23
bazooka - 25
pschreck - 26
piat - 27
enfield - 1376276 (scoped endfield also)
Offset 118 Patterns
webley - 24
gren_ex - -1.0 (same as stick_ex)
mg42 - 13
All other weapons - 0
Any insight on the patterns? Recognise anything?