Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
hylentor
Junior Member
 
Join Date: Mar 2010
Posts: 18

Old March 31st, 2010, 08:59 AM
In working out my plan for BESM, I noticed one snag - they already have attributes as an ability type. Essentially the skeleton "attribute" file would be BESM stats, and probably the skeleton "ability" file would be BESM attributes.

Now, it would probably be easier to just change the labels (i.e. just have the thing_ability.dat instead output "attribute" to a user), but would it be better to change the types (i.e. thing_stats instead of thing_attributes, etc.) for others to be able to find things?

Thanks
hylentor is offline   #1 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old March 31st, 2010, 12:52 PM
It would probably make everything clearer and more intuitive as you developed the files to switch to the nomenclature of the game system. So I think that would be a prudent change.

Hero Lab doesn't care what naming system you use for ids, just as long as they all resolve properly. So there is no risk in doing this. Just make sure you revise everything that tied to the current naming, including components and the like.

This is definitely something you should change right from the start, before you get any substantive content into place, since changing it later will entail chasing down all the places and fixing them.
rob is offline   #2 Reply With Quote
hylentor
Junior Member
 
Join Date: Mar 2010
Posts: 18

Old April 1st, 2010, 07:56 AM
Ok, I've started playing with this and its gave me issues quickly. Surprising (to me) was that HL didn't even bat an eyelash in changing thing_attributes to thing_stats. So, the next thing was to try to get references of attribute to stat where appropriate (starting with the .1st, .str, etc. files). I've pretty much been changing one or two things at a time and recompiling to catch errors.

First, I was a bit leery of changing "Attribute" due to seeing "XML Attribute" in both the wiki and general xml stuff, but decided that backing up and learning by doing works best for me, and I eventually crashed HL (unsurprisingly).

I'm not on the computer I was working on, so I can't copy the error just yet (it was late last night), but I figured it was worth asking if I was even going down the right path there, or if I'm trying to change the wrong thing. If I need to, I can copy the error once I get back home. Thanks again.
hylentor is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old April 2nd, 2010, 08:58 AM
If your editor supports searches on multiple files, that's probably the best way to go about something as huge as finding every reference to "Attribute" and changing it to "Stat". I switched editors to one that has that capability a month ago, and I wouldn't go back.

BTW, just as a note, changing the filenames isn't a problem - Hero Lab doesn't worry about what the file is called, just the extension and the contents. The file names are just there to help the author find the right place.
Mathias is online now   #4 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old April 2nd, 2010, 01:10 PM
It sounds like you're on the right path. As Mathias pointed out, getting a good editor is a real boon and will allow you to change stuff a bit more efficiently. That being said, I think your incremental approach is much better than doing changes en masse. The incremental approach will ensure you don't change too many pieces at once and get yourself confused. It will also be educational as you see where all the interdependencies exist. This is doubly so since you learn best by doing and experimenting.

The term "attribute" is a formal XML term. It has zero bearing on "attributes" as they pertain to RPGs. If you've done even a tiny bit of programming, the XML term "attribute" is a lot like the term "variable" when programming. They don't serve the same purpose. However, they both simply identify an important piece of the structure of what you're writing.
rob is offline   #5 Reply With Quote
hylentor
Junior Member
 
Join Date: Mar 2010
Posts: 18

Old April 2nd, 2010, 06:26 PM
I went to notepad++ and figured out how to search files in that (and was very happy with case-sensitive searching). Was going up the wall trying to figure out how to make windows do it, since it doesn't consider these things documents. Also has the line numbers, which is helping out tremendously, at least when the error matches the right line (see below).

anyway, here's the error I'm coming up against:

I was changing the "Procedure DshBasics" reference (in procedures.dat) because it gave me
Quote:
The data files could not be loaded due to the following errors:

Syntax error in script for Procedure 'DshBasics' on line 23
-> Non-existent component 'Attribute' referenced by script
Now, its actually line 723 (tested by changing Attribute to a random name and getting the error above again) but when I change that line to Stat, I get a crash and the following error out

Quote:
C:\HeroLab\HeroLab.exe
3.6 215
ACCESS VIOLATION
Address: 0x004c51ef
Type: bad read
major: 5, minor: 1, build: 2600, platform: 2, version: Service Pack 3, spmaj: 3, spmin: 0, suitemask: 00000300, type: 1
And this is the script in question:

Quote:
~output attributes
foreach pick in hero from Attribute
final &= eachpick.field[name].text & ": {b}" & eachpick.field[trtFinal].text & "{/b}{br}"
nexteach
I'm stumped - everything in the pre-.dat files is switched, and hadn't complained any more than not compiling. Not sure if there's something that needs to be swapped in before that, but I'd think it'd fail to compile on that, were it true. I'm being careful about being case-sensitive as well.

thanks again
hylentor is offline   #6 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old April 2nd, 2010, 07:03 PM
When an error is reported within a script, the line number specified is the line number *within that script*. For example, in the "DshBasics" procedure script, the error should be occurring on line 23.

Since the vast majority of errors that users will run into when using the Editor are script errors, this behavior is most helpful in finding those errors. If you are editing XML files directly, the script name will point you to the first line of the script code. Simply add the line number given in the error to quickly determine the actual line on which the error is occurring.

As for why you are now getting a crash, I have no idea. Does the crash still occur if you re-launch Hero Lab and try loading the files again (with the change still in place)?

Please package up your data files and send them to me to look at. You can package them up using the HLExport tool, which can be accessed via the Tools menu within HL or the Windows Start menu. You can either attach them to a post or send them to me via email at helpdesk at wolflair dot com.
rob is offline   #7 Reply With Quote
hylentor
Junior Member
 
Join Date: Mar 2010
Posts: 18

Old April 2nd, 2010, 07:30 PM
heh, I got lucky then that the script started on 701

I get the error both if the program was already up and if I restart it.

I've attached the file, but I'll troll through the code again in the morning as well. A fresh brain may help. Thanks for all the help.
Attached Files
File Type: zip besm2.zip (219.4 KB, 7 views)

Last edited by hylentor; April 2nd, 2010 at 07:31 PM. Reason: late night typos
hylentor is offline   #8 Reply With Quote
hylentor
Junior Member
 
Join Date: Mar 2010
Posts: 18

Old April 3rd, 2010, 05:21 AM
I've semi-fixed this. I reverted everything I had already done and then changed it back, and its at least not crashing, although I don't know why - I'm going with the "I missed something" reason, I think.

Yes, apparently thing_stats.dat and editor.dat needed to be changed first, since it compiles past procedures now - tracking down the rest.

Great, its compiling again - I must not have thought about going back to the "thing" document last night, as when I changed it first when attempting this the first time, it crashed on me, so I decided to follow the errors and change whatever it was complaining about. Now I can concentrate on the other things I have to get done this weekend

Last edited by hylentor; April 3rd, 2010 at 05:44 AM. Reason: update again
hylentor is offline   #9 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old April 3rd, 2010, 01:58 PM
Thanks for the files! The crash is due to a bug in the compiler. The things that are based on the "Attribute" component set have not been changed to reference the new "Stat" compset instead, so that old compset they reference doesn't exist. Unfortunately, the compiler has a spot in it where it's not properly verifying that the compset exists, so it's trying to access the non-existent compset and falls over.

We'll get this fixed in the next update. In the meantime, you should be able to work around this issue by locating all the things that are derived from the "Attribute" compset and changing them to the new "Stat" compset. They ought to all be in the file you have renamed to "thing_stats.dat". That will bypass this bug and get you making headway again.
rob 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 08:06 AM.


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