<%*

// 1) Prompt for item name const poiName = await tp.system.prompt(ā€œEnter Item Nameā€, tp.file.title); if (!poiName) return; await tp.file.rename(poiName);

// 2) Gather and pick a container from multiple directories const containerPaths = [ ā€œ2-World/Quests/ā€, ā€œ2-World/People/ā€, ā€œ2-World/Groups/ā€, ā€œ2-World/Points of Interest/ā€, ā€œ2-World/Places/ā€ ];

const containerFiles = tp.app.vault.getMarkdownFiles() .filter(f ⇒ containerPaths.some(path ⇒ f.path.startsWith(path)));

const placeholderLabel = ā€šŸŒ€ No Container Selectedā€; const placeholderPath = ā€œplaceholderā€;

// Build list of choices const containerChoices = [placeholderLabel, …containerFiles.map(f ⇒ f.basename)]; const containerValues = [placeholderPath, …containerFiles.map(f ⇒ f.path)];

const chosenPath = await tp.system.suggester(containerChoices, containerValues, true); if (!chosenPath) return;

// 3) Build full wiki-link for MyContainer let wikiLink = null; if (chosenPath !== placeholderPath) { const containerAlias = chosenPath.split(ā€/ā€œ).pop().replace(/.md{chosenPath}|${containerAlias}]]`; }

// 4) Write MyContainer into front-matter setTimeout(() ⇒ { const file = app.vault.getAbstractFileByPath(tp.file.path(true)); if (!file) return; app.fileManager.processFrontMatter(file, fm ⇒ { fm[ā€œMyContainerā€] = wikiLink ?? ā€œNoneā€; }); }, 100);

%>

Parent Location: INPUT[inlineListSuggester(optionQuery(#Category/Quest),optionQuery(#Category/People),optionQuery(#Category/Group),optionQuery(#Category/Place),optionQuery(#Category/PointofInterest)):MyContainer]

Column

Place Name

INPUT[select(
option(1, ā„¹ļøDescription),
option(2, āš”ļøFeatures),
option(3, šŸ”—Connections),
option(4, šŸ“GM Notes),
class(tabbed)
)]

Tabbed

Description

This is the items description.


Source:

Features

Cost: INPUT[number:cost]

Weight: INPUT[number:weight]

Category: INPUT[template-item-type][:item_type]


Activate: How to active? Frequency: How often can it be activated? Trigger: Does something trigger the activation? Effect: What happens when activated?

GM Notes

Make notes of what you need to track in the town here. Secrets perhaps?

Connections

Is the item linked to any groups or quests?

Quests: INPUT[inlineListSuggester(optionQuery(#Category/Quest)):Connected_Quests]

Groups: INPUT[inlineListSuggester(optionQuery(#Category/Group)):Connected_Groups]