Coder Social home page Coder Social logo

magnus-isu / dungeon_world_data Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dungeonpaper/dungeon_world_data

0.0 0.0 0.0 14.29 MB

Dart + NPM package with Dungeon World character, moves & other data

Home Page: https://pub.dev/packages/dungeon_world_data

License: BSD 2-Clause "Simplified" License

Dart 99.63% TypeScript 0.37%

dungeon_world_data's Introduction

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.

dungeon_world_data's People

Contributors

arthurpaulino avatar chenasraf avatar magnusanderson-wk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.