Adriannom / fvtt-module-table-ninja

Table Ninja makes looking up chosen tables swift and stealthy, so that you can maintain game flow while using them.
GNU General Public License v3.0
2 stars 2 forks source link

Malformed tables return a bucketload of errors to the user #1

Open Adriannom opened 3 years ago

Adriannom commented 3 years ago

ksnip_20210106-134712

eggdropsoap commented 3 years ago

Not all tables like this should be counted as malformed. For example, treasure tables in some game systems have the possibility of no results. These should be displayed as "(no results)" or something in Table Ninja instead of throwing constant errors.

For a reproducible example using tables that are being used in an existing game system:

  1. Install the Old School Essentials game system
  2. Install the Old School Essential OGL Content module to get the compendium entries
  3. Make a new world using OSE, start it, and add the OSE OGL module
  4. Import the Treasure Tables from the compendium
  5. Make a Treasure folder in Table Ninja for a Treasure tab
  6. Drag any OSE treasure table (e.g. the first table, Treasure Type A) into the Table Ninja > Treasure folder
  7. Open Table Ninja button and click Refresh

These tables are weird, but they're not malformed. They have a "chance" value for each line instead of a weight or range, and each line is independently rolled and it's possible for all lines to produce no output. This is necessary to reproduce the behaviour of the original tables.

Currently, I can't use Table Ninja to generate treasure hoards in my OSE world. That's okay for now, but I would hope that the fix wouldn't be to prevent me using these tables, but instead would be to gracefully handle tables that don't always produce a result.