Git Product home page Git Product logo

deck20's Introduction

Deck20

Use "Helden Software" characters in Roll20, add DSA related helpers like a calendar, connect your Stream Deck to Roll20, and more!

A collage of three screenshots from this browser extension for the tabletop RPG "Das Schwarze Auge". The UI is in German. Screen 1 shows a timeline of skill checks, listing the skill's name and additional info: how successful it was, and when it happened. At the bottom you can see a hint of what the roll would have looked like in roll20's chat system. Screen 2 contains a calendar of the fictional world we're playing in, with one day marked as "today". A mouse cursor is hovering over one of the days and reveals more info, like the week day "Praiostag" and the current moon phase "Helm". Screen 3 shows a list of the skills my character "Kilho" has, sorted in groups. There's a "floating action button" in the bottom right that looks like a stack of papers, that can be used to switch between characters.


Table of Contents


About this project

This is a side-project, developed when I have some free time. Use at your own risk. It currently supports Chrome, and should work on other chromium-based browsers (tested on Chrome Beta).

The main goal of this browser extension is to make playing the German TTRPG "Das Schwarze Auge" (The Dark Eye, version 4.1) on Roll20 a smoother experience. Its core features are currently:

Automatic roll generation from imported charactersheets:

This browser extension lets you import charactersheets created via the tool Helden Software, and will offer you multiple ways to perform rolls for a character's attributes and talents:

  • On the "Charactere" page, click the (20) icon next to an attribute/talent.
  • In Roll20, type /t to start a talent roll or /ew to roll on an attribute, then use the autocomplete options to select the specific roll, resulting in a command like so: /t Sinnenschärfe or /ew Charisma.
  • You can use complete /t or /ew commands inside macros too. This can be useful for talents you use often.

For either option, you'll be prompted for a modifier in Roll20. After entering the modifier, the roll will be sent to the chat. All rolls performed by this extension use Roll20's internal random number generator, this extension only makes it easier to perform the rolls.

Additionally, all rolls from either of those methods will be recorded and will be listed on the rolls page in the extension. In the future I'm planning to add some analytics, so that you could see for example what your most rolled talent was, or which talents could be improved.

A calendar for DSA's fictional world "Aventurien":

DSA has a couple of adventures and classes where the current date, and the phase of the moon play an important role. This extension includes a calendar tool based on the wonderful "DSA Datums Rechner", but with a much improved usability. This extension can remember the current date of your campaign (CTRL + doubleclick on any day to set it as today), and supports a much quicker navigation via the mouse: Scroll over the month view to jump between months, or scroll sideways to jump forwards/backards a whole year. The information being displayed when hovering a day also makes it very easy to find e.g. the next full moon!

I have plans to offer an interface between the current date and rolls, which would be especially useful for ritual casting, which often has a modifier based on the current moon phase. See issue #8.

Improvements for Roll20's chat autocomplete function:

Roll20 comes with a couple of chat commands players can use, but they can be hard to remember. This browser extension improves the autocomplete functionality of the chat by showing a list of all available commands when the user types /, and it adds a better experience to the built in /fx command. Additionally, all commands added by this extension make use of the autocomplete functionality with an improved search, so that you could for example type /t kunde , and you'd find all talents tat include the term "kunde", such as "Menschenkunde", "Pflanzenkunde", etc.

(Optional) A local API to interact with an open Roll20 tab from external services/devices:

One of the motivations for this project was that I wanted to a) be able to trigger events on Roll20 via my Elgato Stream Deck, and b) learn how to build a browser extension that utilizes the Native Messaging API. This repository comes with a small webserver that will forward messages to the browser extension, which in turn can communicate with Roll20. For more info see src-native-bridge/readme.md. This feature is completely optional, and has to be enabled manually.

Usage

Grab the zipped extension from the latest release, and install it as an "unpacked extension". A guide on how to do that in Chrome can be found here.

You should now see a d20 icon in your extensions!

Known issues

My Data doesn't load

Indicators: The Calendar doesn't load, previously saved Characters aren't restored.

Underlying issue: Chrome currently has a bug where parts of an extension (the service worker) aren't properly restarted after the extension's updated. See this issue.

