• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Pick a Spell increse it's Caster Level Trait bonus

bodrin

Well-known member
Pick a Spell increase it's Caster Level Trait bonus

Stumped on this one, need a chooser to target the spell list and then apply a Trait bonus to the CL of that spell only.

HTML:
Pick one spell. This spell's effects manifest at +1 caster level.
I've set the "select from" field to Spell levels 1-9
Then the "restrict first list" to All picks on Hero

I'm looking at this existing script to modify once the spell has been selected

Code:
~ +1 Caster Level to Earth spells
      hero.child[ssEarth].field[schCastLev].value += 1
but i'm drawing a blank.
Any help please.:eek:
 
Last edited:
Pull the KnowSpell tag from the chosen spell and store it's tagid in a string variable. Then foreach through all spells on the hero, using that string variable as your tag expression. Add +1 CL to each found spell.
 
Something like so, as usual no assurances on the code.

Code:
doneif (field[usrChosen1].ischosen = 0)

perform field[usrChosen1].chosen.pulltags[KnowSpell.?]

var searchexpr as string
searchexpr = tagids[KnowSpell.?," | "]

~ I'm gonna assume this doesn't apply to itemspells, only spells cast by you or your spell like abilities.
searchexpr &= " & !Helper.ItemSpell"

foreach pick in hero from BaseSpell where searchexpr
  eachpick.field[sCL].value += 1
  nexteach
 
The & will probably need to be replaced with & - the scripts don't recognize &, if I remember correctly.
 
Okay I copied the script, I know the proviso was it's untested, and I altered the ampersand as suggested by Mathias.

Code:
doneif (field[usrChosen1].ischosen = 0)

perform field[usrChosen1].chosen.pulltags[KnowSpell.?]

var searchexpr as string
searchexpr = tagids[KnowSpell.?," | "]

~ I'm gonna assume this doesn't apply to itemspells, only spells cast by you or your spell like abilities.
searchexpr &= " & !Helper.ItemSpell"

foreach pick in hero from BaseSpell where searchexpr
  eachpick.field[sCL].value += 1
  nexteach
The trait appears with a selector but then throws this error,

HTML:
Invalid tag expression specified for 'foreach' statement
the selector also only displays 1st Level through to 9th Level.

I'm trying to show the names of the spells rather than the level.

Screenshot attached.

However i'm still at a loss i've compared the earthouched feat selector,


Code:
~ We need to set up our Candidate expression based on our sorcerer level. It always includes the requirement that it must be a Sor/Wiz spell of abjuration or divination schools or have the earth descriptor.
      var basestr as string
      var candidstr as string
      var spelllevel as number

[COLOR=Red]      ~ Set the focus to our Sorcerer class helper
      perform hero.childfound[cHelpSor].setfocus[/COLOR] [B]~ Don't need this[/B]

      ~ Go no farther if we don't have a focus.
      doneif (state.isfocus = 0) [B]~ Seems self explanatory[/B]

      [COLOR=Red]basestr = "sClass.cHelpSor & component.BaseSpell & (sSchool.Divination | sSchool.Abjur | sDescript.Earth)"[/COLOR] ~ [B]Might need this bit with a few modifications[/B]

      [I]~ Above 6th level we can pick our 2nd spell in the 2nd selector, which could be from 0th to 3rd level.
      if (focus.field[cMagicLev].value >= 6) then[/I] ~ Irrelevant???

       [B] perform assign[ChooseSrc2.Thing]
        candidstr = basestr & " & (sLevel.0 | sLevel.1 | sLevel.2 | sLevel.3)"

        field[usrCandid2].text = candidstr
        endif[/B][U][I][COLOR=Blue] ~ Probably need this or a derivative of it[/COLOR][/I][/U]

which allows a spell of a certain school to be picked and added to the spells known but it's still gobbledygook, (I have a mental block when it comes to selectors).

I'd love an in depth analysis on the Editor and Scripting Resources forum.:D
 

Attachments

  • Let us perfect spell error.JPG
    Let us perfect spell error.JPG
    183 KB · Views: 3
Last edited:
You've quite the memory, ShadowChemosh! How do you do it?
LOL thanks. Actually my memory has started to fail me do to medical reasons!!! :mad:

I don't have any trick I just have a tendency to remember and often find that makes putting together pieces of a puzzle very easy. But I use to be able recall in details things I read but I can't anymore. So I may remember something or a rule or something exists but it still requires me to now find it.

I remembered the other day about a Inquisitor Bane ability could be given to someone else via feat. But I couldn't remember the name of the feat for the life of me. So I had to search d20pfsrd to get the name.

The owner of the company I work for currently has a photographic memory which I have heard is trouble for managers. As in if you tell the owner something you better write it down as he will remember it exactly as you said it. Which also means you can't tell the guy you "forgot" as an excuse! :D
 
Back
Top