crobi / dnd5e-quickref

Quick reference sheet for D&D 5e

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding a Combat section

bror00 opened this issue · comments

I want to pint these to put into my DM screen. Prints need to be landscape and I have three 8.5x11 panels I can fill. These will be player facing.

I want players to have a section on Combat so I've modified the "quickref.html" file and created a new js file for the combat section.

However, I can't the page to display correctly (see screen shot) ...
(https://user-images.githubusercontent.com/29505925/27254856-6d794ce0-535f-11e7-9f5c-3a93e16d67bb.png)

PS - not sure if I forked/pulled the files correctly. Reply below and I can supply my versions as needed.

PPS - because I am printing I manually set all the colors to black)

These are the steps you need to take in order to add a new section (it's a shame there's not much documentation about it):

  1. Copy (and modify) a section in the HTML file (like the conditions section). Judging by your screenshot, you have already done this.
    • Make a note of the section-row's ID. It should be unique (so call it basic-combat, or similar, to keep with the style of existing section IDs).
  2. Create a new data file in the js/ folder. You have done this step as well.
  3. Add the script to the HTML file (like this).
    • This is where you need the filename.
    • Make sure it is above the quickref.js script.
  4. Tell js/quickref.js to load your data onto the page (shown here)
    • And this is where you need the variable name, and the ID of the section-row.
    • The new line should look something like: fill_section(<replace with variable>, "<replace with section ID>", "Combat");

Hopefully I didn't forget anything. If you continue to have problems, let me know.

@s-thom perfect thx!

I was missing the js/quickref.jsline and now it's working!

Now I just need to organize individual sections to get them to print on the pages I want.
I'm also thinking about making a whole new page for abilities (similar to the attached)

D&D 5e Ability & Skills Summary Cheat Sheet