<%*
// 1) Rename if title starts with āNewSpeciesā let title; if (tp.file.title.startsWith(āNewSpeciesā)) { title = await tp.system.prompt(āEnter Sapient Species Nameā); if (!title) { new Notice(āNo name entered. Aborting.ā); return; } await tp.file.rename(title); } else { title = tp.file.title; }
// 2) Gather all planet files under 2-World/Planets const planetFiles = tp.app.vault.getMarkdownFiles() .filter(f ā f.path.startsWith(ā2-World/Planets/ā));
const placeholderLabel = āš No Planet Selectedā; const placeholderPath = āplaceholderā;
// 3) Prompt for container planet const planetChoices = [placeholderLabel, ā¦planetFiles.map(f ā f.basename)]; const planetValues = [placeholderPath, ā¦planetFiles.map(f ā f.path)]; const chosenPath = await tp.system.suggester(planetChoices, planetValues, true); if (!chosenPath) return;
// 4) Build the wiki-link or fallback let wikiLink = null; if (chosenPath !== placeholderPath) { const chosenAlias = chosenPath.split(ā/ā).pop().replace(/.md{chosenPath}|${chosenAlias}]]`; }
// 5) Write to frontmatter setTimeout(() ā { const newFile = tp.file.find_tfile(tp.file.path(true)); if (!newFile) return; app.fileManager.processFrontMatter(newFile, fm ā { fm[āMyContainerā] = wikiLink ?? āNoneā; }); }, 100);
%>
Parent Region:
INPUT[inlineListSuggester(optionQuery(#Category/Place), optionQuery(#Category/Planet)):MyContainer]
Column
Place Name
INPUT[select( option(1, ā¹ļøGeneral), option(2, āļøGoals), option(3, šGM Notes), class(tabbed) )]Tabbed
NOTE
INPUT[select( option(1, š§¾History), option(2, š§āš¦°Psyiology), option(3, š§¬Biology), option(4,šPersonality), option(5, š§ Intelligence), class(tabbed) )]Tabbed
General
Enter description of the sapient species here.
Goals
- Defining Features
- Commonly Spoken Languages:
- Average Lifespan
- Average Adulthood
- Average Size
- Average Weight
- Strengths
- Weaknesses
Membership
To join the group, a PC must spend X week ādoingā something, or āsomething elseā.
GM Notes
Make notes of what you need to track in the town here.
Hierarchy
BUTTON[button_person] List important relationships here.
// 1) Grab your frontmatter arrays
const leader = dv.current().leader ?? null;
const officers = dv.current().officers ?? [];
const members = dv.current().members ?? [];
const initiates = dv.current().initiates ?? [];
// 2) Render the Mermaid diagram
dv.paragraph(
"```mermaid\nflowchart LR\n" +
// Leader node
(leader
? `L[${leader}]:::internal-link\n`
: "") +
// Officers group
(officers.length > 0
? `OG[Officers]\nL --> OG\n` +
officers.map((o,i) =>
`O${i+1}[${o}]:::internal-link\nOG --> O${i+1}\n`
).join("")
: "") +
// Members group
(members.length > 0
? `MG[Members]\n${officers.length ? "OG" : "L"} --> MG\n` +
members.map((m,i) =>
`M${i+1}[${m}]:::internal-link\nMG --> M${i+1}\n`
).join("")
: "") +
// Initiates group
(initiates.length > 0
? `IG[Initiates]\n${members.length ? "MG" : (officers.length ? "OG" : "L")} --> IG\n` +
initiates.map((n,i) =>
`I${i+1}[${n}]:::internal-link\nIG --> I${i+1}\n`
).join("")
: "") +
"```"
)Relationship Config - Enter name of People Notes
Leader Officers INPUT[list:leader]INPUT[list:officers]
Members Initiates INPUT[list:members]INPUT[list:initiates]
Enemies/Allies
Enemies: INPUT[inlineListSuggester(optionQuery(#Category/Group),optionQuery(#Category/People)):MyEnemies]
Allies: INPUT[inlineListSuggester(optionQuery(#Category/Group),optionQuery(#Category/People)):MyAllies]
People
The following people are members of this group.
TABLE WITHOUT ID link(file.name) AS "Name", char_race AS "Race", char_gender AS "Gender"
FROM "2-Campaign/Quests"
WHERE contains(Connected_Groups, this.file.link)
SORT file.name ASCproperties:
property.char_age:
displayName: Age
property.char_gender:
displayName: Gender
property.char_race:
displayName: Race
property.char_status:
displayName: Status
file.name:
displayName: Name
note.char_status:
displayName: Status
note.char_race:
displayName: Race
note.char_gender:
displayName: Gender
note.char_age:
displayName: Age Range
views:
- type: table
name: People
filters:
and:
- file.inFolder("2-World/People")
- MyContainer.contains(this.file.path)
order:
- file.name
- MyContainer
- MyCategory
- char_status
- char_race
- char_gender
- char_age
sort:
- column: note.char_race
direction: ASC
- column: note.MyContainer
direction: ASC
- column: file.name
direction: ASC
columnSize:
file.name: 177
note.MyCategory: 221
note.MyContainer: 244
note.char_status: 137
note.char_race: 160
note.char_gender: 143
note.char_age: 149
Services
Services offered.
Public Services
Item Cost Weight Service 1 1gp L Service 2 1cp -
Member Services
Item Cost Weight Service 1 1gp L Service 2 1cp -
Ranks
Ranks listed here
- Rank 1: Benefit
- Rank 2: Benefit
- Rank 3: Benefit
