Giter Site home page Giter Site logo

dungeon-press's Introduction


Dungeon Press Icon

Dungeon Press

Dungeon Press is a markdown powered static site generator for Dungeons & Dragons.

View Demo · Report Bug · Request Feature

Table of Contents
  1. About Dungeon Press
  2. Getting Started
  3. Markdown Reference
  4. HTML Template Strings
  5. Contributing
  6. License
  7. Contact

About Dungeon Press

Product Name Screen Shot

Dungeon Press is a static site generator that leverages the simplicity and flexibility of Markdown to create interactive tabletop adventures with a clean, minimalistic design. It's designed to cater to both creators and players by offering advanced formatting features, dynamic content adjustment, and easy publishing options.

Powered by Markdown

Dungeon Press utilizes GitHub flavored markdown, enhancing it with features to support advanced formatting such as dialogues, dice rolls, difficulty checks, ability scores, and more.

Details about your adventure, such as the author, description, and version are configured through a self-contained, frontmatter style YAML configuration, making your adventure setup straightforward and customizable.

Notes and Highlights

The platform enables users to highlight text sections, bookmark them, and annotate with notes or general observations. It supports saving checkbox states, with all data stored in the browser's local storage, making it easy to pick up right where you left off.

Procedural Content

Dungeon Press introduces procedural content generation through randomized tables based on a seed. Creators can set a default seed for their adventure or allow players to choose one, adding a unique twist to each playthrough.

Adjustable Difficulty

Adjust the challenge level of your adventure with scalable difficulty checks, ability scores, dice rolls, and values across three difficulty settings: casual, intended, and difficult. This feature adjusts values and modifiers to ensure a balanced experience for all players.

Publishing Features

With Dungeon Press, publishing your adventure is a breeze. It builds a fully responsive static HTML bundle compatible with any HTTP server, with SEO friendliness through meta tags and structured LD+JSON data. Mobile, tablet, and desktop devices are all supported. Media and other files included in the /public directory are automatically included with the exported bundle.

Customization

Configure external links, social media profiles, titles, hero images, and more through dungeonpress.config.js. Themes can be easily adjusted using CSS variables contained in style.css, and the index.html file can be altered to add things like Google Analytics tags.

Dark Mode

Dungeon Press supports both light and dark modes through media queries and CSS variables.

Built With

  • Vite
  • React
  • Marked

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

To run this project you'll need the following software installed:

Installation

  1. Create a copy of this project by using the "Use this template" feature on GitHub, or by forking this repository
  2. Clone your copy of the repo git clone https://github.com/<your-username>/<your-app>.git
  3. Install required dependencies with npm install
  4. Run the project with npm run dev
  5. Open adventure.md and get to work!

Your adventure will now be available at http://localhost:5173. Any changes made to adventure.md will automatically be reflected in the browser.

Additional customization can be found in dungeonpress.config.js. If you'd like to adjust the look, colors, fonts, and other theme related styles can be adjusted via CSS variables in style.css.

To build an HTML bundle suitable for publishing, run npm run build and the output will be generated in the dist directory.

(back to top)

Markdown Reference

Dungeon Press supports most features of GitHub flavoured Markdown, while adding many of its own to support the features need to write an organized and dynamic tabletop adventure.

Here is a list of the additional features that Dungeon Press introduces.

A Note About Difficulty Modifiers

Some features scale with difficulty. These features can be scaled by either a static modifier, or a percentage by appending the value with a %. Values can be scaled either up or down, and the direction can be inverted by appending the value with a ~.

These are the available difficulties and their modfiers/percentages:

  • Casual (-2/x0.66)
  • Intended (0/x1.00)
  • Difficult (+2/x1.33)

Ability Scores

Ability scores are scaled with difficulty.

Creates an ability score table with modifiers.

Format:
||<STR>,<DEX>,<CON>,<INT>,<WIS>,<CHA>||

Example:
||12,15,12,3,12,6||
||17,15,15,3,12,7||%~

Description List

Indented description list item with a bolded inline heading.

Hint: try using quotes with description lists to build dialog options.

Format:
:: <HEADING> :: <DESCRIPTION>

Example:
:: What Does Spritzel Look Like? :: "He's a white-furred otter with a brown patch above his right eye, and he wears a pearl earring."

