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
BenT1
Junior Member
 
Join Date: May 2010
Posts: 25

Old May 17th, 2010, 05:04 PM
Is it possible to script a separate Light shields from Heavy shields for No Arcane spell failure?

You have the script
perform hero.childfound[cHelpWiz].assign[CastArmor.Shield]

but this is for all shields.

Also, how would one script the ability to add the INT Mod to the number of 0 level spells a character knows?

Thanks in advance.

BenT1
BenT1 is offline   #1 Reply With Quote
chiefweasel
Senior Member
 
Join Date: Aug 2008
Location: Miamisburg, OH
Posts: 1,322

Old May 17th, 2010, 06:55 PM
You should be able to create a brand new item, copy the shield information you need them make the changes to the new item. Then onlt the new item would be effected.

Web site - Cheese Weasel Logistics - www.cheeseweasel.net
Twitter - @CheeseWeaselGMZ
For user created content check out www.d20pfsrd.com and www.cheeseweasel.net
For video demos of Hero Lab go to http://www.youtube.com/user/TheChiefweasel?blend=9&ob=5
chiefweasel is offline   #2 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old May 18th, 2010, 08:25 AM
The INT mod to spells is easy - On the Configure Hero form (you can access it for an existing character from the character menu), find the House Rules section of the settings and check "Bonus 0-level spells".
Mathias is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old May 18th, 2010, 09:05 AM
I think the way to handle the light/heavy shield question is to set the class to ignore spell failure from shields, manually calculate the chance of spell failure from heavy shields, and add that in to the class.

Alright, let's begin by calculating what the arcane failure chance is from heavy shields.

Purchase a heavy shield, a light shield, a buckler, and some other piece of armor for a blank character. In the develop menu, make sure that the first option, "Enable Data File Debugging" is checked, and then for each of those armors and shields, right-click on it, and select "Show Debug Tags for XXX".

Compare those tag lists to each other. The first thing you're looking for is a component tag that is specific to shields - it looks like component.BaseArmor is as close as we're going to get, but that's shared by the armors, too, so also look for a tag that's specific to shields, like EquipType.Shield.

The second thing you're looking for is how light shields are distinguished from heavy shields. Looks like you've got ShldClass.Buckler, ShldClass.Light, and ShldClass.Heavy.

The third thing you're looking for is how to determine whether armor is equipped or not. While watching the list of tags for a shield, equip it and unequip it, and watch how the tags change as you do. Looks like Helper.CurrShield is assigned to a shield once it's equipped - that's even more specific than EquipType.Shield.

Now, to figure out how the arcane failure chance is stored. Close all the tag windows, and right-click each of the shields and armors again, this time selecting "Show Debug Fields for XXX". Look through the list of fields to figure out how arcane failure chances are stored - it's field[arArcFail].value.


We'll start writing our script by searching through all the armor on the hero, looking for those that are equipped shields and heavy shields:

Code:
 
var arcfail as number
 
foreach pick in hero from BaseArmor where "Helper.CurrShield & ShldClass.Heavy"
For each pick we find, we'll add its arcane failure chance to a variable (and close out the search):
Code:
 
  arcfail += eachpick.field[arArcFail].value
  nexteach
Now, let's look at the class to figure out how it records arcane failure chances. Add a level or two of a class to the character (it actually doesn't even matter if the class has a chance of arcane spell failure, but you might as well use your new class).

Go to the develop menu, to the "Floating Info Windows" option, and choose "Show Selection Fields". In the list of picks that pops up, find your class - you'll see that there's one copy of the class level for each level you've added - they'll all look like "cSorcerer" - "c" & the class tag. You'll also see one copy of the class helper - it'll look like "cHelpSor" - "cHelp" and the three-letter abbreviation. Select the class helper in this list, and press OK.

Now, look through the fields until you find where the arcane failure chance is stored. It may help to equip enough armor and shields that the class has a % that you can look for. You'll find that it's "cArcFail".

Now, back to the script. We've told the class to ignore arcane spell failure from all shields, and we've totaled up the arcane failure chance from heavy shields, so we'll add what we've calculated to the classes own chance:

Code:
 
field[cArcFail].value += arcfail
For the timing, you probably wouldn't be able to figure this out, but a class calculates its cArcFail at Final/10000, so you want to modify that immediately after, say Final/10500.

Collecting the script together for easy copying (and adding a few comments, so we can understand the script 6 months from now):

Location: an Eval Script on the Class tab, Timing: Final/10500
Code:
 
var arcfail as number
 
~find all equipped heavy shields, and total their arcane failure chance
foreach pick in hero from BaseArmor where "Helper.CurrShield & ShldClass.Heavy"
  arcfail += eachpick.field[arArcFail].value
  nexteach
 
