Weapon Structure Definition - zeroKilo/GROBackendWV GitHub Wiki

Weapon Structure Definition

  • For the 3 classes up to 3 weapons are defined over the packet GetAllDefaultLoadoutKits in InventoryService
  • Weapons in game are defined over the packet GetTemplateWeaponMaps in WeaponService

Template Weapon Maps

  • in the packet for the weapon definitions are 4 std::maps with mapkeys
  1. TemplateWeaponList containing information about the weapon itself (TWL)
  2. WeaponCompatibilityBridge containing list of DWORD ids (WCB)
  3. TemplateComponentLists containing list of map keys (TCL)
  4. Components containing information about components of a weapon

BoneStructure Parameter

Is a bitfield. For now, all bone structure parameters are set to 255 except the ForeGripAndBarrel where it's set to 8. By default all the components' parent is weapon's Body Component, except for:

  1. Barrel - parent: ForeGrip
  2. BarrelAttach - parent: ForeGrip
  3. Flashlight - parent: ForeGrip
  4. Laser Pointer - parent: ForeGrip
  5. Stock Attach - parent: Stock
  6. FG Bottom Attach - parent: ForeGrip

Weapon Body

  1. TCL should contain 1 item with key of weapon and as value the key of 1 component
  2. this component should have type = 0
  3. from this components the key member is used to load the GAO

Stock

  1. TCL should contain 1 item with key of weapon and as value the key of 1 component
  2. this component should have type = 4
  3. from this components the key member is used to load the GAO

ForeGrip and Barrel

  1. TCL should contain 1 item with key of weapon and as value the key of 1 component
  2. this component should have type = 20 to refer to the GripAndBarrel Component
  3. from the components the modefierlistid is used to select a modefierlist
  4. 2 skill modefiers should exist there with modtype 2 and proptype 105 (WCPT_Package_RDVForeGripID_I) & 106 (WCPT_Package_RDVBarrelID_I)
  5. their methodvalue selects components again by mapkey
  6. these components should have type 5 (WCMT_ForeGrip) & 6 (WCMT_Barrel)
  7. from these components the key member is used to load the GAOs
  8. parent component for barrel: ForeGrip Component

Scope

  1. TCL should contain 1 item with key of weapon and as value the key of 1 component
  2. this component should have type = 8
  3. from this components the key member is used to load the GAO

Clip / Magazine

  1. TCL should contain 1 item with key of weapon and as value the key of 1 component
  2. this component should have type = 9
  3. from this components the key member is used to load the GAO

Grenade Launcher

  1. TCL should contain 1 item with key of weapon and as value the key of 1 component
  2. this component should have type = 10
  3. from this components the key member is used to load the GAO

Laser Pointer

  1. TCL should contain 1 item with key of weapon and as value the key of 1 component
  2. this component should have type = 12
  3. from this components the key member is used to load the GAO
  4. parent component: Fore Grip Component

Possible Asset Keys

Body Component (type = 0)

  • 0xAD102A65 (2903517797) - GRO-W-Ar-AsVal-Body.gao

Stock Component (type = 4)

  • 0xAD102B48 (2903518024) - GRO-W-Ar-AsVal-Stock-Folding-01.gao

Fore Grip Component (type = 5)

  • 0xAD102B0A‬ (2903517962) - GRO-W-Ar-AsVal-ForeGrip-02.gao

Barrel Component (type = 6)

  • 0xAD102A54 (2903517780) - GRO-W-Ar-AsVal-Barrel-Medium.gao

Scope (type = 8)

  • 0xF7700653 (4151314003) - GRO-W-Scope-Acog-02.gao

Clip / Magazine (type = 9)

  • 0xAD102AA2 (2903517858) - GRO-W-Ar-AsVal-Clip-Basic.gao

Grenade Launcher (type = 10)

  • 0x01800368 (25166696) - GRO-W-GrenadeLauncher.gao

Laser pointer (type = 12)

  • 0x0180031A (25166618) - GRO-W-LaserPointer.gao

GripAndBarrel Component (type = 20)

  • 0xAD102B0A‬ (2903517962) - GRO-W-Ar-AsVal-ForeGrip-02.gao