Giter VIP home page Giter VIP logo

dnd-monster-md's Introduction

D&D Monster Stat Block MarkDown for Typora

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 blockquotes 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.

How to Install

  1. Launch your Typora program
  2. Go to File > Preferences > Appearance
  3. 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.

How To Use

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";}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.