Add stat change guidelines, attributes toggle, skills editing, and improved character parsing

- Add temporal awareness and stat decay rules to prompt (0-5% per message)
- Add 'Always Include Attributes' toggle in tracker editor
- Fix skills section editing (was not saving customFields)
- Improve Present Characters parser to handle malformed formats (mid-line chars, extra blank lines)
- All changes work in both together/separate generation modes
This commit is contained in:
Spicy_Marinara
2025-11-18 15:10:24 +01:00
parent ed3eac54fc
commit 2b45dc8fae
4 changed files with 57 additions and 7 deletions
+17 -1
View File
@@ -151,7 +151,23 @@ export function renderThoughts() {
let lineNumber = 0;
let currentCharacter = null;
for (const line of lines) {
// Pre-process: normalize the format to handle cases where "- char" appears mid-line
// This handles: "Thoughts: ... - char 2" by splitting it into separate lines
const normalizedLines = [];
for (let line of lines) {
// Check if line contains "- [name]" pattern after some content (not at start)
// Match pattern like "some text - CharName" where there's content before the dash
const midLineCharMatch = line.match(/^(.+?)\s+-\s+([A-Z][a-zA-Z\s]+)$/);
if (midLineCharMatch && !line.trim().startsWith('- ')) {
// Split: first part stays as one line, "- Name" becomes new line
normalizedLines.push(midLineCharMatch[1].trim());
normalizedLines.push('- ' + midLineCharMatch[2].trim());
} else {
normalizedLines.push(line);
}
}
for (const line of normalizedLines) {
lineNumber++;
// Skip empty lines, headers, dividers, and code fences