Solutions:

  • The simple one: Restart your browser.
  • The advanced one: Restart the extension's Service Worker. In one of the views of the extensions, open the devtools, and hit "update" in the "Application" tab, under "Service Workers"

Development

If you think this extension is missing important features, or you found a bug, you can report that by opening a new issue in this repository. If you want to try and figure out a solution on your own, keep reading!

This project is built with the Vue.js based framework Quasar. If you're famailiar with Vue.js, you should become familiar with Quasar bretty quickly!

Getting started

As with every Node.js project, you're going to have to install some dependencies to get started:

yarn install

Modes

This extension can be ran locally in two different modes: SPA and BEX.

SPA (Single Page Application) mode is helpful to work on the UI, but it will neither store data between page reloads, not will it connect to the content injected into Roll20. It has however HMR (hot module reloading) support to automatically refresh updated components, and the Vue Devtools work with it.

BEX (Browser EXtension) mode will store data and connect to Roll20 just fine, but you lose the ability to use Vue Devtools and HMR. Also, due to Vite's current configuration you'll probably have to restart the bex dev-mode a fair amount of times, since the dev mode fails if Vite encounters (linter) errors in the code. Note: The roll-recording featrue of this extension differentiates between rolls recorded with a "debugging" build, like you'd get it from the following command, and "full" builds as described in the "Build the app" section below. A full build will ignore rolls recorded with a debugging build.

To start the app in development mode (hot-module reloading, error reporting, etc.), use one of these commands:

# SPA mode:
quasar dev
# or BEX mode:
quasar dev -m bex

Lint the files

This project comes with a bundled config for ESlint. To make sure all code followes the same style guidelines, use the following lint command. Alternatively, a lot of modern IDEs let you lint the code automatically, e.g. when you save a file.

yarn lint

Build the app for production

If you want to create a "build" of the application, use this command. There are a few parts of the application that recognise when they're running in a debugging environment, or as a full build. For example, rolls recorded with a debugging version of this extension will not show up when you're using a full build.

quasar build -m bex

Customize the configuration

See Configuring quasar.config.js.


Other // Attributions

Main App Icon: "Icosahedron free icon" by Freepik - Flaticon

deck20's People

Contributors

sirs0ri avatar dependabot[bot] avatar renovate[bot] avatar

Watchers

 avatar

deck20's Issues

Advanced talent rolls with dynamic modifiers

(This is one of the main reasons I started this project, thus the categorization as "basic fucntionality")

  • Add an "advanced rolls" editor where the user can:
    • Specify base talent(s), e.g. ritual skills
    • Set all possible modifiers, with tie-ins to other parts of the app, eg. the calendar module
  • Add "advanced rolls" UI to trigger the rolls
    • transform modifiers into usable UI components

Update Checker

Since this BEX is not part of the Chrome webstore and instead build are published here, it should be straightforward to query the current version and show a hint to update the app

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency @quasar/app-vite to v1.9.3
  • chore(deps): update dependency eslint to v8.57.0
  • chore(deps): update dependency eslint-plugin-import to v2.29.1
  • chore(deps): update dependency eslint-plugin-promise to v6.6.0
  • chore(deps): update dependency eslint-plugin-vue to v9.27.0
  • fix(deps): update dependency express to v4.19.2
  • fix(deps): update dependency vue to v3.4.34
  • fix(deps): update dependency vue3-apexcharts to v1.5.3
  • chore(deps): update actions/setup-node action to v4
  • chore(deps): update dependency @vitejs/plugin-vue to v5
  • chore(deps): update dependency eslint to v9
  • chore(deps): update dependency eslint-plugin-n to v17
  • chore(deps): update dependency eslint-plugin-promise to v7
  • chore(deps): update dependency vite to v5
  • chore(deps): update github artifact actions to v4 (major) (actions/download-artifact, actions/upload-artifact)
  • chore(deps): update node.js to v20
  • chore(deps): update softprops/action-gh-release action to v2
  • fix(deps): update dependency idb to v8
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/build-and-release.yml
  • actions/checkout v4
  • actions/setup-node v3
  • actions/upload-artifact v3
  • actions/checkout v4
  • requarks/changelog-action v1
  • actions/download-artifact v3
  • softprops/action-gh-release v1
