vault commit: 2025-10-09 00:46, 16 files changed
This commit is contained in:
+100
@@ -3,6 +3,7 @@ Level_of_Influence: 3
|
||||
Faction: "[[The Archmasons]]"
|
||||
Tags:
|
||||
- npc
|
||||
Intel:
|
||||
---
|
||||
|
||||
# Amity Cornwallis
|
||||
@@ -43,8 +44,107 @@ Tags:
|
||||
|
||||
---
|
||||
|
||||
## 🧠 Intel (auto)
|
||||
```dataviewjs
|
||||
const THIS = dv.current();
|
||||
const thisName = String(THIS.file.name);
|
||||
const thisLC = thisName.toLowerCase();
|
||||
|
||||
// Scan faction & NPC notes that have Intel arrays
|
||||
const pages = dv.pages("#npc or #faction").where(p => p.Intel);
|
||||
|
||||
// Does an Intel entry reference THIS NPC?
|
||||
function mentionsThisNPC(entry) {
|
||||
const sum = String(entry.summary ?? "");
|
||||
|
||||
// 1) Explicit wikilink in summary
|
||||
if (sum.includes(`[[${thisName}]]`) || sum.includes(`[[${thisName}|`)) return true;
|
||||
|
||||
// 2) Source field (string/link/list)
|
||||
const src = entry.source;
|
||||
const arr = Array.isArray(src) ? src : (src ? [src] : []);
|
||||
for (const s of arr) {
|
||||
if (typeof s === "string") {
|
||||
// quoted link or plain text
|
||||
const unq = s.replace(/^"+|"+$/g, ""); // drop surrounding quotes if any
|
||||
if (unq.includes(`[[${thisName}]]`) || unq.includes(`[[${thisName}|`)) return true;
|
||||
// if they typed just the name
|
||||
if (unq.replace(/\[\[|\]\]/g, "").trim().toLowerCase() === thisLC) return true;
|
||||
} else if (s && typeof s === "object" && s.path) {
|
||||
// wikilink object
|
||||
const base = s.path.split("/").pop().replace(/\.md$/i, "").toLowerCase();
|
||||
if (base === thisLC) return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Optional (looser): plain text mention in summary
|
||||
// return sum.toLowerCase().includes(thisLC);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Collect rows: 1) own Intel, 2) mentions from other notes
|
||||
const rows = [];
|
||||
|
||||
// Own Intel (from this NPC note)
|
||||
for (const it of (THIS.Intel ?? [])) {
|
||||
rows.push({
|
||||
from: THIS.file.link,
|
||||
date: it.date ?? "",
|
||||
type: it.type ?? "",
|
||||
summary: String(it.summary ?? ""),
|
||||
session: it.session ?? "",
|
||||
source: it.source ?? "",
|
||||
rel: it.reliability ?? "",
|
||||
cred: it.credibility ?? "",
|
||||
tags: Array.isArray(it.tags) ? it.tags.join(", ") : (it.tags ?? "")
|
||||
});
|
||||
}
|
||||
|
||||
// Mentions elsewhere
|
||||
for (const p of pages.where(p => p.file.path !== THIS.file.path)) {
|
||||
for (const it of (p.Intel ?? [])) {
|
||||
if (mentionsThisNPC(it)) {
|
||||
rows.push({
|
||||
from: p.file.link,
|
||||
date: it.date ?? "",
|
||||
type: it.type ?? "",
|
||||
summary: String(it.summary ?? ""),
|
||||
session: it.session ?? "",
|
||||
source: it.source ?? "",
|
||||
rel: it.reliability ?? "",
|
||||
cred: it.credibility ?? "",
|
||||
tags: Array.isArray(it.tags) ? it.tags.join(", ") : (it.tags ?? "")
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sort newest first
|
||||
rows.sort((a,b) => String(b.date).localeCompare(String(a.date)));
|
||||
|
||||
if (!rows.length) {
|
||||
dv.paragraph("_No intel yet._");
|
||||
} else {
|
||||
dv.paragraph(`_Entries: ${rows.length} (own ${(THIS.Intel ?? []).length} + mentions ${Math.max(0, rows.length - (THIS.Intel ?? []).length)})_`);
|
||||
dv.table(
|
||||
["From Note","Date","Type","Summary","Session","Source","Rel","Cred","Tags"],
|
||||
rows.map(r => [r.from, r.date, r.type, r.summary, r.session, r.source, r.rel, r.cred, r.tags])
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
```button
|
||||
name ➕ Add Intel
|
||||
type command
|
||||
action Templater: Insert Add Intel Entry to NPC
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🏛️ Relations & Factions
|
||||
- **Primary Faction:** [[The Archmasons]]
|
||||
|
||||
- **Allied Factions:** [[Faction A]], [[Faction B]]
|
||||
- **Rival Factions:** [[Faction C]]
|
||||
- **Personal Enemies / Allies:** [[NPC or PC]]
|
||||
|
||||
+97
@@ -38,6 +38,103 @@ Tags:
|
||||
|
||||
---
|
||||
|
||||
## 🧠 Intel (auto)
|
||||
```dataviewjs
|
||||
const THIS = dv.current();
|
||||
const thisName = String(THIS.file.name);
|
||||
const thisLC = thisName.toLowerCase();
|
||||
|
||||
// Scan faction & NPC notes that have Intel arrays
|
||||
const pages = dv.pages("#npc or #faction").where(p => p.Intel);
|
||||
|
||||
// Does an Intel entry reference THIS NPC?
|
||||
function mentionsThisNPC(entry) {
|
||||
const sum = String(entry.summary ?? "");
|
||||
|
||||
// 1) Explicit wikilink in summary
|
||||
if (sum.includes(`[[${thisName}]]`) || sum.includes(`[[${thisName}|`)) return true;
|
||||
|
||||
// 2) Source field (string/link/list)
|
||||
const src = entry.source;
|
||||
const arr = Array.isArray(src) ? src : (src ? [src] : []);
|
||||
for (const s of arr) {
|
||||
if (typeof s === "string") {
|
||||
// quoted link or plain text
|
||||
const unq = s.replace(/^"+|"+$/g, ""); // drop surrounding quotes if any
|
||||
if (unq.includes(`[[${thisName}]]`) || unq.includes(`[[${thisName}|`)) return true;
|
||||
// if they typed just the name
|
||||
if (unq.replace(/\[\[|\]\]/g, "").trim().toLowerCase() === thisLC) return true;
|
||||
} else if (s && typeof s === "object" && s.path) {
|
||||
// wikilink object
|
||||
const base = s.path.split("/").pop().replace(/\.md$/i, "").toLowerCase();
|
||||
if (base === thisLC) return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Optional (looser): plain text mention in summary
|
||||
// return sum.toLowerCase().includes(thisLC);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Collect rows: 1) own Intel, 2) mentions from other notes
|
||||
const rows = [];
|
||||
|
||||
// Own Intel (from this NPC note)
|
||||
for (const it of (THIS.Intel ?? [])) {
|
||||
rows.push({
|
||||
from: THIS.file.link,
|
||||
date: it.date ?? "",
|
||||
type: it.type ?? "",
|
||||
summary: String(it.summary ?? ""),
|
||||
session: it.session ?? "",
|
||||
source: it.source ?? "",
|
||||
rel: it.reliability ?? "",
|
||||
cred: it.credibility ?? "",
|
||||
tags: Array.isArray(it.tags) ? it.tags.join(", ") : (it.tags ?? "")
|
||||
});
|
||||
}
|
||||
|
||||
// Mentions elsewhere
|
||||
for (const p of pages.where(p => p.file.path !== THIS.file.path)) {
|
||||
for (const it of (p.Intel ?? [])) {
|
||||
if (mentionsThisNPC(it)) {
|
||||
rows.push({
|
||||
from: p.file.link,
|
||||
date: it.date ?? "",
|
||||
type: it.type ?? "",
|
||||
summary: String(it.summary ?? ""),
|
||||
session: it.session ?? "",
|
||||
source: it.source ?? "",
|
||||
rel: it.reliability ?? "",
|
||||
cred: it.credibility ?? "",
|
||||
tags: Array.isArray(it.tags) ? it.tags.join(", ") : (it.tags ?? "")
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sort newest first
|
||||
rows.sort((a,b) => String(b.date).localeCompare(String(a.date)));
|
||||
|
||||
if (!rows.length) {
|
||||
dv.paragraph("_No intel yet._");
|
||||
} else {
|
||||
dv.paragraph(`_Entries: ${rows.length} (own ${(THIS.Intel ?? []).length} + mentions ${Math.max(0, rows.length - (THIS.Intel ?? []).length)})_`);
|
||||
dv.table(
|
||||
["From Note","Date","Type","Summary","Session","Source","Rel","Cred","Tags"],
|
||||
rows.map(r => [r.from, r.date, r.type, r.summary, r.session, r.source, r.rel, r.cred, r.tags])
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
```button
|
||||
name ➕ Add Intel
|
||||
type command
|
||||
action Templater: Insert Add Intel Entry to NPC
|
||||
```
|
||||
|
||||
---
|
||||
## 🏛️ Relations & Factions
|
||||
- **Primary Faction:** [[Faction Name]]
|
||||
- **Allied Factions:** [[Faction A]], [[Faction B]]
|
||||
|
||||
+98
@@ -38,6 +38,104 @@ Tags:
|
||||
|
||||
---
|
||||
|
||||
## 🧠 Intel (auto)
|
||||
```dataviewjs
|
||||
const THIS = dv.current();
|
||||
const thisName = String(THIS.file.name);
|
||||
const thisLC = thisName.toLowerCase();
|
||||
|
||||
// Scan faction & NPC notes that have Intel arrays
|
||||
const pages = dv.pages("#npc or #faction").where(p => p.Intel);
|
||||
|
||||
// Does an Intel entry reference THIS NPC?
|
||||
function mentionsThisNPC(entry) {
|
||||
const sum = String(entry.summary ?? "");
|
||||
|
||||
// 1) Explicit wikilink in summary
|
||||
if (sum.includes(`[[${thisName}]]`) || sum.includes(`[[${thisName}|`)) return true;
|
||||
|
||||
// 2) Source field (string/link/list)
|
||||
const src = entry.source;
|
||||
const arr = Array.isArray(src) ? src : (src ? [src] : []);
|
||||
for (const s of arr) {
|
||||
if (typeof s === "string") {
|
||||
// quoted link or plain text
|
||||
const unq = s.replace(/^"+|"+$/g, ""); // drop surrounding quotes if any
|
||||
if (unq.includes(`[[${thisName}]]`) || unq.includes(`[[${thisName}|`)) return true;
|
||||
// if they typed just the name
|
||||
if (unq.replace(/\[\[|\]\]/g, "").trim().toLowerCase() === thisLC) return true;
|
||||
} else if (s && typeof s === "object" && s.path) {
|
||||
// wikilink object
|
||||
const base = s.path.split("/").pop().replace(/\.md$/i, "").toLowerCase();
|
||||
if (base === thisLC) return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Optional (looser): plain text mention in summary
|
||||
// return sum.toLowerCase().includes(thisLC);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Collect rows: 1) own Intel, 2) mentions from other notes
|
||||
const rows = [];
|
||||
|
||||
// Own Intel (from this NPC note)
|
||||
for (const it of (THIS.Intel ?? [])) {
|
||||
rows.push({
|
||||
from: THIS.file.link,
|
||||
date: it.date ?? "",
|
||||
type: it.type ?? "",
|
||||
summary: String(it.summary ?? ""),
|
||||
session: it.session ?? "",
|
||||
source: it.source ?? "",
|
||||
rel: it.reliability ?? "",
|
||||
cred: it.credibility ?? "",
|
||||
tags: Array.isArray(it.tags) ? it.tags.join(", ") : (it.tags ?? "")
|
||||
});
|
||||
}
|
||||
|
||||
// Mentions elsewhere
|
||||
for (const p of pages.where(p => p.file.path !== THIS.file.path)) {
|
||||
for (const it of (p.Intel ?? [])) {
|
||||
if (mentionsThisNPC(it)) {
|
||||
rows.push({
|
||||
from: p.file.link,
|
||||
date: it.date ?? "",
|
||||
type: it.type ?? "",
|
||||
summary: String(it.summary ?? ""),
|
||||
session: it.session ?? "",
|
||||
source: it.source ?? "",
|
||||
rel: it.reliability ?? "",
|
||||
cred: it.credibility ?? "",
|
||||
tags: Array.isArray(it.tags) ? it.tags.join(", ") : (it.tags ?? "")
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sort newest first
|
||||
rows.sort((a,b) => String(b.date).localeCompare(String(a.date)));
|
||||
|
||||
if (!rows.length) {
|
||||
dv.paragraph("_No intel yet._");
|
||||
} else {
|
||||
dv.paragraph(`_Entries: ${rows.length} (own ${(THIS.Intel ?? []).length} + mentions ${Math.max(0, rows.length - (THIS.Intel ?? []).length)})_`);
|
||||
dv.table(
|
||||
["From Note","Date","Type","Summary","Session","Source","Rel","Cred","Tags"],
|
||||
rows.map(r => [r.from, r.date, r.type, r.summary, r.session, r.source, r.rel, r.cred, r.tags])
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
```button
|
||||
name ➕ Add Intel
|
||||
type command
|
||||
action Templater: Insert Add Intel Entry to NPC
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🏛️ Relations & Factions
|
||||
- **Primary Faction:** [[House Noctilun]]
|
||||
- However, in conversation with Calia, she mentions that she is not in the houses good graces, hence why she is stationed in Y'athyr as opposed to Ri'lesera
|
||||
|
||||
+98
@@ -41,6 +41,104 @@ Tags:
|
||||
|
||||
---
|
||||
|
||||
## 🧠 Intel (auto)
|
||||
```dataviewjs
|
||||
const THIS = dv.current();
|
||||
const thisName = String(THIS.file.name);
|
||||
const thisLC = thisName.toLowerCase();
|
||||
|
||||
// Scan faction & NPC notes that have Intel arrays
|
||||
const pages = dv.pages("#npc or #faction").where(p => p.Intel);
|
||||
|
||||
// Does an Intel entry reference THIS NPC?
|
||||
function mentionsThisNPC(entry) {
|
||||
const sum = String(entry.summary ?? "");
|
||||
|
||||
// 1) Explicit wikilink in summary
|
||||
if (sum.includes(`[[${thisName}]]`) || sum.includes(`[[${thisName}|`)) return true;
|
||||
|
||||
// 2) Source field (string/link/list)
|
||||
const src = entry.source;
|
||||
const arr = Array.isArray(src) ? src : (src ? [src] : []);
|
||||
for (const s of arr) {
|
||||
if (typeof s === "string") {
|
||||
// quoted link or plain text
|
||||
const unq = s.replace(/^"+|"+$/g, ""); // drop surrounding quotes if any
|
||||
if (unq.includes(`[[${thisName}]]`) || unq.includes(`[[${thisName}|`)) return true;
|
||||
// if they typed just the name
|
||||
if (unq.replace(/\[\[|\]\]/g, "").trim().toLowerCase() === thisLC) return true;
|
||||
} else if (s && typeof s === "object" && s.path) {
|
||||
// wikilink object
|
||||
const base = s.path.split("/").pop().replace(/\.md$/i, "").toLowerCase();
|
||||
if (base === thisLC) return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Optional (looser): plain text mention in summary
|
||||
// return sum.toLowerCase().includes(thisLC);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Collect rows: 1) own Intel, 2) mentions from other notes
|
||||
const rows = [];
|
||||
|
||||
// Own Intel (from this NPC note)
|
||||
for (const it of (THIS.Intel ?? [])) {
|
||||
rows.push({
|
||||
from: THIS.file.link,
|
||||
date: it.date ?? "",
|
||||
type: it.type ?? "",
|
||||
summary: String(it.summary ?? ""),
|
||||
session: it.session ?? "",
|
||||
source: it.source ?? "",
|
||||
rel: it.reliability ?? "",
|
||||
cred: it.credibility ?? "",
|
||||
tags: Array.isArray(it.tags) ? it.tags.join(", ") : (it.tags ?? "")
|
||||
});
|
||||
}
|
||||
|
||||
// Mentions elsewhere
|
||||
for (const p of pages.where(p => p.file.path !== THIS.file.path)) {
|
||||
for (const it of (p.Intel ?? [])) {
|
||||
if (mentionsThisNPC(it)) {
|
||||
rows.push({
|
||||
from: p.file.link,
|
||||
date: it.date ?? "",
|
||||
type: it.type ?? "",
|
||||
summary: String(it.summary ?? ""),
|
||||
session: it.session ?? "",
|
||||
source: it.source ?? "",
|
||||
rel: it.reliability ?? "",
|
||||
cred: it.credibility ?? "",
|
||||
tags: Array.isArray(it.tags) ? it.tags.join(", ") : (it.tags ?? "")
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sort newest first
|
||||
rows.sort((a,b) => String(b.date).localeCompare(String(a.date)));
|
||||
|
||||
if (!rows.length) {
|
||||
dv.paragraph("_No intel yet._");
|
||||
} else {
|
||||
dv.paragraph(`_Entries: ${rows.length} (own ${(THIS.Intel ?? []).length} + mentions ${Math.max(0, rows.length - (THIS.Intel ?? []).length)})_`);
|
||||
dv.table(
|
||||
["From Note","Date","Type","Summary","Session","Source","Rel","Cred","Tags"],
|
||||
rows.map(r => [r.from, r.date, r.type, r.summary, r.session, r.source, r.rel, r.cred, r.tags])
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
```button
|
||||
name ➕ Add Intel
|
||||
type command
|
||||
action Templater: Insert Add Intel Entry to NPC
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🏛️ Relations & Factions
|
||||
- **Primary Faction:** [[House Gille]]
|
||||
- **Allied Factions:** [[Faction A]], [[Faction B]]
|
||||
|
||||
+98
@@ -44,6 +44,104 @@ Tags:
|
||||
|
||||
---
|
||||
|
||||
## 🧠 Intel (auto)
|
||||
```dataviewjs
|
||||
const THIS = dv.current();
|
||||
const thisName = String(THIS.file.name);
|
||||
const thisLC = thisName.toLowerCase();
|
||||
|
||||
// Scan faction & NPC notes that have Intel arrays
|
||||
const pages = dv.pages("#npc or #faction").where(p => p.Intel);
|
||||
|
||||
// Does an Intel entry reference THIS NPC?
|
||||
function mentionsThisNPC(entry) {
|
||||
const sum = String(entry.summary ?? "");
|
||||
|
||||
// 1) Explicit wikilink in summary
|
||||
if (sum.includes(`[[${thisName}]]`) || sum.includes(`[[${thisName}|`)) return true;
|
||||
|
||||
// 2) Source field (string/link/list)
|
||||
const src = entry.source;
|
||||
const arr = Array.isArray(src) ? src : (src ? [src] : []);
|
||||
for (const s of arr) {
|
||||
if (typeof s === "string") {
|
||||
// quoted link or plain text
|
||||
const unq = s.replace(/^"+|"+$/g, ""); // drop surrounding quotes if any
|
||||
if (unq.includes(`[[${thisName}]]`) || unq.includes(`[[${thisName}|`)) return true;
|
||||
// if they typed just the name
|
||||
if (unq.replace(/\[\[|\]\]/g, "").trim().toLowerCase() === thisLC) return true;
|
||||
} else if (s && typeof s === "object" && s.path) {
|
||||
// wikilink object
|
||||
const base = s.path.split("/").pop().replace(/\.md$/i, "").toLowerCase();
|
||||
if (base === thisLC) return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Optional (looser): plain text mention in summary
|
||||
// return sum.toLowerCase().includes(thisLC);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Collect rows: 1) own Intel, 2) mentions from other notes
|
||||
const rows = [];
|
||||
|
||||
// Own Intel (from this NPC note)
|
||||
for (const it of (THIS.Intel ?? [])) {
|
||||
rows.push({
|
||||
from: THIS.file.link,
|
||||
date: it.date ?? "",
|
||||
type: it.type ?? "",
|
||||
summary: String(it.summary ?? ""),
|
||||
session: it.session ?? "",
|
||||
source: it.source ?? "",
|
||||
rel: it.reliability ?? "",
|
||||
cred: it.credibility ?? "",
|
||||
tags: Array.isArray(it.tags) ? it.tags.join(", ") : (it.tags ?? "")
|
||||
});
|
||||
}
|
||||
|
||||
// Mentions elsewhere
|
||||
for (const p of pages.where(p => p.file.path !== THIS.file.path)) {
|
||||
for (const it of (p.Intel ?? [])) {
|
||||
if (mentionsThisNPC(it)) {
|
||||
rows.push({
|
||||
from: p.file.link,
|
||||
date: it.date ?? "",
|
||||
type: it.type ?? "",
|
||||
summary: String(it.summary ?? ""),
|
||||
session: it.session ?? "",
|
||||
source: it.source ?? "",
|
||||
rel: it.reliability ?? "",
|
||||
cred: it.credibility ?? "",
|
||||
tags: Array.isArray(it.tags) ? it.tags.join(", ") : (it.tags ?? "")
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sort newest first
|
||||
rows.sort((a,b) => String(b.date).localeCompare(String(a.date)));
|
||||
|
||||
if (!rows.length) {
|
||||
dv.paragraph("_No intel yet._");
|
||||
} else {
|
||||
dv.paragraph(`_Entries: ${rows.length} (own ${(THIS.Intel ?? []).length} + mentions ${Math.max(0, rows.length - (THIS.Intel ?? []).length)})_`);
|
||||
dv.table(
|
||||
["From Note","Date","Type","Summary","Session","Source","Rel","Cred","Tags"],
|
||||
rows.map(r => [r.from, r.date, r.type, r.summary, r.session, r.source, r.rel, r.cred, r.tags])
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
```button
|
||||
name ➕ Add Intel
|
||||
type command
|
||||
action Templater: Insert Add Intel Entry to NPC
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🏛️ Relations & Factions
|
||||
- **Primary Faction:** [[Faction Name]]
|
||||
- **Allied Factions:** [[Faction A]], [[Faction B]]
|
||||
|
||||
+98
@@ -38,6 +38,104 @@ Tags:
|
||||
|
||||
---
|
||||
|
||||
## 🧠 Intel (auto)
|
||||
```dataviewjs
|
||||
const THIS = dv.current();
|
||||
const thisName = String(THIS.file.name);
|
||||
const thisLC = thisName.toLowerCase();
|
||||
|
||||
// Scan faction & NPC notes that have Intel arrays
|
||||
const pages = dv.pages("#npc or #faction").where(p => p.Intel);
|
||||
|
||||
// Does an Intel entry reference THIS NPC?
|
||||
function mentionsThisNPC(entry) {
|
||||
const sum = String(entry.summary ?? "");
|
||||
|
||||
// 1) Explicit wikilink in summary
|
||||
if (sum.includes(`[[${thisName}]]`) || sum.includes(`[[${thisName}|`)) return true;
|
||||
|
||||
// 2) Source field (string/link/list)
|
||||
const src = entry.source;
|
||||
const arr = Array.isArray(src) ? src : (src ? [src] : []);
|
||||
for (const s of arr) {
|
||||
if (typeof s === "string") {
|
||||
// quoted link or plain text
|
||||
const unq = s.replace(/^"+|"+$/g, ""); // drop surrounding quotes if any
|
||||
if (unq.includes(`[[${thisName}]]`) || unq.includes(`[[${thisName}|`)) return true;
|
||||
// if they typed just the name
|
||||
if (unq.replace(/\[\[|\]\]/g, "").trim().toLowerCase() === thisLC) return true;
|
||||
} else if (s && typeof s === "object" && s.path) {
|
||||
// wikilink object
|
||||
const base = s.path.split("/").pop().replace(/\.md$/i, "").toLowerCase();
|
||||
if (base === thisLC) return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Optional (looser): plain text mention in summary
|
||||
// return sum.toLowerCase().includes(thisLC);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Collect rows: 1) own Intel, 2) mentions from other notes
|
||||
const rows = [];
|
||||
|
||||
// Own Intel (from this NPC note)
|
||||
for (const it of (THIS.Intel ?? [])) {
|
||||
rows.push({
|
||||
from: THIS.file.link,
|
||||
date: it.date ?? "",
|
||||
type: it.type ?? "",
|
||||
summary: String(it.summary ?? ""),
|
||||
session: it.session ?? "",
|
||||
source: it.source ?? "",
|
||||
rel: it.reliability ?? "",
|
||||
cred: it.credibility ?? "",
|
||||
tags: Array.isArray(it.tags) ? it.tags.join(", ") : (it.tags ?? "")
|
||||
});
|
||||
}
|
||||
|
||||
// Mentions elsewhere
|
||||
for (const p of pages.where(p => p.file.path !== THIS.file.path)) {
|
||||
for (const it of (p.Intel ?? [])) {
|
||||
if (mentionsThisNPC(it)) {
|
||||
rows.push({
|
||||
from: p.file.link,
|
||||
date: it.date ?? "",
|
||||
type: it.type ?? "",
|
||||
summary: String(it.summary ?? ""),
|
||||
session: it.session ?? "",
|
||||
source: it.source ?? "",
|
||||
rel: it.reliability ?? "",
|
||||
cred: it.credibility ?? "",
|
||||
tags: Array.isArray(it.tags) ? it.tags.join(", ") : (it.tags ?? "")
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sort newest first
|
||||
rows.sort((a,b) => String(b.date).localeCompare(String(a.date)));
|
||||
|
||||
if (!rows.length) {
|
||||
dv.paragraph("_No intel yet._");
|
||||
} else {
|
||||
dv.paragraph(`_Entries: ${rows.length} (own ${(THIS.Intel ?? []).length} + mentions ${Math.max(0, rows.length - (THIS.Intel ?? []).length)})_`);
|
||||
dv.table(
|
||||
["From Note","Date","Type","Summary","Session","Source","Rel","Cred","Tags"],
|
||||
rows.map(r => [r.from, r.date, r.type, r.summary, r.session, r.source, r.rel, r.cred, r.tags])
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
```button
|
||||
name ➕ Add Intel
|
||||
type command
|
||||
action Templater: Insert Add Intel Entry to NPC
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🏛️ Relations & Factions
|
||||
- **Primary Faction:** [[Draycott Family]]
|
||||
- **Allied Factions:** [[House Valora]]
|
||||
|
||||
+98
@@ -48,6 +48,104 @@ Tags:
|
||||
|
||||
---
|
||||
|
||||
## 🧠 Intel (auto)
|
||||
```dataviewjs
|
||||
const THIS = dv.current();
|
||||
const thisName = String(THIS.file.name);
|
||||
const thisLC = thisName.toLowerCase();
|
||||
|
||||
// Scan faction & NPC notes that have Intel arrays
|
||||
const pages = dv.pages("#npc or #faction").where(p => p.Intel);
|
||||
|
||||
// Does an Intel entry reference THIS NPC?
|
||||
function mentionsThisNPC(entry) {
|
||||
const sum = String(entry.summary ?? "");
|
||||
|
||||
// 1) Explicit wikilink in summary
|
||||
if (sum.includes(`[[${thisName}]]`) || sum.includes(`[[${thisName}|`)) return true;
|
||||
|
||||
// 2) Source field (string/link/list)
|
||||
const src = entry.source;
|
||||
const arr = Array.isArray(src) ? src : (src ? [src] : []);
|
||||
for (const s of arr) {
|
||||
if (typeof s === "string") {
|
||||
// quoted link or plain text
|
||||
const unq = s.replace(/^"+|"+$/g, ""); // drop surrounding quotes if any
|
||||
if (unq.includes(`[[${thisName}]]`) || unq.includes(`[[${thisName}|`)) return true;
|
||||
// if they typed just the name
|
||||
if (unq.replace(/\[\[|\]\]/g, "").trim().toLowerCase() === thisLC) return true;
|
||||
} else if (s && typeof s === "object" && s.path) {
|
||||
// wikilink object
|
||||
const base = s.path.split("/").pop().replace(/\.md$/i, "").toLowerCase();
|
||||
if (base === thisLC) return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Optional (looser): plain text mention in summary
|
||||
// return sum.toLowerCase().includes(thisLC);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Collect rows: 1) own Intel, 2) mentions from other notes
|
||||
const rows = [];
|
||||
|
||||
// Own Intel (from this NPC note)
|
||||
for (const it of (THIS.Intel ?? [])) {
|
||||
rows.push({
|
||||
from: THIS.file.link,
|
||||
date: it.date ?? "",
|
||||
type: it.type ?? "",
|
||||
summary: String(it.summary ?? ""),
|
||||
session: it.session ?? "",
|
||||
source: it.source ?? "",
|
||||
rel: it.reliability ?? "",
|
||||
cred: it.credibility ?? "",
|
||||
tags: Array.isArray(it.tags) ? it.tags.join(", ") : (it.tags ?? "")
|
||||
});
|
||||
}
|
||||
|
||||
// Mentions elsewhere
|
||||
for (const p of pages.where(p => p.file.path !== THIS.file.path)) {
|
||||
for (const it of (p.Intel ?? [])) {
|
||||
if (mentionsThisNPC(it)) {
|
||||
rows.push({
|
||||
from: p.file.link,
|
||||
date: it.date ?? "",
|
||||
type: it.type ?? "",
|
||||
summary: String(it.summary ?? ""),
|
||||
session: it.session ?? "",
|
||||
source: it.source ?? "",
|
||||
rel: it.reliability ?? "",
|
||||
cred: it.credibility ?? "",
|
||||
tags: Array.isArray(it.tags) ? it.tags.join(", ") : (it.tags ?? "")
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sort newest first
|
||||
rows.sort((a,b) => String(b.date).localeCompare(String(a.date)));
|
||||
|
||||
if (!rows.length) {
|
||||
dv.paragraph("_No intel yet._");
|
||||
} else {
|
||||
dv.paragraph(`_Entries: ${rows.length} (own ${(THIS.Intel ?? []).length} + mentions ${Math.max(0, rows.length - (THIS.Intel ?? []).length)})_`);
|
||||
dv.table(
|
||||
["From Note","Date","Type","Summary","Session","Source","Rel","Cred","Tags"],
|
||||
rows.map(r => [r.from, r.date, r.type, r.summary, r.session, r.source, r.rel, r.cred, r.tags])
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
```button
|
||||
name ➕ Add Intel
|
||||
type command
|
||||
action Templater: Insert Add Intel Entry to NPC
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🏛️ Relations & Factions
|
||||
- **Primary Faction:** [[House Asase]]
|
||||
- **Allied Factions:** [[Faction A]], [[Faction B]]
|
||||
|
||||
+100
@@ -3,8 +3,10 @@ Level_of_Influence: 2
|
||||
Faction:
|
||||
Tags:
|
||||
- npc
|
||||
Intel:
|
||||
---
|
||||
|
||||
|
||||
# Laughlin
|
||||
*Figment Grandhall Scholar, Solicitor, Schmoozer and Fundraiser*
|
||||
|
||||
@@ -47,6 +49,104 @@ Tags:
|
||||
|
||||
---
|
||||
|
||||
## 🧠 Intel (auto)
|
||||
```dataviewjs
|
||||
const THIS = dv.current();
|
||||
const thisName = String(THIS.file.name);
|
||||
const thisLC = thisName.toLowerCase();
|
||||
|
||||
// Scan faction & NPC notes that have Intel arrays
|
||||
const pages = dv.pages("#npc or #faction").where(p => p.Intel);
|
||||
|
||||
// Does an Intel entry reference THIS NPC?
|
||||
function mentionsThisNPC(entry) {
|
||||
const sum = String(entry.summary ?? "");
|
||||
|
||||
// 1) Explicit wikilink in summary
|
||||
if (sum.includes(`[[${thisName}]]`) || sum.includes(`[[${thisName}|`)) return true;
|
||||
|
||||
// 2) Source field (string/link/list)
|
||||
const src = entry.source;
|
||||
const arr = Array.isArray(src) ? src : (src ? [src] : []);
|
||||
for (const s of arr) {
|
||||
if (typeof s === "string") {
|
||||
// quoted link or plain text
|
||||
const unq = s.replace(/^"+|"+$/g, ""); // drop surrounding quotes if any
|
||||
if (unq.includes(`[[${thisName}]]`) || unq.includes(`[[${thisName}|`)) return true;
|
||||
// if they typed just the name
|
||||
if (unq.replace(/\[\[|\]\]/g, "").trim().toLowerCase() === thisLC) return true;
|
||||
} else if (s && typeof s === "object" && s.path) {
|
||||
// wikilink object
|
||||
const base = s.path.split("/").pop().replace(/\.md$/i, "").toLowerCase();
|
||||
if (base === thisLC) return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Optional (looser): plain text mention in summary
|
||||
// return sum.toLowerCase().includes(thisLC);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Collect rows: 1) own Intel, 2) mentions from other notes
|
||||
const rows = [];
|
||||
|
||||
// Own Intel (from this NPC note)
|
||||
for (const it of (THIS.Intel ?? [])) {
|
||||
rows.push({
|
||||
from: THIS.file.link,
|
||||
date: it.date ?? "",
|
||||
type: it.type ?? "",
|
||||
summary: String(it.summary ?? ""),
|
||||
session: it.session ?? "",
|
||||
source: it.source ?? "",
|
||||
rel: it.reliability ?? "",
|
||||
cred: it.credibility ?? "",
|
||||
tags: Array.isArray(it.tags) ? it.tags.join(", ") : (it.tags ?? "")
|
||||
});
|
||||
}
|
||||
|
||||
// Mentions elsewhere
|
||||
for (const p of pages.where(p => p.file.path !== THIS.file.path)) {
|
||||
for (const it of (p.Intel ?? [])) {
|
||||
if (mentionsThisNPC(it)) {
|
||||
rows.push({
|
||||
from: p.file.link,
|
||||
date: it.date ?? "",
|
||||
type: it.type ?? "",
|
||||
summary: String(it.summary ?? ""),
|
||||
session: it.session ?? "",
|
||||
source: it.source ?? "",
|
||||
rel: it.reliability ?? "",
|
||||
cred: it.credibility ?? "",
|
||||
tags: Array.isArray(it.tags) ? it.tags.join(", ") : (it.tags ?? "")
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sort newest first
|
||||
rows.sort((a,b) => String(b.date).localeCompare(String(a.date)));
|
||||
|
||||
if (!rows.length) {
|
||||
dv.paragraph("_No intel yet._");
|
||||
} else {
|
||||
dv.paragraph(`_Entries: ${rows.length} (own ${(THIS.Intel ?? []).length} + mentions ${Math.max(0, rows.length - (THIS.Intel ?? []).length)})_`);
|
||||
dv.table(
|
||||
["From Note","Date","Type","Summary","Session","Source","Rel","Cred","Tags"],
|
||||
rows.map(r => [r.from, r.date, r.type, r.summary, r.session, r.source, r.rel, r.cred, r.tags])
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
```button
|
||||
name ➕ Add Intel
|
||||
type command
|
||||
action Templater: Insert Add Intel Entry to NPC
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🏛️ Relations & Factions
|
||||
- **Primary Faction:** [[Faction Name]]
|
||||
- **Allied Factions:** [[Faction A]], [[Faction B]]
|
||||
|
||||
+98
@@ -40,6 +40,104 @@ Tags:
|
||||
|
||||
---
|
||||
|
||||
## 🧠 Intel (auto)
|
||||
```dataviewjs
|
||||
const THIS = dv.current();
|
||||
const thisName = String(THIS.file.name);
|
||||
const thisLC = thisName.toLowerCase();
|
||||
|
||||
// Scan faction & NPC notes that have Intel arrays
|
||||
const pages = dv.pages("#npc or #faction").where(p => p.Intel);
|
||||
|
||||
// Does an Intel entry reference THIS NPC?
|
||||
function mentionsThisNPC(entry) {
|
||||
const sum = String(entry.summary ?? "");
|
||||
|
||||
// 1) Explicit wikilink in summary
|
||||
if (sum.includes(`[[${thisName}]]`) || sum.includes(`[[${thisName}|`)) return true;
|
||||
|
||||
// 2) Source field (string/link/list)
|
||||
const src = entry.source;
|
||||
const arr = Array.isArray(src) ? src : (src ? [src] : []);
|
||||
for (const s of arr) {
|
||||
if (typeof s === "string") {
|
||||
// quoted link or plain text
|
||||
const unq = s.replace(/^"+|"+$/g, ""); // drop surrounding quotes if any
|
||||
if (unq.includes(`[[${thisName}]]`) || unq.includes(`[[${thisName}|`)) return true;
|
||||
// if they typed just the name
|
||||
if (unq.replace(/\[\[|\]\]/g, "").trim().toLowerCase() === thisLC) return true;
|
||||
} else if (s && typeof s === "object" && s.path) {
|
||||
// wikilink object
|
||||
const base = s.path.split("/").pop().replace(/\.md$/i, "").toLowerCase();
|
||||
if (base === thisLC) return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Optional (looser): plain text mention in summary
|
||||
// return sum.toLowerCase().includes(thisLC);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Collect rows: 1) own Intel, 2) mentions from other notes
|
||||
const rows = [];
|
||||
|
||||
// Own Intel (from this NPC note)
|
||||
for (const it of (THIS.Intel ?? [])) {
|
||||
rows.push({
|
||||
from: THIS.file.link,
|
||||
date: it.date ?? "",
|
||||
type: it.type ?? "",
|
||||
summary: String(it.summary ?? ""),
|
||||
session: it.session ?? "",
|
||||
source: it.source ?? "",
|
||||
rel: it.reliability ?? "",
|
||||
cred: it.credibility ?? "",
|
||||
tags: Array.isArray(it.tags) ? it.tags.join(", ") : (it.tags ?? "")
|
||||
});
|
||||
}
|
||||
|
||||
// Mentions elsewhere
|
||||
for (const p of pages.where(p => p.file.path !== THIS.file.path)) {
|
||||
for (const it of (p.Intel ?? [])) {
|
||||
if (mentionsThisNPC(it)) {
|
||||
rows.push({
|
||||
from: p.file.link,
|
||||
date: it.date ?? "",
|
||||
type: it.type ?? "",
|
||||
summary: String(it.summary ?? ""),
|
||||
session: it.session ?? "",
|
||||
source: it.source ?? "",
|
||||
rel: it.reliability ?? "",
|
||||
cred: it.credibility ?? "",
|
||||
tags: Array.isArray(it.tags) ? it.tags.join(", ") : (it.tags ?? "")
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sort newest first
|
||||
rows.sort((a,b) => String(b.date).localeCompare(String(a.date)));
|
||||
|
||||
if (!rows.length) {
|
||||
dv.paragraph("_No intel yet._");
|
||||
} else {
|
||||
dv.paragraph(`_Entries: ${rows.length} (own ${(THIS.Intel ?? []).length} + mentions ${Math.max(0, rows.length - (THIS.Intel ?? []).length)})_`);
|
||||
dv.table(
|
||||
["From Note","Date","Type","Summary","Session","Source","Rel","Cred","Tags"],
|
||||
rows.map(r => [r.from, r.date, r.type, r.summary, r.session, r.source, r.rel, r.cred, r.tags])
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
```button
|
||||
name ➕ Add Intel
|
||||
type command
|
||||
action Templater: Insert Add Intel Entry to NPC
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🏛️ Relations & Factions
|
||||
- **Primary Faction:** [[Faction Name]]
|
||||
- **Allied Factions:** [[Faction A]], [[Faction B]]
|
||||
|
||||
+98
@@ -38,6 +38,104 @@ Tags:
|
||||
|
||||
---
|
||||
|
||||
## 🧠 Intel (auto)
|
||||
```dataviewjs
|
||||
const THIS = dv.current();
|
||||
const thisName = String(THIS.file.name);
|
||||
const thisLC = thisName.toLowerCase();
|
||||
|
||||
// Scan faction & NPC notes that have Intel arrays
|
||||
const pages = dv.pages("#npc or #faction").where(p => p.Intel);
|
||||
|
||||
// Does an Intel entry reference THIS NPC?
|
||||
function mentionsThisNPC(entry) {
|
||||
const sum = String(entry.summary ?? "");
|
||||
|
||||
// 1) Explicit wikilink in summary
|
||||
if (sum.includes(`[[${thisName}]]`) || sum.includes(`[[${thisName}|`)) return true;
|
||||
|
||||
// 2) Source field (string/link/list)
|
||||
const src = entry.source;
|
||||
const arr = Array.isArray(src) ? src : (src ? [src] : []);
|
||||
for (const s of arr) {
|
||||
if (typeof s === "string") {
|
||||
// quoted link or plain text
|
||||
const unq = s.replace(/^"+|"+$/g, ""); // drop surrounding quotes if any
|
||||
if (unq.includes(`[[${thisName}]]`) || unq.includes(`[[${thisName}|`)) return true;
|
||||
// if they typed just the name
|
||||
if (unq.replace(/\[\[|\]\]/g, "").trim().toLowerCase() === thisLC) return true;
|
||||
} else if (s && typeof s === "object" && s.path) {
|
||||
// wikilink object
|
||||
const base = s.path.split("/").pop().replace(/\.md$/i, "").toLowerCase();
|
||||
if (base === thisLC) return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Optional (looser): plain text mention in summary
|
||||
// return sum.toLowerCase().includes(thisLC);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Collect rows: 1) own Intel, 2) mentions from other notes
|
||||
const rows = [];
|
||||
|
||||
// Own Intel (from this NPC note)
|
||||
for (const it of (THIS.Intel ?? [])) {
|
||||
rows.push({
|
||||
from: THIS.file.link,
|
||||
date: it.date ?? "",
|
||||
type: it.type ?? "",
|
||||
summary: String(it.summary ?? ""),
|
||||
session: it.session ?? "",
|
||||
source: it.source ?? "",
|
||||
rel: it.reliability ?? "",
|
||||
cred: it.credibility ?? "",
|
||||
tags: Array.isArray(it.tags) ? it.tags.join(", ") : (it.tags ?? "")
|
||||
});
|
||||
}
|
||||
|
||||
// Mentions elsewhere
|
||||
for (const p of pages.where(p => p.file.path !== THIS.file.path)) {
|
||||
for (const it of (p.Intel ?? [])) {
|
||||
if (mentionsThisNPC(it)) {
|
||||
rows.push({
|
||||
from: p.file.link,
|
||||
date: it.date ?? "",
|
||||
type: it.type ?? "",
|
||||
summary: String(it.summary ?? ""),
|
||||
session: it.session ?? "",
|
||||
source: it.source ?? "",
|
||||
rel: it.reliability ?? "",
|
||||
cred: it.credibility ?? "",
|
||||
tags: Array.isArray(it.tags) ? it.tags.join(", ") : (it.tags ?? "")
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sort newest first
|
||||
rows.sort((a,b) => String(b.date).localeCompare(String(a.date)));
|
||||
|
||||
if (!rows.length) {
|
||||
dv.paragraph("_No intel yet._");
|
||||
} else {
|
||||
dv.paragraph(`_Entries: ${rows.length} (own ${(THIS.Intel ?? []).length} + mentions ${Math.max(0, rows.length - (THIS.Intel ?? []).length)})_`);
|
||||
dv.table(
|
||||
["From Note","Date","Type","Summary","Session","Source","Rel","Cred","Tags"],
|
||||
rows.map(r => [r.from, r.date, r.type, r.summary, r.session, r.source, r.rel, r.cred, r.tags])
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
```button
|
||||
name ➕ Add Intel
|
||||
type command
|
||||
action Templater: Insert Add Intel Entry to NPC
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🏛️ Relations & Factions
|
||||
- **Primary Faction:** [[Faction Name]]
|
||||
- **Allied Factions:** [[Faction A]], [[Faction B]]
|
||||
|
||||
+98
@@ -47,6 +47,104 @@ Tags:
|
||||
|
||||
---
|
||||
|
||||
|
||||
## 🧠 Intel (auto)
|
||||
```dataviewjs
|
||||
const THIS = dv.current();
|
||||
const thisName = String(THIS.file.name);
|
||||
const thisLC = thisName.toLowerCase();
|
||||
|
||||
// Scan faction & NPC notes that have Intel arrays
|
||||
const pages = dv.pages("#npc or #faction").where(p => p.Intel);
|
||||
|
||||
// Does an Intel entry reference THIS NPC?
|
||||
function mentionsThisNPC(entry) {
|
||||
const sum = String(entry.summary ?? "");
|
||||
|
||||
// 1) Explicit wikilink in summary
|
||||
if (sum.includes(`[[${thisName}]]`) || sum.includes(`[[${thisName}|`)) return true;
|
||||
|
||||
// 2) Source field (string/link/list)
|
||||
const src = entry.source;
|
||||
const arr = Array.isArray(src) ? src : (src ? [src] : []);
|
||||
for (const s of arr) {
|
||||
if (typeof s === "string") {
|
||||
// quoted link or plain text
|
||||
const unq = s.replace(/^"+|"+$/g, ""); // drop surrounding quotes if any
|
||||
if (unq.includes(`[[${thisName}]]`) || unq.includes(`[[${thisName}|`)) return true;
|
||||
// if they typed just the name
|
||||
if (unq.replace(/\[\[|\]\]/g, "").trim().toLowerCase() === thisLC) return true;
|
||||
} else if (s && typeof s === "object" && s.path) {
|
||||
// wikilink object
|
||||
const base = s.path.split("/").pop().replace(/\.md$/i, "").toLowerCase();
|
||||
if (base === thisLC) return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Optional (looser): plain text mention in summary
|
||||
// return sum.toLowerCase().includes(thisLC);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Collect rows: 1) own Intel, 2) mentions from other notes
|
||||
const rows = [];
|
||||
|
||||
// Own Intel (from this NPC note)
|
||||
for (const it of (THIS.Intel ?? [])) {
|
||||
rows.push({
|
||||
from: THIS.file.link,
|
||||
date: it.date ?? "",
|
||||
type: it.type ?? "",
|
||||
summary: String(it.summary ?? ""),
|
||||
session: it.session ?? "",
|
||||
source: it.source ?? "",
|
||||
rel: it.reliability ?? "",
|
||||
cred: it.credibility ?? "",
|
||||
tags: Array.isArray(it.tags) ? it.tags.join(", ") : (it.tags ?? "")
|
||||
});
|
||||
}
|
||||
|
||||
// Mentions elsewhere
|
||||
for (const p of pages.where(p => p.file.path !== THIS.file.path)) {
|
||||
for (const it of (p.Intel ?? [])) {
|
||||
if (mentionsThisNPC(it)) {
|
||||
rows.push({
|
||||
from: p.file.link,
|
||||
date: it.date ?? "",
|
||||
type: it.type ?? "",
|
||||
summary: String(it.summary ?? ""),
|
||||
session: it.session ?? "",
|
||||
source: it.source ?? "",
|
||||
rel: it.reliability ?? "",
|
||||
cred: it.credibility ?? "",
|
||||
tags: Array.isArray(it.tags) ? it.tags.join(", ") : (it.tags ?? "")
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sort newest first
|
||||
rows.sort((a,b) => String(b.date).localeCompare(String(a.date)));
|
||||
|
||||
if (!rows.length) {
|
||||
dv.paragraph("_No intel yet._");
|
||||
} else {
|
||||
dv.paragraph(`_Entries: ${rows.length} (own ${(THIS.Intel ?? []).length} + mentions ${Math.max(0, rows.length - (THIS.Intel ?? []).length)})_`);
|
||||
dv.table(
|
||||
["From Note","Date","Type","Summary","Session","Source","Rel","Cred","Tags"],
|
||||
rows.map(r => [r.from, r.date, r.type, r.summary, r.session, r.source, r.rel, r.cred, r.tags])
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
```button
|
||||
name ➕ Add Intel
|
||||
type command
|
||||
action Templater: Insert Add Intel Entry to NPC
|
||||
```
|
||||
|
||||
---
|
||||
## 🏛️ Relations & Factions
|
||||
- **Primary Faction:** [[House Elidari]]
|
||||
- **Allied Factions:** [[Faction A]], [[Faction B]]
|
||||
|
||||
+60
-14
@@ -8,6 +8,7 @@ Tags:
|
||||
|
||||
|
||||
|
||||
|
||||
# Session 10 - Wined, Dined and Influenced
|
||||
|
||||
> **Date:** `= this.Date` • **Name:** `= this.Session_Name`
|
||||
@@ -16,19 +17,6 @@ Tags:
|
||||
|
||||
## 📄 Session Summary (auto)
|
||||
<!-- SUMMARY-START -->
|
||||
At dinner, the party split across three tables to engage the city’s notables.
|
||||
- **Val & Calen with [[Iniana Asase]]**
|
||||
- Learned her activism roots in the Drenches and struggles with the [[Thin Wisps]].
|
||||
- She advised the party to seek official **licensure** for legitimacy.
|
||||
- Discussions focused on improving Y’athyr and how to confront entrenched problems.
|
||||
- **[[Faylen Valora]] & Metternich with [[Ronan Elidari]], [[Amity Cornwallis]], [[Deidre Gille]]**
|
||||
- [[Faylen Valora]]’s speech earned **+1 Influence with every notable**, though reactions varied.
|
||||
- Later debate with Ronan won **+1 Influence with [[Amity Cornwallis**]].
|
||||
- Metternich bonded with Amity privately, trading cynical and practical views on leadership and power.
|
||||
- His attempt at Discovery with Deidre Gille failed.
|
||||
- **Kite with Elthea Rinvale**
|
||||
- Discussed her presence in Y’athyr, her business with the Consortium, and his reasons for leaving Castore.
|
||||
- Conversation touched on Trackless vs. E’in society.
|
||||
<!-- SUMMARY-END -->
|
||||
|
||||
```button
|
||||
@@ -152,7 +140,65 @@ action Templater: Insert Generate Session Summary
|
||||
|
||||
---
|
||||
|
||||
## 🧠 Intel Captured
|
||||
## 🧠 Intel Captured (auto)
|
||||
|
||||
```dataviewjs
|
||||
const THIS = dv.current();
|
||||
const sessName = THIS.file.name;
|
||||
const sessDate = THIS.Date ?? dv.current().file.frontmatter?.Date ?? "";
|
||||
const sessLC = sessName.toLowerCase();
|
||||
|
||||
const pages = dv.pages("#npc or #faction").where(p => p.Intel);
|
||||
|
||||
function matchesSessionField(sessionField) {
|
||||
const list = Array.isArray(sessionField) ? sessionField : [sessionField];
|
||||
for (const s of list) {
|
||||
if (!s) continue;
|
||||
if (typeof s === "object" && s.path) {
|
||||
const base = s.path.split("/").pop().replace(/\.md$/i,"");
|
||||
if (base.toLowerCase() === sessLC) return true;
|
||||
} else {
|
||||
const text = String(s);
|
||||
if (text.includes(`[[${sessName}]]`)) return true;
|
||||
if (text.toLowerCase() === sessLC) return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
const rows = [];
|
||||
for (const p of pages) {
|
||||
for (const it of p.Intel) {
|
||||
let ok = false;
|
||||
if (it.session) ok = matchesSessionField(it.session);
|
||||
if (!ok && sessDate && it.date) ok = String(it.date) === String(sessDate); // fallback
|
||||
if (ok) {
|
||||
rows.push({
|
||||
from: p.file.link,
|
||||
date: it.date ?? "",
|
||||
type: it.type ?? "",
|
||||
summary: String(it.summary ?? ""),
|
||||
source: it.source ?? "",
|
||||
rel: it.reliability ?? "",
|
||||
cred: it.credibility ?? "",
|
||||
tags: Array.isArray(it.tags) ? it.tags.join(", ") : (it.tags ?? "")
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rows.sort((a,b)=> String(b.date).localeCompare(String(a.date)));
|
||||
|
||||
if (!rows.length) {
|
||||
dv.paragraph("_No intel captured for this session yet._");
|
||||
} else {
|
||||
dv.table(
|
||||
["From", "Date", "Type", "Summary", "Source", "Rel", "Cred", "Tags"],
|
||||
rows.map(r => [r.from, r.date, r.type, r.summary, r.source, r.rel, r.cred, r.tags])
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user