• 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

Tutorial 6 - Adding Spellcasting - Error Message

TheBullDog

Active member
I didn't want to revise a dead thread, though it is pretty much the same exact issue as the other thread. However, I am having the exact same issue, except I am trying to do it to the Monk class with a revised Way of the Four Elements archetype, as opposed to a Vampire in the other thread.

Cannot set dynamic linkage 'castattr' when no default linkage exists

perform linkage
.setfocus
doneif (state.isfocus = 0)

doneif (tagis[Helper.Disable] <> 0)

~ Spellcasting attribute
perform focus.setlinkage[castattr,BaseAttr,"IsAttr.aWIS"]
~ perform focus.setlinkage[spellattr,BaseAttr,"IsAttr.aWIS"]

~ Spellcasting type
perform focus.assign[CasterType.SpontKnow]
perform focus.assign[CasterSrc.Divine]
perform focus.assign[Helper.WarlocCast]
perform focus.assign[sClass.cHelpMnk]

~ Cantrip Array
focus.field[cArrKnCan].arrayvalue[3] += 1
focus.field[cArrKnCan].arrayvalue[6] += 2
focus.field[cArrKnCan].arrayvalue[11] += 3
focus.field[cArrKnCan].arrayvalue[17] += 4


Is there anyway to assign the spell-casting attribute without Duplicating the Monk class?

I love you guys (Wolf-Lair / Hero Lab) but your lack of how to for the editor is frustrating. At the very least a complete list of scripting and tags and what not would be nice. The editor has been out for how long, and there is still pretty much zero documentation on it.

I mean sure, you have a very basic tutorial... But that is bunk when it comes to advanced stuff. And the one thing that should tell me how to do this, doesn't work it gives me the aforementioned error.
 
1) Look at the scripting for the Arcane Trickster and/or Eldritch Knight.

2) What is your Phase/Priority set to? The above use: First/10000.

Example: Arcane Trickster
Phase: First, Priority: 10000
perform linkage
.setfocus

doneif (state.isfocus = 0)

~ Spellcasting attribute
perform focus.setlinkage[castattr,BaseAttr,"IsAttr.aINT"]

~ Spellcasting type
perform focus.assign[CasterType.SpontKnow]
perform focus.assign[CasterSrc.Arcane]
perform focus.assign[Helper.3rdCaster]
perform focus.assign[sClass.cHelpWiz]

~ Cantrip Array
focus.field[cArrKnCan].arrayvalue[2] += 2
focus.field[cArrKnCan].arrayvalue[9] += 3

~ Spells Known Array
focus.field[cArrKnSpl].arrayvalue[2] += 3
focus.field[cArrKnSpl].arrayvalue[3] += 4
focus.field[cArrKnSpl].arrayvalue[6] += 5
focus.field[cArrKnSpl].arrayvalue[7] += 6
focus.field[cArrKnSpl].arrayvalue[9] += 7
focus.field[cArrKnSpl].arrayvalue[10] += 8
focus.field[cArrKnSpl].arrayvalue[12] += 9
focus.field[cArrKnSpl].arrayvalue[13] += 10
focus.field[cArrKnSpl].arrayvalue[15] += 11
focus.field[cArrKnSpl].arrayvalue[18] += 12
focus.field[cArrKnSpl].arrayvalue[19] += 13

~ Max Spell Levels Array
focus.field[cArrKnLev].arrayvalue[2] += 1
focus.field[cArrKnLev].arrayvalue[6] += 2
focus.field[cArrKnLev].arrayvalue[12] += 3
focus.field[cArrKnLev].arrayvalue[18] += 4
 
Code does not work, if you read my post that is the exact code I have posted. Eldritch Knight, and Arcane Trickster both have a spell casting attribute selected in the base class.
 
You can change a Linkage via script but you can NOT set it via script. That is just how HL authoring kit logic works. Meaning if the class did not have a spell casting attribute set when made you can't change it via this logic.

Instead you will need to assign the SplAttr.? at First/20000 to the class helper. I "think" that will work in 5e.

In example add this to your script and remove the linkage logic.
Code:
perform focus.assign[SplAttr.aINT]

I will add I didn't test this so again not sure it will work for a class that has no casting logic to start with.
 
If I am understanding you correctly, I would need access to the class helper to do that, which I don't have because it is a base class and part of the encrypted hero lab files.
 
If I am understanding you correctly, I would need access to the class helper to do that, which I don't have because it is a base class and part of the encrypted hero lab files.
Ok. The FOCUS in the script is already set to point to the class helper. :)

The code I gave you above replaces your linkage code in your script.

Just FYI you could also go direct to a class helper using a bit of code like this:
Code:
perform hero.childfound[cHelpRog].assign[SplAttr.aINT]

The above are different ways to transition to Picks in HL.

I would recommend reading the Glossary of Terms for the Editor. Then check out FAQ#2 for all the places to learn about the editor including YouTube videos. Welcome to the wonderful world of using the HL editor which will be the most frustrating and rewarding thing you can do with Hero Lab. :)
 
That second code worked perfectly... The big problem was the Spell DC not taking into account the Ability Bonus. So thank you!

In the end my code looked like this.
Code:
       perform linkage[table].setfocus
       doneif (state.isfocus = 0)

       perform hero.childfound[cHelpMnk].assign[SplAttr.aWIS]

       ~ Spellcasting type
       perform focus.assign[CasterType.SpontKnow]
       perform focus.assign[CasterSrc.Divine]
       perform focus.assign[Helper.WarlocCast]
       perform focus.assign[sClass.cHelpMnk]
	   
	   
       ~ Cantrip Array
       focus.field[cArrKnCan].arrayvalue[3] += 1
       focus.field[cArrKnCan].arrayvalue[6] += 2
       focus.field[cArrKnCan].arrayvalue[11] += 3 
       focus.field[cArrKnCan].arrayvalue[17] += 4
 
Back
Top