View Single Post
Ambush
Senior Member
 
Join Date: Dec 2008
Posts: 121

Old February 21st, 2022, 08:00 AM
Quote:
Originally Posted by ploturo View Post
You can limit the changes to output only by checking for state.isoutput like this:
Thanks for that addition, Ploturo, that's pretty cool.

Unfortunately, I get an error when I try to set the descript field:
Only derived fields can generally be modified via scripts

Which upon research *could* be able to be gotten around with a "trustme", but that still throws a compilation error, so maybe not. I've tried the trustme both in and out of the loop to set each spell's descriptor.

Which leads all the way down to this script:
Code:
doneif (field[pIsOn].value = 0)
doneif (state.isoutput <> 1)

~find every spell with the ritual tag
    foreach pick in hero from BaseSpell where "Helper.RitualSpel"
        ~set the name to be the name & ritual
        eachpick.field[sNameMod].text = "*r*"
    nexteach
And this does what I need it to do. It's not the prettiest solution, but it's functional and only shows up on the output xml. I don't love playing with the name field, because it's technically an identifier here, and I also don't love using sNameMod, because I don't know if this will blow up something else somewhere along the way, but it works. And that's good enough for now.

+1 for Fenris
+1 for Ploturo

DM, exRealmWorker, Character Sheet Hacker, Gamer
Ambush is offline   #8 Reply With Quote