Make RPG attributes (STR/DEX/etc) customizable and editable

- Replace showRPGAttributes boolean with rpgAttributes array in trackerConfig
- Add RPG Attributes section in Edit Trackers with add/remove/rename/toggle
- Dynamically generate attribute display from config in userStats.js
- Add migration from old showRPGAttributes to new rpgAttributes array
- Initialize new attributes with default value of 10 in classicStats
- Default attributes: STR, DEX, CON, INT, WIS, CHA (all enabled)
This commit is contained in:
Spicy_Marinara
2025-11-03 11:09:42 +01:00
parent 883212b5e9
commit f20710f5a3
7 changed files with 260 additions and 59 deletions
+11
View File
@@ -118,6 +118,9 @@ import { ensureHtmlCleaningRegex, detectConflictingRegexScripts } from './src/sy
import { setupMemoryRecollectionButton, updateMemoryRecollectionButton } from './src/systems/features/memoryRecollection.js';
import { initLorebookLimiter } from './src/systems/features/lorebookLimiter.js';
// Utility modules
import { importAllDefaults } from './src/utils/importDefaults.js';
// Integration modules
import {
commitTrackerData,
@@ -601,6 +604,14 @@ jQuery(async () => {
// Non-critical - continue anyway
}
// Import default preset and regexes if user doesn't have them
try {
await importAllDefaults();
} catch (error) {
console.error('[RPG Companion] Failed to import defaults:', error);
// Non-critical - continue anyway
}
// Register all event listeners
try {
registerAllEvents({