Giter VIP home page Giter VIP logo

morii-vtt's Introduction

Morii VTT CI

Morii is a web-based half-vtt (i.e. no maps) for playing TTRPGs. It currently supports D&D 5E, Cairn and Shadowdark.

Key Features

  • Campaign Management - Create, destroy and join campaigns, invite/kick players
  • Live Games - See/edit your character sheet, send messages to fellow players, roll some dice
  • Game Overview for GMs - All character/NPC sheets in one place with system specific useful info
  • Character Sheets - All the things you would expect from digital character sheets, fully incorporated rolling and more
  • Import/Export - Import/export your characters into simple .json files or between campaigns.
  • Language Module - Transcribe message into a fantasy language (supports elvish, dwarvish and gnomish)

Systems

D&D 5E

  • Quick-Create - Create your new character blazingly fast with 5E SRD Classes, Races, Spells and Equipment included (I)
  • Roll20 Import - Import your characters exported from roll20 using the VTTES plugin.
  • SRD Monsters - As a GM, view, save, add and modify monsters in your campaigns (with all SRD monsters included)
  • GM Overview - Includes initiative tracker and simple ordered views of characters' armor class and passive perceptions

Cairn

  • Character Reroll - Create new random character instantly, with as much rolling as you want. Also supports the Cairn optional gear packages.
  • GM Overview - Includes basic stats overview of all PCs and separate monsters view with all Cairn SRD monsters

Shadowdark

  • ShadowDarklings Import - Import characters exported from the ShadowDarklings creator.
  • Character sheet is done and available, rest of the features are being worked on - see issue.

With all that aside, this project is still actively developed, and as such expect some rough edges here and there. If you have any issues, encounter bugs, want to contribute or have some general feedback etc., feel free to start a new issue or reach out directly over Discord.

(I) As there are no subclasses/backgrounds under the OGL you will sadly still have to import these manually.

Dev Environment

If you'd like to try Morii out on local/want to contribute, you will need the following variables in a .env file:

MONGO_INITDB_DATABASE=morii
MONGO_URL=mongodb://mongo/morii-mongo?readPreference=primary

JWT_SECRET='anything can be here for dev' ~ you can also use something like "openssl rand -base64 12"
JWT_REFRESH_SECRET='same as JWT_SECRET, should be different for prod'

There is also a Docker dev setup which you can use so (Linux is recommended, WSL2 should work as well):

  • ./bin/start-dev.sh ~ spins up a new docker container with separated client, server and MongoDB instances
  • ./bin/stop-dev.sh ~ stops the container, you can also just Ctrl+C the running process, it calls this script to cleanly exit

You might need to add the execution permission for both of these, like so: chmod +x <script>.

You can also manually spin your own MongoDB localhost instance and run MoriiVTT like this (Node 18 recommended):

  1. Create local docker MongoDB container ~ docker run -d -p 27017:27017 -v ~/mongodb_data:/data/db --name morii-mongo-local mongo:latest.
  2. Modify the MONGO_URL variable in .env to be mongodb://localhost:27017.
  3. Run either the full stack with yarn run-stack-dev OR in two separate terminals: yarn server-dev on root and yarn dev in src/client.

๐Ÿ“ Licenses

  • Notice of Open Game Content: This project uses open game content under the Open Gaming License, Version 1.0a.
  • Designation of Open Game Content: This project contains classes, races, spells, equipment and general rules contained in SRD5 under the aforementioned OGL license.
  • Source Code: The source code itself (typescript, svelte etc.) is licenced under the MIT License.
  • Race Icons: All 5E race icons were created by fjallnari using Midjourney.
  • Class Icons: All 5E class icons were created by Jime Mosqueda.
  • Fonts: Midjungards (the elvish font) was made by Robert Pfeffer. Moonrune (the dwarvish & gnomish font) was made by Morten Bek.
  • Cairn: All Cairn-related info comes from Cairn SRD, created by Yochai Gal and provided under the CC-BY-SA 4.0. license.

morii-vtt's People

Contributors

fjallnari avatar ptaranat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ptaranat

morii-vtt's Issues

Add Cairn armors

Armors are stored as Record<string, Partial<ItemCairn>> and created functionally like so: ... createArmor('Shield', '+1'),
See createArmor:

