Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Pathfinder Roleplaying Game (http://forums.wolflair.com/forumdisplay.php?f=62)
-   -   Replacing spells per day with spell points (http://forums.wolflair.com/showthread.php?t=64516)

Bob G July 12th, 2020 01:32 PM

Replacing spells per day with spell points
 
Iím working on several archetypes that use an alternate magic system (Super Genius Gamesí House Rule Handbook: Spell Point Compilation), which is a spell point system. The aspect of this system that Iím having trouble with is this: ďA bard gains bonus spell points equal to her Charisma bonus (to a maximum of the highest level spell she knows).Ē

To that effect, I put together this eval script:
<Post-attributes 10000>
Code:

if (hero.childfound[aCHA].field[aFinalVal].value >= 22) then
  if (hero.childfound[cHelpBrd].field[cTotalLev].value >= 16) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 4
      hero.childfound[cReseSPBrd].field[abValue].value += 3
  elseif (hero.childfound[cHelpBrd].field[cTotalLev].value >= 13) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 3
      hero.childfound[cReseSPBrd].field[abValue].value += 3
  elseif (hero.childfound[cHelpBrd].field[cTotalLev].value >= 10) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 3
      hero.childfound[cReseSPBrd].field[abValue].value += 2
  elseif (hero.childfound[cHelpBrd].field[cTotalLev].value >= 7) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 2
      hero.childfound[cReseSPBrd].field[abValue].value += 2
  elseif (hero.childfound[cHelpBrd].field[cTotalLev].value >= 4) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 2
      hero.childfound[cReseSPBrd].field[abValue].value += 1
  else
      hero.childfound[cOpenSPBrd].field[abValue].value += 1
      hero.childfound[cReseSPBrd].field[abValue].value += 1
  endif

elseif (hero.childfound[aCHA].field[aFinalVal].value >= 20) then
  if (hero.childfound[cHelpBrd].field[cTotalLev].value >= 13) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 3
      hero.childfound[cReseSPBrd].field[abValue].value += 3
  elseif (hero.childfound[cHelpBrd].field[cTotalLev].value >= 10) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 3
      hero.childfound[cReseSPBrd].field[abValue].value += 2
  elseif (hero.childfound[cHelpBrd].field[cTotalLev].value >= 7) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 2
      hero.childfound[cReseSPBrd].field[abValue].value += 2
  elseif (hero.childfound[cHelpBrd].field[cTotalLev].value >= 4) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 2
      hero.childfound[cReseSPBrd].field[abValue].value += 1
  else
      hero.childfound[cOpenSPBrd].field[abValue].value += 1
      hero.childfound[cReseSPBrd].field[abValue].value += 1
  endif

elseif (hero.childfound[aCHA].field[aFinalVal].value >= 18) then
  if (hero.childfound[cHelpBrd].field[cTotalLev].value >= 10) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 3
      hero.childfound[cReseSPBrd].field[abValue].value += 2
  elseif (hero.childfound[cHelpBrd].field[cTotalLev].value >= 7) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 2
      hero.childfound[cReseSPBrd].field[abValue].value += 2
  elseif (hero.childfound[cHelpBrd].field[cTotalLev].value >= 4) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 2
      hero.childfound[cReseSPBrd].field[abValue].value += 1
  else
      hero.childfound[cOpenSPBrd].field[abValue].value += 1
      hero.childfound[cReseSPBrd].field[abValue].value += 1
  endif

elseif (hero.childfound[aCHA].field[aFinalVal].value >= 16) then
  if (hero.childfound[cHelpBrd].field[cTotalLev].value >= 7) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 2
      hero.childfound[cReseSPBrd].field[abValue].value += 2
  elseif (hero.childfound[cHelpBrd].field[cTotalLev].value >= 4) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 2
      hero.childfound[cReseSPBrd].field[abValue].value += 1
  else
      hero.childfound[cOpenSPBrd].field[abValue].value += 1
      hero.childfound[cReseSPBrd].field[abValue].value += 1
  endif

elseif (hero.childfound[aCHA].field[aFinalVal].value >= 14) then
  if (hero.childfound[cHelpBrd].field[cTotalLev].value >= 4) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 2
      hero.childfound[cReseSPBrd].field[abValue].value += 1
  else
      hero.childfound[cOpenSPBrd].field[abValue].value += 1
      hero.childfound[cReseSPBrd].field[abValue].value += 1
  endif

elseif (hero.childfound[aCHA].field[aFinalVal].value >= 12) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 1
      hero.childfound[cReseSPBrd].field[abValue].value += 1
  endif

First, thereís probably a more elegant way of scripting this, but at least I know that abValue is calculating correctly. The trouble is that abValue isnít adding to the bardís spell point pools. I attempted every phase from First to Render, but the spell points arenít changing. Hero Lab gurus, what am I missing?

Minous July 13th, 2020 04:42 PM

When does cReseSPBrd and cOpenSPBrd get created and set?

Bob G July 13th, 2020 08:15 PM

Quote:

Originally Posted by Minous (Post 289672)
When does cReseSPBrd and cOpenSPBrd get created and set?

Currently both are set to<Post-attributes 10000>

Minous July 14th, 2020 03:42 AM

Check the field history of the objects. Id suggest changing the second script to 10001


All times are GMT -8. The time now is 07:42 AM.

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