Collapsable Details

Collapsable block of content with a heading.

Parameters

  • open when present, the block will be open by default
Format:
[[ <HEADING> [parameters]
Lorem ipsum dolor sit amet.
]]

Example:
[[ Actions open
:: Bite. :: *Melee Weapon Attack:* #+5 to hit, reach 5 ft., one target. *Hit:* 2d6+3% piercing damage. If the target is a creature, it must succeed on a dc13|strength saving throw or be knocked prone.
]]

Details Blocks

Stylized blocks intended to convey supplementary or important information to the players and dungeon master.

Parameters

  • narrative blocks are meant to be read aloud to the players
  • info blocks are for information intended for only the dungeon master
  • thing blocks can be used to create NPCs, items, spells, locations, etc.
Format:
{{ [parameters]
Lorem ipsum dolor sit amet.
}}

Example:
{{ narrative
Travel is incredibly difficult in the deep snow. A bitter wind cuts through your clothing, and ice crystals riding the strong breeze sting your eyes.
}}

Dialog

Stylized text useful for distinguishing dialog and speech.

Format:
"Lorem ipsum dolor sit amet."

Example:
:: What Does Spritzel Look Like? :: "He's a white-furred otter with a brown patch above his right eye, and he wears a pearl earring."

Dice Rolls

Dice rolls are scaled with difficulty.

Shortcuts for creating dice rolls, with averages automatically included.

Format:
<NUMBER>d<NUMBER>[+/-]<NUMBER>

Examples:
1d2
1d4+2
1d6-4
1d8+6%~

Difficulty Checks

Difficulty checks are scaled with difficulty.

Shortcuts for creating difficulty checks.

Format:
dc<NUMBER>|<SKILL OR ABILITY>

Examples:
dc10
dc|perception
dc13|strength
dc10|nature|animal_handling
dc10%~

Dynamic Values

Static values that scale with difficulty.

Hint: values that start with ## are still stylized, but are not scaled with difficulty.

Format:
#+<NUMBER>
#-<NUMBER>
##<NUMBER>

Examples:
#+3
#-4
##5
#+6%~

Inline Checkboxes

Inline checkboxes will retain their checked state, stored in the browser's local storage.

Table of Contents

Heading levels between 1 and 3 will automatically be added to the table of contents. These headings can also be externally linked to via fragment identifiers.

# Heading 1
## Heading 2
### Heading 3

Table Features

As we all know, a good adventure always has a few tables. Dungeon Press adds two special table features to help you generate content efficiently.

Roll Tables

You can create a roll table by prefixing the first column heading with d<NUMBER>. Roll tables will automatically generate a column for the number value of the roll result.

Format:
| d<NUMBER> <HEADING> |
|---------------------|
| Item 1              |
| item 2              |
| etc...              |

Example:
| d4 Treasure Chest Contents |
|----------------------------|
| 100 gp                     |
| +1 Dagger                  |
| Potion of Healing x 5      |
| Just a rock                |

Random Tables

Random tables take this a step further. Replace the d with an r and Dungeon Press will randomly pick a number of rows from the table equal to the number of outcomes possible given the dice.

Create more rows than there are outcomes to make random pools of content. Rows are picked based on a random seed which can be configured by the author or overridden by the player in the UI.

Format:
| r<NUMBER> <HEADING> |
|---------------------|
| Item 1              |
| item 2              |
| etc...              |

Example:
| r4 Treasure Chest Contents |
|----------------------------|
| 100 gp                     |
| +1 Dagger                  |
| Potion of Healing x 5      |
| Just a rock                |
| Sack full of beans         |
| Empty bottle               |
| Chipped emerald            |
| A miniature horse saddle   |

Only 4 of 8 items from the example table will be visible on the page!

(back to top)

HTML Template Strings

The values in the YAML configuration of your adventure (your adventure's "attributes") are made available to index.html. Use the format {{attribute.<KEY>}} to access these values inside of index.html.

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the Apache 2.0 License. See LICENSE.txt for more information.

(back to top)

Contact

[email protected]

Project Link: https://github.com/twocatmoon/dungeon-press

(back to top)

dungeon-press's People

Contributors

jordanranson avatar

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.