Effect modfied speed overwrites base speed when editing player movement speeds

Issue #273 resolved
Ben Freeland created an issue

Setup

dnd5e: 1.4.1
obsidian: 5.0.8

Steps to reproduce:

  1. Change encumbrance setting to Variant
  2. Create player sheet
  3. Add item weighing 90 lb to sheet
  4. Observe that player walking speed is now 20
  5. Click on walking speed to open Manage Speed dialog
  6. Close Manage Speed dialog

Expected:

Walking speed continues to display 20. Disabling effect returns walking speed to 30.

Observed:

Walking speed now displays 10. Disabling effect only returns walking speed to 20. Each time the dialog is opened and closed while the effect is active walking speed decreases by a further 10.

Comments (2)

  1. Ben Freeland reporter

    It looks like the applySpeedBonuses function in js/data/bonuses.js applies the effects by overwriting the values in data.attributes.movement and doesn’t have a way to tell if the bonuses were already applied.

  2. Kim Mantas repo owner

    The 'new paradigm' around Document data involves overwriting the in-memory values under data directly now. The raw data that exists in the database is kept under data._source and doesn't get modified. What happened here was the derived data was being written to the sheet and then saved as though it were raw data.

    There might be a few more instances of this still lurking in the sheet.

  3. Log in to comment