System
Lorebookfrom ChubTokens: 0 permanent · Lorebook: up to 778 tokens triggered, 778 across all entries · estimated prompt budget 778
- Format
- V2
- Project space
- lorebooks
- Rating
- 0.00
- Ratings
- 0
- Stars
- 0
- Favorites
- 0
- Chats
- 0
- Messages
- 0
- Forks (upstream)
- 0
- Tokens (upstream)
- 780
Last checked on Chub: Created Updated Archived since
No description.
1 entries · scan depth 2 · budget 512 tokens · recursive scanning off
Book settings
- #1system
Keys: STATUS WINDOW SYSTEM
Enabled · After character · Order 10 · 100%
Entry settings
// ============================================= // GOBLIN SLAYER RPG - ADVANCED STATS SYSTEM // Permanent tracking of stats and skills (English version) // =============================================
if (!context.character) context.character = {}; if (!context.character.stats) { context.character.stats = { level: 1, strength: 2, agility: 3, resistance: 1, intelligence: 8, perception: 3, leadership: 3, exp: 0, expRequired: 100, skills: ["Night Vision", "Natural Stealth", "Devour (Unique)"] }; }
// Function to display current stats in exact format function showStats() { var s = context.character.stats; return "Level: " + s.level + "\n" + "Strength: " + s.strength + " | Agility: " + s.agility + " | Resistance: " + s.resistance + "\n" + "Intelligence: " + s.intelligence + " | Perception: " + s.perception + " | Leadership: " + s.leadership + "\n" + "EXP: " + s.exp + "/" + s.expRequired + "\n" + "Skills: [" + s.skills.join("], [") + "]"; }
// Safe function to add EXP and check for level up function addEXP(amount) { if (typeof amount !== "number" || amount <= 0) return false; context.character.stats.exp += amount;
var leveledUp = false; while (context.character.stats.exp >= context.character.stats.expRequired) { context.character.stats.exp -= context.character.stats.expRequired; context.character.stats.level += 1; context.character.stats.expRequired = context.character.stats.level * 100; // simple scaling leveledUp = true; } return leveledUp;}
// Safe function to modify attributes function modifyAttributes(changes) { var s = context.character.stats; if (changes.strength) s.strength += changes.strength; if (changes.agility) s.agility += changes.agility; if (changes.resistance) s.resistance += changes.resistance; if (changes.intelligence) s.intelligence += changes.intelligence; if (changes.perception) s.perception += changes.perception; if (changes.leadership) s.leadership += changes.leadership;
// Prevent negative values if (s.strength < 1) s.strength = 1; if (s.agility < 1) s.agility = 1; if (s.resistance < 1) s.resistance = 1; if (s.intelligence < 1) s.intelligence = 1; if (s.perception < 1) s.perception = 1; if (s.leadership < 1) s.leadership = 1;}
// Safe function to add new skill (no duplicates) function addSkill(skillName) { var s = context.character.stats; if (s.skills.indexOf(skillName) === -1) { s.skills.push(skillName); return true; } return false; // already had it }
// Devour function (combines EXP + stats + new skill) function devour(expGained, statChanges, newSkill) { addEXP(expGained); modifyAttributes(statChanges); if (newSkill && newSkill !== "") { addSkill(newSkill); } }
// Auto-update internal stats so the Narrator always uses the correct values context.character.scenario += "\n\n[INTERNAL STATS UPDATED - ALWAYS USE THESE VALUES]\n" + showStats();
Showing 1 of 1
2 files
- .jsonjson_lorebookoriginal
4.2 KBfirst seen 9b03e3d4acffcd4d
- .jsonjson_lorebook
4.2 KBfirst seen 3e7bb05d35a30fcf
Opens with the tab.
