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):
- 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 itbasic-combat
, or similar, to keep with the style of existing section IDs).
- Make a note of the
- Create a new data file in the
js/
folder. You have done this step as well.- Make a note of the name of this file, as well as the name of the variable.
- 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.
- 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");
- And this is where you need the variable name, and the ID of the
Hopefully I didn't forget anything. If you continue to have problems, let me know.