View Single Post
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,502

Old February 24th, 2018, 09:30 AM
I'm building part of the character sheet which shows the Health and then some defense values.



I started out with a somewhat crude, but reasonably functional setup where I built everything with individual labels (still working on scaling):



It then dawned on me that I could probably use templates, since this is essentially all the same data (not to mention that I'm suddenly realizing I never actually stuck the code in to load those box labels with the values). I found the use of "templateref", but it looks like you can only use a template once in a layout. Looking at example source code, it looks like this is usually handled by applying the template to a single trait that has multiple values, such as initiative, and all references in the position script are to the template name. Is there a way to simply build a layout that has four instances of this template, pointing to trHealth, trDR, trDefense, and trDodge, and then refer to each uniquely?

The alternate method which I'm going to mess around with is one templateref for the Health and then a table with three columns for the other three, but I figured I'd ask here while I'm fiddling (and also to remind me to post the answer if I find one).
Attached Images
File Type: png Health and Defense Section.png (6.4 KB, 16 views)
File Type: png Health and Defense Actual.png (8.8 KB, 16 views)
Duggan is offline   #1 Reply With Quote