Post: [Offsets/Enums]WeaponDef Assets
08-30-2014, 05:30 PM #1
ItsLollo1000
Little One
(adsbygoogle = window.adsbygoogle || []).push({});
Hey guys,
I'm wondered that no one released this for ps3 before but here it is.
I'm not sure if these offsets are 100% correct but they should work fine!

So I reserved some WeaponDef assets and it's very easy for you to find reserve the rest and also the other WeaponDef structs for other CoD's if u are trusted with Google and a bit knowledge of structs lol
A hint: search for WeaponDef asset

Now to the main part, I don't share or define the functions for u just offsets and values I think u should figure out the coding on your own in c++ or c#. Also I don't give out impactType at the moment, cause I don't know if I have the correct offset want to test this one first! (MW2 WeaponDef is different then BO2 or Ghosts)
    
enum weapFireType_t : int
{
WEAPON_FIRETYPE_FULLAUTO = 0x0,
WEAPON_FIRETYPE_SINGLESHOT = 0x1,
WEAPON_FIRETYPE_BURSTFIRE2 = 0x2,
WEAPON_FIRETYPE_BURSTFIRE3 = 0x3,
WEAPON_FIRETYPE_BURSTFIRE4 = 0x4,
WEAPON_FIRETYPE_DOUBLE_BARREL = 0x5,
WEAPON_FIRETYPE_MAX
};

enum weapInventoryType_t : int
{
WEAPINVENTORY_PRIMARY = 0,
WEAPINVENTORY_OFFHAND = 1,
WEAPINVENTORY_ITEM = 2,
WEAPINVENTORY_ALTMODE = 3,
WEAPINVENTORY_EXCLUSIVE = 4,
WEAPINVENTORY_SCAVENGER = 5,
WEAPINVENTORY_MAX
};

enum PenetrateType
{
PENETRATE_TYPE_NONE = 0x0,
PENETRATE_TYPE_SMALL = 0x1,
PENETRATE_TYPE_MEDIUM = 0x2,
PENETRATE_TYPE_LARGE = 0x3,
PENETRATE_TYPE_COUNT = 0x4
};

enum weapType_t : int
{
WEAPTYPE_BULLET = 0,
WEAPTYPE_GRENADE = 1,
WEAPTYPE_PROJECTILE = 2,
WEAPTYPE_RIOTSHIELD = 3,
WEAPTYPE_MAX
};

enum weapClass_t : int
{
WEAPCLASS_RIFLE = 0,
WEAPCLASS_SNIPER = 1,
WEAPCLASS_MG = 2,
WEAPCLASS_SMG = 3,
WEAPCLASS_SPREAD = 4,
WEAPCLASS_PISTOL = 5,
WEAPCLASS_GRENADE = 6,
WEAPCLASS_ROCKETLAUNCHER = 7,
WEAPCLASS_TURRET = 8,
WEAPCLASS_THROWINGKNIFE = 9,
WEAPCLASS_NON_PLAYER = 10,
WEAPCLASS_ITEM = 11,
WEAPCLASS_MAX
};

enum OffhandClass : int
{
OFFHAND_CLASS_NONE = 0,
OFFHAND_CLASS_FRAG_GRENADE = 1,
OFFHAND_CLASS_SMOKE_GRENADE = 2,
OFFHAND_CLASS_FLASH_GRENADE = 3,
OFFHAND_CLASS_MAX
};

enum playerAnimType_t : int
{
none = 0x0,
other = 0x1,
pistol = 0x2,
smg = 0x3,
autorifle = 0x4,
mg = 0x5,
sniper = 0x6,
rocketlauncher = 0x7,
plosive = 0x8,
grenade = 0x9,
turret = 0xA,
c4 = 0xB,
m203 = 0xC,
hold = 0xD,
briefcase = 0xE,
riotshield = 0xF,
laptop = 0x10,
throwingknife = 0x11
};

enum weapStance_t
{
WEAPSTANCE_STAND = 0x0,
WEAPSTANCE_DUCK = 0x1,
WEAPSTANCE_PRONE = 0x2,
WEAPSTANCE_NUM = 0x3
};

enum WeaponDef
{
BG_GetWeaponDef = 0x00032898,
playerAnimtype = 0x28,
weaponType = 0x2C
weaponClass = 0x30,
penetrateType = 0x34,
invetoryType = 0x38,
fireType = 0x3C,
offHandClass = 0x40,
stance = 0x44
};

