Skip to content

8kto/ttrpg-snw-generator

Repository files navigation

Character and inventory generator for Swords & Wizardry (Complete/Revised)

linter and tests

                           _                         _                  _
                          | |       ___             (_)                | |
 _____      _____  _ __ __| |___   ( _ )   __      ___ ______ _ _ __ __| |_ __ _   _
/ __\ \ /\ / / _ \| '__/ _` / __|  / _ \/\ \ \ /\ / / |_  / _` | '__/ _` | '__| | | |
\__ \\ V  V / (_) | | | (_| \__ \ | (_>  <  \ V  V /| |/ / (_| | | | (_| | |  | |_| |
|___/ \_/\_/ \___/|_|  \__,_|___/  \___/\/   \_/\_/ |_/___\__,_|_|  \__,_|_|   \__, |
                                                                                __/ |
                                                                               |___/

A tool built super quickly for my fellow OSR players. I sourced the equipment lists, along with their weights and costs, from the rulebook and used the BFRPG Equipment Emporium to fill in any missing weights.

Contributions are welcome!

Disclaimer I

This is an unofficial tool for "Swords and Wizardry" and is not endorsed by the game's publishers. All related trademarks belong to their respective owners.

Disclaimer II

This is a quick and dirty code; I spent only a little time making it "clean". You can read the sources at your own risk.

To see a better approach I took on a similar project, check out my other TTRPG helper and generator for the Lamentation of the Flame Princess system.

Demo

Current URL: https://swords-and-wizardry.ivlev.blog/

Features

  • Random character generation (check TODO)
  • Spell lists for casters. Magic Users get their spells randomly according to their Intelligence score
  • Lists of equipment, weapons, and armor with weight and cost
  • Inventory management, calculating total weight, cost, and speed
  • Multiple inventories that can be renamed. For example: "Zsusza, the thief", "Zoltan, the mercenary", "Solomon, the donkey", etc.
  • Quick equipment sets that can be selected to save time when generating a new character
  • Saves inventory in the browser's local storage, meaning the selected items will persist after a page reload
  • Displays help on encumbrance and speed
  • Converts text (which can be copied from other sources) into equipment and adds it to the inventory
  • Exports inventories as JSON, which can be manually added to the browser's storage (dev tools). I didn’t have time yet to write a more convenient import feature.
  • Custom items
  • Builds with WMR

Contributions

Contributions are welcome. Code should follow conventions described in Code Conventions.

TODO

  • Mobiles support (?)
  • Languages support (?)
  • Add coins
  • More convenient Import
  • New random character: adjust heuristics (drop hopeless, pick random properly)
  • Race
    • Half elves cannot be pure Fighters or MU, only listed classes (and other races?)
  • Char Damage modifier
  • Char: edit numbers
  • Generate with strict 0e attrs
  • Fighter Parrying Ability
  • daisyUI, dark/light themes
  • Console log with events like "Intelligence: rolled 3d6 with 12 ..." (?)
  • Compact mode