View Single Post
ploturo
Member
 
Join Date: May 2021
Posts: 84

Old February 25th, 2022, 02:47 PM
I hope you haven't gotten too frustrated with trying to implement this, but there is a way for you to edit the spells' original thing descript field dynamically.

I realized today that the fact that amendthing[ ] only works from within a thing context isn't actually a roadblock, because there is a trivial way to dynamically get the thing context(s) you need.

Combining amendthing[ ] with state.isoutput you should be able to change the descriptions to add the indicator for rituals to the descript field just during output.

The code below uses pathfinder specifics and a different tag, but hopefully it should translate just fine to the equivalent in 5E.
Code:
~ don't continue if adjustment isn't activated
doneif (field[pIsOn].value = 0)

if (state.isoutput <> 0) then

    foreach thing in BaseSpell where "sDescript.Good"

        perform eachthing.amendthing[description,eachthing.field[descript].text & "*Good*"]
        
    nexteach
    
endif
It temporarily adds the extra text to the descriptions of all spells with that tag whether or not they are being used, but it won't catch any spells where the tag was added to the pick later by a script.

If that second part is a problem, you might be able to use a similar method to iterate over the picks like before and change them one at a time using a second internal foreach thing with "thingid.whatever" to make it specific to that pick's thing and then makes the change as above, although timing when the script runs might end up being more complicated.
ploturo is offline   #11 Reply With Quote