Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
quistar
Member
 
Join Date: May 2014
Location: Plantation, FL
Posts: 78

Old May 20th, 2014, 07:22 PM
I've been slowly learning how to add new rules to the Pathfinder rules module for settings like Forgotten Realms and Ravenloft, and while I've made progress, I have hit some walls and need to ask for help. Rather than try to read every single thread, I'm going to focus my efforts here.

I know that some of you have already set up full files with rules for the above, but I've already started and would rather learn how to set them up myself to better learn programming the script.

For my first question: I've entered a Prestige Class into the program, with prereqs in the Expr-reqs and Pre-reqs buttons. However, the program is not recognizing them as prereqs when I go to add a level of the pclass to a character. How do I get it to recognize the prereqs as such?

Thanks in advance, many more questions to follow.

- Andrew <:-(}
quistar is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 20th, 2014, 09:52 PM
Are your pre-reqs and exprreqs being added to the Class, or the Class Level? They belong on the Class Level.
Mathias is online now   #2 Reply With Quote
quistar
Member
 
Join Date: May 2014
Location: Plantation, FL
Posts: 78

Old May 21st, 2014, 05:43 PM
Quote:
Originally Posted by Mathias View Post
Are your pre-reqs and exprreqs being added to the Class, or the Class Level? They belong on the Class Level.
AHA! That's my problem! I'll switch them and see if it works. Thanks!

- Andrew <:-(}
quistar is offline   #3 Reply With Quote
quistar
Member
 
Join Date: May 2014
Location: Plantation, FL
Posts: 78

Old May 21st, 2014, 05:52 PM
That did it once I restarted HL. Thanks!

On to my next question then...

I want the Prestige Class I'm working on to offer the Favored Enemy feature of the ranger class. That's easy, it's just a checkbox. The problem is, it won't "stack" with the Favored Enemy options from ranger by allowing Favored Enemy Upgrades. Is there a way to do this?

- Andrew <:-(}
quistar is offline   #4 Reply With Quote
quistar
Member
 
Join Date: May 2014
Location: Plantation, FL
Posts: 78

Old June 2nd, 2014, 08:14 PM
Still waiting on the Favored Enemy question so here's another for the Forum to tackle.

I'm trying to add a PClass feature, gained at 1st level and increasing every odd level (10-level pclass), called "Soul of Burnished Bronze." It does the following:

At 1st level, a Herald of Dawn receives a +2 sacred bonus against a vampire's domination gaze and any other vampire or vampire spawn supernatural special attacks requiring a Will save. This bonus increases by +2 every other Herald of Dawn level thereafter.

I borrowed the Bravery class feature from the Fighter class to do this but obviously I have fixes to make on the script; there is a Timing Error among other things. These are the Eval Scripts I programmed in, Priority set to 10000 for each. Any help would be appreciated (including making the bonus a Sacred bonus). Thanks in advance!

First script: Final Phase


field[listname].text = "Soul of Burnished Bronze +" & field[xIndex].value

~only perform the calculations for the first copy
doneif (tagis[Helper.FirstCopy] = 0)

~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

~ We need to take into account extra levels, so we'll calculate the bonus
~ we have based on extra levels and store that in a different field. This
~ is to handle the Band of the Stalwart Warrior from UE.
var calclevel as number
calclevel = field[xAllLev].value
field[abValue2].value = round(calclevel/2, 0, -1)

field[abValue].value += field[xCount].value

~ Now we'll show the higher of the two bonuses.
field[abValue].value = maximum(field[abValue].value, field[abValue2].value)

Second Script: Render phase.


field[abSumm].text = signed(field[abValue].value) & " vampire's domination gaze and any other vampire or vampire spawn supernatural special attacks requiring a Will save"
field[livename].text = field[thingname].text & " " & signed(field[abValue].value)
field[sbName].text = lowercase(field[thingname].text) & " " & signed(field[abValue].value)

~only perform the calculations for the first copy
doneif (tagis[Helper.FirstCopy] = 0)

~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

#situational[hero.child[svWill], signed(field[abValue].value) & " vs. vampire's domination gaze and any other vampire or vampire spawn supernatural special attacks requiring a Will save",field[thingname].text]

- Andrew <:-(}
quistar is offline   #5 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old June 3rd, 2014, 09:40 AM
Quote:
Originally Posted by quistar View Post
That did it once I restarted HL. Thanks!

