• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Amateur needs help with custom spell list and breaking a game rule.

Redcap's Corner

Well-known member
I'm not much of a programmer, but I'm good with syntax and I'm pretty good at reverse engineering things. To that end, I've added a fair amount of custom material to Hero Lab and have had good success with it, but I'm working on an alternate class and I'm stuck on two issues.

1) The class has its own custom spell list. It's an arcane prepared spellbook caster (a'la wizard). It has a very narrow spell list, and thus many of its spells aren't from the Core Rulebook, which means I technically can't "edit" them to add them to this class's spell list (as far as I can tell) without effectively reprogramming them. So, to create the basis of its spell list I've been adding spells to its otherwise empty list using an Eval Script on the class helper (at post-levels, priority 5000, index 2). I've been using the following code (though obviously with more than just these five spells):

Code:
  perform assign[ClsAllowSp.spDeteMag0]
  perform assign[ClsAllowSp.spHaunFey0]
  perform assign[ClsAllowSp.spKnowDir0]
  perform assign[ClsAllowSp.spReadMag0]
  perform assign[ClsAllowSp.spSift0]

The problem I'm having is that, for some reason, no spell with a tag that comes alphabetically after Paragon Surge is showing up when I compile and test the class in Hero Lab. I've added over 100 spells to its spell list, and at every single spell level, the spell list truncates after that point alphabetically. What am I missing?

2) This class has an ability that allows natural armour bonuses affecting it to always stack with one another. Does anyone know how I would go about breaking this fundamental rule of the game with a class ability? I can't think of any similar abilities to use as a basis from which to reverse engineer this.

Thanks!
 
1) There is a limit to how many characters the candidate expression field for spells can hold, and when it is being generated from a long list of individual spell allowed tags, you're going to hit that limit. If you can build the list from a more "group criteria" standpoint you'll probably be fine. For example, if the class uses "Wizard spells of the Enchantment and Illusion schools", or "Druid spells up to spell level 4" would both work.

For a unique and eclectic spell list beyond a certain point, the copy and replace method's going to have to be the route traveled, inconvienant as it is, sorry!

2) Almost all bonuses to natural armor that I can think of are untyped (and should be stacking already), with the exception of amulets of natural armor and the barkskin spell (both of which are enhancement bonuses and normally don't stack).

I'm having trouble thinking of a clean way to do this apart from copy-replacing relevant things and modifying their scripts to check for the class or some tag it applies and apply typed or untyped bonuses appropraitely.
 
There is a limit to the number of spells you can add, the candidate expression is only so big, you've probably make it too big for Hero Lab to handle.
 
2) Almost all bonuses to natural armor that I can think of are untyped (and should be stacking already), with the exception of amulets of natural armor and the barkskin spell (both of which are enhancement bonuses and normally don't stack).

I'm having trouble thinking of a clean way to do this apart from copy-replacing relevant things and modifying their scripts to check for the class or some tag it applies and apply typed or untyped bonuses appropraitely.

Weird. Why are they being treated as untyped? Natural armour bonuses definitely aren't normally supposed to stack with one another (though I understand that many things that add natural armour bonuses do so in the form of "enhancement bonuses to natural armour" or "improvements to natural armour").
 
Last edited:
1) There is a limit to how many characters the candidate expression field for spells can hold, and when it is being generated from a long list of individual spell allowed tags, you're going to hit that limit. If you can build the list from a more "group criteria" standpoint you'll probably be fine. For example, if the class uses "Wizard spells of the Enchantment and Illusion schools", or "Druid spells up to spell level 4" would both work.

For a unique and eclectic spell list beyond a certain point, the copy and replace method's going to have to be the route traveled, inconvienant as it is, sorry!

Unfortunately the spell list is "most spells in the game with a range of personal and a few effectively personal range spells that don't technically have that range, unless those spells are overtly divine in nature or seem to only be relevant to alchemists." Something tells me that would be too tricky to try to summarize with a formula.

With that copy and replace method, am I going to need to update each of my replacements every single time the spell gets added to another class's spell list through official channels? For instance, let's say one of the new occult adventures playtest classes has a spell in common with my class, and I do my copy and replace for that spell to add my class to it. When you guys issue an update that includes occult adventures, is Hero Lab going to refuse to add that spell to the appropriate OA class list unless I manually update my replacement of the spell? Or is my class going to see itself on the replacement version and pull from that, with the OA class seeing itself on the officially issued version of the spell and pull from that? I can clarify if that doesn't make sense.
 
