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 .
×

Character sheet creation tool using Svelte

So I recently started looking into creating a custom character sheet for a table that I want to run with some friends. After reading the wiki, I started coding my sheet in plain HTML/CSS/JS and realized that I was going to lose my sanity real fast if I didn't use some tool or framework that streamlined the process. I am aware of the existence of tools such as the K-Scaffold , but it uses tools and syntax that I'm not very familiar with. So, instead, I did what any sane person would do and spent the next few days creating a project that allows the creation of character sheets using Svelte , a front-end framework that uses syntax very similar to plain HTML while boasting powerful features. Svelte20 (GitHub) This way, I can break up my HTML into multiple files, write scoped styles (CSS that only affects elements in one file),  use "import" statements to include external code files in my sheet workers, freely use npm libraries, get code completion thanks to TypeScript, easily write styles using preprocessors (Sass, Less, etc.), automatically generate all relevant files (html, css, sheet.json, etc.) and use many of the existing UI libraries for Svelte , amongst other advantages. Anyways, hope this will be useful to someone. Cheers.
1660001566

Edited 1660001839
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Interesting, I'll have to dig into this. Do you have an example of what a constructed html file from svelte20 looks like? For instance, what does the full html file from your tab demo look like? Also, I notice that you've got Roll20Async in your libraries. I'd really recommend not using that framework as it will make your sheet incompatible with Roll20 Mod Scripts like chatSetAttr.
Hey! Glad you found this project interesting. I included a demo sheet inside the repository's releases page, the source code for that demo can be found in src/sheet/sheet.svelte . I tried to highlight as many of Svelte20's features in that demo, including tabs. And thanks for letting me know about Roll20Async, the idea looked appealing as I'm used to working with async/await syntax, but I guess I'll have to refrain from using it.
1660021589
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
This looks very promising! Nice work!