Hello everybody! If you’ve ever made homebrew feats, creatures, spells, or items in one
of your Foundry worlds you may dread the idea of having to do all that work again for another
world. To make matters worse, did you know that metadata for anything you store in any
tab of the right-hand sidebar has to get sent to all of your players whenever they connect?
That means those hundreds of monsters and thousands of items you’ve got in your sidebar
could be slowing everybody down, or even stopping some players from being able to connect at
all. The only way to prevent all that data from being sent is to store things in compendium
packs and keep only what you need for your next session in the sidebar. But if you add
things to your systems compendium packs they’ll get replaced whenever you update the system.
That’s where a shared compendium module comes into play. By making a shared compendium
module you can speed up your world and make all your homebrew content available instantly
to all of your worlds just by activating your module in them! The best part? This will work
no matter what system you use. Creating a module might seem intimidating but if you
can copy and paste it’s gonna be a piece of cake. Let’s get started!
First, let’s talk about what a compendium is in Foundry. A compendium is basically a
pack of content of a specific type. Those types are things you’re already familiar
with: Actors, Items, Scenes, Journal Entries, Macros, Roll Tables, and Playlists. So, for
example you can create a compendium of Actors or a compendium of Journal Entries if you
want. In fact in Foundry if you go over to the compendium tab and hit ‘Create Compendium’
you’ll see an option to name your compendium and to select its type and that’s all there
is to it. Making them this way won’t share them between your worlds though.
Instead we’re gonna start with a nice solid base that I’ve put together that will give
you a compendium of each type and then I’ll show you how you can make more if you want
them. To get started head to the description and grab the installation link I’ve got
down there. Then, open Foundry, go to the Add-On Modules tab, hit ‘Install Module’
and paste the URL in the Manifest URL field and click ‘Install’. Now we can see the
‘My Shared Content’ module right here in our list and you’ll notice there’s
no option to ‘Check Update’ so you won’t be able to mess up your compendia by accidentally
updating and overwriting anything.
Now we’ve installed a generic ‘My Shared Content’ module that includes a compendium
of each type which you can see here in my ‘Compendium’ tab now that I’ve activated
the module in my world. I’ve got Shared Creatures, Items, Journal Entries, Macros,
Playlists, Roll Tables, and Scenes which I can start adding things to right away! Now,
if all you want is one compendium for each type then you’re good to go and you don’t
have to watch any more of this video.
One thing to keep in mind though is that in Foundry lots of things are considered ‘Items’
that you might not want in the same compendium. For example in the DnD5E system: classes,
class features, monster features, racial features, and spells are all considered items just of
a different type.
If you want to have a better organizational structure for all of your homebrew content
then I’d recommend making some additional compendia that are more specific. Let’s
take a look at how to do that now. But first, let’s close Foundry since we’re going
to be editing some files in our newly made module.
Once you’ve got Foundry closed navigate to your Foundry user data folder. If you’re
a Windows user you can just right click on Foundry in your start bar and select ‘Browse
User Data’. If you’re a Mac user copy everything in the ‘User Data Path’ field
of your ‘Configuration’ tab and open Finder. Then in the top bar click ‘Go’ and ‘Go
to Folder’. Paste the ‘User Data Path’ in and hit ‘Go’.
Now that we’re all on the same page click into your ‘Data’ folder and then your
‘modules’ folder. Find the ‘my-shared-content’ folder and open that now. Here we’ve got
the ‘module.json’ and a ‘packs’ folder. The ‘packs’ folder is holding the database
file for each of our compendia but we don’t need to do anything with these.
Everything we need is in the module.json file. If you use a code editor like VisualStudio
Code you can open it using that but if you don’t you can just as easily use a text
editor like Notepad. I’ll drag the module.json onto my notepad and we can see a bunch of
fields like “name”, “title”, “version”, “author”, “minimum” and “compatible”
core versions, and “packs”. If you want to change the title of the pack, the author,
the version number, or the description that’s perfectly fine. If you want to change the
“name” field however you’ll want to use only standard characters, with dashes
in between words and you’ll also want to re-name the parent folder to match like it
is here with both being “my-shared-content”.
The “minimumCoreVersion” refers to the oldest version of Foundry the module supports.
Let’s say “0.7.5” and set our ”compatibleCoreVersion” which is the newest version our module supports
to “0.7.9”. As Foundry continues to evolve you may want to update this value to be in
line with the latest version of Foundry.
Now for the good stuff: the “packs” field. This is where we define each of our compendia
and what type they are as well as where the database file will be located. You’ll notice
that each pack is wrapped in these opening and closing curly braces. If there’s another
pack after it they also end with a comma like these. You’ll also notice that each of the
fields in each pack have a comma but only if there’s another line underneath them.
It’s very important to keep that consistent and to not accidentally delete those or the
quotation marks around each field.
You can see each of the packs that I showed you earlier which we can use as a basis for
any additional packs that we want to make. Like, let’s say we wanted another items
compendium for storing homebrew class features in. We can copy everything from the opening
curly brace to the comma after the closing curly brace, hit ‘Enter’, and paste in
our copied pack. Keep in mind, if your pack is the last one in the list, do not include
a comma at the end.
Now we’ve just got to rename everything. Let’s make the name ‘homebrew-class-features’
making sure to use all lowercase letters and dashes in place of spaces. Then we can change
the “label” to “Homebrew Class Features” and to finish it up we can change just the
last part of the “path” field to say “homebrew-class-features.db” instead of “items.db”. You’ll notice
that this matches the ‘name’ field we just entered.
If we hit save, close our notepad, launch Foundry, and join our world we can see in
the compendium tab that our “Homebrew Class Features” compendium is there and almost
ready for us to start putting class features in!
To add content to any of our new shared compendia first we have to right click on them and select
‘Toggle Edit Lock’ which makes it so we can add things to our compendium. Then we’ll
get this warning dialog box telling us that we’re editing a compendium that doesn’t
belong to this world and changes we make might get wiped out when the module is updated.
You’ll remember that because of how this module is put together there is no way to
even check for updates so you don’t have anything to worry about. Let’s hit ‘Yes’,
open up the compendium and go over to our Items Directory. We can either drag and drop
things onto the compendium or we can put everything that we want to go into the compendium in
a folder like this. Then we can right click on the folder and select ‘Export to Compendium’.
In the dialog box that opens we can select the destination pack, in this case the ‘Homebrew
Class Features’ pack, and we can leave ‘Merge By Name’ checked off so while Foundry is
putting items into the compendium it will check for any items with the same name and
if it finds one, it will update it to match this new version of the item. Then press ‘Export
Content’ and we can see the compendium fill up with our folder’s content!
You’ve done it! You’ve created a module that will speed up your world and let you
store things in a compendium that you can share across all of your worlds. If you want
more packs than we made in this video you can follow the exact same copy/paste procedure
for each type of pack and the only things you’ll need to update are the ‘name’,
‘label’, and ‘path’ to be something that none of the other packs use.
It doesn’t even have to be right now. If in three weeks you realize it’d be great
to have an extra compendium or two you can just follow the same process to add more packs.
You can also just as easily remove packs by deleting their pack in the module.json and
its database file in the ‘packs’ folder.
I hope this has been helpful and will help speed up your games and make it easier for
you to homebrew content for yourselves. If you’d like to find out how to make other
content modules like packing up worlds or adventure modules let me know in the comments
and I’ll see what I can do. In the meantime, stay safe, and I’ll see you in the next
one.