Dart + NPM package with Dungeon World character, moves & other data
  • Dart 99.6%
  • TypeScript 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2023-12-23 13:37:46 +02:00
.github/ISSUE_TEMPLATE npm use typescript build 2022-07-19 02:06:55 +03:00
.vscode fix exports 2022-07-19 02:36:16 +03:00
bin remove all old files, update npm build 2022-05-21 01:27:46 +03:00
example moved files to _old 2022-02-13 02:00:03 +02:00
lib fix: default type resolver 2023-12-23 13:33:24 +02:00
scripts/parsers feat: update npm package 2023-09-07 21:22:58 +03:00
test remove all old files, update npm build 2022-05-21 01:27:46 +03:00
web/src fix: wizard cast a spell move dice 2023-12-04 11:00:30 +02:00
.editorconfig fixes + data updates 2022-04-27 18:26:05 +03:00
.gitignore chore: gitignore 2023-09-07 18:22:18 +03:00
.prettierrc remove all old files, update npm build 2022-05-21 01:27:46 +03:00
.pubignore build: update publish script 2023-09-07 23:38:03 +03:00
analysis_options.yaml new classes wip + parsing 2022-02-14 01:55:13 +02:00
CHANGELOG.md chore(release): bump version 2023-12-23 13:34:55 +02:00
dartdoc_options.yaml readme, docs, cleanup 2019-12-21 15:33:18 +02:00
LICENSE chore: bump version, update license to MIT 2023-11-29 23:58:43 +02:00
pubspec.yaml chore: fix dart version specifier 2023-12-23 13:37:46 +02:00
README.md docs: update docs, comments, readme 2023-09-07 20:51:01 +03:00

Dungeon World Data

This dart package contains data for Dungeon World, such as classes, moves, spells, equipment, etc.

Homebew classes included:

  • Immolator
  • Barbarian.

How to use

After importing, access dungeonWorldData to access the entire data structure. There is more information in the doc directory.

Available data

Code Type
dungeonWorldData.characterClasses Map<String, CharacterClass>
dungeonWorldData.items Map<String, Item>
dungeonWorldData.moves Map<String, Move>
dungeonWorldData.races Map<String, Race>
dungeonWorldData.spells Map<String, Spell>
dungeonWorldData.monsters Map<String, Monster>
dungeonWorldData.tags Map<String, Tag>

There is also a Dice class, with simple dice rolling functionality for your use.

Translations

The data is currently only available in English, but a localization engine is implemented.

  • Use dungeonWorldData.initLocale(locale) to create a new locale reference.
  • Use dungeonWorldData.addForLocale or dungeonWorldData.addAllForLocale to add items to the locales.
  • Use dungeonWorldData.changeLocale(locale) to change to a different locale.

At any given locale, getting items via the generic getter get(key) and [] operator will give you only data for the current locale.

You can use getItemFor(locale, key) to get data for a specific, non-current locale on the fly.

Credits

Credits to ~vindexus who created https://www.npmjs.com/package/dungeonworld-data. The data is from there, this package simply wraps it up for Dart.

Contributing

I am developing this package on my free time, so any support, whether code, issues, or just stars is very helpful to sustaining its life. If you are feeling incredibly generous and would like to donate just a small amount to help sustain this project, I would be very very thankful!

Buy Me a Coffee at ko-fi.com

I welcome any issues or pull requests on GitHub. If you find a bug, or would like a new feature, don't hesitate to open an appropriate issue and I will do my best to reply promptly.

Code Contributors

  1. Make your changes
  2. Run tests, and add new tests if appropriate. Make sure nothing breaks.
  3. Create a PR, explain what your changes do.
  4. Profit!

If you want to translate DW data for this package:

  1. Create a new folder inside lib/data with the locale code.
  2. Copy the contents of lib/data/en-US to your new folder
  3. Update all the localization info there, including the values of each property (not the keys!), and the meta tags that signify the language.