Adding a New Weapon to Disrupt (WD1)
Source: Discord modding community (DΣΛD_F0X / Silver)
Basic Weapon Adding
- Duplicate a vanilla weapon model in another folder, save the path to it
- weapons.lib — create a new weapon stats entry: unique name + hidkey, add to
weapons.lib.xml, repack - items.lib — create a new weapon item entry: unique name, hidname, hidkey. Point
weaponWeaponParamto yourweapons.libentry. Edit loc string IDs if you have the loc tool. Can adjust price, icon, etc. - items.lib — generate a new archetype ID (UUID v4), hash it through the bot, compare with vanilla hashed archetype IDs to find the correct hash format
- entitylibrary_rt — add a new weapon archetype by copying an existing entry. Set UID to your hashed archetype ID. Change
disEntityIdto a unique one (start from 9999 — that's the archetype limit) - entitylibrary_rt — change all
fileModelhashes to a hash of your weapon model.xbg(together with path). Compare with vanilla entries to find the correct hash format - entitylibrary_rt — change
weaponWeaponPlayerto the ID of yourweapons.libentry - windy_city.depload — find a vanilla archetype you based your entitylibrary on, duplicate it, set the archetype ID to your generated one, change the
.xbgit references to your own. In the future you'll have to do this with materials etc. as well
Living City (LC) Additions
After the basic steps above:
- Adjust your weapon item entry like the LC ones (mostly
maxNbToAdd = 2) - Make a corresponding
custom_Weapon...item with ID =itemsBaseItem + 1for Armory - Add its
hidKeyto the armoriesshopsettings(that's how armories weapons cost $1 and still gives the original weapon item) - Make a
custom_Weapons...accessID for it (hidden from armories until you buy the base item in gunshops) - Make a corresponding
wluso you actually drop the weapon upon swapping (optional — otherwise you just won't drop anything)
Follow the pattern of the Globals_Custom._Weapon_Archetypes table.
Additional Libs to Edit
iteminventorylists.lib— add your gun to the proper categoryshopsettings.lib— add it to a shop
Weapon Recoil Curves
Source: community notes, author not recorded.
Each curve controls one axis of the weapon and arm animation while firing. Curves are defined per weapon, so a new weapon inherits the curves of whatever it was duplicated from until you point it at its own.
| Curve | Effect |
|---|---|
curveRecoilTranslationX | Moves the hand backwards and forward while shooting |
curveRecoilTranslationY | Moves the arm left and right while shooting |
curveRecoilTranslationZ | Moves the hand up and down while shooting |
curveRecoilRotationX | Moves the gun up while shooting |
curveRecoilRotationY | Moves the gun backwards and forwards while shooting (disabled for pistols) |
curveRecoilRotationZ | Moves the gun left and right |
curveBodyRecoilCurve | Freezes the head and other body parts while shooting (keep this low for the best effect) |