Coder Social home page Coder Social logo

my-shared-compendia's Introduction

SOTSS world has the latest elfward game

::: CONTAINER :::

GitHub All Releases

My Shared Compendia

A Foundry VTT module to share Data between worlds via compendia as explained by u/solfolango on r/FoundryVTT; here. Its not hard to do, but you can jumpstart your efforts and just use this module.

Installation

  1. Simply use the install module screen within the FoundryVTT setup
  2. Open you local module.json
  3. Delete line 68 to 69

67
68 "download": "https://github.com/stschoelzel/My-Shared-Compendia/releases/download/1.0.0/My-Shared-Compendia.zip",
69 "manifest": "https://github.com/stschoelzel/My-Shared-Compendia/releases/download/1.0.0/module.json"
70

๐Ÿšจ Whenever there is an update, FoundryVTT will erase your compendia. ๐Ÿšจ

Therefore you want to prevent FoundryVTT to ever update this module.

Alternatively, and better, modify this to your own local and custom module.

Default Setup

This module comes with 8 Default compendia. One for each Type of Entity that is supported by FoundryVTT and one extra "Actors".

Customize

To change the default setup simple edit the module.json. All compendia are defined within the "packs" attribute beginning with line 10.

Theres a sample for each possible compendium Entity - so start there. Delete or change as you see fit and/or fork for your convenience.

Classes, Feats or Features

There are no enteties for Classes, Feats, Features or anything more than the seven listed available in FoundryVTT. Best practices is to use the "Item" entity for those.

For Example:

		{
			"name": "feats",
			"label": "My Feats",
			"path": "packs/feats.db",
   "module": "My-Shared-Compendia",
			"entity": "Item"
		},
		{
			"name": "classes",
			"label": "My Classes",
			"path": "packs/classes.db",
   "module": "My-Shared-Compendia",
			"entity": "Item"
		},
		{
			"name": "class-features",
			"label": "My Class Features",
			"path": "packs/class-features.db",
   "module": "My-Shared-Compendia",
			"entity": "Item"
		}

Dependencies

There a no known Dependencies. But, Compendium Folders is highly recomended.

โœจ

I only intent to update this if it breaks. Anyway, delete line 67 to 70 in the module.json

Hooks.on("createToken", (TDoc, t1, t2) => { console.log("Created", TDoc.actor); // Checks if its a NPC type of actor if (TDoc.actor.type === "NPC") { // getting the NPC Hit Dice let HD = TDoc.actor.data.data.attributes.hitDice.value; // rolling the NPC's hit points let HP = new Roll(HD, data = {}, options = {}); HP.evaluate(); // doing a little error checking to prevent any 0 HP mobs from spawning let tHP = HP.total; if (tHP < 1) {tHP = 1;} // assigning the random HP amount to the proper fields TDoc.actor.data.data.attributes.hp.value = tHP; TDoc.actor.data.data.attributes.hp.max = tHP; TDoc.update(); } });

my-shared-compendia's People

Contributors

jmhnilbog avatar

Watchers

 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.