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

Custom Sheet Sandbox Bug Thread

February 18 (5 years ago)
Drespar
Roll20 Team

Hi All!

Today we pushed an update for Pro users: the Custom Sheet Sandbox! This is a tool for sheet creators to make it faster and easier to write character sheets, either for custom use in their games, or for submitting as a community sheet to the github repo. More information on getting started with Github is available on the wiki.

With this sandbox, you can also test out your sheet.json files before submitting them to the github repo.

We have also implemented support for Google Fonts in character sheets and roll templates.

These enhancements make it easier for our sheet authors and Pro users to make the character sheets they really want, a lot faster than previously. We've been using this tool in-house for over 3 months, and it results in a 30% decrease in the amount of time it takes to make changes to character sheets, overall.

What is It?

The Custom Sheet Sandbox is exactly that-- a trimmed-down "sandbox" for you to play in when creating custom sheets. 

Please Note: You will need to store your custom sheet HTML, CSS, and translation.json files to your hard drive in order to use this feature. Many character sheet developers use code editors like Notepad++ or Visual Studio Code to edit these files.

Custom Sheet Sandbox games have the following limitations:

  • You are the only player who can access the sandbox. You can't invite others into your sandbox game.
  • There is only one page in the game, and there is no way to create additional pages.
  • There is no Video or Voice chat in the game.
  • You can only have 15 Custom Sheet Sandboxes at any given time.
  • This is a Pro subscriber feature only.

How Do I Use It?

As a Pro user you will notice a new button called "Custom Sheet Sandbox" at the top of the home page once logged in. Additionally you will see a similar button (shown below) in the "My Games" section.


Click the button. You'll get a new sandbox game.


You can launch the game right away, or paste in your sheet.json file if you already have it ready.


Once in the game, you'll see there's a floating box with buttons to upload HTML, CSS, and translation files.


Clicking any of these opens a dialog box to upload the relevant file from your hard drive. As soon as the file finishes uploading, all characters in the game will be updated to the new source file. You no longer need to reload the whole VTT to see changes.

If you have your game settings page open in a second browser window, you can upload a new sheet.json file in that window and, from inside the VTT, you can click "Reload Sheet Default Settings" to have that sheet.json file update, again without reloading.

Do API Scripts Work?

The Custom Game Sandbox does include support for API scripts. Please note, however, that API scripts that interact with elements of the VTT that are disabled (such as other players, pages, etc.) won't work in these games. However, there is an API sandbox for the game, so you can test out sheet-affecting APIs before using or releasing your sheet.

Did You Say Google Fonts?!?

We didn't mean to bury the lede, but yes! Google Fonts are now supported in custom and community sheets! 

You can call a Google Font in your CSS using the @import function:

@import url('https://fonts.googleapis.com/css?family=Sigmar+One&display=swap');

You can then call the font from inside your CSS with the font-family attribute:

font-family: 'Sigmar One';

To call more than one Google Font for your sheet, separate them with a | symbol:

@import url('https://fonts.googleapis.com/css?family=Sigmar+One|Sriracha&display=swap');

Supporting Google Fonts and other external font sources is a popular suggestion in the Suggestions Forum, and we're glad to make it an option with this update! For licensing reasons, this is limited to Google Fonts, available at fonts.googleapis.com.

February 18 (5 years ago)
vÍnce
Pro
Sheet Author

Before I read you can only have one page in the sandbox game, I used the transmogrifier tool to copy an additional page to the sandbox... Will this cause a problem?

February 18 (5 years ago)
Cavni
Forum Champion

I'm having one of those moments where I stare at my screen going "Huh. How did I not think of that possibility."

Vince, your transmogrified page will not cause any technical problems for your sandbox. Tinker away. That said, we are going to update the Transmogrifier to exclude Sandbox games in the future because... whoops, I did not think of that possibility. ;D

February 18 (5 years ago)
GiGs
Pro
Sheet Author
API Scripter

Vince, continuing to break things since time immemorial.

February 18 (5 years ago)
vÍnce
Pro
Sheet Author


GiGs said:

Vince, continuing to break things since time immemorial.

That's been my mantra on roll20 for sure. ;-P 


February 19 (5 years ago)

I'm a pro user but when I click the sandbox link it tells me that there's an error and the that that page doesn't exist? And the button isn't underneath my create new game button either.

February 19 (5 years ago)
Kraynic
Pro
Sheet Author


Charlotte said:

I'm a pro user but when I click the sandbox link it tells me that there's an error and the that that page doesn't exist? And the button isn't underneath my create new game button either.


Your tag says you have a plus account.  If that should be pro instead of plus, you should contact Roll20 more directly to get that issue straightened out.

