Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - D&D 5th Edition SRD (http://forums.wolflair.com/forumdisplay.php?f=89)
-   -   Adding a floating spell from another class (http://forums.wolflair.com/showthread.php?t=63795)

Fenris447 October 21st, 2020 09:22 AM

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.

dungeonguru October 21st, 2020 02:18 PM

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.

ShadowChemosh October 21st, 2020 02:27 PM

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


Fenris447 October 21st, 2020 02:56 PM

Quote:

Originally Posted by ShadowChemosh (Post 291502)
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. :)

It's pretty perfect, so thanks! I was trying to use a custom tag in the foreach's tag expression. The custom tag was predifined in Tags.1st, auto-tagged to the bootstrap, and even added to the root thing. No matter what, I get an error "Invalid tag expression specified for 'foreach' statement". Different timings didn't make a difference. :confused:

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!


All times are GMT -8. The time now is 02:13 PM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.