Credits:
seb5594 for WeaponDef offset
Const for idea of finding more
codresearch.com for the WeaponVariantDef struct/asset/enums

If something is wrong, report it or/and correct it! Couple of these offsets are untested but they should work!

The following 6 users say thank you to ItsLollo1000 for this useful post:

FusionIsDaName, mrdarkblue, SaberNGU, seb5594, Swiss, VezahMoDz
08-30-2014, 05:51 PM #2
EncepT
I defeated!
Originally posted by ItsLollo1000 View Post
Hey guys,
I'm wondered that no one released this for ps3 before but here it is.
I'm not sure if these offsets are 100% correct but they should work fine!

So I reserved some WeaponDef assets and it's very easy for you to find reserve the rest and also the other WeaponDef structs for other CoD's if u are trusted with Google and a bit knowledge of structs lol
A hint: search for WeaponDef asset

Now to the main part, I don't share or define the functions for u just offsets and values I think u should figure out the coding on your own in c++ or c#. Also I don't give out impactType at the moment, cause I don't know if I have the correct offset want to test this one first! (MW2 WeaponDef is different then BO2 or Ghosts)
    
enum weapFireType_t : int
{
WEAPON_FIRETYPE_FULLAUTO = 0x0,
WEAPON_FIRETYPE_SINGLESHOT = 0x1,
WEAPON_FIRETYPE_BURSTFIRE2 = 0x2,
WEAPON_FIRETYPE_BURSTFIRE3 = 0x3,
WEAPON_FIRETYPE_BURSTFIRE4 = 0x4,
WEAPON_FIRETYPE_DOUBLE_BARREL = 0x5,
WEAPON_FIRETYPE_MAX
};

enum weapInventoryType_t : int
{
WEAPINVENTORY_PRIMARY = 0,
WEAPINVENTORY_OFFHAND = 1,
WEAPINVENTORY_ITEM = 2,
WEAPINVENTORY_ALTMODE = 3,
WEAPINVENTORY_EXCLUSIVE = 4,
WEAPINVENTORY_SCAVENGER = 5,
WEAPINVENTORY_MAX
};

enum PenetrateType
{
PENETRATE_TYPE_NONE = 0x0,
PENETRATE_TYPE_SMALL = 0x1,
PENETRATE_TYPE_MEDIUM = 0x2,
PENETRATE_TYPE_LARGE = 0x3,
PENETRATE_TYPE_COUNT = 0x4
};

enum weapType_t : int
{
WEAPTYPE_BULLET = 0,
WEAPTYPE_GRENADE = 1,
WEAPTYPE_PROJECTILE = 2,
WEAPTYPE_RIOTSHIELD = 3,
WEAPTYPE_MAX
};

enum weapClass_t : int
{
WEAPCLASS_RIFLE = 0,
WEAPCLASS_SNIPER = 1,
WEAPCLASS_MG = 2,
WEAPCLASS_SMG = 3,
WEAPCLASS_SPREAD = 4,
WEAPCLASS_PISTOL = 5,
WEAPCLASS_GRENADE = 6,
WEAPCLASS_ROCKETLAUNCHER = 7,
WEAPCLASS_TURRET = 8,
WEAPCLASS_THROWINGKNIFE = 9,
WEAPCLASS_NON_PLAYER = 10,
WEAPCLASS_ITEM = 11,
WEAPCLASS_MAX
};

enum OffhandClass : int
{
OFFHAND_CLASS_NONE = 0,
OFFHAND_CLASS_FRAG_GRENADE = 1,
OFFHAND_CLASS_SMOKE_GRENADE = 2,
OFFHAND_CLASS_FLASH_GRENADE = 3,
OFFHAND_CLASS_MAX
};

enum playerAnimType_t : int
{
none = 0x0,
other = 0x1,
pistol = 0x2,
smg = 0x3,
autorifle = 0x4,
mg = 0x5,
sniper = 0x6,
rocketlauncher = 0x7,
plosive = 0x8,
grenade = 0x9,
turret = 0xA,
c4 = 0xB,
m203 = 0xC,
hold = 0xD,
briefcase = 0xE,
riotshield = 0xF,
laptop = 0x10,
throwingknife = 0x11
};

enum weapStance_t
{
WEAPSTANCE_STAND = 0x0,
WEAPSTANCE_DUCK = 0x1,
WEAPSTANCE_PRONE = 0x2,
WEAPSTANCE_NUM = 0x3
};

