Skip to content

p4535992/foundryvtt-pin-cushion

 
 

Repository files navigation

Pin Cushion (note on canvas and journal directory enchantment)

GitHub issues

Latest Release Download Count

Forge Installs

Foundry Core Compatible Version

Latest Version

Foundry Hub Endorsements

GitHub all releases

Translation status

If you want to buy me a coffee alt-text

Adds additional functionality around Map Pins

img

NOTE

In compliance with the licenses, some piece of code of some feature has been inserted by other projects that I describe in detail in the "Credits" department of this README, I invite you to support these developers.

My aim is not to take credit for their work, I just don't want to install 100 modules for 100 features which then collide with each other, every single external feature can be disabled in the settings of this module to allow the use of modules between them .

Installation

It's always easiest to install modules from the in game add-on browser.

To install this module manually:

  1. Inside the Foundry "Configuration and Setup" screen, click "Add-on Modules"
  2. Click "Install Module"
  3. In the "Manifest URL" field, paste the following url: https://raw.githubusercontent.com/p4535992/foundryvtt-pin-cushion/master/src/module.json
  4. Click 'Install' and wait for installation to complete
  5. Don't forget to enable the module in game using the "Manage Module" button

Known issue

  • This module slows down opening journals a bit (the rendering to understand each other), I guess for all the controls, filters and overrides i do, any help is solved this issue is welcome

libWrapper

This module uses the libWrapper library for wrapping core methods. It is a hard dependency and it is recommended for the best experience and compatibility with other modules.

Settings

  • Force to show notes: Automatically flag journal notes to show on the map without having to have your players turn it on themselves.

  • Preview Maximum Length: TEXT PREVIEW ONLY How many characters should the text preview show?

  • Preview Delay: How long before preview appears (in milliseconds)

  • Default Journal Entry Permission: The default permission journal entries will be created with

  • Default Journal Entry Folder: The default folder journal entries will be created in when creating Map Pins with a double-click

  • Show by default the icon image of the journal on the map note: If a image is set on the journal by default is the first image set from Pin Cushion

  • Enable Player-Only Icons by default: Newly created notes will have player-only icons enabled automatically.

  • Default Note Icon for Players: The default icon used for player-only icons

  • GM Label: Add the ability for Note tooltips to be configured so that GMs see different text to Players. So secret information can be displayed to GMs whilst players see the 'public' information about the Note.

  • Enable revealed state on scene Notes: When enabled, then the 'revealed' state will be used to determine if the Note is visible to players. (The default Foundry VTT behavior is for Notes to be visible to players only if the linked document is accessible by the player.)

  • [Only if setting 'Enable revealed state on scene Notes.' is enabled] Set the tint color of the Note revealed state on scene Notes: Is an option to set the tint color of the Note icon to indicate if the linked document is reachable or not (if the Note has no linked document, then it will always be displayed in the 'unreachable' tint).

  • [Only if setting 'Enable revealed state on scene Notes.' is enabled] Note Tint Color when linked: For PLAYERs, the RGB value to be used to tint scene Notes if they have a reachable link (if left blank then the tint, if any, will remain unchanged). For GMs, this is the initial Icon Tint set during import.

  • [Only if setting 'Enable revealed state on scene Notes.' is enabled] Note Tint Color when not linked: For PLAYERs, the RGB value to be used to tint scene Notes if they do not have a reachable link (if left blank then the tint, if any, will remain unchanged). For GMs, this is the initial Icon Tint set during import.

  • Select Specific Folder: Make sense only with the module setting 'Default Journal Entry Folder' set with value 'Specific folder'

  • Enable feature Backgroundless Pins: If enabled this setting will let you with a additional checkbox 'Has Backgorund ?' on the note configuration panel remove or not the background box from map notes. WARNING: If you disable this module setting you simply have all your notes with background (the standard way), but the flags on the notes are not delete, so you can re-enable this when you want. YOU NEED TO REFRESH THE PAGE FOR APPLY THE SETTING.

  • Enable Sidebar Journal Images for GM Users:

  • Enable Sidebar Journal Images for Player Users:

  • [Only if setting 'Enable Sidebar Journal Images for GM Users' or 'Enable Sidebar Journal Images for Player Users' is enabled] Thumbnail Position: Whether the thumbnail is left of the journal entry title or right.

  • Use mouse position for show the tooltip: When you hover a note on the canvas the tooltip is build based on the current mouse position instead the journal icon position. This solution seem to be more dynamic.

Features

This module add many new settings for many use case on the Note config dialog, here some of the most interesting, but there is more:

  • Create Pin on canvas with double click

create-pin

  • Customized note configuration