~the class is currently set to ignore arcane failure chances from shields,
~but we want to add the chance from heavy shields back in
field[cArcFail].value += arcfail
Mathias is offline   #4 Reply With Quote
BenT1
Junior Member
 
Join Date: May 2010
Posts: 25

Old May 18th, 2010, 01:32 PM
So here is how I changed the script to make it stop adding the Heavy Shield arcane failure at 7th level. Now it should be able to be done more elegantly using the HasAbility.cDBlShBl in a doneif validation script. Any suggestions?

And thanks for your help so far....

var arcfail as number

var arcfail as number

~find all equipped heavy shields, and total their arcane failure chance
foreach pick in hero from BaseArmor where "Helper.CurrShield & ShldClass.Heavy"
arcfail += eachpick.field[arArcFail].value
nexteach

~only run if the Shield Blade hasn't been reached.
doneif (#levelcount[DuskBlade] >= 7)

~the class is currently set to ignore arcane failure chances from shields,
~but we want to add the chance from heavy shields back in
field[cArcFail].value += arcfail
BenT1 is offline   #5 Reply With Quote
Grog
Member
 
Join Date: May 2010
Posts: 45

Old July 7th, 2010, 07:59 PM
Quote:
Originally Posted by Mathias View Post
In the develop menu, make sure that the first option, "Enable Data File Debugging" is checked, and then for each of those armors and shields, right-click on it, and select "Show Debug Tags for XXX".

Compare those tag lists to each other......
Very helpful... Now I can find tons of stuff I was wondering about.

Thank you!
Grog is offline   #6 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old May 18th, 2010, 02:03 PM
So, above 7th level, they get to ignore arcane failure from all shields, not just light ones? If so, the script you have is correct (except that I'd put the doneif before the foreach - foreach is computationally expensive, so making sure that it doesn't run unless it's needed is always good) (you also duplicated the variable declaration).

If this is listed in the class description as a special ability, and you'd like to move it to a special ability, then here's how you'd modify the script (the timing stays the same):

Code:
 
~if we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)
 
~we no longer apply at level 7+
if (field[xAllLev].value >= 7) then
  ~so remove us from the Special Tab and printout
  perform assign[Helper.SpecUp]
  ~and get out
  done
  endif
 
var arcfail as number
 
~find all equipped heavy shields, and total their arcane failure chance
foreach pick in hero from BaseArmor where "Helper.CurrShield & ShldClass.Heavy"
  arcfail += eachpick.field[arArcFail].value
  nexteach
 
~the class is currently set to ignore arcane failure chances from shields,
~but we want to add the chance from heavy shields back in
root.field[cArcFail].value += arcfail
Mathias is offline   #7 Reply With Quote
BenT1
Junior Member
 
Join Date: May 2010
Posts: 25

Old May 18th, 2010, 05:07 PM
The extra Var was just a typo when pasting in.

The class gains the Class Special of cDBlShBl (Shield Blade) at 7th Level. This cancels out the ArcFail for the Heavy Shield that the class suffered until 7th level. They have no ArcFail for light Shields from the beginning, so I used the No Arcane Failure selection under the spells in the Class Tab, then added your script to maintain the ArcFail for Heavy Shields until 7th.

What I was wondering was if there was an easy way to just check to see if the Class Special had been added rather than check the level. That way when using the script in other things, all that has to be changed is the Class Special being checked for.

2nd, I used the 'doneif (#levelcount[DuskBlade] >= 7)'
you used the 'if (field[xAllLev].value >= 7) then'

to determine the level of the character. Is there a reason to do it this way? Or is the xAllLev value the same as the #levelcount since it is taking place within a DuskBlade class eval script?

On a slightly different note. I am trying to write up Radiant Servant of Pelor from Complete Divine for a character in my campaign. This Prestige class adds the Sun domains abilities Sun's Blessing and Nimbus of Light to the character. This character is already a Cleric with the Sun domain. I have set them up as Class Abilities (renamed) and scripted them to count both the Cleric and RSP levels for the totals on the Specials tab within the character.

What I would like to be able to do is be able to replace the Domain abilities on the specials list with the Class Abilities. (Not have both on the list)
BenT1 is offline   #8 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old May 19th, 2010, 12:22 PM
The initial check I added to the class special - looking for the presence of Helper.ShowSpec - that's what handles checking whether a class special has reached the correct level.

In this case, the class special I've written belongs at 1st level - it's what creates the heavy shield restriction, and I've set it up to turn itself off at 7th level.

On a class special, #levelcount[Our Parent Class] has already been done for you, and placed in xAllLev.
Mathias is offline   #9 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old May 19th, 2010, 12:24 PM
I'm afraid I'm not following what you're talking about for the Radiant Servant. Could you re-phrase what you're trying to do, what you've done, and what's not working as expected, please?
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 03:03 AM.


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