Weird. Why are they being treated as untyped? Natural armour bonuses definitely aren't normally supposed to stack with one another (though I understand that many things that add natural armour bonuses do so in the form of "enhancement bonuses to natural armour" or "improvements to natural armour").

I'm not aware of any rules saying untyped natural armor bonuses don't stack with each other, could you give me a citation where you saw that?
 
Unfortunately the spell list is "most spells in the game with a range of personal and a few effectively personal range spells that don't technically have that range, unless those spells are overtly divine in nature or seem to only be relevant to alchemists." Something tells me that would be too tricky to try to summarize with a formula.

With that copy and replace method, am I going to need to update each of my replacements every single time the spell gets added to another class's spell list through official channels? For instance, let's say one of the new occult adventures playtest classes has a spell in common with my class, and I do my copy and replace for that spell to add my class to it. When you guys issue an update that includes occult adventures, is Hero Lab going to refuse to add that spell to the appropriate OA class list unless I manually update my replacement of the spell? Or is my class going to see itself on the replacement version and pull from that, with the OA class seeing itself on the officially issued version of the spell and pull from that? I can clarify if that doesn't make sense.

That is, unfortunately, what that means. If we make any changes to update the base spells for whatever reason, those changes will not be inherited by your replacements, necessitating manual changes on your end.
 
Though now that I think about it, just because you're copying the base spells doesn't mean you have to replace the existing ones. You could just remove all the sClass tags from the copy except the one for your new class, which would mean the old ones would still be updated by us as necessary. The drawback being when creating spell based magic items (like potions and wands and scrolls), you'll see the duplicated spell more than once. That might be an acceptable compromise.
 
Aaron, couldn't he use a spell expression like the Red Mantis Assassin uses to create a spell list that that checks for the range personal tag? And then add the outliers with the ClsAllowSp.? tag?
 
Aaron, couldn't he use a spell expression like the Red Mantis Assassin uses to create a spell list that that checks for the range personal tag? And then add the outliers with the ClsAllowSp.? tag?

Actually, this could work. If someone could tell me the necessary code to add all sorcerer and druid spells with personal range from only the Advanced Class Guide, Advanced Player's Guide, Advanced Race Guide, Core Rulebook, Ultimate Combat, and Ultimate Magic to this custom spell list and also provide me with some example code to remove one or two of those spells, that would be incredible. From the combined sorcerer and druid lists of personal-only spells from those books, there are fewer than 35 spells that would need to be removed from the list and only 22 that would need to be added. I was able to add exactly 100 manually before, so this seems within the realm of possibilities.
 
it'd be something like

Code:
Post-Level, 10500
field[cSpellExpr].text = "(" & field[cSpellExpr].text & ") & (sClass.cHelpSor|sClass.cHelpDrd) & sRange.Touch"

Completely untested, but that's the idea
 
I actually came up with a nearly identical line of text from poaching from red mantis assassin, but it doesn't seem to be working. Is it because the red mantis assassin is spontaneous and this class is spellbook prepared?
 
You also need to set the spell book expression then

field[cSplBkExpr].text, should just haveto do the same thing expect change all mentions of the other field to this one
 
"Natural Armor" is itself a bonus type, not something that receives a bonus like Armor Class. By RAW, there's no such thing as an "untyped" bonus to natural armor.

I see the info in the link, but I can't find a corresponding entry in the core rulebook that states natural armor is a bonus. I realize it is referred to as the "natural armor bonus" throughout, but I thought Natural armor was a secondary attribute (like the "initiative bonus"), because it can accrue bonuses of various types of its own. On a quick review I see things granting both enhancement bonuses to natural armor and racial bonuses, but there may be more. Under the interpretation you advance, we'd need to make a distinction between things which grant natural armor and things which improve it.

For example, by your logic, a bugbear (who has +3 natural armor from his race) who took 3 sorcerer levels with the Draconic bloodline (which grants a +1 natural armor bonus at 3rd level) would still only have a +3 bonus to his AC. That seems wrong to me, but I'll keep investigating.
 
