• 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

Wizard Spell Known

Brolthemighty

Well-known member
Sorceror Spells Known

So I'm tooling around the HeroLab editor, and I'm trying to figure out where the scripting is located that gives the Wizard its bonus spells known based off of its Int.

Anyone know this scripting? I figure it'd be a great start for the actual scripted mechanics for a feat that does roughly the same thing, but based off of Cha for sorcerors.

Any help?
 
Last edited:
On the Class tab in the editor, there is a option the Spellcasting section that has the Bonus Spell Attribute. From that you can choose any attribute to use for bonus spells. The ere isn't any scripting shown for that, its all done behind the scenes.

As a note though, you cant change existing classes. Many of the items used in HL are locked. So in order to create a Wizard that uses, say STR, instead of Int, then you would need to create a whole new class using the Wizard as a template.

Hope this helps.
 
As a note though, you cant change existing classes. Many of the items used in HL are locked. So in order to create a Wizard that uses, say STR, instead of Int, then you would need to create a whole new class using the Wizard as a template.
Just an FYI the only things locked are the Things that are outside of the CORE. So the wizard is something you can fully copy and then simply do a "Replaces Thing ID" on to have your wizard with changes override the one from LW.

For changing a caster stat from say Int to Cha the easiest method is to use an Archetype with the "Override Spell Attribute" option. So based on this what I would do is have the Feat require the person to add the archetype by showing a error message if they don't have the archetype and have the archetype require the Feat and show an error if no feat.

The above would be the easiest method to change a caster attribute. :)
 
Hey Shadow, I have found that when you do a replace ID for a class, IE Wizard, one of 2 things happen. Either you get 2 Wizard tabs, or there are no items connected to the feats/talents/and things like that.

You seen that before?
 
Hey Shadow, I have found that when you do a replace ID for a class, IE Wizard, one of 2 things happen. Either you get 2 Wizard tabs, or there are no items connected to the feats/talents/and things like that.

You seen that before?
Had not seen that before but I was able to duplicate the issue pretty quickly. So after playing around a little looks like you should only do a Replace Things ID on the "Class Level" not the "Class". Then set "Allow Custom Abilities" to be able to select from the CORE wizard (Note you will have to look at the tag and you want to pick "cHelpWiz"). Reload the game system and that seems to work then.

Image1.jpg
 
Ah, that did work for most of it. The spells didnt want to come up for some reason though. What I figured out is that you have to select Use Which Spells as well, and make sure to point it to the old Druid tag, not the new one.

So it looks like it is working, but I need to do some more testing to make sure. Thanks for the assist.
 
Alright, so I've gotten the feat and the archetype built....and it all checks out when I go to Test. However after choosing it on the character, it hasn't actually modified Spells Known.

What I did was under Archetype, I went and changed Override Spell Attribute and changed it from None to Charisma (which according to the little help bubble, would then base bonus spells off of Cha instead of none). It's just not working though. Any ideas?
 
Last edited:
Over on the right side of the screen, below the buttons, is a field called Replace Thing Id. In it you need to put the Thing name of the spell you are trying to replace. Then you need to save and Test it. You also need to reload the game system sometimes, so if you dont see it immediately then try to do a cntrl-r on a Windows machine. Note sure how to do the rest on a Mac.
 
I'm not trying to replace a spell though. Essentially, with the feat, I'm giving the sorceror the wizard's ability to get bonus spell known based off of a stat (in this case, Cha).
 
I'm not trying to replace a spell though. Essentially, with the feat, I'm giving the sorceror the wizard's ability to get bonus spell known based off of a stat (in this case, Cha).
Yea that should work and all that is required. This is the standard method for making a class use a different attribute. I can take a quick look when I get home but honestly it should be that easy, a single option on a drop down box, on the archetype. :confused:

If you want I can take a quick look at the user file as seeing can often speed up debugging the issue. If you can/want email me the .user file at my forum ID at yahoo dot com.
 
That would be great, incoming.

Edit: I've sent the file, I hope it works for you. I just can't seem to figure it out. Even spent a good hour going over it with weasel, and he couldn't find a way to do it either.
 
Last edited:
That would be great, incoming.

Edit: I've sent the file, I hope it works for you. I just can't seem to figure it out. Even spent a good hour going over it with weasel, and he couldn't find a way to do it either.
Great got it. Now please note I have no access to HL at work so I am looking at the raw XML. I think the issue is, or I am confused, is that you linked the archetype to the Sorcerer class not the Wizard Class.

Code:
<link linkage="varies" thing="cHelpSor"/>
Above should be thing="cHelpWiz".

