Performance issues...

For discussion about the NBOS Character Sheet Designer and Viewer.

Performance issues...

Postby mmacmartin » Thu Dec 10, 2009 7:47 pm

Hi, I'm new here on the boards, and I'm new to using the NBOS Character Sheet designer.

I've recently got obsessed with the Mutant Chronicles RPG, and figured that this would be a good way to put the Character Sheet Designer through its paces. The game has each skill having a number of "picks", and the total skill value being a function of that and the linked attribute. In keeping with the way that the official Mutant Chronicles sheets look, I wanted to have a checkbox per pick - for a total of 16 per skill, plus a mod box, plus stat mod box, plus an "Uncapped?" box, plus a final total box.

Anyway, after a lot of copy and pasting, I ended up with at template (attached) which is done to the end of "skills". Now, there's an issue with it: because the character sheet designer seems to run all updates after editing any values, and the fact that my skill update function seems to be processor intensive, this causes the viewer to slow down to the point of near unusability.

I have no idea if I can speed up my function in any way. I would very much like to be able to call the checkboxes SkillName.Picks[i], but the designer does not seem to like that. I would also very much like to be able to have an OnChange function (preferably for an object "class": i.e. call each checkbox of SkillName an UpdateBox<SkillName> and have things set up so that it knows what to do). Having an OnChange event would allow for significant run-time speed ups. If it is there already in the program, it is hidden away and not in the brief tutorial.

Anyway, I would appreciate if anything could be done about performance issues: either help me write a more efficient template in this style, or if it could be looked into on the application end.

Thank you
Attachments
mctest.csd
(344.9 KiB) Downloaded 147 times
mmacmartin
Torch Bearer
 
Posts: 1
Joined: Thu Dec 10, 2009 7:38 pm

Re: Performance issues...

Postby nortain » Tue May 28, 2013 6:13 pm

If you go under the Sheet tab->Document Setup-> Script Configuration. There are 4 script events you can add functions to. If you have a large character sheet I'd recommend using something like On Open and On Update to call a driver function that executes everything in the character sheet. Using individual fields to be updated (i.e. calling and modifying source values directly) runs at an O(n^2) speed. If you're not familiar with O notation just know that's about as bad as it gets. It sounds like (4 some odd years ago) you were experiencing the brunt of that. For readers coming across this post, make sure to use on open and/or on update for anything but a simple character sheet. The speed of the application will be the difference between being useless and being usable.
nortain
Torch Bearer
 
Posts: 6
Joined: Fri Apr 12, 2013 4:12 am


Return to Character Sheet Designer General

Who is online

Users browsing this forum: No registered users and 1 guest

cron