p4535992 / foundryvtt-hidden-entity-links

A FoundryVTT module that hides entities in the sidebar from players who have limited access to them, and many other features
Creative Commons Attribution 4.0 International
1 stars 0 forks source link

Hidden Entity Links

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

A module for FoundryVTT for hide things...

hidden_links6

Instructions

In the module settings you will find options to hide each entity type (apart from Macros) from your players if they have limited access.

The concept is hide everything on the sidebar, but still have permissions , a classic use is a merchant in a specific scene cna be used only on that scene not on the sidebar.

The graphic interaction with new choices on the sidebar context let you decide the entity/document you want to make secret with a simple right click on the specific element or the folder of the sidebar, so you can hide , unhide multiple elements with one click.

There is a integration based on the permission applied on the entities.

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-hidden-entity-links/master/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

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.

Known issue

Features

img1img2img3img4img5img6img7img8

Hide entity with right click context integration

You can force to hide some specific entity.

NOTE: this bypass the check used with the feature "Permission manager integration".

hide

Show entity with right click context integration

From version 1.0.7 you can force to show some entity.

NOTE: this bypass the check used with the feature "Permission manager integration".

show

Unhide/Unshow entity with right click context integration

From version 1.0.7 you can remove the flag of hidden with a voice on the right context.

By module settings we can apply the css style to all the entities are not hide or show

nohideshow

Permission manager integration

From version 1.0.7 you can hide by default the entities based on the permissions level of the player, it very hard to maintain trace of this so for this feature it is highly recommended to install and use this module together with the module Permission Viewer

On the module setting you can see a dropdown menu where to choose the permission level to set for the specific type.

perm1

Remember the permission on foundry are from lowest to highest NONE,LIMITED,OBSERVER,OWNER. and remember each level of permissions in foundry inherits the permissions of the previous lower levels, therefore the permissions of OWNER also associate the permissions of OBSERVER,LIMITED,NONE to the player, the permissions of LIMITED also associate the permissions of NONE etc.

ATTENTION: Permissions help in certain contexts, but you can still force the hide feature from the context menu for example set the value to LIMITED and all the entity with permission LIMITED for that player are "hide" by default, but maybe you want to "hide" some entity with observer permission you can still do that with the standard right click on the entity. The hide feature has priority over the "permissions control manager".

Below is an example where as GM we set the values -, NONE, LIMITED, OBSERVER, OWNER, ONLY LIMITED, ONLY OBSERVER respectively in the dropdown. Showing the view by the player that he has these exact privileges in the other distinct entities.

NOTE: the following screenshots of the example start from the fact that there are no entities set explicitly with 'hide' and 'show', the explicit configurations of 'hide' and 'show' have priority over the permissions configurations.

What GM always see:

permgmsee

Here what player see with the default value "-":

permempty

Here what player see with the value "NONE":

permnone

Here what player see with the value "LIMITED":

permlimited

Here what player see with the value "OBSERVER":

permobserver

Here what player see with the value "OWNER":

permowner

Here what player see with the value "ONLY LIMITED":

permonlylimited

Here what player see with the value "ONLY OBSERVER":

permonlyobserver

Other features

img

API

Update css on the folder (not ready need more developing...)

game.modules.get('hidden-entity-links').api.hiddenEntityLinks.updateFolderHiddenEntityLinks = async function (entityData, html, data)

Update css on the specific entity

game.modules.get('hidden-entity-links').api.hiddenEntityLinks.updateHiddenEntityLinks = async function (entityData, html, data)

Rendering css on the specific sidebar tab

game.modules.get('hidden-entity-links').api.hiddenEntityLinks.directoryRenderedHiddenEntityLinks = async function (sidebarTabDirectory, html, data, entities)

Hide all the reference link on the javascript editor of foundry based on the specific permissions

game.modules.get('hidden-entity-links').api.hiddenEntityLinks.hideRenderedHiddenEntityLinks = function (sheet, html, data)

Hide the specific entity

game.modules.get('hidden-entity-links').api.hiddenEntityLinks.hideEntityLink = async function (entityID, entities)

UnHide/Unshow the specific entity

game.modules.get('hidden-entity-links').api.hiddenEntityLinks.unhideEntityLink = async function (entityID, entities)

Show the specific entity

game.modules.get('hidden-entity-links').api.hiddenEntityLinks.showEntityLink = async function (entityID, entities)

Settings

Build

Install all packages

npm install

dev

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

npm run dev

npm build scripts

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

Changelog

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 Foundry VTT module is licensed under a Creative Commons Attribution 4.0 International License and the Foundry Virtual Tabletop Limited License Agreement for module development.

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

Credit

ko-fi