Weapons, armour, bodies
Weapons
A new weapon is always made from one of ours, its base. It swings as the base swings, keeps its combos, grips and sounds, and costs what it costs; everything else is yours to give. Any weapon of the content catalog can be a base, guns included.
"weapons": [ {
"name": "BlackBlade",
"title": "Blackened longsword",
"description": "A longsword blued black in the fire.",
"base": "Longsword",
"picture": "black_blade.png",
"grip": [7, 44],
"offGrip": [7, 60],
"edge": [[7, 2], [7, 36]],
"edgeWidth": 15,
"icon": "black_blade_icon.png",
"weapon": { "windupTime": 0.37, "staminaCost": 14 },
"hit": { "damage": 31, "poiseDamage": 25 },
"pickup": { "spin": 600 }
} ]Making one on the bench
- Open the mod on the bench and press + beside Weapons.
- Pick the weapon of ours it is made from. Its picture is copied in to draw over.
- Draw it. The picture is drawn as ours are: the blade pointing up (a gun's muzzle to the right), 40 pixels to a unit.
- Set where the hand holds it with the hand tool on the rail, the other hand with the next, and drag the blow along the blade.
- Set its numbers on the right. Only what you change is written.
- Try in the Test Map.
The keys
| key | what it is |
|---|---|
name | its own name: letters, digits and _. In the game it is <mod id>.<name> |
title, description | what players see |
base | required: the weapon of ours it is made from |
picture | a PNG of the mod's, blade up, 40 pixels to a unit |
grip | the pixel the main hand holds. Needed unless the picture is exactly the base's size. It goes where the base's hand is |
offGrip | the pixel the other hand holds; without it, the other hand keeps its distance from the main one as on the base |
edge, edgeWidth | where the blow lands, two pixels and a width in pixels. Without them the blow runs from where the base's starts to this blade's tip, as wide as the base's |
icon | its icon, a PNG drawn at 40 pixels to a unit, shown where the game shows a weapon's icon |
weapon, hit, pickup | numbers written over the base's (below) |
points | what it costs of a loadout's 100 points, 0 to 100 (below) |
shot, heat, magazine | a gun's own rounds, heat and magazine (A gun's shot, heat and sounds) |
sounds | its own sounds (below) |
A new picture hangs bare at the hip: the base's scabbard was made for the base's blade.
Numbers
weapon, hit and pickup hold numbers written over the base's, by the names the game's components keep them under:
weapon: the weapon itself (ProceduralWeapon,MeleeWeapon,Firearm): how long it winds up, what it costs in stamina, a gun's muzzle speed and points on its picturehit: what its blow does (WeaponDamage): damage, poise damage, armour piercingpickup: how it lies and spins when dropped or thrown (WeaponPickup)
Lists and nested values (grips, combos, muzzlePixel) are given whole. A choice is written by name ("stowAt": "Hip"). Pictures, sounds and links to other objects are not set this way; for those, use patches.
Every number a base has, by name, is in the ModKit's Weapons/<Name>.fields.json. On the bench they are all behind the numbers' search, each with the game's own tooltip.
Price in a loadout
points is what the weapon costs of a loadout's 100 points in the arena, a whole number from 0 to 100. Without it the game works it out as it does for ours, from its damage, poise damage and armour piercing. A bow, a crossbow or a thrown weapon keeps its base's fixed price.
Sounds
"sounds": { "swing": ["swing1.wav", "swing2.wav"], "hit": "ring1.wav" }A slot takes a file or a list of them; each time, one of the list is played at random. A slot not given keeps the base's sound. .wav (8, 16, 24 or 32-bit PCM, or 32-bit float), .ogg and .mp3 are read; a dedicated server reads none.
swing: the air the weapon moveshit: the blow landing, on anything. It is played in place of every sound the blow would make.
Leave the first moment of each file as its loudest part, peaking around -16 dB, as ours are. Guns and sabers have their own slots: A gun's shot, heat and sounds.
Online
Mod weapons take arena numbers after ours. Every player meeting online has the same mods, so the weapon is the same everywhere (Online).
Modding