![]() |
Junior Member
Join Date: May 2010
Posts: 25
|
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 |
![]() |
![]() |
Senior Member
Join Date: Aug 2008
Location: Miamisburg, OH
Posts: 1,322
|
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 |
![]() |
![]() |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
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".
|
![]() |
![]() |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
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" Code:
arcfail += eachpick.field[arArcFail].value nexteach 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 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 |
![]() |
![]() |
Junior Member
Join Date: May 2010
Posts: 25
|
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 |
![]() |
![]() |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
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 |
![]() |
![]() |
Junior Member
Join Date: May 2010
Posts: 25
|
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) |
![]() |
![]() |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
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. |
![]() |
![]() |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
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?
|
![]() |
![]() |
Junior Member
Join Date: May 2010
Posts: 25
|
Ok, what I am trying to do is set up a prestige class Radiant Servant of Pelor (RSP) from Complete Divine. (Assuming you are not familiar) It basically is a prestige class that ups the effect of the Cleric's Turn Undead ability in 3.5 by allowing it accesss to the Sun Domain Power 'Greater Turning' which destroyed Undead at the Cleric's effective turning level, instead of effective turning level /2. Within Pathfinder, the Sun Domain power became Sun's Blessing, which adds the Cleric's class level to the damage done when channeling positive energy to damage Undead.
At this point, I have created the prestige class RSP with Herolab Pathfinder and copied the Sun's Blessing to a Class Special Ability I called Radiant Blessing (or some such). I changed the Eval Script so it counted both the Cleric Levels and the RSP Levels and outputted it to the Specials tab in the character with the correct bonus damage. But if the Cleric taking RSP already has the Sun Domain, it also lists the Sun's Blessing in the Specials tab, but only counts the Cleric Levels for the bonus damage. What I would like to be able to have happen is when a Cleric with the Sun Domain takes the RSP prestige class, the Sun's Blessing in the Specials tab would be removed, leaving only the Radiant Blessing. (The one having the correct bonus damage listed. The same with the Nimbus of Light from the Sun Domain, which the RSP gets as its own special also. The actual prestige class is included with the files I sent you with the weird stuff my Dragonshaman Copper class was doing, if you want to look directly at what I have done so far. I hope this clarifies what I am trying to do. BenT1 |
![]() |
![]() |
![]() |
|
|