So either I am backwards in what I think you want or you clicked the wrong class when putting the archetype together. As I thought the idea was that a Wizard would use Cha instead of Cha not have the Sorcerer go from Cha to Cha. :)

Can you change that in the Archetype and try again?
 
Okay, I see the confusion. I've obviously titled my threat improperly. I titled it "Wizard Spell Known" to indicate....eh, it doesn't matter really in the end. Here's the meat of the feat....and what I'm meaning:

Benefit: You gain bonus spells based on your Charisma modifier (see Core Rulebook Table 1-3). These spells are added to your number of spells known; this feat does not increase the number of spells you can cast per day.

Normal: Bard and sorcerers are normally fixed in their number of spells known per level.

So I'm looking to emulate how a Wizard gains bonus spells based off of it's Int....but I'm trying to do it with Cha. I apologize for the confusion.
 
Yikes this took some time to figure out and more time trying to get the timing down. Basically you have to modify the Array values of Spells Known on the Sorcerer to get this to work. Plus I had to figure out the formula that was used to generate the Bonus Spells table.

For future readers here is the finished script running at Final Phase/100.
Code:
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)
~ If no sorcerer class get out now
doneif (hero.childlives[cHelpSor] <> 1)

var n1 as number
var n2 as number
var n3 as number
var n4 as number
var n5 as number
var n6 as number
var n7 as number
var n8 as number
var n9 as number

~ Calculate spell bonus based on our Cha modifier
~ 1 + 0.25 * (ability modifier - spell level)
n1 = 1 + (0.25 * (#attrmod[aCHA] - 1))
n1 = round(n1,0,-1)
n2 = 1 + (0.25 * (#attrmod[aCHA] - 2))
n2 = round(n2,0,-1)
n3 = 1 + (0.25 * (#attrmod[aCHA] - 3))
n3 = round(n3,0,-1)
n4 = 1 + (0.25 * (#attrmod[aCHA] - 4))
n4 = round(n4,0,-1)
n5 = 1 + (0.25 * (#attrmod[aCHA] - 5))
n5 = round(n5,0,-1)
n6 = 1 + (0.25 * (#attrmod[aCHA] - 6))
n6 = round(n6,0,-1)
n7 = 1 + (0.25 * (#attrmod[aCHA] - 7))
n7 = round(n7,0,-1)
n8 = 1 + (0.25 * (#attrmod[aCHA] - 8))
n8 = round(n8,0,-1)
n9 = 1 + (0.25 * (#attrmod[aCHA] - 9))
n9 = round(n9,0,-1)

~ Known Spells is stored on an array on the Sorcerer Class
~ thing. So we need to modify the array values for each
~ spell level 1 through 9. We don't want to give bonus known for
~ levels we can't cast so first check to see if we can cast the
~ specific level first.
If (hero.child[cHelpSor].field[cCastMax].arrayvalue[1] <> 0) Then
   hero.child[cHelpSor].field[cKnowMax].arrayvalue[1] += n1
Endif
If (hero.child[cHelpSor].field[cCastMax].arrayvalue[2] <> 0) Then
   hero.child[cHelpSor].field[cKnowMax].arrayvalue[2] += n2
Endif
If (hero.child[cHelpSor].field[cCastMax].arrayvalue[3] <> 0) Then
   hero.child[cHelpSor].field[cKnowMax].arrayvalue[3] += n3
Endif
If (hero.child[cHelpSor].field[cCastMax].arrayvalue[4] <> 0) Then
   hero.child[cHelpSor].field[cKnowMax].arrayvalue[4] += n4
Endif
If (hero.child[cHelpSor].field[cCastMax].arrayvalue[5] <> 0) Then
   hero.child[cHelpSor].field[cKnowMax].arrayvalue[5] += n5
Endif
If (hero.child[cHelpSor].field[cCastMax].arrayvalue[6] <> 0) Then
   hero.child[cHelpSor].field[cKnowMax].arrayvalue[6] += n6
Endif
If (hero.child[cHelpSor].field[cCastMax].arrayvalue[7] <> 0) Then
   hero.child[cHelpSor].field[cKnowMax].arrayvalue[7] += n7
Endif
If (hero.child[cHelpSor].field[cCastMax].arrayvalue[8] <> 0) Then
   hero.child[cHelpSor].field[cKnowMax].arrayvalue[8] += n8
Endif
If (hero.child[cHelpSor].field[cCastMax].arrayvalue[9] <> 0) Then
   hero.child[cHelpSor].field[cKnowMax].arrayvalue[9] += n9
Endif
 
Back
Top