This repository contains a file base.user.css
that when its contents are added to your own Typora base.user.css
, you will be able to create a D&D stat block in no matter what theme you're using. In order for this to work, you have be ok with losing your blockquote
as it will turn all blockquote
s into monster stat blocks. There is are a couple of specialized markdown patterns that are used to generate the specific sections, some of which ordering matters.
- Launch your Typora program
- Go to File > Preferences > Appearance
- Click the "Open Theme Folder" button
This will open an explorer window where you will find a file called base.user.css
. Simply open the file in any text editor, and copy the contents of this repository's base.user.css
file, and paste it at the bottom of your local file.
Now all you have to do is save the file, and relaunch Typora.
Below is an example of a monster stat block:
> # John Doe
> ### Medium drow, lawful evil
> ---
> > 1. 16 (natural armour)
> > 1. 85 (10d8 + 40)
> > 1. 45ft.
> ---
> > | | | | | | |
> > | ------- | ------- | ------- | ------- | ------- | ------- |
> > | 12 (+1) | 18 (+4) | 18 (+4) | 14 (+2) | 16 (+3) | 20 (+5) |
> ---
> > - **Skills** Deception +9, Insight +7
> > - **Damage Vulnerabilities** piercing from magic weapons wielded by good creatures
> > - **Damage Immunities** bludgeoning, piercing, and slashing from nonmagical weapons
> > - **Senses** darkvision 60ft., passive Perception 13
> > - **Languages** Common, Deep Speech, Dwarvish, Elvish, Infernal, Undercommon
> > - **Challenge** 10 (โ XP)
> ---
> **Limited Magic Immunity.** Immune to spells of 5th level or lower unless he wishes to be affected. He has advantage on saving throws against all other magical effects.
>
> ## Actions
> **Multiattack.** The rakshasa makes two claw attacks.
Which will produce the following within Typora
Component | Mark Down |
---|---|
Monster Name | Header 1: # |
Monster Size/Type/Alignment | Header 3: ### |
Stat Block Separators | Horizontal Rule: --- |
Monster Attributes (armour. HP, etc) | Ordered List within a Blockquote:> 1. <armour class> > 1. <hit points> > 1. <speed> These rows will automatically have the "Armour Class", "Hit Points", "Speed" titles added to each row in that order. |
Monster Stats | 6 column Table within a Blockquote: `> |
Monster Properties | 6 row Unordered List within a Blockquote: > - content These rows will automatically be coloured the expected dark red. |
Monster Info | This section is just regular Mark Down, nothing special |
Monster Info Headers | In this example, I have a header for "Actions" Header 2: ## |
If you need to add/remove/reorder additional Monster Attributes, or Monster Properties, these can be found at the top of the CSS, and are as follows:
/* Attributes */
blockquote blockquote ol li:nth-child(1)::before {content: "Armour Class";}
blockquote blockquote ol li:nth-child(2)::before {content: "Hit Points";}
blockquote blockquote ol li:nth-child(3)::before {content: "Speed";}
/* Stats */
blockquote blockquote table td:nth-child(1)::before {content: "STR";}
blockquote blockquote table td:nth-child(2)::before {content: "DEX";}
blockquote blockquote table td:nth-child(3)::before {content: "CON";}
blockquote blockquote table td:nth-child(4)::before {content: "INT";}
blockquote blockquote table td:nth-child(5)::before {content: "WIS";}
blockquote blockquote table td:nth-child(6)::before {content: "CHA";}
You will notice that the nth-child(#)
portion defines the ordering of the rows, and the content within the quotes ("text to show "
) is what will be displayed. You can change this to any text you want.
As an example, you can add a 4th row for "Proficiency Bonus" in the monster's attributes using the following:
blockquote blockquote ol li:nth-child(4)::before {content: "Proficiency Bonus";}