On to my next question then...

I want the Prestige Class I'm working on to offer the Favored Enemy feature of the ranger class. That's easy, it's just a checkbox. The problem is, it won't "stack" with the Favored Enemy options from ranger by allowing Favored Enemy Upgrades. Is there a way to do this?

- Andrew <:-(}
Give the PrC a class ability which checks for other classes with favored enemies. If it finds one, give it a selector to add the PrC's levels to the cFav1Level field of the chosen class.
Aaron is offline   #6 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old June 3rd, 2014, 09:53 AM
Quote:
Originally Posted by quistar View Post
Still waiting on the Favored Enemy question so here's another for the Forum to tackle.

I'm trying to add a PClass feature, gained at 1st level and increasing every odd level (10-level pclass), called "Soul of Burnished Bronze." It does the following:

At 1st level, a Herald of Dawn receives a +2 sacred bonus against a vampire's domination gaze and any other vampire or vampire spawn supernatural special attacks requiring a Will save. This bonus increases by +2 every other Herald of Dawn level thereafter.

I borrowed the Bravery class feature from the Fighter class to do this but obviously I have fixes to make on the script; there is a Timing Error among other things. These are the Eval Scripts I programmed in, Priority set to 10000 for each. Any help would be appreciated (including making the bonus a Sacred bonus). Thanks in advance!

First script: Final Phase


field[listname].text = "Soul of Burnished Bronze +" & field[xIndex].value

~only perform the calculations for the first copy
doneif (tagis[Helper.FirstCopy] = 0)

~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

~ We need to take into account extra levels, so we'll calculate the bonus
~ we have based on extra levels and store that in a different field. This
~ is to handle the Band of the Stalwart Warrior from UE.
var calclevel as number
calclevel = field[xAllLev].value
field[abValue2].value = round(calclevel/2, 0, -1)

field[abValue].value += field[xCount].value

~ Now we'll show the higher of the two bonuses.
field[abValue].value = maximum(field[abValue].value, field[abValue2].value)

Second Script: Render phase.


field[abSumm].text = signed(field[abValue].value) & " vampire's domination gaze and any other vampire or vampire spawn supernatural special attacks requiring a Will save"
field[livename].text = field[thingname].text & " " & signed(field[abValue].value)
field[sbName].text = lowercase(field[thingname].text) & " " & signed(field[abValue].value)

~only perform the calculations for the first copy
doneif (tagis[Helper.FirstCopy] = 0)

~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

#situational[hero.child[svWill], signed(field[abValue].value) & " vs. vampire's domination gaze and any other vampire or vampire spawn supernatural special attacks requiring a Will save",field[thingname].text]
I think you're using an old version of the Bravery ability, which might be causing some confusion. Also, the timing errors are probably from leaving the eval scripts with the same names as the ability you copied them from. Here is my ccrack at what I think you're trying, based on the current bravery version.

PostLevel 10000
Code:
      ~only perform the calculations for the first copy
      doneif (tagis[Helper.FirstCopy] = 0)

      field[abValue].value += (field[xCount].value * 2)
Render 10000
Code:
      field[listname].text = "Soul of Burnished Bronze +" & (field[xIndex].value * 2)

      ~only perform the calculations for the first copy
      doneif (tagis[Helper.FirstCopy] = 0)

      field[abSumm].text = signed(field[abValue].value) & " to Will saves vs. vampire or vampire spawn supernatural special attacks."
      field[livename].text = field[thingname].text & " " & signed(field[abValue].value)
      field[sbName].text = lowercase(field[thingname].text) & " " & signed(field[abValue].value)

      ~ If we're not shown, just get out now
      doneif (tagis[Helper.ShowSpec] = 0)

      doneif (tagis[Helper.SpcDisable] <> 0)

      #situational[hero.child[svWill], signed(field[abValue].value) & " sacred bonus vs. vs. vampire or vampire spawn supernatural special attacks",field[thingname].text]
As usual, no assurance on the code, not tested so you may have to tweak it.
Aaron is offline   #7 Reply With Quote
quistar
Member
 
Join Date: May 2014
Location: Plantation, FL
Posts: 78