February 19 (5 years ago)
Lars K.
Pro
Sheet Author
API Scripter
Small Feature Request

Would it be possible to remember the paths of the HTML, CSS, and Translation file and then have a single button that reloads all of them at once? Or is that something the browser's sandboxing prevents? It would save me like 5-8 clicks or so when I made changes to all files at once (which happens surprisingly often in my workflow, since I generate them from Scala code).

February 19 (5 years ago)
Kraynic
Pro
Sheet Author


Lars K. said:

Small Feature Request

Would it be possible to remember the paths of the HTML, CSS, and Translation file and then have a single button that reloads all of them at once? Or is that something the browser's sandboxing prevents? It would save me like 5-8 clicks or so when I made changes to all files at once (which happens surprisingly often in my workflow, since I generate them from Scala code).


That was discussed in the Pro forum while it was only on the dev server.  You might want to look at some Roll20 comments there, though this one is the most direct for what you are asking about.  https://app.roll20.net/forum/permalink/8108140/

February 19 (5 years ago)

Its funny how i just a week ago tried for the first time ever to edit a character sheet to fit my needs.. and it wasn't the best experience but here you go and release this, very simple indeed. Even a person like me that hasn't done anything with Html or Css can edit away and see the effects of the things i modify. Love it, Cheers! =D

February 19 (5 years ago)

Edited February 19 (5 years ago)

Receiving an error and unable to enter sandbox.



February 20 (5 years ago)
Lars K.
Pro
Sheet Author
API Scripter


Kraynic said:

That was discussed in the Pro forum while it was only on the dev server.  You might want to look at some Roll20 comments there, though this one is the most direct for what you are asking about.  https://app.roll20.net/forum/permalink/8108140/

Thanks, I forgot about checking there first. My bad.

Did anyone make progress on getting the direct HTTP POST to work that was mentioned there? I used to have a script like that as part of my build tool, but at some point some change on Roll20's side prevented it from successfully uploading sheets. Would love to have that again with the new Sandbox, for super fast turnaround time.

February 20 (5 years ago)
GiGs
Pro
Sheet Author
API Scripter


Lars K. said:


Kraynic said:

That was discussed in the Pro forum while it was only on the dev server.  You might want to look at some Roll20 comments there, though this one is the most direct for what you are asking about.  https://app.roll20.net/forum/permalink/8108140/

Thanks, I forgot about checking there first. My bad.

Did anyone make progress on getting the direct HTTP POST to work that was mentioned there? I used to have a script like that as part of my build tool, but at some point some change on Roll20's side prevented it from successfully uploading sheets. Would love to have that again with the new Sandbox, for super fast turnaround time.

Are you sure it was a change roll2--side, and not browser-side? i remember a change in browser security models happening at a specific time, that made it more difficult for a number of programs to interact with the file system.


February 20 (5 years ago)
Lars K.
Pro
Sheet Author
API Scripter


GiGs said:


Are you sure it was a change roll2--side, and not browser-side? i remember a change in browser security models happening at a specific time, that made it more difficult for a number of programs to interact with the file system.



Well, I wasn't using a browser for this, so yeah, pretty sure. As I said, it was integrated into my build tool, so it was using a Scala HTTP client library internally.

February 20 (5 years ago)
Drespar
Roll20 Team

Hi Richard Jokes,

Do you notice this on any sandbox game or did it just start on a copy you have been working on?

Richard Jokes said:

Receiving an error and unable to enter sandbox.


Got that error upon starting, trying to enter the sandbox

February 22 (5 years ago)
Nicholas
Roll20 Team

Hey Richard Jokes - 

Would you mind trying to create a brand new sheet sandbox and letting me know if you're able to get into that one perchance? Thanks for your patience!

April 21 (5 years ago)
Andreas J.
Forum Champion
Sheet Author
Translator

