Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

Reply
 
Thread Tools Display Modes
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265

Old April 30th, 2013, 03:14 AM
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 Code:
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.

Dormio Forte Somnio


Community Created Resources :
Data Package Repositories :
d20pfsrd
Custom Character Sheets
Community Server Setup (Packs)

Hero Lab Help- Video Tutorials and Pathfinder FAQ

Created by the community for the community

Last edited by bodrin; April 30th, 2013 at 03:24 AM.
bodrin is offline   #1 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old April 30th, 2013, 09:23 AM
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.
Aaron is offline   #2 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old April 30th, 2013, 09:29 AM
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
Aaron is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old April 30th, 2013, 09:32 AM
The & will probably need to be replaced with & - the scripts don't recognize &, if I remember correctly.
Mathias is online now   #4 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265

Old May 1st, 2013, 12:31 AM
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 Code:
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

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

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

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

      ~ 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 ~ Irrelevant???

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

        field[usrCandid2].text = candidstr
        endif ~ Probably need this or a derivative of it
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.
Attached Images
File Type: jpg Let us perfect spell error.JPG (183.0 KB, 3 views)

Dormio Forte Somnio


Community Created Resources :
Data Package Repositories :
d20pfsrd
Custom Character Sheets
Community Server Setup (Packs)

Hero Lab Help- Video Tutorials and Pathfinder FAQ

Created by the community for the community

Last edited by bodrin; May 1st, 2013 at 12:36 AM.
bodrin is offline   #5 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old May 1st, 2013, 09:15 AM
Hate to say this again but there is a trait from Carrion Crown players guide that does exactly this and is coded in HL. Its called "Inspired by Greatness".

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.
ShadowChemosh is offline   #6 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old May 1st, 2013, 11:58 AM
You've quite the memory, ShadowChemosh! How do you do it?
Aaron is offline   #7 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265

Old May 1st, 2013, 01:47 PM
Quote:
Originally Posted by ShadowChemosh View Post
Hate to say this again but there is a trait from Carrion Crown players guide that does exactly this and is coded in HL. Its called "Inspired by Greatness".
Arrgghhhh!!!!


Once again thanks.

Dormio Forte Somnio


Community Created Resources :
Data Package Repositories :
d20pfsrd
Custom Character Sheets
Community Server Setup (Packs)

Hero Lab Help- Video Tutorials and Pathfinder FAQ

Created by the community for the community
bodrin is offline   #8 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old May 1st, 2013, 02:37 PM
Quote:
Originally Posted by Aaron View Post
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!!!

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!

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.
ShadowChemosh is offline   #9 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 02:32 AM.


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