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

[Cyberpunk Red by Roll20] CSS style sheets and chrome devtools

June 14 (1 month ago)
Yui V.
Pro
Sheet Author

Hi,

I was thinking of customising the Cyberpunk Red by Roll20 character sheet, for personal use in my campaign (like adding tabs, stuff like that).
The CPR by Roll20 sheet is proprietary, and thus not on the github, I uderstand that and wouldn't share my custom version (if I can make it lol).

So, using chrome's devtools, I can exrtact the HTML elements quite easily (that's how I managed to get specific attribute names and already create macros that autopopulate weapons in their fieldset, for exemple, in my campaign, without compendium use, for exemple)

But the CSS on the other hand, I have no experience chrome's devtools, and I cannot find any css (even element specific if not for sheetwise) that's in the "right" format, by which I mean, "classe name, space, bracket, styling, bracket" that I could copy paste into the custom character sheet editor.

I've been trying on character sheets of my own making, which would be easier to cross reference since I have access to the original html and css sheets for those, but can't find anything.

(sheet-workers also do not appear in the devtools, but that's secondary, I can remake them, although if you have a clue about that too, I'd gladly accept it, while remaking all of the css would be daunting)

Do you have any idea? Or is this a touchy subject?

Thank you.

June 14 (1 month ago)
Yui V.
Pro
Sheet Author

Found it, it's actually in the html elements tab, inside an element called <style type="text/css" title="charsheet">. It's "hard printed" inside the html, actually.

tip, data-i18n properties can mess with the character sheet if you don't have the right translation files, so render them ineffective by selecting them all, and deleting the tags (or otherwise unabling them). I couldn't find json files, but am not interested in them, since it's strictly for personnal use.


Now, I'm trying to find sheetworkers... This seems a bit more difficult, there are event listeners tabs, total gibberish, and no element inside the html with the sheetworkers in it... hmm....

June 14 (1 month ago)

Edited June 14 (1 month ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator

assuming that this is the cyberpunk red sheet that also says demiplane optional, if you look in the dev console tab after you've opened a character sheet, you'll see a log message from the sheet. it has a link to the sheetworker js file

Also, note that you'll need to remove the .repcontainer elements along with the .repcontrol element that comes after it. These are injected by the roll20 system as the interface versions of the fieldsets.

also, note, you wont be able to use the demiplane sheet with your custom one.

June 14 (1 month ago)
Yui V.
Pro
Sheet Author

Oh, thanks!

Now I can't find the roll templates though. I've searched with different tools, can't find them. Without the html <rolltemplate> elements, the rolls print blank to the chat...

June 14 (1 month ago)

Edited June 14 (1 month ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator

Haven't ever gone looking for the roll template code in the r20 system before, but it looks like the template html of the roll templates is stored in a file called rolltemplates.json. You can access it via the sources tab using the search function (ctrl-shift-p on chrome(ium)). It's in a single line string with newline characters, so you'll need to do some parsing of the rolltemplate data in order to get the actual html to use.

June 14 (1 month ago)
Yui V.
Pro
Sheet Author

hmm...
I can't find any json files at all actually, even using search, let alone the rolltemplates one...
I can only find the roll20 default rolltemplate and 5e rolltemplate.

June 14 (1 month ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator

huh, weird. I can find it when accessing the game from my laptop, but not on my desktop computer.

June 15 (1 month ago)
Yui V.
Pro
Sheet Author

I tried on my two laptops, on chrome, edge and firefox, couldn't find anything (although there's no source tab on firefox's devtools, so I might nnot know where to search)