'Barbarism is the natural state of mankind,' the borderer said, still staring somberly at the Cimmerian. 'Civilization is unnatural. It is a whim of circumstance. And barbarism must always ultimately triumph.'

-Robert E. Howard
Beyond The Black River

Corrupt Cliffs

Corrupt Cliffs
Get your FREE Narrative Terrain Deck today!

Places of Interest

Tuesday, December 15, 2020

Conan 2d20 on Roll20: Custom Sheets

Alright, if you follow me at all, anywhere on social media, you are likely aware I've been working on a Conan 2d20 sheet for Roll20.  The sheet won't be available via the standard channel since it requires the API and there are already two free sheets available directly.  For those of you who expressed interest and wanted something with a little more automation, I still wanted to make this available.

Requirements:    Roll20 Pro Subscription.  No way around it, the sheet uses the API extensively.

Set-up Requirements: Like most Conan games on Roll20 we will need a few roll tables.  

CD for combat dice with the following entries: 1, 2, -, -, 1 + effect, 1+ effect.



HITLOC for hit locations with the following entries: Head, Torso, Right Arm, Left Arm, Right Leg, Left Leg.  These entries need the following weights as well: 2,6,3,3,3,3.



Finally you will require a character named GMPANEL.  This is the Doom pool.  This is the player momentum pool.  The Character sheet makes calls to the API using this object by name.  It must be named this or the sheet will not work.


Basic Game Setup

Ok, now that we know what we need lets walk through the steps.  I have a video detailing these steps here: VIDEO LINK

  1. Copy and paste the HTML code into a game's custom sheet HTML.
  2. Repeat this for the CSS code.
  3. Save these.
  4. Switch to your Game's API input and add a new script, I normally named it Conan.js
  5. Copy and paste the API code here.  
  6. Save it.
  7. Open the game and create the two roll tables
  8. Create the GMPANEL character.
  9. Open the GMPANEL, go to the character sheet and select the GMPANEL tab.
  10. Click Initialize.

The GMPANEL

To make the panel more useful I generally create a token the represents the character and link the tokens bars to doom and momentum.  I also allow the players to see the text on the bars and set the DOOM max to 1, so it always displays a bar with the numbers on showing doom.

Creating a character

!!IMPORTANT!! Anytime you create a new character you need to go to the GMPANEL on that character sheet and click initialize.  This sets up the characters attributes so the API can call them when it needs to.  If you do not do this, the API will likely attempt to get attributes that do not exist, resulting in a crash.

HELP
!help will bring up some basic help and a few API commands you will find useful as GM.

The Code:
I will update the dates on these as I make modifications and release new versions.

Last updated these on May 9, 2021.  I inadvertently broke the combat dice without realizing it.  That is fixed.  Also noted the pay upkeep was not working properly due to sheet workers.  Still has some issues. The main UI for the character sheet has been updated as well (I believe the last update had the original version)

HTML CODE: Updated May 9, 2021
CSS CODE: Updated May 9, 2021
API CODE: Updated May 9, 2021

If you open the code and simply copy and past it as is, it will mostly be fine, but I have found it will append a little snippet of code to the end of the copy and paste.  This doesn't seem to affect the HTML and CSS, but it breaks the API.  After you paste the API into the API window, scroll to the bottom and delete the bad part of the code.


All graphics are hosted on IMGUR.

And one final note.  If you go looking through the code, you will most assuredly find references to things and classes that are no longer used or commented out.  Some things need to get reimplemented still, others need to get removed.  Code cleanup is the least fun part, and so the last thing I do...IF I do it. :)

If you have feedback or ideas of improvement, I would love to hear them, even if I don't use them.
Stay strong!

Remember this isn't the end times, this is humanity working together to save as many lives as we can through a proven methodology for fighting a new virus. Stay Strong.

Till next time, don't forget to Keep it Weird!

4 comments:

  1. I wish I could understand all this. :)

    ReplyDelete
  2. By CROM this is amazing! However I am definitely struggling to get this to work, ive copied the html, css, and api in their appropriate places. when i open the sheet in game everything is completely out of whack, and its all on a white background, the skill names are floating above the boxes and its just a mess. The video link you have doesn't actually include a link either.... if you can offer any kind of assistance that'd be most welcome! thank you :)

    ReplyDelete
    Replies
    1. ahh yeah, I had planned to make a video and never got around to it. I suck!

      Are you on Facebook? Can you get a hold of me there? https://www.facebook.com/starshipsandsteel and we can see what is up?

      Delete
    2. i fixed the "white background and weird abnormal layout by clicking the box for the legacy sanitization. but im now getting syntax errors with the API script
      and yes ill find you on facebook

      Delete