Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit

Notices

Reply
 
Thread Tools Display Modes
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old September 28th, 2017, 02:40 PM
Quote:
Originally Posted by Mathias View Post
Try adding a

Code:
debug "starting script"
at the very beginning, so that you can tell if the script has re-started - visual elements can end up being generated several times.
I see it starting three times for Agility, but once for everything else.

It's not impeding any function. But it is strange.

Sorry, I should say three times for Movement, which is linked to Agility.
EightBitz is offline   #11 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old September 28th, 2017, 02:44 PM
Yeah, visual elements can get regenerated several times. Does that happen to be the first item in the table - that could mean a pass specifically to get the height of the first element, which will then be used to lay out the rest of the table.

Is it an option to build all this text in a component field, which the visual element can just look up? That saves the foreach from having to run so many times.
Mathias is online now   #12 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old September 28th, 2017, 03:59 PM
Quote:
Originally Posted by Mathias View Post
Yeah, visual elements can get regenerated several times. Does that happen to be the first item in the table - that could mean a pass specifically to get the height of the first element, which will then be used to lay out the rest of the table.

Is it an option to build all this text in a component field, which the visual element can just look up? That saves the foreach from having to run so many times.
As to the first part of your comment, what I'm getting from it is that the script is being called for reasons which might not be obvious to me, so this isn't completely unexpected.

As to the second part of your comment ... maybe, but that wouldn't solve my whole problem, and I'm not sure that would be the best solution. There are attributes, skills, and specializations. I'm emulating the official character sheet in putting all things related to a given attribute on the same line. So three columns:

Attributes | Skills | Specializations

I have a template that includes:
- One portal for attributes that looks up each attribute.
- One portal for skills that looks up each skill linked to that attribute.
- One portal for specializations that looks up each skill linked to that attribute, then for each skill, it looks up each specialization linked to that skill.

Wherever I determine these output fields, I'd have to have equivalent loops somewhere. The loops that will run the least are the ones for printing character sheets.
EightBitz is offline   #13 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old September 28th, 2017, 04:18 PM
Hero Lab now has tests to determine if it needs to regenerate the text of a field between evaluations, in order to speed up the time required to recalculate everything on a character, so if all of that is calculated in component scripts and stored in fields, then it will probably not need to be recalculated for that same character during a single period that the user has HL open, but if the calculations are in the visual elements, they're recalculated every time the user looks at that tab, and every time they change something while that tab is open.
Mathias is online now   #14 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old September 28th, 2017, 04:44 PM
Quote:
Originally Posted by Mathias View Post
Hero Lab now has tests to determine if it needs to regenerate the text of a field between evaluations, in order to speed up the time required to recalculate everything on a character, so if all of that is calculated in component scripts and stored in fields, then it will probably not need to be recalculated for that same character during a single period that the user has HL open, but if the calculations are in the visual elements, they're recalculated every time the user looks at that tab, and every time they change something while that tab is open.
This is just for the character sheet. It's not on the tabs in the UI. Those are all self-contained. And during character creation, some of these fields will be changing quite a bit. Adding points to skills, then maybe changing your mind and taking them away to put them somewhere else; or adding specialties and arranging points between them, then maybe changing your mind and removing them or changing points between them, etc.

I still feel like there will be more recalculation during character creation than if I just left these scripts on the character sheet.
EightBitz is offline   #15 Reply With Quote
Reply

Thread Tools
Display Modes

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 11:41 AM.


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