ebullient / ttrpg-convert-cli

Utility to convert JSON data (for content you own) from 5etools or pf2etools into Obsidian-friendly Markdown.
https://www.ebullient.dev/projects/ttrpg-convert-cli/
Apache License 2.0
202 stars 42 forks source link

✨ Mythic Actions, Lair Actions and Regional Effects as separate resources (like Legendary Actions) #568

Open vkhatuntsevv opened 2 weeks ago

vkhatuntsevv commented 2 weeks ago

Problem

hi, i want a small thing added to monster template statblock, that being whether Monster has Mythic Actions, Lair Actions, Regional Effects or not. the same way it does with Legendary actions it is possible with Legendary Actions by putting this line inside the template:

Legendary: {#if resource.legendary}true{#else}false{/else}{/if}

the same way i did it with Spells and Concentration. i assume it worked there because there are resources which correspond to monster being Legendary, or to Spell Duration (resource.duration) having word (.contains) "Concentration":

Concentration: {#if resource.duration}{#if resource.duration.contains("Concentration")}true{#else}false{/if}{/if}

image and now i have a handy checkbox here which i can use for sorting Dataview queries, for example

What I would like to have is

separate resources for Mythic Actions, Lair Actions and Regional Effects. that would be the perfect solution, but if there is any workaround w/o adding them as separate resources, i'd still be more than happy

I've tried:

let's take only Mythic Actions, so not to distract on Lair and Regional (they basically have the same structure):

Mythic: {#if resource.legendary}{#if resource.legendary.contains("mythic")}true{#else}false{/if}{/if}

this is essentially what i tried in monster template. i tried different variations, such as "Mythic", "Mythic Actions", "Mythic_Encounter", same for other ones (since, from what i saw in QuteMonster.java, they belong to resource.legendary? not sure), but that did not work. i mean, it did add those lines, but, for example, Tromokratis, a creature with Mythic Actions, had unmarked checkbox (false) which is obviously not true, hence i did something wrong or it's just that resource.legendary does not even have "mythic" as a word there. can't wrap my head around that, and i might be missing some information i did not find in docs

sorry if my request is poorly phrased because i'm not that familiar with coding overall

ebullient commented 2 weeks ago

You did great. This is clear. =)