Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

K-scaffold Character Sheet Framework v2.2

1696441444

Edited 1696441497
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The K-scaffold Character Sheet Framework has come a long way since it started taking shape 3 years ago. Currently it is an easy to install package via NPM that streamlines a lot of the tedium required to create even a moderately complex character sheet. Today marks the release of v2.2 of the K-scaffold , as well as several new tools to make it even easier to use. New Tools K-scaffold Initializer One of the tediums that did still exist was the start of a new character sheet project and setting up your file structure. The K-scaffold Initializer solves this by providing an easy to use console command to initialize a new project complete with sheet.json, translation.json, and readme.md template files, and even starter code for your pug and scss files. You can use the initializer today by using the following command in your console once you have node.js and NPM installed. npx @kurohyou/k-init K-scaffold VSCode Extension The brand new VSCode extension provides K-scaffold specific code snippets and syntax highlighting. You can install it in your vscode by searching for "k-scaffold" in the extensions browser. Brand new K-scaffold Documentation Site The K-scaffold's documentation is now presented in a stylish new site  powered by vitepress . I've also written a guide on how to use the K-scaffold that is presented on the same documentation website. This makes now a great time to jump into using the scaffold and Pug to supercharge your sheet creation. K-scaffold v2.2 K-scaffold version 2 marks a dramatic increase in the capabilities of the K-scaffold combined with making the overall scaffold simpler and easier to use. The high points of K-scaffold v2.X.X are: Support for a formula definition on attributes that tells the K-scaffold how to calculate their values without you needing to write an entire javascript function. This mimics the default Roll20 auto-calcs, but does not have their performance issues. In addition, these formulas can be used with repeating attributes. A macro parsing function available in your sheetworkers. This allows you to easily parse out macro syntax to figure out a value. You can now create template files for your sheet's sheet.json, translation.json, and the instructions field of the sheet.json. Lets you easily define custom values for these files to override the K-scaffold's defaults The instructions field can be written in basic Markdown syntax Ability to write true single file components that contain all your pug (html), styling, and sheetworker functions for a given section of your sheet in one file.
1696446944
GiGs
Pro
Sheet Author
API Scripter
That does sound like a lot of nice improvements.
1696483394

Edited 1696484363
vÍnce
Pro
Sheet Author
I just started playing around with KS last week.  New docs are excellent.  I'll have to give the new initializer command and syntax highlighting extension a spin.  Thanks Scott. installed the new extension; shouldn't I have some highlighting on the pug file? I was using the formatter-pug extension prior which does give me proper highlighting, but I disabled it to compare with the k-scaffold extension. example with K-scaffold Sheet Framework; example using formatter-pug;
1696486657

Edited 1696487630
vÍnce
Pro
Sheet Author
I really like the initializer command.  What a time saver. However, when I attempt to build using "npm run dev" I'm getting an error;  Processing OSRIC.pug ========================= ==== PUG PARSE ERROR ==== ========================= ENOENT: no such file or directory, open 'D:\Users\sefne\Documents\GitHub\K-Scaffold\OSRIC\source\spines\_index.pug'     at D:\Users\sefne\Documents\GitHub\K-Scaffold\OSRIC\source\OSRIC.pug line 3 I'm not seeing a "..\source\spines\_index.pug" created using the initializer command... I added it manually and tried to build again and got a new error; Processing OSRIC.pug ========================= ==== PUG PARSE ERROR ==== ========================= ENOENT: no such file or directory, open 'D:\Users\sefne\Documents\GitHub\K-Scaffold\OSRIC\source\mixins\_rolltemplate.pug' at D:\Users\sefne\Documents\GitHub\K-Scaffold\OSRIC\source\OSRIC.pug line 15 I manually added a '_rolltemplate.pug' file to the mixins folder and I was able to compile an html, css, sheet.json and translation.json So, there might be some minor adjustments needed with k-init. Hope this helps. Cheers
1696526752
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Thanks Vince! apparently I had some old boilerplate that got left in the initializer. I'm not sure what's going on with the pug highlighting. I don't run any other pug formatters, just the default VSCode language formatting and the K-scaffold extension.
1696532876
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Just released an update to the initializer: Fixes the template issues reported by Vince Adds ability to scaffold a project for use with SFCs or with the standard organization
1696558473
vÍnce
Pro
Sheet Author
Just tried the updated initializer.  No errors.  Works great.