Last edited:
I see the info in the link, but I can't find a corresponding entry in the core rulebook that states natural armor is a bonus. I realize it is referred to as the "natural armor bonus" throughout, but I thought Natural armor was a secondary attribute (like the "initiative bonus"), because it can accrue bonuses of various types of its own. On a quick review I see things granting both enhancement bonuses to natural armor and racial bonuses, but there may be more. Under the interpretation you advance, we'd need to make a distinction between things which grant natural armor and things which improve it.

For example, by your logic, a bugbear (who has +3 natural armor from his race) who took 3 sorcerer levels with the Dragonic bloodline (which grants a +1 natural armor bonus at 3rd level) would still only have a +3 bonus to his AC. That seems wrong to me, but I'll keep investigating.

I also can't find anything in the Core Rulebook that supports either position, but armour bonuses to AC are definitely a type of bonus, right? And magic armour offers an enhancement bonus to that armour bonus. Amulets of Natural Armour work the same way but for the natural armour bonus type. If you look in Ultimate Magic on pg.134 there's a chart of bonus types, and natural armour is listed on that chart along with competence, deflection, dodge, etc.

History shows that I'm usually wrong when I don't agree with the rules interpretation of a Hero Lab developer, but I'm extremely confident in this case that natural armour is a type of bonus and that it doesn't stack with itself by default.
 
You also need to set the spell book expression then

field[cSplBkExpr].text, should just haveto do the same thing expect change all mentions of the other field to this one

All right, awesome! That worked. I'm using the following code, so far:

Code:
field[cSplBkExpr].text = "(" & field[cSplBkExpr].text & ") | (sClass.cHelpDrd | sClass.cHelpSor) & (sRange.Personal & !sRange.Touch) "

Is there a way to also limit it only to spells from the Core Rulebook, ACG, APG, ARG, Ultimate Combat, and Ultimate Magic? I tried adding:

Code:
& (sSource.ACG | sSource.APG | sSource.ARG | sSource.UltCombat | sSource.UltMagic)

But that didn't seem to work, and I couldn't figure out the tag for the Core Rulebook.

Finally, prior to getting this code to work, I had gone ahead and manually added the 22 additional spells using the method I had mentioned before, and now that the druid/sorcerer personal spells have been added, the manually added spells aren't showing up anymore. Any thoughts?

Thanks so much for helping with this!
 
I also have another problem with this class. It has the druid's A Thousand Faces class ability, and I'm trying to make that ability an in-play option so it's easier to use. I'm using the following code:

Code:
doneif (tagis[Helper.ShowSpec] = 0)

if (field[abilActive].value <> 0) then
  hero.child[aDEX].field[aStartMod].value += 2
  var sizetarget as number
  sizetarget = -1
  call SetSizeTo
  perform assign[Helper.ChgDisab2]
  endif

if (field[abilAct2].value <> 0) then
  hero.child[aSTR].field[aStartMod].value += 2
  var sizetarget as number
  sizetarget = 0
  call SetSizeTo
  perform assign[Helper.ChgDisab1]
  endif

Post-levels/10000 with "Activation Name" set to "Small" and "Activation Name #2" set to "Medium". It seems to be working for the most part. Regardless of the race I choose (I've tried Small, Medium, and Large), this seems to overwrite their size bonus to AC to the appropriate size modifier and apply the correct ability score modifier. However, it doesn't actually change the listed size category. If I select gnome as the race and check the "Medium" box, it will still say "Small" but it takes away their +1 size modifier to AC and applies the +2 Str. If I select trox as the race, it even corrects the space and reach to 5 ft. when I select either box, but it still says "Large". Any ideas why?
 
Last edited:
I also can't find anything in the Core Rulebook that supports either position, but armour bonuses to AC are definitely a type of bonus, right? And magic armour offers an enhancement bonus to that armour bonus. Amulets of Natural Armour work the same way but for the natural armour bonus type. If you look in Ultimate Magic on pg.134 there's a chart of bonus types, and natural armour is listed on that chart along with competence, deflection, dodge, etc.

History shows that I'm usually wrong when I don't agree with the rules interpretation of a Hero Lab developer, but I'm extremely confident in this case that natural armour is a type of bonus and that it doesn't stack with itself by default.

True, but the armor that the enhancement bonus is applied to is an actual item. It is not a bonus itself, it only grants a bonus of the same name. If anything, accepting that example seems to strengthen my position that Natural armor is not a bonus type but something else... Can you think of any bonus types which have other bonus types applied to them without a physical intermediary? Are there any "insight bonuses to dodge" or similar lurking somewhere in the system?
 
Back
Top