diff --git a/languages/en.json b/languages/en.json index 51f0166..086331b 100644 --- a/languages/en.json +++ b/languages/en.json @@ -14,6 +14,10 @@ "name": "% offset from top of token", "hint": "Offset percentage from top of token, input as whole number (IE. 70 is 70%)" }, + "jitter": { + "name": "Jitter", + "hint": "How much the text will move around its spawn point (0 = doesn't move, 1 is it could spawn on the edges of the token)" + }, "number-scale-type": { "name": "Number Scale Type", "hint": "Scaling type for the size of the RPG Numbers", diff --git a/module.json b/module.json index b0c027c..4842bb1 100644 --- a/module.json +++ b/module.json @@ -23,7 +23,17 @@ "verified": "5.3.0" } } - ] + ], + "requires": [ + { + "id": "sequencer", + "type": "module", + "compatibility": { + "minimum": "3.0.0", + "verified": "3.1.2" + } + } + ] }, "esmodules": [ "scripts/module.js", diff --git a/scripts/module.js b/scripts/module.js index ef41fbe..9068e81 100644 --- a/scripts/module.js +++ b/scripts/module.js @@ -38,6 +38,7 @@ export function generateDamageScroll(dmg_list, targets) { const size = tok.document.texture.scaleY * tok.document.width; const topOffset = size * (game.settings.get("pf2e-rpg-numbers", 'top-offset') / 100); const fontSize = game.settings.get("pf2e-rpg-numbers", 'font-size'); + const jitter = game.settings.get("pf2e-rpg-numbers", 'jitter'); const colors = { acid: "0x56fc03", bludgeoning: "0xc7c7c7", @@ -78,7 +79,7 @@ export function generateDamageScroll(dmg_list, targets) { seq.scrollingText() .atLocation(tok, { offset: { y: topOffset }, gridUnits: true }) .text(`${dmg.value}`, style) - .jitter(1) + .jitter(jitter) .anchor("TOP") .waitUntilFinished(-1800) }