const createArmor = (name: string, armor: string, bulky: boolean = false): Record<string, Partial<ItemCairn>> => {
    const prettyArmorName = `${name} (${armor} Armor${bulky ? ', bulky': ''})`;
    return {[name]: { name: prettyArmorName, type: 'armor', bulky: bulky, armor: armor }};
}

This removes redundant item names, can be included in gear packages and also simplifes random armor creation. See:

  const getRandomArmor = (): Partial<ItemCairn> | undefined => {
      const armorName = [
          ...Array(3).fill(undefined), 
          ...Array(11).fill('Brigandine'), 
          ...Array(5).fill('Chainmail'), 
          'Plate'
      ].random();

      return cairn.armors[armorName] ?? undefined;
  }

Add Shadowdark turn tracker

This could very similar to how 5E's initiative view works, an issue unique to SD is that it does not differentiate between a normal DEX check and "initiative" DEX check.

Sending items to players/between players

The requested feature doesn't sound that hard on paper, but it requires #108 to be completed first, with possibly character names being saved as well (to create a autocomplete whom to send the item to).

Sender would click a button in the item accordion to send an item -> small dialog with input/autocomplete whom to send it to -> possibly new Sockets event (send-item?) would fire up -> (maybe add a pop-up to accept or reject the item for the receiving player) -> remove the item from the original sheet & add it to the new owner. After that modifyCharacter would probably need to be triggered.

Add Cairn armor in-sheet value editing

Similarly to how weapons have specific input field inItemDetailCairn.svelte, I would add an equivalent input for an armor-type item armor field.

Then we could create a function, something like recalculateArmor, which updates the global armor value on submitting the input field. I would create this function in the CharacterSheetCoreCairn file and pass it down to ItemDetailCairn similar to how the function deleteItem works now. $modifyCharacter() should be called at the end to trigger DB update.

Improve Cairn GM overview

Currently the overview is pretty bare-bones with only NPCs, PCs and chat present. I would at the very least add a monsters view (maybe similar to how the 5e one works or simpler), with other things such as PCs armor sorted overview or session notes being a possibility.

Might want to ask in the Cairn community what would make their lives easier.

Things to add:

  • monsters view
  • simple overview of PCs' main stats

Refactor client sockets so players store username/socketId pairs

Currently only the GM saves all in-game username/socket pairs ( to allow simultaneous PC sheet editing), while players only store the GM's socketID.

This would basically use the GM's model of dealing with sockets for players as well and would allow for both private messaging (#106) and in-game active player list (#107).

Add Drag&Drop for NPCs and Cairn items

For NPCs adding drag and drop handle similar to how Initiative for 5E works (uses the material-symbols:drag-indicator icon) would suffice I think.

For Cairn items it's a bit trickier, holding over the hamburger menu might be more user-friendly, and there's not much space to add a separate handle, but the implementation would probably be messier.

Support more TTRPG systems

This meta-issue can be used as an overview of other potential systems to add with their accompanying licenses and SRD info.

Game system License Other info
Cypher System CSOL CSRD is freely avalaible as .docx document.
Worlds Without Number None Using game mechanics from the free version should be fine.
Eclipse Phase CC BY-NC-SA 4.0 There is a SQL dump of character creation info in EPCC.
Mausritter Third Party License The Foundry module has all of the relevant info in objects.
Knave CC BY 4.0
The Black Hack OGL 1.0a A lot is covered under the license, but it's the OGL.
24XX CC BY 4.0 SRD is fair use, but there is not much meat to add to the VTT.
GUMSHOE CC BY 3.0 SRD is fair use
Into the Odd Mark of the Odd SRD is fair use
Monolith (Cairn hack) CC BY 4.0 Similar to Cairn, might need its own sheet though.
Dolmenwood OGL? System is being worked on right now. Devs shared some rules.
OSE 3rd Party License? #86
Wanderhome 3rd Party License Mechanics and game rules may be reused and referenced freely.
Shadowdark 3rd Party License ๐Ÿšง #127
Mothership needs permission

Burning Wheel, Symbaroum and Tales from the Loop don't have a third party license, permission would have to be asked for.

Any other suggestions are welcome.

