An aberration that slipped into this reality. A being of shadow, strife, and despair. Source of the Vaelthorne Hold curse.
Appearance & Personality
Visuals & Mannerisms
Visuals:
Mannerisms:
Campaign Developments
Recent Activity
This section displays every time this character is mentioned in the session notes.
// 1. Get the main name and any aliases from the current noteconst targetName = dv.current().file.name;const aliases = dv.current().aliases || [];const searchTerms = Array.isArray(aliases) ? [targetName, ...aliases] : [targetName, aliases];// 2. Filter sessions that link to this NPCconst sessions = dv.pages('"Campaign Information/Sessions"') .where(p => p.file.outlinks.includes(dv.current().file.link)) .sort(p => p.file.mtime, 'desc');for (let session of sessions) { const file = app.vault.getAbstractFileByPath(session.file.path); const content = await app.vault.read(file); const lines = content.split('\n'); let matches = []; let inSummary = false; for (let line of lines) { // Find the Saga20 callout if (line.toLowerCase().includes('[!success]+ saga20 summary')) { inSummary = true; continue; } if (inSummary) { if (line.trim().startsWith('>')) { let cleanedLine = line.trim().replace(/^>\s?/, ""); // Check if the line contains the main name OR any of the aliases const foundMatch = searchTerms.some(term => cleanedLine.toLowerCase().includes(term.toString().toLowerCase()) ); if (foundMatch) { matches.push(cleanedLine); } } else if (line.trim() !== "" && !line.trim().startsWith('>')) { // Exit callout block inSummary = false; } } } if (matches.length > 0) { dv.header(4, session.file.link); dv.list(matches); }}