dungeon_world_data 1.2.4

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 73

Dungeon World Data #

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

How to install #

First, add to your pubspec:

dependencies:
  ..
  dungeon_world_data: ^1.0.0

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

Available data #

  • Map<String, Move> moves
  • List<Move> basicMoves
  • List<Move> specialMoves
  • Map<String, PlayerClass> classes
  • Map<String, Equipment> equipment
  • Map<String, Spell> spells
  • Map<String, Monster> monsters
  • Map<String, Tag> tags

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

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 #

  1. Make your changes
  2. Make a PR, explain what your changes do, what could break.
  3. ???
  4. Profit!

v1.2.4 #

  • Fix JSON output for Equipment item

v1.2.1-v1.2.3 #

  • Tag bugfixes

v1.2.0 #

  • Improved equipment loading (breaks interface for equipment items)

v1.1.7 #

  • Fixed spell loading

v1.1.6 #

  • Reduced min version of meta to increase compatibility

v1.1.4, v1.1.5 #

  • Added key property to some missing classes

v1.1.2, v1.1.3 #

  • Documentation updates

v1.1.1 #

  • Working release

example/example.dart

import 'package:dungeon_world_data/dw_data.dart';
import 'package:dungeon_world_data/tag.dart';

void main() {
  // Get all monsters
  print(dungeonWorld.monsters.values.map((monster) => monster.name));
  print('');

  // Get all bard advanced moves
  print(dungeonWorld.advancedMoves['bard'].map((move) => move.name));
  print('');

  // Get fighter class
  print(dungeonWorld.classes['bard']);
  print('');

  // Get all spells
  print(dungeonWorld.spells.values.first);
  print('');

  // Get all inventory items
  print(dungeonWorld.equipment.values.where((i) => i.description != null).toList().join('\n\n'));
  print('');

  Map l = {'name': 'one'};
  print(Tag.parse(l));
  print(dungeonWorld.equipment['axe'].toJSON());
  print(dungeonWorld.equipment.values.firstWhere((i) => i.description != null && i.description.isNotEmpty));
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  dungeon_world_data: ^1.2.4

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:dungeon_world_data/_base.dart';
import 'package:dungeon_world_data/_data.dart';
import 'package:dungeon_world_data/alignment.dart';
import 'package:dungeon_world_data/dice.dart';
import 'package:dungeon_world_data/dw_data.dart';
import 'package:dungeon_world_data/equipment.dart';
import 'package:dungeon_world_data/gear_choice.dart';
import 'package:dungeon_world_data/mappers.dart';
import 'package:dungeon_world_data/monster.dart';
import 'package:dungeon_world_data/move.dart';
import 'package:dungeon_world_data/player_class.dart';
import 'package:dungeon_world_data/spell.dart';
import 'package:dungeon_world_data/tag.dart';
  
Version Uploaded Documentation Archive
1.2.4 Mar 13, 2019 Go to the documentation of dungeon_world_data 1.2.4 Download dungeon_world_data 1.2.4 archive
1.2.3 Mar 13, 2019 Go to the documentation of dungeon_world_data 1.2.3 Download dungeon_world_data 1.2.3 archive
1.2.2 Mar 13, 2019 Go to the documentation of dungeon_world_data 1.2.2 Download dungeon_world_data 1.2.2 archive
1.2.1 Mar 13, 2019 Go to the documentation of dungeon_world_data 1.2.1 Download dungeon_world_data 1.2.1 archive
1.2.0 Mar 13, 2019 Go to the documentation of dungeon_world_data 1.2.0 Download dungeon_world_data 1.2.0 archive
1.1.7 Mar 13, 2019 Go to the documentation of dungeon_world_data 1.1.7 Download dungeon_world_data 1.1.7 archive
1.1.6 Mar 13, 2019 Go to the documentation of dungeon_world_data 1.1.6 Download dungeon_world_data 1.1.6 archive
1.1.5 Mar 13, 2019 Go to the documentation of dungeon_world_data 1.1.5 Download dungeon_world_data 1.1.5 archive
1.1.4 Mar 13, 2019 Go to the documentation of dungeon_world_data 1.1.4 Download dungeon_world_data 1.1.4 archive
1.1.3 Mar 13, 2019 Go to the documentation of dungeon_world_data 1.1.3 Download dungeon_world_data 1.1.3 archive

All 20 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
46
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
73
Learn more about scoring.

We analyzed this package on Mar 13, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.2.0
  • pana: 0.12.14

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in libraries.

Health suggestions

Format lib/dw_data.dart.

Run dartfmt to format lib/dw_data.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <3.0.0
meta ^1.1.0 1.1.7
path ^1.6.2 1.6.2
quiver ^2.0.1 2.0.1
resource ^2.1.5 2.1.5
Transitive dependencies
matcher 0.12.4
stack_trace 1.9.3
typed_data 1.1.6