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
Redcap's Corner
Senior Member
 
Join Date: Jul 2010
Posts: 149

Old March 8th, 2015, 08:20 PM
Oh my god, I did it. For reference, in case anyone else ever wants to add all spells of a particular subschool to a class at the lowest available level, here's one way of doing it.
  • If you want to keep spells already on the class spell list at their normal spell level, delete all the blue code.
  • If you want those spells to lower to the lowest available spell level, then keep the code intact.

POST-LEVELS/5000
Code:
var addspell as number
var magspell as string
var newlevel as number
var newspell as string

~ Compile a list of all magus spells of the teleportation subschool.
foreach thing in BaseSpell where "sClass.cHelpMag & sSubschool.Teleport"
  magspell = magspell & " " & eachthing.field[name].text
nexteach

~ Check for lower level versions of any of those spells.
foreach thing in BaseSpell where "!sClass.cHelpMag & sSubschool.Teleport"
  newspell = eachthing.field[name].text
  newlevel = eachthing.tagvalue[sLevel.?]
  foreach thing in BaseSpell where "sClass.cHelpMag & sSubschool.Teleport"
    if (compare(newspell, eachthing.field[name].text) = 0) then
      if (eachthing.tagvalue[sLevel.?] > newlevel) then
        ~ If any are found, get rid of the normal version.
        addspell = 1
        perform eachthing.pulltags[ClsDenySp.?]
      endif
    endif
  nexteach
  ~ And add the lower level version.
  if (addspell <> 0) then
    perform eachthing.pulltags[ClsAllowSp.?]
  endif
  addspell = 0
nexteach

~ Cross-reference 0-level non-magus teleportation spells with the list.
foreach thing in BaseSpell where "!sClass.cHelpMag & sClass.? & sSubschool.Teleport & sLevel.0"
  newspell = eachthing.field[name].text
  ~ Add any spell not on the list to the list at this level.
  if (pos(magspell, newspell) < 0) then
    perform eachthing.pulltags[ClsAllowSp.?]
    magspell = magspell & " " & eachthing.field[name].text
  endif
nexteach

~ Repeat the process for each ascending spell level.
foreach thing in BaseSpell where "!sClass.cHelpMag & sClass.? & sSubschool.Teleport & sLevel.1"
  newspell = eachthing.field[name].text
  if (pos(magspell, newspell) < 0) then
    perform eachthing.pulltags[ClsAllowSp.?]
    magspell = magspell & " " & eachthing.field[name].text
  endif
nexteach

foreach thing in BaseSpell where "!sClass.cHelpMag & sClass.? & sSubschool.Teleport & sLevel.2"
  newspell = eachthing.field[name].text
  if (pos(magspell, newspell) < 0) then
    perform eachthing.pulltags[ClsAllowSp.?]
    magspell = magspell & " " & eachthing.field[name].text
  endif
nexteach

foreach thing in BaseSpell where "!sClass.cHelpMag & sClass.? & sSubschool.Teleport & sLevel.3"
  newspell = eachthing.field[name].text
  if (pos(magspell, newspell) < 0) then
    perform eachthing.pulltags[ClsAllowSp.?]
    magspell = magspell & " " & eachthing.field[name].text
  endif
nexteach

foreach thing in BaseSpell where "!sClass.cHelpMag & sClass.? & sSubschool.Teleport & sLevel.4"
  newspell = eachthing.field[name].text
  if (pos(magspell, newspell) < 0) then
    perform eachthing.pulltags[ClsAllowSp.?]
    magspell = magspell & " " & eachthing.field[name].text
  endif
nexteach

foreach thing in BaseSpell where "!sClass.cHelpMag & sClass.? & sSubschool.Teleport & sLevel.5"
  newspell = eachthing.field[name].text
  if (pos(magspell, newspell) < 0) then
    perform eachthing.pulltags[ClsAllowSp.?]
    magspell = magspell & " " & eachthing.field[name].text
  endif
nexteach

foreach thing in BaseSpell where "!sClass.cHelpMag & sClass.? & sSubschool.Teleport & sLevel.6"
  newspell = eachthing.field[name].text
  if (pos(magspell, newspell) < 0) then
    perform eachthing.pulltags[ClsAllowSp.?]
    magspell = magspell & " " & eachthing.field[name].text
  endif
nexteach

~ Finally, apply all changes to the class spell list.
perform linkage[varies].pushtags[ClsDenySp.?]
perform linkage[varies].pushtags[ClsAllowSp.?]

Last edited by Redcap's Corner; March 9th, 2015 at 11:58 AM.
Redcap's Corner is offline   #11 Reply With Quote
Redcap's Corner
Senior Member
 
Join Date: Jul 2010
Posts: 149

Old March 8th, 2015, 08:51 PM
I'm still drawing a total blank on how to reduce the spell level by 1 on all the teleportation spells already on the magus list, though. Is it even possible? It can't be done the way metamagic is, because metamagic doesn't apply until the spell's a pick. I need to alter the spell level while it's still just a thing.
Redcap's Corner is offline   #12 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 12:25 PM.


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