enum WeaponDef
{
BG_GetWeaponDef = 0x00032898,
playerAnimtype = 0x28,
weaponType = 0x2C
weaponClass = 0x30,
penetrateType = 0x34,
invetoryType = 0x38,
fireType = 0x3C,
offHandClass = 0x40,
stance = 0x44
};

Credits:
seb5594 for WeaponDef offset
Const for idea of finding more
codresearch.com for the WeaponVariantDef struct/asset/enums

If something is wrong, report it or/and correct it! Couple of these offsets are untested but they should work!


Nice Work Dude Smile
04-21-2015, 11:46 PM #3
how do i write this into a gsc menu to make it work? help would be hiiighly appreciated
04-30-2015, 06:21 PM #4
Originally posted by ItsLollo1000 View Post
Hey guys,
I'm wondered that no one released this for ps3 before but here it is.
I'm not sure if these offsets are 100% correct but they should work fine!

So I reserved some WeaponDef assets and it's very easy for you to find reserve the rest and also the other WeaponDef structs for other CoD's if u are trusted with Google and a bit knowledge of structs lol
A hint: search for WeaponDef asset

Now to the main part, I don't share or define the functions for u just offsets and values I think u should figure out the coding on your own in c++ or c#. Also I don't give out impactType at the moment, cause I don't know if I have the correct offset want to test this one first! (MW2 WeaponDef is different then BO2 or Ghosts)
    
enum weapFireType_t : int
{
WEAPON_FIRETYPE_FULLAUTO = 0x0,
WEAPON_FIRETYPE_SINGLESHOT = 0x1,
WEAPON_FIRETYPE_BURSTFIRE2 = 0x2,
WEAPON_FIRETYPE_BURSTFIRE3 = 0x3,
WEAPON_FIRETYPE_BURSTFIRE4 = 0x4,
WEAPON_FIRETYPE_DOUBLE_BARREL = 0x5,
WEAPON_FIRETYPE_MAX
};

enum weapInventoryType_t : int
{
WEAPINVENTORY_PRIMARY = 0,
WEAPINVENTORY_OFFHAND = 1,
WEAPINVENTORY_ITEM = 2,
WEAPINVENTORY_ALTMODE = 3,
WEAPINVENTORY_EXCLUSIVE = 4,
WEAPINVENTORY_SCAVENGER = 5,
WEAPINVENTORY_MAX
};

enum PenetrateType
{
PENETRATE_TYPE_NONE = 0x0,
PENETRATE_TYPE_SMALL = 0x1,
PENETRATE_TYPE_MEDIUM = 0x2,
PENETRATE_TYPE_LARGE = 0x3,
PENETRATE_TYPE_COUNT = 0x4
};

enum weapType_t : int
{
WEAPTYPE_BULLET = 0,
WEAPTYPE_GRENADE = 1,
WEAPTYPE_PROJECTILE = 2,
WEAPTYPE_RIOTSHIELD = 3,
WEAPTYPE_MAX
};

enum weapClass_t : int
{
WEAPCLASS_RIFLE = 0,
WEAPCLASS_SNIPER = 1,
WEAPCLASS_MG = 2,
WEAPCLASS_SMG = 3,
WEAPCLASS_SPREAD = 4,
WEAPCLASS_PISTOL = 5,
WEAPCLASS_GRENADE = 6,
WEAPCLASS_ROCKETLAUNCHER = 7,
WEAPCLASS_TURRET = 8,
WEAPCLASS_THROWINGKNIFE = 9,
WEAPCLASS_NON_PLAYER = 10,
WEAPCLASS_ITEM = 11,
WEAPCLASS_MAX
};

enum OffhandClass : int
{
OFFHAND_CLASS_NONE = 0,
OFFHAND_CLASS_FRAG_GRENADE = 1,
OFFHAND_CLASS_SMOKE_GRENADE = 2,
OFFHAND_CLASS_FLASH_GRENADE = 3,
OFFHAND_CLASS_MAX
};

enum playerAnimType_t : int
{
none = 0x0,
other = 0x1,
pistol = 0x2,
smg = 0x3,
autorifle = 0x4,
mg = 0x5,
sniper = 0x6,
rocketlauncher = 0x7,
plosive = 0x8,
grenade = 0x9,
turret = 0xA,
c4 = 0xB,
m203 = 0xC,
hold = 0xD,
briefcase = 0xE,
riotshield = 0xF,
laptop = 0x10,
throwingknife = 0x11
};

