Member
Join Date: May 2014
Location: Plantation, FL
Posts: 78
|
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 <:-(} |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Are your pre-reqs and exprreqs being added to the Class, or the Class Level? They belong on the Class Level.
|
#2 |
Member
Join Date: May 2014
Location: Plantation, FL
Posts: 78
|
|
#3 |
Member
Join Date: May 2014
Location: Plantation, FL
Posts: 78
|
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 <:-(} |
#4 |
Member
Join Date: May 2014
Location: Plantation, FL
Posts: 78
|
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 <:-(} |
#5 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Quote:
|
|
#6 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Quote:
PostLevel 10000 Code:
~only perform the calculations for the first copy doneif (tagis[Helper.FirstCopy] = 0) field[abValue].value += (field[xCount].value * 2) 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] |
|
#7 |
Member
Join Date: May 2014
Location: Plantation, FL
Posts: 78
|
Quote:
Andrew <:-(} - Andrew <:-(} |
|
#8 |
Member
Join Date: May 2014
Location: Plantation, FL
Posts: 78
|
Quote:
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 <:-(} |
|
#9 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Quote:
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. |
|
#10 |
|
|