As a “full-stack” WordPress web developer my weakest skill (being the one that’s required of me least) is Javascript. The vast majority of what my clients need is handled by existing solutions and for custom requests I’m better off simply using a trusted subcontractor who has more expertise and will work faster than I.

But I like to tinker, and often dream up useful tools hoping they end up simple enough for me to pull off. Last year I started playing the excellent indie RPG Tales From the Loop, just as I started playing around with CSS columns.

I’ve used tools like spreadsheets to make game tools since the 80s when I made a spreadsheet car-builder for the superb Car Wars board game. My Champions RPG sheet (Excel) made its way around several BBS file depositories through the 90s.

For this sheet I wanted to make my web-based form fillable and loadable anywhere — on a desktop, smartphone, whatever. I didn’t want to worry about logins and database storage on my end. That’s when I realized I I could store my data in the URI.

Long story short, I’ve cobbled together enough basic javascript that I have a character sheet that reads and converts a form’s state into a JSON string then compresses that into a URI-safe string it sets as the current page’s hashtag. Just bookmark the form (or share the URI) and the character loads right up on page load!

That button will load a blank sheet. To see how it functions with an existing character, here’s my Troublemaker, Chet Barker. The URI is over a thousand characters, but the maximum allowed is 2038 so there’s a decent amount more that can be stored.

Here’s the full URI, in all its glory:

I’m sure the current code is quite ugly (v 1.1 as of this posting). I may continue to tweak it if needed. It should be completely portable and will store the form data of any form with the id “charSheet”. That’s right, anyone could make any fillable HTML form and use this code to save the state to the URI! What this means is: I’ll probably do more character sheets for more RPGs in the future using this. Stay tuned!