<%*
// 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]
