Narrat 2.15.0 released

Published on June 15, 2023

Narrat 2.15.0 is live!

Narrat 2.15.0 includes the new dice-based skillcheck system, which incorporates most of the requests and feedbacks people have asked for.

Specifically, this changes the old skill check rolling system into a dice-based system.

  • Instead of one roll, you can specify a number of dice to be rolled
  • There are new methods for calculating final score of a skill check, like only getting the highest roll out of a number of rolls, or running a pool of dice and adding up the amount of successes.

To get the latest version, simply run npm install narrat@latest

Breaking Change

Due to the amount of changes in the skill checks config, I decided to make this one a breaking change. It’s pretty quick to update though.

In skills.yaml, the skillChecks object previously contained general skill checks options. This can now be deleted and instead:

Create a skillChecks.yaml config file, using this example file:

[details=Config example]

options:
  diceRange: [1, 6] # Dice rolls will be between those 2 numbers, inclusive
  diceCount: 2 # How many dice are rolled by default on skill checks
  extraPointsPerLevel: 1 # How many extra points to your rolls are given per level in the skill
  extraDicePerLevel: 0 # How many extra dice the player gets per level in the skill (Default 0)
  successOnRollsBelowThreshold: false # Inverts the skillcheck behaviour so that success is when the roll is *below* the difficulty threshold
  showDifficultyText: true # Whether to show the difficulty text on the skill check
  showDifficultyNumber: true # Whether to show the difficulty number on the skill check
  showDifficultyWithoutModifiers: false # Whether to show the original difficulty without modifiers applied on the skill check
  totalRollIsHighest: false # Uses only the highest roll to do the final skill check comparison, instead of adding up all rolls
  totalRollIsLowest: false # Uses only the lowest roll to do the final skill check comparison, instead of adding up all rolls
  difficultyText: # Text to show for each band of difficulty level
    - [2, "Very Easy"]
    - [4, "Easy"]
    - [6, "Medium"]
    - [8, "Hard"]
    - [10, "Very Hard"]
    - [11, "Extremely Hard"]
    - [12, "Near Impossible"]
skillChecks:
  testDicePool:
    skill: agility # skill id
    difficulty: 6 # score to beat during rolls
    winsNeeded: 2 # [Optional] How many rolls need to beat the score (uses total of all rolls if this option isn't present)
    hideAfterRoll: false # [Optional] Whether to hide the skill check from options after it happened once
    repeatable: false # [Optional] Whether the skill check can be repeated if failed

[/details]

Then in your config.yaml, add the info about that new file:

skillChecks: data/skillChecks.yaml

The config options available have different names, but you should be able to reproduce the same effect as your old settings. For example, to match the default settings where rolls are between 0 and 100:

options:
  diceRange: [1, 100]
  diceCount: 1
  extraPointsPerLevel: 10
  extraDicePerLevel: 0
  successOnRollsBelowThreshold: false
  showDifficultyText: true
  showDifficultyNumber: false
  showDifficultyWithoutModifiers: false
  totalRollIsHighest: false
  totalRollIsLowest: false
  difficultyText:
    - [0, 'Very Easy']
    - [10, 'Easy']
    - [30, 'Medium']
    - [50, 'Hard']
    - [70, 'Very Hard']
    - [80, 'Extremely Hard']
    - [90, 'Near Impossible']

More details

This updates also includes configuration for individual skill checks in yaml. This allows the new option winsNeeded for skill checks (which is what enables doing skill checks that use a pool of dice and need to win x times to succeed).

More generally, this new skillchecks config system will enable adding more options and complexity to them in the future as people’s needs grow. Previously, all options for a skill check had to be specified in one line of code, and this was getting out of hand. For example:

choice:
  roll myTestRoll agility 50 "Text of the roll" hideAfterRoll if (== $data.allowed true):
    // Rest of the code

Instead can now have the skill check config specified in skillChecks.yaml

skillChecks:
  myTestRoll:
    skill: agility
    difficulty: 50
    winsNeeded: 2 # This wasn't possible before
    hideAfterRoll: true

The script then becomes:

choice:
  roll myTestRoll "Test of the roll" if (== $data.allowed true):
  // Rest of the code
skillChecks: data/skillChecks.yaml`

Those new skill check options replace the old skillChecks options in the skills.yaml file. You can still make it do the exact same thing as before, some of the options have just been renamed.



Narrat is released under MIT License
Copyright© 2021-present Liana Pigeot