From c8727fd7bb807b31421c48dd9a1c38914b7346d6 Mon Sep 17 00:00:00 2001 From: CPTN Cosmo Date: Tue, 10 Feb 2026 03:43:05 +0100 Subject: [PATCH] refactor: Update special effect options to use DSN v4 `sfx` property with lowercase IDs. --- scripts/module.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/module.js b/scripts/module.js index 5abd95d..0ac0954 100644 --- a/scripts/module.js +++ b/scripts/module.js @@ -212,7 +212,9 @@ Hooks.on('diceSoNiceRollStart', (messageId, context) => { if (roll.dice && roll.dice.length > 0) { roll.dice.forEach(die => { if (!die.options) die.options = {}; - die.options.specialEffect = effect === 'default' ? 'Stars' : capitalize(effect); + // Use new DSN v4 API: sfx property + // Effect ID should likely be lowercase + die.options.sfx = { id: effect === 'default' ? 'stars' : effect }; }); } else { // Determine if we need to iterate terms for Duality Rolls @@ -220,7 +222,7 @@ Hooks.on('diceSoNiceRollStart', (messageId, context) => { roll.terms.forEach(term => { if (term.faces) { // It's a die if (!term.options) term.options = {}; - term.options.specialEffect = effect === 'default' ? 'Stars' : capitalize(effect); + term.options.sfx = { id: effect === 'default' ? 'stars' : effect }; } }); }