Relics and items with charges

Relics are like spell books except they do not cause Fatigue. We should add functionality that supports Relics by allowing users to create items that hold charges.

We can represent charges with circle outlines, and used up charges with filled circles or crossed out circles. Crossed-out is less ambiguous. This iconography is similar to Mausritter which Cairn is directly inspired by.

We can represent the charge functionality with lightning bolts.

Turn-tracker for Cairn game overview

The ideal solution would provide UI to keep track of combat turns, similar to the Initiative component.
Another useful feature would be an interface for torch-keeping and general time passage on a more macro scale.

The main problem is space as the Cairn game overview is pretty full already - one solution would be to put monsters into a separate game view (similar to 5E) and re-use & modify the 5E Initiative component. Another solution is to add a new Cairn specific turn-tracking component on top of NPCs.

Monster Menu improvements

As a DM, I would like a way to keep track of multiple monsters and their stats. Rather than favoriting monsters, I would want something like a left arrow or a plus, to add this Monster to my monster list.

  • Add multiple monsters of the same type, for example, 5 goblins.
  • Rather than using ???, display greyed out placeholder text like, Name and Description, which clears if the user clicks on them, but comes back if they exit. This avoids having to delete text on first click.
  • Center Add Custom Monster bar. Maybe it can be the same size with All SRD monsters, and right below it. This leaves more room for favorites/custom monster list.

Most of the interaction with Monsters involve reducing its HP and rolling Strength saves. It is unclear at first that you can click on STR to do a strength save. We should consider making the text of STR, DEX, and WIL more prominent raised buttons, and the numbers of the attributes as flat text boxes.
This allows the DM to click on the attribute text to roll a save, and to click on the attribute number to edit it without having to hit the edit key. Otherwise, the DM would more convenient always be in edit move, but they lose out on conveniently rolling saves.

Add Level-Up for Shadowdark

If a character reaches an XP threshold allow the player to level-up; small dialog with talents rolling and general changes overview.
I would also add settings option to enable this always no matter the current xp value.

Favorite monsters should have Drag&Drop

Similar to how Initiative Drag&Drop works. Would probably need a new OwnerAuth server route called something like updateMonsters to beam the changes up to the DB.

Let players create NPCs

PCs can hire hirelings. Some optional gear packages come with animal companions that behave like hirelings. We should allow the creation and management of NPCs for players using same or similar interface for GMs.

Otherwise, we could let GMs control NPCs entirely. This may be the best option for now.

Implement whispers between users

Currently users can only write messages either to the whole group, privately or to the GM only. Whispers could be added either a separate chat command or as another message mode to be cycled through. Some useful features would be:

  • username autocomplete
  • right-click on a specific user portrait in chat to pre-fill the whisper
  • reply to the last whisper sent to user (maybe as a separate command in chat)

Sockets would need to be refactored a bit, #108 is a prerequisite.

Add Cairn sheet UI tooltips

For a bit more clarity, we could add tooltip to both the Deprived and the Filled Slots boxes.

  • Deprived tooltip could look like: 'Deprived PCs cannot recover HP. If deprived for more than a day, they add a Fatigue to inventory.'
  • Filled Slots tooltip could look like: 'Filling all ten item slots reduces a PC to 0 HP.'

As both of these are instances of the RowBoxWithLabel component, tooltip option would need to be added to it (similar to e.g. InPlaceEditBox). Open to suggestions on which other tooltips could be added, if any at all.

Import Cairn character sheet from JSON

Feature Request

Currently, we can export Cairn characters to JSON, but we cannot import them when creating a new character or NPC, only copying existing sheets. The functionality exists in 5e.

Expand the language system

Currently the only supported languages are Elvish, Dwarvish and Gnomish.

There is still a plethora of other languages that could be added, including but not limited to: Giant, Goblin, Halfling, Orc, Infernal, Abyssal, Celestial, Draconic, Primordial, Sylvan and Quori (although this one might be too specific).

Add Shadowdark character generation

Could use the same UI as Cairn does, we would need to gather the items and rules for rolling. A unique SD thing is buying equipment.
Another option is to add .json import from the already well-made generator at http://shadowdarklings.net/. It's not as ideal as having our own solution, but way less work and there would not need to reinvent the wheel.

