<%*

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

// 2) Gather region notes const regionFiles = tp.app.vault.getMarkdownFiles() .filter(f ⇒ f.path.startsWith(ā€œ2-World/Regions/ā€));

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

// 3) Prompt to choose a container region const regionChoices = [placeholderLabel, …regionFiles.map(f ⇒ f.basename)]; const regionValues = [placeholderPath, …regionFiles.map(f ⇒ f.path)]; const chosenPath = await tp.system.suggester(regionChoices, regionValues, true); if (!chosenPath) return;

// 4) Build wiki-link or fallback let regionLink = null; if (chosenPath !== placeholderPath) { const regionAlias = chosenPath.split(ā€/ā€œ).pop().replace(/.md{chosenPath}|${regionAlias}]]`; }

// 5) Write into frontmatter setTimeout(() ⇒ { const file = tp.file.find_tfile(tp.file.path(true)); if (!file) return; app.fileManager.processFrontMatter(file, fm ⇒ { fm[ā€œMyContainerā€] = regionLink ?? ā€œNoneā€; }); }, 100);

%>

Parent Region: INPUT[inlineListSuggester(optionQuery(#Category/Hub),optionQuery(#Category/Region),optionQuery(#Category/Place),optionQuery(#Category/PointofInterest)):MyContainer]

Column

Map

Town Name

INPUT[select(
option(1, šŸ†Quest Info),
option(2, šŸ•µļøā€ā™€ļøQuest Details),
option(3, šŸ“GM Notes),
class(tabbed)
)]

Tabbed

NOTE

INPUT[select(
option(1, šŸ”Backstory),
option(2, šŸŽPlanning),
option(3, šŸ™Žā€ā™‚ļøPeople),
class(tabbed)
)]

Tabbed


Quest Info

Provide a summary of the quest here.

  • Obtain the quest
  • Embark on an epic journey
  • Complete the quest
  • Roll in epic loot

Quest Details

Date Obtained: INPUT[datePicker:questObtained] Status: INPUT[inlineSelect(option(Not Started), option(In Progress), option(Complete)):questStatus] Quest Giver: INPUT[suggester(optionQuery(#Category/People)):questGiver] Quest Location: INPUT[suggester(optionQuery(#Category/Hub)):questLocationObtained] Session Obtained: INPUT[suggester(optionQuery(#Category/Journal)):questSessionObtained] Available Loot: INPUT[suggester(optionQuery(#item)):questLootAvail] Acquired Loot: INPUT[suggester(optionQuery(#item)):questLookEarned]

GM Notes

Make notes of what you need to track in the region here.

Backstory

Describe the backstory of the quest here. Why is it important for the party to complete?

Planning

Plan your quest out here.

People

BUTTON[button_person] The following people are associated with this quest.

properties:
  file.name:
    displayName: People Name(s)
  note.char_race:
    displayName: Race
  note.char_gender:
    displayName: Gender
  note.char_age:
    displayName: Age
views:
  - type: cards
    name: Star Systems - Cards
    filters:
      and:
        - file.folder == "2-World/People"
        - list(Connected_Quests).contains(this)
        - char_status == "Alive"
    order:
      - file.name
      - char_age
      - char_gender
      - char_race
    image: note.image
  - type: table
    name: Star Systems - Table
    filters:
      and:
        - file.folder == "2-World/People"
        - list(Connected_Quests).contains(this)
        - char_status == "Alive"
    order:
      - file.name
    sort:
      - property: file.name
        direction: DESC
    columnSize:
      file.name: 182