v3.5.0: Weather effects improvements and dice roll fixes

- Refactor weather effects toggles to radio buttons in settings
  - Replace weatherEffectsForeground with weatherBackground/weatherForeground
  - Add Background/Foreground position options as radio toggles
  - Remove weather foreground toggle from main panel
- Fix dice roll to work independently of RPG attributes
  - Dice rolls now sent regardless of attribute settings
  - Adjust prompt wording based on whether attributes are enabled
- Improve History Persistence UI styling
  - Update input/select CSS to match tracker editor
  - Fix alignment issues
- Add theme-based radio button styling
  - Radio buttons now use theme colors instead of default blue
  - Support for all themes (default, sci-fi, fantasy, cyberpunk, custom)
- Update weather effects z-index logic for both modes
- Bump version to v3.5.0
This commit is contained in:
Spicy_Marinara
2026-01-11 20:05:35 +01:00
parent 46e6de0eba
commit c614f7b8dc
9 changed files with 225 additions and 43 deletions
+29 -14
View File
@@ -392,21 +392,30 @@ export function generateTrackerInstructions(includeHtmlPrompt = true, includeCon
// Include attributes based on settings (only if includeAttributes is true)
if (includeAttributes) {
const alwaysSendAttributes = trackerConfig?.userStats?.alwaysSendAttributes;
const shouldSendAttributes = alwaysSendAttributes || extensionSettings.lastDiceRoll;
const showRPGAttributes = trackerConfig?.userStats?.showRPGAttributes !== false;
const shouldSendAttributes = alwaysSendAttributes && showRPGAttributes;
if (shouldSendAttributes) {
const attributesString = buildAttributesString();
instructions += `${userName}'s attributes: ${attributesString}\n`;
// Add dice roll context if there was one
if (extensionSettings.lastDiceRoll) {
const roll = extensionSettings.lastDiceRoll;
instructions += `${userName} rolled ${roll.total} on the last ${roll.formula} roll. Based on their attributes, decide whether they succeeded or failed the action they attempted.\n\n`;
} else {
instructions += `\n`;
}
}
}
// Add dice roll context if there was one (independent of attributes)
if (extensionSettings.lastDiceRoll) {
const roll = extensionSettings.lastDiceRoll;
const showRPGAttributes = trackerConfig?.userStats?.showRPGAttributes !== false;
const alwaysSendAttributes = trackerConfig?.userStats?.alwaysSendAttributes;
const hasAttributes = includeAttributes && (alwaysSendAttributes && showRPGAttributes);
if (hasAttributes) {
instructions += `${userName} rolled ${roll.total} on the last ${roll.formula} roll. Based on their attributes, decide whether they succeeded or failed the action they attempted.\n\n`;
} else {
instructions += `${userName} rolled ${roll.total} on the last ${roll.formula} roll. Decide whether they succeeded or failed the action they attempted.\n\n`;
}
} else if (includeAttributes && trackerConfig?.userStats?.alwaysSendAttributes && trackerConfig?.userStats?.showRPGAttributes !== false) {
instructions += `\n`;
}
}
// Append HTML prompt if enabled AND includeHtmlPrompt is true
@@ -990,19 +999,25 @@ export function generateContextualSummary() {
// Include attributes based on settings
const alwaysSendAttributes = trackerConfig?.userStats?.alwaysSendAttributes;
const shouldSendAttributes = alwaysSendAttributes || extensionSettings.lastDiceRoll;
const showRPGAttributes = trackerConfig?.userStats?.showRPGAttributes !== false;
const shouldSendAttributes = alwaysSendAttributes && showRPGAttributes;
if (shouldSendAttributes) {
const attributesString = buildAttributesString();
summary += `${userName}'s attributes: ${attributesString}\n`;
}
// Add dice roll context if there was one
if (extensionSettings.lastDiceRoll) {
const roll = extensionSettings.lastDiceRoll;
// Add dice roll context if there was one (independent of attributes)
if (extensionSettings.lastDiceRoll) {
const roll = extensionSettings.lastDiceRoll;
if (shouldSendAttributes) {
summary += `${userName} rolled ${roll.total} on the last ${roll.formula} roll. Based on their attributes, decide whether they succeeded or failed the action they attempted.\n\n`;
} else {
summary += `\n`;
summary += `${userName} rolled ${roll.total} on the last ${roll.formula} roll. Decide whether they succeeded or failed the action they attempted.\n\n`;
}
} else if (shouldSendAttributes) {
summary += `\n`;
}
return summary.trim();