Add development documentation

We may want to include details on spinning up a local dev environment.

  • Set up MongoDB docker container
  • Set up .env file
  • Command to run MONGO_URL=mongodb://localhost:27017 MONGO_INITDB_DATABASE=morii-db yarn run-stack-dev

Add Shadowdark SRD spells

Could be added as an option to the main sheet tab under spells - simple Svelecte (maybe inside a small dialog window with preview) would work. Could be done similarly to how adding 5E SRD spells works.

Add SD torch tracking

This should allow multiple light sources to be kept track of with their respective timers. Maybe allow players to light up their torches? A simple read-only timer above chat for all to see would also be great.

Add Shadowdark support

Meta-issue to keep track of Shadowdark (SD) support todos. Minimal system basics are already on add-shadowdark. Those first few are related to the sheet itself:

  • Gear - similar to Cairn (slots and coins as paddles on side or as separate small boxes on top)
  • Talents - same as gear, possibly a filter for talent origin
  • Spells - spell level filter, spellcasting ability, spell-attack modifier, simple spells known table
  • Attacks - should be linked with items (similar to how 5e works)
  • #129
  • #131
  • #133

And the following should be in the GM's overview:

Misc stuff:

  • JSON import - when the character schema is finalised, add SD JSON schema validation

Stack item type for Cairn

When an item "stacks" it uses up the same slot as another item. For example, if we add a Bucket to the inventory, we should prevent the slot from being counted.

Notes:
https://cairnrpg.com/tools/character-generator/

The list of items that stack is https://github.com/yochaigal/cairn/blob/main/character-generator/js/cairn_data.js

# Tool
Bucket
Glue
Metal File
Nails
Net

# Trinket
Card Deck
Dice Set
Fake Jewels
Incense
Marbles
Salt Pack
Soap
Twine

We could rename these items to have stacks it its name Bucket (stacks), or we could implement a new type "stacks" like "bulky" and let the user select. The latter is more flexible for custom items.

Items that add slots or don't take up slots

There are a few items in the equipment lists that behave differently than what we currently support.

Items that add slots:

  • Cart (+4 slots, bulky)
  • Horse (+4 slots)
  • Mule (+6 slots, slow)
  • Tent (fits 2 people, bulky)
  • Wagon (+8 slots, slow)

Carts definitely take up 2 existing slots, as well as add 4 slots. Physically, this is represented by a 2x3 card, where 2 slots are the cart handles, and 4 slots are free.

But it is unclear how Horses, Mules, and Wagons should work as they appear to be vehicles.
We should add the support of slotless items, using mdi:checkbox-blank-off-outline icon, denoting that a slot should not be used for this item. This will allow the user to store important items in the inventory, rather than in notes. It will also let GMs rule whether certain small items should be slotless or not. Currently, we support stacking, but that can take up space, unlike slotless.

As part of this change, we should add some logic to automatically add slots for certain items. We should do it if the name contains "+N slots", since it is better than adding a new field like bulky or stacks.

Option to invite players from the game

This could simply be a button which launches the Invite dialog and is displayed if no players are currently in the campaign instead of the default No characters found. Another option is adding this to the GameInfo component in the top-left but that might be too crowded.

Add Cairn-specific setting to disable automatic HP setting

Currently it might be confusing for people if their character's HP gets reduced when they get overencumbered. System-specific setting could be added (similar to how e.g. Show Encumbrance works for 5E now).

As maybe a different specific entry, there could also be an option to disable the red border around the Filled slots box if character gets overencumbered.

Add Cairn character to ASCII converter

An option could be added as a Cairn specific setting to let users copy converted character exported in a format such as:

Character Name
==============
Background :: Result
= Stats =
STR :: X/X
DEX :: X/X
WIL :: X/X
HP  :: Y/Y
Armor :: 0
= Equipment =
1. Hand 1
2. Hand 2
3. Body
4. Body
5. Pack
6. Weapon | XdY+Z | Bulky?
7. 
8. 
9. 
10. 
* Tiny?
GP ::

Add Shadowdark monsters view

Could be similar to Cairn monsters, might need a separate overview tab - to make space for the turn tracker and torch tracker.

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.