Weapon
Updated for version 3.38. Thanks Pawcio for pretty much all of this info. This info here is mostly based of his template.
This page is missing some information.
You should read this to understand some things about the XML files in BeardLib.
Module Definition
The module is inherited from ItemModuleBase. So base parameters can be found there.
This modules let's you add weapons.
Module name
The name of the module you use as the meta of the module definition is 'WeaponMod' or 'WeaponModModule' if _force_search
is set to true in the module definition.
XML Structure
Many values are optional if their based on weapon already defines them and you don't wish to change them.
<weapon id ...>
<weapon id ...>
And any other value from WeaponTweakData. There are more that are not listed here yet
<factory id ...>
<factory id ...>
Holds more data for the weapon.
*These are all of the values for factory
<stance/>
<stance/>
Data for the "stance" of the weapon or basically where the guns is on the screen or how much rotated it is. There's one for standing (standard), aiming (steelsight), crouching(crouched), and bipod. The module will inherit the stance of the based on weapon regardless. Example of modifying the stance:
You can get the values for position (vector3) and rotation (Rotation) using a mod called PVM Using that mod you can pretty much change the stance to your liking.
The icon
The icon will be stored in guis/dlcs/mods/textures/pd2/blackmarket/icons/weapons and will be named id
.texture then add it using AddFiles.
Template
Since this template is more complex and requires other modules (other than the usual AddFiles, Localization) You pretty much should depend on the template. Download template here
Last updated