npm
package.json
  • @quasar/extras 1.16.6
  • apexcharts 3.42.0
  • events 3.3.0
  • express 4.18.2
  • idb 7.1.1
  • pinia 2.1.6
  • quasar 2.12.6
  • vue 3.3.4
  • vue-router 4.2.4
  • vue3-apexcharts 1.4.4
  • @quasar/app-vite 1.6.2
  • autoprefixer 10.4.16
  • eslint 8.43.0
  • eslint-config-standard 17.1.0
  • eslint-plugin-import 2.28.1
  • eslint-plugin-n 16.0.2
  • eslint-plugin-promise 6.1.1
  • eslint-plugin-vue 9.17.0
  • postcss 8.4.29
  • node ^18 || ^16
  • npm >= 6.13.4
  • yarn >= 1.21.1
  • vite 4.4.9
  • @vitejs/plugin-vue 4.3.4

  • Check this box to trigger a request for Renovate to run again on this repository

Anbindung an R20 Charaktersheet

Beim erstmaligen hinzufügen eines Charaktersheets in der Deck20 Erweiterung sollte abgefragt werden welchem Token das Sheet zugeordnet wird. (noch hardcoded)
Eine Möglichkeit das Token im Nachhinein zu ändern könnte Probleme beim erstmaligen Aufsetzen eines Charakters vorbeugen.

Create talent rolls

  • filled from imported charactersheet
  • rollable via BEX ui
  • rollable from chat with a simple syntax(/t TALENTNAME)
  • store results somehow

Add overview about past rolls, with a basic graphical overview

Since this BEX is supposed to do all the rolls for a player, it can be used to also to collect the results from those rolls and show the player an overview of:

  • how many rolls happened in total
  • which talents were the most rolled
  • which attributes were the most used
  • some basic stats about success/failure chances
  • create long-term stats about how well r20's RNG is (is there an even 5% chance to roll each side on a d20? are there "good dice" and "bad dice"?)

Additional improvements through:

  • Filtering by time/adventure
  • Filtering by character
  • search for talents/attributes

Unterstützung für Meta-Talente, zB "Wache halten"

Es wäre praktisch unter den Talenten den Wachehalten-wert einzufügen.
Einfaches Qualitiy of Live Feature.

Zitat Meister:
Das Metatalent Wache Halten wird auf MU/IN/KO beprobt.
Der TaW wird berechnet als
(
3 x Selbstbeherrschung
+4 x Sinnenschärfe
+Wildnisleben
+Sich Verstecken
+Schleichen
)/10.

Je nach Grad der Erschöpfung Malus +1/+2/+4
Bonus -1 für Aufmerksamkeit
Bonus -(TaW/2) für Gefahreninstinkt
Bonus -(Pkt/3) für Ausdauernd
Bonus -1 für Dämmerungssicht
Bonus -3 für Nachtsicht
Bonus -1 für Herausragender Sinn
Malus +2 für Einäugig
Malus +2 für Einbildungen
Malus +3 für Dunkelangst
Malus +1 für Eingeschränkter Sinn
Malus +3 für Nachtblind
Malus +2 für Unstet

Chrome kills the Service Worker after 5 minutes

Since the API relies on the Serviceworker for communication with Roll20, this essentially breaks the extension.

To investigate:

  • How can the SW be restarted? Is interacting with the popup enough?
  • Can the Content Script listen to a visibilityChange Event and then reload the iframe to restart the SW?
  • What happens with nativeBridge communications coming in while the SW is inactive?

Löschen eines Charakters

Neben dem bereits vorhandenem Hinzufügen von Charakteren (XML-File) wäre eine Option zum Entfernen eine durchaus sinnvolle Funktion.

Prompt for "nativeMessaging" permisson inside of a tutorial flow so set up the web server

The native Messaging part of the BEX (talking to a local webserver) is a very very niche functionality, which has some additional required setup steps. Those steps should be explained properly, and if the user's not interested, there's no need to have the nativeMessaging permission as a required permission.

Idea:

  • Make the nativeMessaging optional
  • For users that haven't interacted with the nativeMessaging part, show a server tab that holds the config flow
  • during the config flow:
  • Store if the user has selected/denied interest in the native part, and adjust the server code accordingly.

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.