note-config

  • Journal preview on the sidebar

journal-preview

  • Changes the dropdown of map pin icons into a filepicker so users can select any icons they like
  • Adds the ability to double-click the canvas while on the Notes Layer and create a map pin (and corresponding Journal Entry)
  • Adds a preview of the associated Journal Entry when you hover over a map pin
  • Removes the background box from map notes

img

  • Add the possibility to add a thumbnail preview of the journal

img

  • [Only with setting 'Enable revealed state on scene Notes' enabled] Add an option to have a 'revealed' state on scene Notes: When enabled, then the 'revealed' state will be used to determine if the Note is visible to players. (The default Foundry VTT behaviour is for Notes to be visible to players only if the linked document is accessible by the player.)

  • [Only with setting 'Enable revealed state on scene Notes' enabled] Add an option to set the tint colour of the Note: Icon to indicate if the linked document is reachable or not (if the Note has no linked document, then it will always be displayed in the "unreachable" tint).

  • [Only with setting 'Enable revealed state on scene Notes' enabled] Provide tint colours to allow GMs to see if notes have been revealed to players. Setting the tint to a blank string will remove this tinting.

  • Add an option to hide the label text: It will hide the label text when you hover on the note, it useful for avoid the "double" test given from the 'label' and 'title' attributes.

  • Add an option to always show the label text: The label of the note is always visible without the need to go to hover the note useful for note on a map or any use case.

  • Add an option to do not show Journal Preview: Do not show the journal preview to the player can be useful in some case.

  • Add an option for setup the tooltip placement (default: 'e') Placement location of the tooltip relative to the element it is open for. Values can be n, e, s, w, nw, ne, sw, se, nw-alt, ne-alt, sw-alt, or se-alt (as in north, east, south, and west). This only matters if followMouse is set to false.

  • Add an option for setup the tooltip stylish color

  • Add an option for setup the tooltip smartplacement behaviour: (default: false) When enabled the plugin will try to keep tips inside the browser viewport. If a tooltip would extend outside of the viewport then its placement will be changed to an orientation that would be entirely within the current viewport.

img

  • Add an option for setup the pin is transparent ? behaviour: Now with a simple checkbox on the note configuration it is possible to make the icon transparent without wasting time looking for the transparent image file. Very useful for people who use maps with icons printed on the map and just want to show the tooltip when the cursor is over that image and it saves me a lot of time. NOTE: This configuration is applied only to the icon image of the note , not the image tooltip.

  • Add an option for setup the Show only to GM ? behaviour: Quite simply regardless of the associated permissions it shows the note only to the gm, it is very useful when used with this other module Automatic Journal Icon Numbers to prepare notes for the GM or random encounter with the Ironmonk modules, personally it saves me a lot of time in not continuously setting the permissions on the associated journal.

  • Enable drag note on token layer if GM: Enable drag note on token layer if GM

  • Enable autoscale for nameplates of the note on the canvas: Enable autoscale for nameplates of the note on the canvas",

  • Default image icon for on creation of a note Set the path to a image to use as default icon during the creation of the note on the canvas.

  • Shows Pages in the journal directory: Adds expandable elements to the journals in their directory to show the journal's pages

  • Player Pin Defaults: This mod improves the defaults of player-made pins in Foundry, making it easier for players to document maps such as dungeons.

Build

Install all packages

npm install

dev

dev will let you develop you own code with hot reloading on the browser

npm run dev

build

build will build and set up a symlink between dist and your dataPath.

npm run build

build:watch

build:watch will build and watch for changes, rebuilding automatically.

npm run build:watch

prettier-format

prettier-format launch the prettier plugin based on the configuration here

npm run-script prettier-format

lint

lint launch the eslint process based on the configuration here

npm run-script lint

lint:fix

lint:fix launch the eslint process with the fix argument

npm run-script lint:fix

build:json

build:json unpack LevelDB pack on src/packs to the json db sources in src/packs/_sourcevery useful for backup your items and manually fix some hard issue with some text editor

npm run-script build:json

build:db

build:db packs the json db sources in src/packs/_source to LevelDB pack on src/packs with the new jsons. NOTE: usually this command is launched after the command build:json and after make some modifications on the json source files with some text editor

npm run-script build:db

Issues

Any issues, bugs, or feature requests are always welcome to be reported directly to the Issue Tracker, or using the Bug Reporter Module.

License

This package is under an GPLv3 License and the Foundry Virtual Tabletop Limited License Agreement for module development.

Acknowledgements

About

Adds additional functionality around Map Pins

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 88.4%
  • HTML 6.0%
  • CSS 4.9%
  • Other 0.7%