Old June 3rd, 2014, 12:36 PM
Quote:
Originally Posted by Aaron View Post
Give the PrC a class ability which checks for other classes with favored enemies. If it finds one, give it a selector to add the PrC's levels to the cFav1Level field of the chosen class.
Sounds good, but I'm a rank amateur when it comes to writing the script. How do I do that?

Andrew <:-(}

- Andrew <:-(}
quistar is offline   #8 Reply With Quote
quistar
Member
 
Join Date: May 2014
Location: Plantation, FL
Posts: 78

Old June 3rd, 2014, 12:48 PM
Quote:
Originally Posted by Aaron View Post
I think you're using an old version of the Bravery ability, which might be causing some confusion. Also, the timing errors are probably from leaving the eval scripts with the same names as the ability you copied them from. Here is my ccrack at what I think you're trying, based on the current bravery version.

PostLevel 10000
Code:
      ~only perform the calculations for the first copy
      doneif (tagis[Helper.FirstCopy] = 0)

      field[abValue].value += (field[xCount].value * 2)
Render 10000
Code:
      field[listname].text = "Soul of Burnished Bronze +" & (field[xIndex].value * 2)

      ~only perform the calculations for the first copy
      doneif (tagis[Helper.FirstCopy] = 0)

      field[abSumm].text = signed(field[abValue].value) & " to Will saves vs. vampire or vampire spawn supernatural special attacks."
      field[livename].text = field[thingname].text & " " & signed(field[abValue].value)
      field[sbName].text = lowercase(field[thingname].text) & " " & signed(field[abValue].value)

      ~ If we're not shown, just get out now
      doneif (tagis[Helper.ShowSpec] = 0)

      doneif (tagis[Helper.SpcDisable] <> 0)

      #situational[hero.child[svWill], signed(field[abValue].value) & " sacred bonus vs. vs. vampire or vampire spawn supernatural special attacks",field[thingname].text]
As usual, no assurance on the code, not tested so you may have to tweak it.
Much appreciated! I did get an error on Line 1 for Eval Script "calc for Soul of Burnished Bronze", error in right-side expression of assignment. No idea what that means.

Thanks in advance for your patience. I'm learning to do the scripts by example and using similar scripts, but that only carries me so far without help.

- Andrew <:-(}

- Andrew <:-(}
quistar is offline   #9 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old June 4th, 2014, 01:19 PM
Quote:
Originally Posted by quistar View Post
Sounds good, but I'm a rank amateur when it comes to writing the script. How do I do that?

Andrew <:-(}
Yeah, I guess this one is pretty tough for a beginner. Here is how I would start. As I said, not tested, may need to tweak.

Pre-Levels 10000
Code:
~ First check all classes on the hero for one with favored enemies
var foundone as number
var validclass as number
var i as number
var currlevel as string
var searchexpr as string

foreach pick in hero from Class
  ~We subtract 1 because arrays start at 0, so 1st level is 0 in an array.
  currlevel = eachpick.field[cTotalLev].value - 1

  ~This is awkward because the number is in an array field, so we have to "walk up" the array, checking each cell (up to the current level) for a non-zero value.
  for i = 0 to currlevel
    if (eachpick.field[cFav1Tot].arrayvalue[i] <> 0) then
      validclass = 1
      endif
    next

  if (validclass <> 0) then
    foundone += 1

    ~ We also note down which classes are valid choices, for later
    searchexpr = splice(searchexpr, tagids[Classes.?], " | ")
    endif

  ~validclass has to be reset to 0 for each new class, so we can know if this class should be choosable. Otherwise, once a valid class was found, all future classes would also be valid
  validclass = 0
  nexteach

~stop if we did not find an appropriate class
doneif (foundone = 0)

~Now define our candidate expression. It should be mostly built in the previous foreach, we just need to add a bit onto the beginning and enclose the rest in parenthesis.
field[usrCandid1].text = "component.Class & (" & searchexpr & ")"

~If we haven't chosen any class to benefit yet, stop
doneif (field[usrChosen1].ischosen = 0)

~Since we got this far, add our own class levels to the chosen class.
~Note that since we are running this script before Levels phase, we can't rely on our normal level fields.
field[usrChosen1].chosen.field[cFav1Level].value += #levelcount[WHATEVER YOUR PrC's CLASSES TAGS ARE]

Last edited by Aaron; June 4th, 2014 at 01:21 PM.
Aaron is offline   #10 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 04:07 PM.


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