Experimental Feature: FoundryVTT Dice Integration

  How-To Guides

Have your dice rolls from rollable() markdown appear in FoundryVTT for visibility for the rest of your party.

To enable this functionality, you need to get a few things set up:

In order for the notebook to post your dice rolls to Foundry, both sites need to be logged in from tabs or windows of the same browser, this required so the window that pops up during the dice roll can post to the correct authenticated Foundry session.

Installing the Module

The module code is available in github for anyone to view (or even contribute!).

Currently this module needs to be installed from the POC manifest install link:

https://raw.githubusercontent.com/goblinsnotebook/tgn-foundry-integration/poc/module.json

Once installed, you will need to restart your world for the module to take effect. It doesn’t strictly need to be enabled in your campaign for dice rolls to show, but you get some additional styling by doing so.

Configure the Feature Settings

When the Foundry module is installed, the settings to connect to it need to be added to the notebook. Enable the experimental feature and click the settings button below it.

You are prompted to input two things needed to push the dice rolls. These settings are stored in your browser rather than in the campaign on the server so that if you were to open it on another device like a phone it won’t try and push any dice rolls.

FoundryVTT Base Url

This is the URL that you access your Foundry instance in the browser, but only the domain name (and optionally port) which is usually the URL up to the first forwards slash.

Example

When joining the game in Foundry, you may be at a url of

https://my.foundry-instance.com/join

You just need to enter this part into the url box

https://my.foundry-instance.com

If you are using a local install of Foundry, the url may include a port number and may have been configured in a custom way. The default local install runs at

http://localhost:30000

User Id

The user id is needed to tell Foundry who to post the dice rolls as. You can easily obtain it from the Foundry UI when logged in.

Right-click your name in the player panel and select User Configuration. This panel may also display when you first log in.

Yout user id is displayed when you hover over the icon next to your name. Click the icon to copy the id to your clipboard.

Usage

Once configured, the Foundry dice options will appear on the dice roller panel

There are a few options that can be toggled on or off depending on how you want the rolls to appear. These only affect to roll in Foundry, they will always appear normally inside the notebook.

IconSettingSetting OnSetting Off
EnabledSend dice rolls to Foundry
(no rolls sent to Foundry)
Public RollShow the roll details
Show the roll as private
Show Object NameIf the roll is made from an object, include the name
Do not disclose the object name
Show Dice LabelShow the value of the dicelabel setting of the rollable() syntax
Do not show the label
Show CalculationShow the full calculation used, including dice rolls and static modifiers
Hide the calculation and only show the final result

The above were rolled with the “To Hit” part of the following markdown:

***Scimitar.*** *Melee Weapon Attack* rollable(dice=1d20+4,label=+4,dicelabel=To Hit [Scimitar]) to hit, reach 5 ft., one target. *Hit:* rollable(dice=1d6+2,dicelabel=Damage [Scimitar]) slashing damage.