<%* const hasTitle = !tp.file.title.startsWith(ā€œNewPlayerā€); let title; if (!hasTitle) { title = await tp.system.prompt(ā€œEnter Player Nameā€); await tp.file.rename(title); } else { title = tp.file.title; } _%>

Player Name: Placeholder

Column

Place Name

INPUT[select(
option(1, ā„¹ļøGeneral),
option(2, šŸ§™Description),
option(3, āš™ļøConfigure),
option(4, šŸ“GM Notes),
class(tabbed)
)]

Tabbed

NOTE

INPUT[select(
option(1, 🤹Abilities+Skills),
option(2, šŸ’ŖTraits),
option(3, šŸ“–Spell Book),
option(4, āš”ļøInventory),
option(5, šŸ”—Connections),
option(6, šŸ§‘ā€šŸ¤ā€šŸ§‘Relationships),
class(tabbed)
)]

Tabbed


General

items:
  - label: Race
    value: '{{frontmatter.char_race}}'
  - label: Level
    value: '{{frontmatter.level}}'
  - label: Initiative
    value: '{{frontmatter.modifier}}'

items:
  - label: Spell Save
    value: 14
  - label: AC
    value: '{{frontmatter.ac}}'
  - label: AC (Mage Armor)
    value: 15

state_key: din_health
health: '{{ frontmatter.hp }}'
reset_on: long-rest
hitdice:
  dice: d6
  value: 4
items:
  - name: Short Rest
    value: short-rest
  - name: Long Rest
    value: long-rest

Description

This is the persons description.

Configure

StatValue
StatusINPUT[template-person-status][:char_status]
RaceINPUT[template-person-race][:char_race]
ClassINPUT[template-person-class][:char_class]
LevelINPUT[number:level]
GenderINPUT[template-person-gender][:char_gender]
AgeINPUT[template-person-age-range][:char_age]
HPINPUT[number:hp]
Max HPINPUT[number:max_hp]
ACINPUT[number:ac]
ModifierINPUT[number:modifier]

GM Notes

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

Skills

PLUGIN URL: https://github.com/hay-kot/obsidian-dnd-ui-toolkit DISPLAYS NOTES THAT MATCH THE TAGS ABOVE DISPLAYS NOTES THAT MATCH THE TAGS ABOVE DISPLAYS NOTES THAT MATCH THE TAGS ABOVE CODE ABOVE CREATED WITH CHAT-GPT. ITS COMPLEX CODE THAT SHOULD NOT BE CHANGED UNLESS YOU KNOW WHAT YOU ARE DOING MERMAID-FIX-TEXT-CLIPPING.CSS is enabled in Settings > Appearance > CSS Snippets. This fixes text clipping and styles the boxes %%

const player = dv.current();
const factions = dv.pages('"3-Mechanics/Guilds and Groups"');
let tableData = [];
for (let faction of factions) {
    let factionName = faction.faction;
    let playerStanding = player.faction_standing?.[factionName] || 0;
 
    // Ensure benefits is treated as an array
    let benefitsList = Array.isArray(faction.benefits) ? faction.benefits : [];
 
    // Filter benefits the player qualifies for
    let qualifiedBenefits = benefitsList
        .filter(b => playerStanding >= b.standing)
        .map(b => b.reward)
        .join(", "); 
 
    let primaryContact = faction.primary_contact || "No contact set";
 
    tableData.push([factionName, playerStanding, qualifiedBenefits || "No benefits yet", primaryContact]);
}
dv.table(["Faction", "Your Standing", "Benefits", "Primary Contact"], tableData);