Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Brolthemighty
Senior Member
 
Join Date: Jan 2013
Posts: 273

Old February 10th, 2013, 04:54 AM
Alright, so after several nights of trying to figure this out....I can't figure out how to finish up the scripting of the feat. To summarize, I'll list the feat, the current script, and then what's needed and what needs fixing.

Benefit: Choose one arcane spell that you can cast to be your thesis spell. When casting that spell, you do so at +2 caster level. When you apply a metamagic feat other than Heighten Spell to that spell, the enhanced spell uses up a spell slot one level lower than normal. For example, an empowered thesis spell uses up a spell slot one level higher than the spell's actual slot (rather than the normal two levels higher).
Special: You can gain this feat multiple times. Its effects do not stack. Each time you take the feat, it applies to a new spell.

Phase: Post-Attributes Priority: 14500
Script:

doneif (field[usrChosen1].ischosen = 0)

~ Generate our search expression to target the correct spell
var searchexpr as string
searchexpr = "thingid." & field[usrChosen1].chosen.idstring
searchexpr &= " & HasMetaMag.?"

~ Cycle through all the Custom/metamagic copies of our chosen spell,
~ and reduce their effective level by 1 (keeping them from going negative)
foreach pick in hero from BaseSpell where searchexpr
eachpick.field[sLevel].value = maximum(eachpick.field[sLevel].value - eachpick.tagcount[HasMetaMag.?],0)
nexteach

What's Missing Still: "When casting that spell, you do so at +2 caster level."
- I found the feat Spell Specialization that increases the caster level by +2, but I wasn't sure how to apply it's scripting, or could even find where it increased the caster level.

What needs fixing: Due to the scripting of the metamagic reduction, the save DC seems to be getting decreased by 1 for every metamagic feat applied. Here's a great response a fellow board member suggested...."It would appear to me that by lowering each metamagic feat by an effective level of 1, you are also reducing the DC being applied by 1. At the moment, I can't explain why since I haven't delved into it. To offset it, though, I would probably use a variable to count how many metamagic feats there are, then increase the DC by 1 for each."


I can find scripts to increase the DC...and might be able to stumble my way through writing the script for counting metamagic feats....but not sure how to apply multiple scripts to the same feat (One for reducing metamagic cost, one to increase caster level, and one to increase the save). I'd appreciate ya'lls help. The more I try....the more I learn from all of you.

Last edited by Brolthemighty; February 11th, 2013 at 07:44 AM.
Brolthemighty is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,215

Old February 11th, 2013, 07:40 AM
Without knowing the phase & priority you've assigned to this script, I can't fully diagnose this.
Mathias is offline   #2 Reply With Quote
Brolthemighty
Senior Member
 
Join Date: Jan 2013
Posts: 273

Old February 11th, 2013, 07:44 AM
The script is at Phase: Post Attributes; Priority: 14500
Brolthemighty is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,215

Old February 11th, 2013, 08:05 AM
Code:
 
eachpick.field[sCL].value += 2
Should be all you need for the CL. Just add that as a second line within your foreach.
Mathias is offline   #4 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,215

Old February 11th, 2013, 08:15 AM
I think let's try changing the way the metamagic cost reductions are handled.

Switch the phase & priority to Post-Attributes/11000 (a little earlier).

Then, we're going to use a double-foreach to find all the spells, and then find all the metamagics within that spell

Code:
 
doneif (field[usrChosen1].ischosen = 0)
 
~ Generate our search expression to target the correct spell
var searchexpr as string
searchexpr = "thingid." & field[usrChosen1].chosen.idstring
searchexpr &= " & HasMetaMag.?"
 
~ Cycle through all the Custom/metamagic copies of our chosen spell,
~ and reduce their effective level by 1 (keeping them from going negative)
foreach pick in hero from BaseSpell where searchexpr
  foreach pick in eachpick.gizmo from BaseMetamg
    eachpick.field[mmFinalLev].value = maximum(eachpick.field[mmFinalLev].value - 1, 0)
    nexteach
  nexteach
Mathias is offline   #5 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,215

Old February 11th, 2013, 08:17 AM
Adding the CL to the revised metamagic level cost script:

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

~ Generate our search expression to target the correct spell
var searchexpr as string
searchexpr = "thingid." & field[usrChosen1].chosen.idstring
searchexpr &= " & HasMetaMag.?"

~ Cycle through all the Custom/metamagic copies of our chosen spell,
~ and reduce their effective level by 1 (keeping them from going negative)
foreach pick in hero from BaseSpell where searchexpr
  eachpick.field[sCL].value += 2
  foreach pick in eachpick.gizmo from BaseMetamg
    eachpick.field[mmFinalLev].value = maximum(eachpick.field[mmFinalLev].value - 1, 0)
    nexteach
  nexteach
Mathias is offline   #6 Reply With Quote
Brolthemighty
Senior Member
 
Join Date: Jan 2013
Posts: 273

Old February 11th, 2013, 08:21 AM
Edit: Was typing before you added that. Thank you SO much! My guesses on where to put the CL adjustment would've been wrong.

Even seeing how you do it....they why of the how still eludes me. I feel like I'm pretty much a parrot simply finding the codes already imbedded in the system, and simply regurgitating it on to new feats and such, lol. I appreciate the help.

Last edited by Brolthemighty; February 11th, 2013 at 08:23 AM.
Brolthemighty is offline   #7 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,215

Old February 11th, 2013, 08:24 AM
Don't thank me until someone's tested all that. I was just writing down what I think will work.
Mathias is offline   #8 Reply With Quote
Brolthemighty
Senior Member
 
Join Date: Jan 2013
Posts: 273

Old February 11th, 2013, 08:26 AM
Well, the save and test itself works. Give me a few and I'll be able to implement and check the results. Results soon....
Brolthemighty is offline   #9 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,215

Old February 11th, 2013, 08:29 AM
I just realized that, as written, that would only have added a CL bonus to metamagic-altered copies of the chosen spell, and skipped the regular copies of that spell

Code:
doneif (field[usrChosen1].ischosen = 0)
 
~ Generate our search expression to target the correct spell
var searchexpr as string
searchexpr = "thingid." & field[usrChosen1].chosen.idstring
 
~ Cycle through all the Custom/metamagic copies of our chosen spell,
~ and reduce their effective level by 1 (keeping them from going negative)
foreach pick in hero from BaseSpell where searchexpr
  eachpick.field[sCL].value += 2
  if (eachpick.tagis[HasMetaMag.?] <> 0) then
    foreach pick in eachpick.gizmo from BaseMetamg
      eachpick.field[mmFinalLev].value = maximum(eachpick.field[mmFinalLev].value - 1, 0)
      nexteach
    endif
  nexteach
Mathias is offline   #10 Reply With Quote
Reply


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 10:05 AM.


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