TraderX_Tools/examples/weapons-with-presets.example.yaml
2026-09-06 22:47:27 +03:00

39 lines
1.4 KiB
YAML

# Example: a weapons category that uses groups, variants, compat-driven
# attachments and server presets. Build with:
# traderx_build.py build weapons-with-presets.example.yaml --out /path/TraderX --compat compat.example.json --dry-run
defaults:
stock: unlimited
sell_percent: 25
attachment_price: 150 # price for optics/mags that are not sold anywhere else
groups:
ak_optics: [PSO1Optic, KobraOptic, SNAFU_AKKahles]
ak_muzzle: [AK_Suppressor]
ak_mags: [Mag_AKM_30Rnd, Mag_AKM_Drum75Rnd]
categories:
- name: Assault Rifles
traders: [Boris]
licenses: [Weapons License] # created in TraderXGeneralSettings.json if missing
price: 1200
items:
- AKM:
attachments: [ak_optics, ak_muzzle, ak_mags]
variants: [AKM_Tan] # inherits AKM's attachments
presets:
"CQB*": [KobraOptic, AK_Suppressor, Mag_AKM_30Rnd] # * = default preset
"DMR": [PSO1Optic, Mag_AKM_30Rnd]
- AKM_Tan
- SNAFU_AK103A: {price: 1100, stock: 5, coefficient: 0.95, restart: reset}
- name: AK Optics
traders: [Boris]
price: 400
items: [PSO1Optic, KobraOptic, SNAFU_AKKahles]
- name: Ammo
traders: [Boris]
price: 60
buy: static 30 # buying gives a stack of 30
sell: any # any stack size accepted, paid pro-rata
items: [Ammo_762x39, Ammo_545x39]