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

Charactermancer In Custom Charactersheet Won't Launch

1553369488

Edited 1553369520
Will K.
Sheet Author
I'm trying to update one of my character sheets to use the Charactermancer now that it's available but I can't get the slides to launch. <!-- CHARACTERMANCER LAUNCH SCRIPTS --> <script type="text/worker"> on("clicked:intro", function() {     startCharactermancer("intro"); }); </script> <button type="action" name="act_intro">Intro!</button> <charmancer class="sheet-charmancer-intro"> <div class=""> <p>Intro</p> </div> </charmancer>
Hello Will K., I have moved this issue to the Character Sheets & Compendium forums. 
1553448659

Edited 1553448686
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I copy and pasted your script into a test game. It works perfectly fine for me. Some things to check: Look for errors in your console log (ctrl+shift+i on pc chrome; cmd+i on mac chrome) Do you have multiple <script> tags in your sheet? All sheetworkers should be in the same <script> tag And, a very minor styling critique. I tend to prefer my scripts be at the end of the sheet, rather than before the html.
1553457038
GiGs
Pro
Sheet Author
API Scripter
I just copied and pasted the text into an empty game, and it doesnt work at all for me.  It gives this weird error: app.js?1553011698:560 Uncaught ReferenceError: COMPENDIUM_BOOK_NAME is not defined     at Worker.<anonymous> (app.js?1553011698:560) (anonymous) @ app.js?1553011698:560
1553459695
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hmm, interesting. It looks like mancer requires that a compendium be active in the game. I think that's a bug.
1553461049
GiGs
Pro
Sheet Author
API Scripter
You're right, I activated the fate compendium and it works.
Hey, thanks, I'll report the bug.
1553487276
Finderski
Pro
Sheet Author
Compendium Curator
Scott C. said: And, a very minor styling critique. I tend to prefer my scripts be at the end of the sheet, rather than before the html. Scott, can I ask why? I tend to put my at the top and my roll templates at the bottom, so am curious. :)
1553489213

Edited 1553489358
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
It started cause that was where the sheets I was learning from put them. But it's also cause I like to add to the end of the code, and I usually do the ground work on the html/css first. And, my sheets tend to be very sheetworker heavy; having the 1200 lines of html before the 12000 lines of JavaScript just makes it easier for me to navigate the code. It obviously has no effect on how the sheet actually works of course.
1553490242
Andreas J.
Forum Champion
Sheet Author
Translator
Finderski said: Scott, can I ask why? I tend to put my at the top and my roll templates at the bottom, so am curious. :) Beyond what Scott C. said, that's also the way the Official sheet are done. There is also the minimal chance it speeds up loading the sheet, as the html is what you need to view the sheet for at all times, where as the scripts are just used every now and then. It can be tiny bit quicker for the browser to not load 12000 lines of javascript before the sheet, but I think things like that might only be noticable on the most sheetworker-heavy sheets, if even that.
1553495383
GiGs
Pro
Sheet Author
API Scripter
I prefer to put my script stuff at the end, purely because its easier for me the way i edit files, but if you prefer to put the script at the start, I don't think it makes any practical difference. 
1553523002
Finderski
Pro
Sheet Author
Compendium Curator
Cool.  The navigating thing, for me, is always a problem, because I tend to write HTML, then edit Sheet Workers that I need for that HTML, etc.  So, I use CTRL+F a lot for navigating the sheet. For example, CTRL+F </scrip puts me at the top of my HTML, CTRL+F <roll puts me at the top of my roll template, etc.   I just always find it interesting how different people think and solve for "problems". :)