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
Mindcloud
Member
 
Join Date: Jan 2009
Posts: 95

Old March 2nd, 2010, 04:10 PM
I am encountering a error with a Class Special. I have included a screen shot. I have tried a dozen different ways to enter this I even started over from scratch with a new user file. Here is the code causing the problem any ideas?

Code:
  <thing id="cKniPre" name="Knightly Presence" description="When wearing heavy armor, a knight gains a +4 on Intimidate checks against any opponent that can see him. In addition, when the knight uses her Intimidate check to demoralize an opponent, then the opponent is shaken for 1d4 rounds plus 1 round per point of the knights Charisma modifier." compset="ClSpecial">
    <tag group="Helper" tag="ClExLose"/>
    <tag group="AbilType" tag="Extra"/>
    </thing>
Attached Images
File Type: jpg error.JPG (35.3 KB, 7 views)
Mindcloud is offline   #1 Reply With Quote
Mindcloud
Member
 
Join Date: Jan 2009
Posts: 95

Old March 2nd, 2010, 04:39 PM
Well I figured it out after I loaded up the utility Filemon it was erroring out after accessing herolab.prefs. I deleted the herolab.prefs file and reactivated. Any Idea why this would get corrupted by a user file?

Last edited by Mindcloud; March 2nd, 2010 at 04:42 PM.
Mindcloud is offline   #2 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old March 2nd, 2010, 05:06 PM
The error you're seeing is generated if a class special is bootstrapped to a class without a ClSpecWhen tag to tell it what level you get the special at. You'll learn about that in Tutorial 3, in the "Add a Special Ability" section. I'm guessing the fix from deleting the .prefs file will turn out to be temporary.

Last edited by Mathias; March 2nd, 2010 at 05:12 PM.
Mathias is offline   #3 Reply With Quote
Mindcloud
Member
 
Join Date: Jan 2009
Posts: 95

Old March 2nd, 2010, 05:18 PM
So i inserted a eval script which was incorrect into my special and it caused herolab to error out again on compile forcing me to delete herolab.prefs and reactivate again.

Post Levels(USER) 10000
Code:
if(hero.tagis[Hero.HeavyArmor] <> 0) then
    debug " is heavy armor"
endif
I did a diff on a bad copy of herolab.prefs and here is what I found in the bad copy.
Code:
<preference name="Editor State" value="1"/>

<preference name="Last Update" type="string" value="2010/03/02:2036"/>

<preference name="Notify Dialog" value="1"/>
<preference name="Retrieve Index" value="3"/>
My guess is it is the last two lines above that are the problem.

In the clean file they are.

Code:
<preference name="Notify Dialog" value="0"/>
<preference name="Retrieve Index" value="4"/>
Mindcloud is offline   #4 Reply With Quote
Mindcloud
Member
 
Join Date: Jan 2009
Posts: 95

Old March 2nd, 2010, 05:31 PM
Quote:
Originally Posted by Mathias View Post
The error you're seeing is generated if a class special is bootstrapped to a class without a ClSpecWhen tag to tell it what level you get the special at. You'll learn about that in Tutorial 3, in the "Add a Special Ability" section. I'm guessing the fix from deleting the .prefs file will turn out to be temporary.
As usual you are correct.

Is there any case when you would not have to use a ClSpecWhen for a Class Special?

Also what would be the correct code for checking to see if the hero is wearing heavy armor?

Also Thank you for all of you help over the last couple of days. You have done a great job with the Pathfinder files!

Last edited by Mindcloud; March 2nd, 2010 at 05:41 PM.
Mindcloud is offline   #5 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old March 2nd, 2010, 05:32 PM
It's probably the "Editor State" setting, since the others should have nothing to do with behaviors you've described. Since the Editor is Colen's area of expertise, I've flagged this issue to him. We'll get this investigated and hopefully fixed in time for the upcoming V3.6 release.

Thanks for the helpful analysis, since it should make this problem significantly easier to chase down with the added diagnostic info!
rob is offline   #6 Reply With Quote
Mindcloud
Member
 
Join Date: Jan 2009
Posts: 95

Old March 2nd, 2010, 05:35 PM
Quote:
Originally Posted by rob View Post
It's probably the "Editor State" setting, since the others should have nothing to do with behaviors you've described. Since the Editor is Colen's area of expertise, I've flagged this issue to him. We'll get this investigated and hopefully fixed in time for the upcoming V3.6 release.

Thanks for the helpful analysis, since it should make this problem significantly easier to chase down with the added diagnostic info!
I'll be happy to send you any of my files if it would help.
Mindcloud is offline   #7 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old March 3rd, 2010, 08:31 AM
Quote:
Originally Posted by Mindcloud View Post
As usual you are correct.

Is there any case when you would not have to use a ClSpecWhen for a Class Special?

Also what would be the correct code for checking to see if the hero is wearing heavy armor?

Also Thank you for all of you help over the last couple of days. You have done a great job with the Pathfinder files!
Class Specials ALWAYS need to be added at a specific level. In the next update, I'll do a better job of detecting that error and notifying the user, rather than letting the program try to access the array value for level 0 (which doesn't exist, and therefore gives an error).

To find the heavy armor code, go to the develop menu, make sure "Enable Data File Debugging" is enabled, and then go to the "floating info windows" at the bottom, and select "show hero tags" from that list.

Now, add a suit of heavy armor to your character (you might as well check what medium and light look like, too). While watching the list of hero tags, equip the heavy armor, and watch for changes. You'll see that Hero.EquipArmor is added if the character is wearing any armor, and Hero.HeavyArmor is added if they're wearing heavy armor (Hero.MedArmor and Hero.LightArmor are for the other armor categories).
Mathias is offline   #8 Reply With Quote
Colen
Senior Member
Lone Wolf Staff
 
Join Date: Dec 2008
Posts: 4,690

Old March 3rd, 2010, 04:54 PM
Mindcloud, can you describe the error that forced you to delete herolab.prefs in more detail? All I can figure out from the above is that you saw the errors shown in the screenshot, then something happened, and then you had to delete herolab.prefs to make Hero Lab run again, but I have no idea what the "something" could be.

If there's a bug in Hero Lab that's causing crashes like this, we'd really like to fix it, so knowing exactly what happened would be really useful. Thanks!
Colen is offline   #9 Reply With Quote
Mindcloud
Member
 
Join Date: Jan 2009
Posts: 95

Old March 3rd, 2010, 07:45 PM
So I attempted to reproduce the error for you.

I created a default class named test with the id tst and created a class special called "aaaa test special" id ctstsp. I did not add the ClSpecWhen tag to the bootstrap on the class. And as expected on recompile it errored out with the same error from my OP. I then went back and deleted the class special and all references to it from the class. Here I would expect it to recompile with no errors however it still errors out with the same index error from my OP but only on my user generated class. Additionally if I close the file in the editor and create a new file and make a class create a class special and add it with the ClSpecWhen it doesn't error out at any point. I can also add the original class that was causing the error to a portfolio without error. I was not forced to delete my prefs file at any point so I must conclude that my original conclusion was incorrect due to my ignorance of the ClSpecWhen tag and overzealous Filemon use. So it's not a editor bug or as bad as I thought and as Mathis stated could proabaly be corrected by better error handleing in the data files.

Nonetheless thank you for the quick response and sorry if I led you on a wild goose chase.
Mindcloud 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:47 AM.


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