Skip to content

Monk's Tokenbar

Crowguard edited this page Jun 5, 2024 · 46 revisions

Adds a token bar to show the current player tokens that are available on the current scene

Installation

Install the module via Foundry's Add-on Modules screen.

Tokenbar Features

Tokens will be added to the tokenbar when they are placed on the scene and certain requirements are met:

  • The originating actor is owned by a player AND the token is of friendly disposition.
  • Any token can be set to display on the tokenbar regardless using the dropdown in the token configuration window.
  • Or the module settings can be configured to pull actors from the Party sheet instead (PF2 only).

Left-clicking a token on the tokenbar will select that token and pan the canvas to it. Double left-clicking a token will open that token's sheet as the GM, and open it for players if they have sufficient permission to view it.

  • Players and the GM can CTRL+ left-click on a token to target it.

Right-clicking a token on the tokenbar can be used to do the following:

  • Sending a private message to the owner of the token.
  • Open the actor sheet or the token configuration windows.
  • Edit the attributes displayed for that token (GM only)
  • Target the token.
  • Change movement for that specific token (see below. GM only).
  • Add a Hero Point (PF2 only, GM only).

Tokens be dragged off of the tokenbar onto the scene as well.

Attributes

The attributes shown in the tokenbar can be modified in the module settings.

  • The datapath is trimmed, you just need the attribute path; D&D 5E example: skills.prc.passive.
  • You can use math and combine attributes in the attribute fields; [[spells.spell1+spells.spell2+spells.spell3+spells.spell4+spells.spell5+spells.spell6+spells.spell7+spells.spell8+spells.spell9]] will show how many total spell slots the tokens have for example (D&D 5th Edition).
  • You can display multiple attributes in the same line using :; attributes.hp.value:attributes.hp.max or attributes.hp.value + "/" + attributes.hp.max.
  • If using an attribute that displays undefined when empty instead of 0, use '{{resources.secondary.value}}' || 0 to make it display 0; or just check the module setting to change how all undefined attributes display.

Additional Features

Assign XP

Clicking on the assign XP button will open a dialog to facilitate assigning XP. Automatically fill with the current player characters associated with the current scene. Add experience at the top and it will divide between the players evenly. Additionally once an encounter has finished, the dialog will automatically popup with the calculated XP for the encounter, divided evenly between the participants of the encounter.

The assign XP window can also be opened with the macro game.MonksTokenBar.assignXP().

Convert to Lootable

Clicking the convert button (on the left-hand token layer tools) will convert your selected tokens to a loot entity; the module currently supports Item Piles and Monk's Enhanced Journal's loot journal. Converting loot can be set to occur automatically once combat has ended.

Items of certain types such as feats and backgrounds are excluded from being added to the lootable.

Automatic post-combat loot conversion can be enabled in the module settings; any tokens with a disposition other than Friendly will be converted.

Limit Token Movement

Tokenbar has an option for preventing all tokens or specific ones from moving while the game is unpaused.

  • Free Movement: Tokens can move normally.
  • Combat Turn: Tokens can only move when its their turn in the combat tracker. Player controllable NPC tokens can be set in the module settings to share their owner's turn.
  • No Movement: Players cannot move tokens at all. The Gamemsater can Alt+click on a token to give that token free movement.
    • To give a specific token movement while other tokens are locked, use the following macro. game.MonksTokenBar.changeMovement("free", ["AfiYRdDSaOGNFGX5"]); You can also use the tokens name in place of its id.

Request Roll

By selecting one or more tokens and hitting the request roll button, you can send a request to the owners of the tokens asking them to roll the selected skills or saving throws.

Please note that the PF 2e setting Preview D20 Rolls interferes with auto-rolling requests. It will need to be disabled for each user on in the player configuration window.

The flavor text field in the Request Roll configuration accepts custom HTML styling.

The chat cards can be right-clicked to reroll with various options.

You can hold Ctrl click dice requests increase of the number of dice requested; Ctrl right-click to decrease them again.

Anonymous Integration

With the help of the Anonymous module, tokenbar will hide the names of NPCs in the chat cards.

Allow Players to Request Rolls

If this setting is enabled, players can initiate rolls using predefined macros the Gamemaster has set up (see below).

Chat Card Pop Out

The chat cards created by requesting a roll can be right-clicked to pop them out for easier tracking.

Contested Rolls

Clicking on the contested roll button will open a dialog to facilitate a contested roll.

  • If one token is selected and another token is targeted, both of those tokens will be added to the request.
  • If just one token is selected and nothing is targeted, the next token selected will be added to the request.
  • If two tokens are selected, both of them will be added to the request.

Clicking request will add a chat message and prompt players to roll the contested roll requested. After both parties have rolled it will show which one won the contested roll.

Grab Message Roll

By clicking the Grab Message Roll button (little hand in the chat card), you can click a previous roll's chat card to use it for the result of the request in case your player was trigger happy and rolled before requested.

This feature is currently only available for:

  • D&D 5th Edition
  • Pathfinder 1st Edition

Group DC

At the bottom of the chat card, Tokenbar averages the results of all the requested rolls and displays it as the Group DC.

In-Line Journal Requests

Requires Monk's Enhanced Journal.

You can embed requests into enhanced journals using the following syntax:

  • @Request[perception dc:15 silent fastForward rollmode:selfroll]{flavor text}.
  • @Request[save:str dc:15 silent fastForward rollmode:selfroll]{flavor text}
  • @Request[check:int dc:15 silent fastForward rollmode:selfroll]{flavor text}

Multiple Choice Requests

You can hold the CTRL key or the META key on Mac and click multiple skills to request a choice from among them; the player will get the dialog to choose once they click the dice in the chat card.

Request Macros

By clicking the save button in the bottom left, the Gamemaster can save predefined roll setups to macros; either to have certain commonly used roll settings on the hotbar, or they then be run by players if they have access to the macro and Allow Players Roll is enabled in the module settings.

  • The macros are saved with the tokens that were selected when it was saved as the targets.
    • game.MonksTokenBar.requestRoll([{"token":"Test PC"}],{request:[{"type":"attribute","key":"perception"}], silent:false, fastForward:false, rollMode:'roll'})
  • Replace the listed token, Test PC in this example, with null to use your currently selected tokens, or all Player tokens if you have no tokens selected.
    • game.MonksTokenBar.requestRoll([{"token":"null"}],{request:[{"type":"attribute","key":"perception"}], silent:false, fastForward:false, rollMode:'roll'})

Roll Modes

  • Public Roll will show everyone who is involved and their rolls.
  • Public Roll, Results Hidden will show the player and everyone else involved but will only reveal their own roll/success.
  • Private Roll, Results Hidden will only show the player that they're involved, but they won't be able to see the result.
  • Self Roll won't show the players at all. The GM will have to roll the dice themselves if auto-roll isn't used.

Bug Reporting

Please feel free to contact me on Discord if you have any questions or concerns. ironmonk88#4075

If submitting a ticket, please do so on this module's GitHub here.

License

This Foundry VTT module, written by Ironmonk, is licensed under GNU GPLv3.0, supplemented by Commons Clause.

This work is licensed under Foundry Virtual Tabletop EULA - Limited License Agreement for module development v 0.1.6.

Clone this wiki locally