Ten medieval weapons for [dot-weapon](https://github.com/gamespice-platform/weapon): longsword, dagger, battle axe, war axe, double axe, mace, spear, round shield (bash and block), bow (a drawn shot with a dropping arrow) and crossbow (slow reload, flatter bolt). Made for Zombie Zone, usable in any game or server (`games: "*"` in `provides.json`).
## Using it
- The addon is `addons/zz_medieval_weapons/`. The Workshop form is `weapons/*.tres` plus `provides.json`, generated by `tools/export-defs.sh`. - `ZzMedievalPack.weapons()` returns the `DotWeaponDef`s. Add them to a `DotWeaponCatalogue`. - Melee is dot-weapon's sweep of rays. The bow fires through `DotWeaponProjectile`. Stamina and knockback come out as events (`{"type": "stamina", "cost"}` and `{"type": "knockback", "impulse", "direction"}`) that the game applies. - A raised shield is a stance. The damage path calls `ZzMedievalBlock.reduced(def, damage, facing, hit_from, blocking)` and charges `ZzMedievalBlock.stamina_cost`. - A spawn menu calls `ZzMedievalSpawnProvider.spawn_entries()`.
The pack also draws the weapons: a first-person view with arms, a world model, swings, a shield guard and bash, a bow draw and loose, and a crossbow cocking. See [docs/view-model.md](https://github.com/zees-games/zz-medieval-weapons/blob/HEAD/docs/view-model.md). Metal needs something to reflect: see [docs/lighting.md](https://github.com/zees-games/zz-medieval-weapons/blob/HEAD/docs/lighting.md).
## Settings
Every number is in a weapon profile, `cfg/addons/zz_medieval_weapons/weapon/<id>.yml`. Common keys (`name`, `slot`, `deploy_ticks`, `holster_ticks`, `reserve`, `magazine`, `reload_ticks`, `use_interval_ticks`, `min_charge`) are at the top; this pack's keys are under `extra:`.
| Keys | Weapons | Meaning | | --- | --- | --- | | `damage`, `reach`, `arc_degrees`, `rays`, `swing_ticks`, `stamina_cost` | melee | Hit and swing | | `speed`, `min_speed`, `gravity_scale`, `draw_ticks` | bow, crossbow | Projectile speed and arrow drop | | `knockback`, `block_reduction`, `block_arc_degrees`, `block_stamina_per_damage` | shield | Bash and block |
Durations are ticks at 64 Hz. A game overrides keys in `cfg/game/<game>/weapon/<id>.yml` (set `ZzMedievalConfig.game`), a server operator in `cfg/server/weapon/<id>.yml`. Deleting a shipped file changes nothing: built-in defaults apply. A weapon with a folder may hold `upgrades/<id>.yml` (`set`, `mul`, `add`, a `cost` and `requires`), applied with `ZzMedievalConfig.upgraded(id, [ids])`.
## Testing
`./game.sh test` parses every script and runs the pack's suite. `tools/screenshot.sh [weapon ...]` renders each model to `screenshots/`.
## Credits
Every model was decimated, re-textured and given a worn look. Author, URL and change notes are in [CREDITS.md](https://github.com/zees-games/zz-medieval-weapons/blob/HEAD/CREDITS.md). The code is MIT, see [LICENSE](https://github.com/zees-games/zz-medieval-weapons/blob/HEAD/LICENSE).
| Weapon | Model | Author | Licence | Source | | --- | --- | --- | --- | --- | | `double_axe` | Decorative Double-Bladed Battle Axe | Arms Museum | CC0 1.0 | [link](https://sketchfab.com/3d-models/decorative-double-bladed-battle-axe-f0bfbca7a2804efd9cf77fd0f5a806aa) | | `war_axe` | Decorative Battle Axe | Arms Museum | CC0 1.0 | [link](https://sketchfab.com/3d-models/decorative-battle-axe-97575b982f5944baa0c9062d8107a983) | | `longsword` | Medieval Longsword Type XVIa | leeeck | CC BY 4.0 | [link](https://sketchfab.com/3d-models/359b73c3e8c449d7aa5fd96e7d831abd) | | `bow` | Medieval Bow and Arrow | ana.stakflett | CC BY 4.0 | [link](https://sketchfab.com/3d-models/d5680d6d851d4411941f8f40f7feab94) | | `round_shield` | Worn Round Shield | iedalton | CC BY 4.0 | [link](https://sketchfab.com/3d-models/d848db788bc041ddab8a51c7836979d2) | | `battle_axe` | Medieval Battle Axe | CaptainHC | CC BY 4.0 | [link](https://sketchfab.com/3d-models/79115d20afec46928ca10dd948b4ced6) | | `mace` | Medieval Mace | Kama Modeling | CC BY 4.0 | [link](https://sketchfab.com/3d-models/83217215a0c541b2956a8e87a4ae62fe) | | `spear` | Medieval Spear | iedalton | CC BY 4.0 | [link](https://sketchfab.com/3d-models/f61070945153418fa11c4abae286b292) | | `crossbow` | Medieval Crossbow | iedalton | CC BY 4.0 | [link](https://sketchfab.com/3d-models/cc36ed347db340d59bd2ec7b06ae0d63) | | `dagger` | Medieval Dagger | Whatevvs | CC BY 4.0 | [link](https://sketchfab.com/3d-models/519b1fc1390747038cfc9f4ea158f660) |
Deze add-on voert code uit in de game. Abonneer je alleen op add-ons van makers die je vertrouwt.
De game downloadt je abonnementen wanneer je hier solo begint te spelen, en in de desktop- en mobiele apps.