Senior Member
Join Date: Sep 2017
Posts: 600
|
Apologies for the necro, but I've spent hours trying to solve this:
Brol, before you got this working as a configurable, were you able to set the charges based on the CHA mod of that Alter Self? I'm having trouble doing the same thing with an ability I'm adding for MOoT. I can't seem to figure out how to dynamically alter the trkMax of a bootstrapped SpellLike spell. Does the container context transition work in an eval script to target a bootstrap?? I know I can find the spell on the hero, but I don't want to alter any other versions of that spell if they're present. Just the one bootstrapped by my specific ability. And weirdly, I cannot get a Foreach to work to find that bootstrapped copy of the spell. Anything I do just tells me the foreach is returning nothing. I've tried every kind of tag you can think of. thingid.____, custom tags, pre-defined custom tags, etc. Found an issue with or have a suggestion for the 5e Community Pack? Please post it here at our GitHub. Feel free to stop by the Lone Wolf Development Subreddit, for discussion of any and all LWD products and community efforts! Last edited by Fenris447; October 21st, 2020 at 09:28 AM. |
#11 |
Senior Member
Join Date: May 2016
Posts: 608
|
In order to narrow down a spell to a particular class you could probably look for the tags spells get from the selection portal.
Like the High Elf cantrip usually has the tag portal.RacSplLst where a wizard spell that is memorized on the Wizard Spells tab gets the tag portal.ClsSplMem3 (or at least that's what I remember). Otherwise you might be able to look for things that don't have the Racial tags on them like Helper.RaceSpell. You use these tags in your foreach where clause and you should be good. Just right click on spells in the UI and look at the tags and compare/contrast. |
#12 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
This should get you what you want as long as I understood it correctly. I wrote this without testing anything so you may have to modify it.
Code:
~ Loop through all the spells of X foreach pick in hero from BaseSpell where "thingid.spXXXXXX" ~ Check to see if this spell is bootstrapped by something if (eachpick.isroot <> 0) then ~ Check the bootstrap to see if its the correct ability if (eachpick.root.tagis[thingid.AbilityThatBootstrappedSpell] <> 0) then eachpick.field[trkMax].value = maximum(1,#attrmod[aCHA]) endif endif nexteach Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
#13 |
Senior Member
Join Date: Sep 2017
Posts: 600
|
Quote:
I was hoping to have a code that I could just pop into multiple root things to do the same thing for their bootstrapped spells, without having to define the thingid for each every time. But this is good enough! Found an issue with or have a suggestion for the 5e Community Pack? Please post it here at our GitHub. Feel free to stop by the Lone Wolf Development Subreddit, for discussion of any and all LWD products and community efforts! |
|
#14 |
|
|