Skip to content

Commit

Permalink
feat: Add option for Recall Knowledge breakdown style
Browse files Browse the repository at this point in the history
This controls the style of the roll breakdown shown by the Recall Knowledge
macro.  It can show no modifiers, all modifiers, or only the extra modifiers
beyond the standard skill and proficiency modifiers that are always present.

It's added to the settings of the BAM macro settings.  Maybe both RK and BAM
settings should go on a new sub-menu?
  • Loading branch information
xyzzy42 authored and xdy committed Oct 13, 2024
1 parent 4e91e36 commit 5ff4468
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/module/settings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,20 @@ export function registerWorkbenchSettings() {
onChange: () => updateHooks(),
});

game.settings.register(MODULENAME, "rkBreakdown", {
name: `${MODULENAME}.macros.recallKnowledge.breakdown.name`,
hint: `${MODULENAME}.macros.recallKnowledge.breakdown.hint`,
scope: "world",
config: true,
default: "all",
type: String,
choices: {
all: game.i18n.localize(`${MODULENAME}.macros.recallKnowledge.breakdown.all`),
extra: game.i18n.localize(`${MODULENAME}.macros.recallKnowledge.breakdown.extra`),
none: game.i18n.localize(`${MODULENAME}.macros.recallKnowledge.breakdown.none`),
},
});

game.settings.register(MODULENAME, "customPauseImage", {
name: `${MODULENAME}.SETTINGS.customPauseImage.name`,
hint: `${MODULENAME}.SETTINGS.customPauseImage.hint`,
Expand Down
9 changes: 9 additions & 0 deletions static/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,15 @@
"noSpellcastingEntry": "You must have either an NPC character sheet open and selected, or a single NPC token selected. Also, said NPC must have a spellcasting entry.",
"generatedSpellbookFor": "Generated spellbook for {name}"
},
"recallKnowledge": {
"breakdown": {
"name": "Recall Knowledge: Show roll breakdowns",
"hint": "Show a breakdown of the modifiers applied to each skill on a line below the result.",
"all": "All modifiers",
"extra": "Extra modifiers; omit skill and proficiency",
"none": "Don't show any modifiers"
}
},
"refocus": {
"regains": "Regains {focus} focus points.",
"notPsychic": "spent at least {regain} focus points",
Expand Down

0 comments on commit 5ff4468

Please sign in to comment.