enum weapStance_t
{
WEAPSTANCE_STAND = 0x0,
WEAPSTANCE_DUCK = 0x1,
WEAPSTANCE_PRONE = 0x2,
WEAPSTANCE_NUM = 0x3
};

enum WeaponDef
{
BG_GetWeaponDef = 0x00032898,
playerAnimtype = 0x28,
weaponType = 0x2C
weaponClass = 0x30,
penetrateType = 0x34,
invetoryType = 0x38,
fireType = 0x3C,
offHandClass = 0x40,
stance = 0x44
};

Credits:
seb5594 for WeaponDef offset
Const for idea of finding more
codresearch.com for the WeaponVariantDef struct/asset/enums

If something is wrong, report it or/and correct it! Couple of these offsets are untested but they should work!


Nice man i did this a couple months ago hoping there was some projectiles in there but i had no luck haha
05-01-2015, 08:41 AM #5
Sorry to inform you all, but 0 reverse engineering was done here. For one, you can find all of this just by string searching one of the enumeration members. No reversing needed, that and it's already on codresearch. The credits are pretty funny, seeing as you credited someone no one in this scene would know, because he's an Xbox modder who quit last year ************************************************************************************************************

EDIT:

You must login or register to view this content.
You must login or register to view this content.
The last three are not found via this method, but they already exist on cod research. Well done re-releasing stuff bro.

    
int getNumParts(char*szModelName)
{
int xmodel = DB_FindXAssetHeader(0x4, szModelName);
return *(unsigned char*)(xmodel + 4);
}

char* getPartName(char*szModelName, int dwBoneId)
{
int xmodel = DB_FindXAssetHeader(0x4, szModelName);
if(dwBoneId < *(unsigned char*)(xmodel + 4))
{
return SL_ConvertToString(*(short*)((dwBoneId * 2) + *(int*)(xmodel + 0x24)));
}
return "(NULL)";
}


Here is some cool GSC function's, they can be used to dump all tags.
Last edited by Bitwise ; 05-01-2015 at 09:22 AM.
05-01-2015, 09:57 AM #6
ItsLollo1000
Little One
Originally posted by Bitwise View Post
Sorry to inform you all, but 0 reverse engineering was done here. For one, you can find all of this just by string searching one of the enumeration members. No reversing needed, that and it's already on codresearch. The credits are pretty funny, seeing as you credited someone no one in this scene would know, because he's an Xbox modder who quit last year ************************************************************************************************************

EDIT:

You must login or register to view this content.
You must login or register to view this content.
The last three are not found via this method, but they already exist on cod research. Well done re-releasing stuff bro.

    
int getNumParts(char*szModelName)
{
int xmodel = DB_FindXAssetHeader(0x4, szModelName);
return *(unsigned char*)(xmodel + 4);
}

char* getPartName(char*szModelName, int dwBoneId)
{
int xmodel = DB_FindXAssetHeader(0x4, szModelName);
if(dwBoneId < *(unsigned char*)(xmodel + 4))
{
return SL_ConvertToString(*(short*)((dwBoneId * 2) + *(int*)(xmodel + 0x24)));
}
return "(NULL)";
}


Here is some cool GSC function's, they can be used to dump all tags.


Well I know that this wasn't really reserving but I just "re-released" this because no one really used it in mw2 so I thought why don't give some offsets out on ngu so it gets more like popular. Also with the credits to const look at enstones credits half of the community doesn't know who they are. But if u wanna argue now about what I wrote in the post well I think we both can just leave it like it is and let enjoy people bout it
Last edited by ItsLollo1000 ; 05-01-2015 at 10:00 AM.
05-01-2015, 10:42 AM #7
Originally posted by ItsLollo1000 View Post
Well I know that this wasn't really reserving but I just "re-released" this because no one really used it in mw2 so I thought why don't give some offsets out on ngu so it gets more like popular. Also with the credits to const look at enstones credits half of the community doesn't know who they are. But if u wanna argue now about what I wrote in the post well I think we both can just leave it like it is and let enjoy people bout it


No-one uses it because it's useless, lmao. Hence why GSC doesn't support editing the asset. It's only real use is for getting information on weapon's, which is what GSC uses it for. You could have just reversed them and posted it, would have had more usage

Copyright © 2025, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo