Skip to content

jmhnilbog/My-Shared-Compendia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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(); } });

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published