What I’m trying to do
I’m compiling a lot of Dungeons and Dragons properties dynamically and having some trouble threading one last needle in the display/formatting putting two arrays together (because I’m an art nerd trying my darndest).
Overall…trying to “import” spells to Monster pages by adding them to the monster page’s “Spells” List property. I’m choosing to do this a particular way and understand it could be easier (with less functionality). Each entry gets structured: spellName | #x/period (e.g. Druidcraft | At Will or Entangle | 3x/day) so I can keep track of the uses per day dynamically inside the property by changing that trailing text.
Things I have tried
I’ve got a series of formulas which take the List entries and parse it into the form I need to draw in spell pages that share the same name. First (Test 01) this.Spells.map(list(value.split(" | ")).slice(0,-1)) takes the raw list and splits it in half at the bar. Test 01b does the opposite and just takes the trailing Uses part this.Spells.map(list(value.split(" | ")).slice(-1)). Then (Test 02) this.formula.test01.map([link(value.toString())]) returns that list as links.
Things start getting more complicated when a third level formula merges the two lists back together with the links and uses in place. [" ".repeat(this.Spells.length).split("").map([ this.formula.test02[index]]).map(this.formula.test02[index]+[" (" + this.formula["test 01 b"][index]+")"])]
That’s the local-page content I’m trying to include. Now for where I’m trying to include it.
I’ve got a Base with a table view. It has the following filter this.formula["test01"].filter(value==file.name) so that it makes a table row for each tagged spell that’s been imported. I can import whatever properties from the imported spells as columns (like Effects, further below) which I appreciate, but I’m trying to keep some of it inline.
From here on out I’ve been scratching my head. I’ve got the following formula
[(this.formula["test01"].flat().filter(value==file.name).map(file(value).properties["Casting Time"]))+(this.formula["test01"].flat().filter(value==file.name).map(file(value).properties.Range))+" | Targets "+
this.formula["test01"].flat().filter(value==file.name).map(file(value).properties.Targeting)
]]
It yields the following output
What I’d like to do is use what I have from test03 (which include the dynamic “Uses”) instead of the just the linked spell name. I can’t seem to figure out how to make it so each row’s entry gets the appropriate single response from the Test 03 list without inserting the entire list. It’s probably got something to do with reduce() and [index] (which I found some help with here already in Test 03), but I’m outta my depth. This is already my second from-scratch go at it, so here’s to hoping it’s doable in some manner!

