PDA

View Full Version : PData Riddles


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?

Zor
12-17-2007, 10:52 AM
Well I posted the following in the Wiki when I found it in the new Amxmodx.

Zor
12-17-2007, 11:04 AM
Also, I would guess that the Offset 105 Patterns is for the motion of the weapon if you were moving, or maybe the recoil amount to kick it up, also that might be the heat level for the MG42. The Offset 117 Patterns look like the weapons numbers but its kinda screwy that the thing would have 0 for the webley the amerknife and the 2 types of grenades. As for the last one, duno...well I am going to my parents place in the next few days. I will be working on 2 things while there, the dod exposure module and any bugs in the dodx module as well as any new ideas that people want in that. However I may rebuild the whole thing once I get the dod exposure done up, that is exposing the dod dll like we do with the hl dll. Sokay, talk at ya all soon.

Cheers!

Wilson [29th ID]
12-17-2007, 12:13 PM
Zor, those offsets don't match up to my research it seems. Where did you find those? I know my research is correct because I've tested it, but perhaps your findings cover something else just as important.

Your 2nd post I appreciate but must say I've already considered - it's not those possibilities.

Zor
12-17-2007, 12:26 PM
I found that information as part of the Ham Sandwich Module Config.

http://wiki.amxmodx.org/HamSandwich_General_Usage_%28AMX_Mod_X%29

That data might just be for that module...

Cheers!

Wilson [29th ID]
12-17-2007, 12:32 PM
Oh...those are the numbers used for hamsandwich module. Not pdata..
EDIT: Hah, I posted this then saw your reply :P

Wilson [29th ID]
12-17-2007, 05:41 PM
Some more findings. These ones are for player entities.

53
-K43 8
-Garand 14
-MP40 16
-K98 16
-British rifleman, 12

49 - bpAmmo (Bazooka, Piat, Pschreck)
53 - bpAmmo (Webley, Colt, Luger)
54 - bpAmmo (Enfield, K98, ScopedK98)
55 - bpAmmo (Spring)
56 - bpAmmo (Sten, Thompson, MP40)
57 - bpAmmo (Bren, BAR, STG44, FG42)
58 - bpAmmo (Carbine, K43, MG34)
59 - bpAmmo (HEGren)
61 - bpAmmo (Stick Grenade)
Where is MG42?? 30cal?


88 - Alive (Boolean)
289 - Alive (Boolean)

151,152
-Normally both 3
-If firing standing still, both 28
-If firing while running, 151=28, 152=3
-Getting up from proning, both 77
-Spectating, 86

---from dod deathnades---
#define HAND_OFFSET 289
#define STICK_OFFSET 291

229 - deploy -- recoil?!
-standing: 600
-proned: 50
-deployed: 1
-proned & deployed: 1
-scoped: 42
-proned & scoped: 30
-shouldered zook: 50

376 - model string (us-inf)

// DoD Player - From dodfun module
#define STEAM_PDOFFSET_WDEPLOY 229 + LINUXOFFSET // weapon deploy

#define STEAM_PDOFFSET_TEAMNAME 1396 + (LINUXOFFSET * sizeof(char)) //

team name 349 char[16]
#define STEAM_PDOFFSET_CLASS 366 + LINUXOFFSET // player class
#define STEAM_PDOFFSET_RCLASS 367 + LINUXOFFSET // random class

#define STEAM_PDOFFSET_SCORE 475 + LINUXOFFSET // score
#define STEAM_PDOFFSET_DEATHS 476 + LINUXOFFSET // deaths