<%* // // Main Code Section //

// Call modal form const result = await MF.openForm(‘PLANE’);

// Declare variables after form returns values const name = result.Name.value; const temp = app.vault.getAbstractFileByPath(‘temp123.md’);

// Rename, move, & open note await tp.file.move(Compendium/Atlas/${name}/${name}); await app.workspace.getLeaf(true).openFile(tp.file.find_tfile(name)); new Notice().noticeEl.innerHTML = <span style="color: green; font-weight: bold;">Finished!</span><br>New plane <span style="text-decoration: underline;">${name}</span> added; _%>


type: plane tags:

banner

<% name %>

:FasCircleHalfStroke: Plane of Existence


SUMMARY

Description of the plane <% name %>.

marker

Column

dv.container.className += ’ npcDirect’; dv.list(dv.pages(‘“Compendium/NPC’s”’) .where(p p.file.outlinks.includes(dv.current().file.link)) .sort(p p.file.link) .map(p p.headerLink), 1);

```dataviewjs

dv.container.className += ’ npcChild’; let page = dv.current().file.path; let pages = new Set(); let stack = [page]; while (stack.length > 0) { let elem = stack.pop(); let meta = dv.page(elem); if (!meta) continue; for (let inlink of meta.file.inlinks.concat(meta.file.outlinks).array()) { let locations = dv.page(inlink.path); if (!locations || pages.has(inlink.path) || inlink.path === meta.locations?.[0]) continue; if (dv.array(locations.locations).join(”, “).includes(meta.file.path)) { pages.add(inlink.path); stack.push(inlink.path); }}} let data = Array.from(pages) .filter(p dv.page(p)?.type === “npc”) .map(p dv.page(p).headerLink) .sort((a, b) { if (a < b) return -1; if (a > b) return 1; return 0; }); dv.list(data);

LIST WITHOUT ID headerLink FROM “Compendium/Atlas/<% name %>” WHERE type= “realm” SORT file.name ASC

LIST WITHOUT ID headerLink FROM “Session Notes” AND <% name %> SORT file.ctime DESC