Two months and no further bugs, nice. (Bump so post doesn't get closed)

June 05 (4 years ago)
Wes Baker
Sheet Author

I'm having two issues with the Custom Sheet Sandbox today (both of these were tested using Chrome in incognito mode with only the 1Password extension enabled):

  1. I'm not able to add the sheet.json. In the console I see this error: "Uncaught ReferenceError: prettysheets is not defined". 
  2. Once in the sandbox, no changes to the sheet seem to stick, when I refresh the HTML, CSS, and Translation revert to what they previously were before today. With a new sandbox that means I come back in and there's no sheet. With previously created sandboxes that means any changes I'm testing are lost on refresh (which is frustrating when you're trying to fix something that breaks when you re-open the sheet).
June 05 (4 years ago)
GiGs
Pro
Sheet Author
API Scripter

For question 1, what is the sheet.json text you are trying to add? It sounds like there's an error in it.

For question 2: you dont need to refresh the sandbox, and indeed you shouldnt refresh it. The way to update the sandbox is to click the Sandbox Tools form that is floating somewhere in the window, and use the HTML, CSS, and translation buttons there to reload the files. Make changes to your files, then roload them - dont refresh. 

This has the additional benefit that the sheet reloads way faster than it would with a full refresh, and you can do it with a character sheet open, and see the changes immediately.

June 05 (4 years ago)
Wes Baker
Sheet Author
  1. The JSON is valid, you can see it here: https://github.com/wesbaker/roll20-character-sheets/blob/ose-1.3.0/Old%20School%20Essentials%20-%20AAC/sheet.json
  2. I do update the HTML and CSS that way, but I'm testing attributes that were being squashed on sheet:loaded, so I have to refresh to see if my changes worked.
June 05 (4 years ago)
GiGs
Pro
Sheet Author
API Scripter

That does sound like a weird json error at roll20's side. If you create a new sandbox, and can you use your json in it?

Also can you post a different sheet's json in for testing purposes, just to see if there's some invisible character or encoding issue messing up your json in the sandbox?


On the other issue: Whenever you refresh, it will revert back to the last time you loaded those files. Is that not what is happening?

June 06 (4 years ago)
Wes Baker
Sheet Author

I've tried several sheet.json files and they all have the same effect, though they all have attributes, so maybe that's part of it.

Whenever I refresh, it reverts to what it was at some arbitrary point in time. If I saved the files in the sandbox before that point in time (not sure when) then it reverts to those files. In a new sandbox, it reverts to having no files saved.

June 07 (4 years ago)
Randy Knapp
Pro
Sheet Author

I too am getting the "prettysheets it not defined" when trying to save the settings. I do not have any attributes in my sheet.json.

June 07 (4 years ago)
Randy Knapp
Pro
Sheet Author

Alright, I did some digging and editing JS on the game settings page.

Even if you "fix" the javascript error by skipping that function, the button on the page is still generically submitting the form, but is apparently not doing any update at all. Even if you make changes on the page and fix the Uncaught ReferenceError, no changes will be made when you click save. You can't change compendium, you can't change anything. Even injecting code to update the compendium override from the standard game settings page does not work.

June 16 (4 years ago)
Kenton
Forum Champion
Translator

Thanks for reporting your issue. We're investigating.

June 23 (4 years ago)

Edited June 23 (4 years ago)
Evil Hat Productions
Pro
Marketplace Creator
Sheet Author
Compendium Curator

When I try to save the sheet.json by clicking the save button, it does not save, and the console gives me this error:

7831187:1210 Uncaught ReferenceError: prettysheets is not defined

    at getCurrentSheetInfo (7831187:1210)

    at HTMLAnchorElement.<anonymous> (7831187:1335)

    at HTMLAnchorElement.dispatch (v2.js?1591908278:51)

    at HTMLAnchorElement.g.handle (v2.js?1591908278:51)

Puts a bit of a crimp in testing using this, don't it? :)

The above is from my Chrome instance, got a similar error on Safari
[Error] ReferenceError: Can't find variable: prettysheets
getCurrentSheetInfo (7831187:1210)
(anonymous function) (7831187:1335)
dispatch (v2.js:51:17791)


Evil Hat Productions said:

When I try to save the sheet.json by clicking the save button, it does not save, and the console gives me this error:

7831187:1210 Uncaught ReferenceError: prettysheets is not defined

    at getCurrentSheetInfo (7831187:1210)

    at HTMLAnchorElement.<anonymous> (7831187:1335)

    at HTMLAnchorElement.dispatch (v2.js?1591908278:51)

    at HTMLAnchorElement.g.handle (v2.js?1591908278:51)

Puts a bit of a crimp in testing using this, don't it? :)

The above is from my Chrome instance, got a similar error on Safari
[Error] ReferenceError: Can't find variable: prettysheets
getCurrentSheetInfo (7831187:1210)
(anonymous function) (7831187:1335)
dispatch (v2.js:51:17791)

Im getting the same issue using a known working sheet.json too (Same console issues) with Chrome (on macOS)


Thanks,


I just encountered the issues with prettysheets being undefined as well. Seems like it just trying to compare a nonexistent field against a the list of Roll20 official sheets, which is not defined in the sandbox. I got around this by setting window.prettysheets = {} in the console without any apparent side effects and my sandbox settings and sheet.json were saved successfully. Hope this workaround helps for the time being.