Skip to content

ManaHime/foundryvtt-gmScreen

 
 

Repository files navigation

GM Screen

Latest Release Download Count Forge Installs Foundry Hub Endorsements Foundry Hub Comments

Foundry Core Compatible Version Manifest+ Version

ko-fi patreon

Creates a Configurable modular grid that GMs can populate with journal entries, rollable tables, actors, and items. Customize your "GM Screen" by dragging and dropping items into cells and have its information available at any time from a button on the bottom right of the UI, near the sidebar. Roll rollable tables, open linked entities, and even place actor sheets into these cells. Obviously the space constraints mean some sheets will work better than others.

Usage

  • Drag and Drop Journal Entries, Rollable Tables, even Actors and Items into cells on the GM Screen.
  • Alternatively use the select menus (not recommended).
  • Each cell has settings which allow for that cell to span multiple columns or rows.
  • Clicking the little icon on the top-right of the cell will pop out the full sized sheet for whatever entity is in the cell. The GM Screen is intended to be read-only, so edits to things inside it will happen for the most part by popping the entity out.

Installation

Module JSON:

https://github.com/ElfFriend-DnD/foundryvtt-gmScreen/releases/latest/download/module.json

Screenshots

Demonstration of the GM Screen Grid with dnd5e content.

Configuration

Name Default Description
Grid Tabs Menu Allows the user to configure multiple tabs of the grid. Each grid tab created can have its own Column Override and Row Override if the default setting isn't what you want for that particular tab.
Columns 4 Sets the number of columns in the grid.
Rows 3 Sets the number of rows in the grid.
Display as Drawer true Controls whether the GM Screen appears as a normal popup dialog or as a drawer. To use the PopOut module with the GM Screen, this needs to checked.
Drawer Only: Right Margin 0(vw) Sets the offest from the sidebar to the right side of the GM Screen. This number affects the maximum possible width of the screen.
Drawer Only: Height 60(vh) Sets the height of the GM Screen Drawer.
Drawer Only: Width 100(%) Calculated as a percentage of the available screen width after the sidebar and right margin are taken into account.
Drawer Only: Opacity 100(%) Controls how opaque the drawer is.
Reset Grid false Saving with this checkbox checked will reset the grid (useful if you end up somehow causing it to fail to render).

Note that changing the grid dimensions after populating the grid might cause unexpected results, and odds are you will have to clear the grid and repopulate things.

Compatibility

I'm honestly not sure how well this will play with modules that make changes to how journal articles or roll tables interact.

Name Works Notes
OneJournal ✔️ Works as expected.
MEME ✔️ Markdown Renders as expected.
Inline Webviewer ✔️ Jounrnal entries with webviews work as expected.

API

After the hook gmScreenReady is fired, the following api methods are expected to be on window['gm-screen']:

toggleGmScreenVisibility(isOpen: boolean)

Opens or Closes the GM Screen. By default will toggle the current state.

window['gm-screen'].toggleGmScreenVisibility(false); // always closes
window['gm-screen'].toggleGmScreenVisibility(true); // always opens
window['gm-screen'].toggleGmScreenVisibility(); // always toggles

Hooks.callAll('gmScreenOpenClose', cb)

This hook is called when the GM Screen Opens of Closes with the following as the callback:

(app: Application, options: {isOpen: true}) => void

Known Issues

  • The grid does not refresh automatically when settings are changed, click the "refresh" button.
  • It is possible to overlap your cells with column/row spanning. It should not be possible to make it so you cannot recover from such a situation manually.

Acknowledgements

Bootstrapped with Nick East's create-foundry-project.

Mad props to the League of Extraordinary FoundryVTT Developers community which helped me figure out a lot.

About

A module which creates a modular GM Screen

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 66.1%
  • JavaScript 15.2%
  • SCSS 9.4%
  • Handlebars 9.3%