Latest version | 2.2.14 |
---|---|
Minimum Core | 9 |
Compatible Core | 9 |
Last updated | 1 year ago |
Created | 3 years ago |
Authors | |
Languages |
Deutsch English Español Français Português (Brasil) |
Systems | All systems |
Dependencies |
libWrapper socketlib |
Project source | Project URL |
Report bugs | Bug tracker URL |
Read-me | Readme URL |
Changelog | Changelog URL |
Little Utilities, Arms Reach for door, journal, stairways, token, ecc.
This project is born like a upgrade of the project Arms Reach ty to psyny, in preparation of foundry vtt 0.8.0, but after a while i put some feature here and there and now i got something a little more complex.
I'll try to make this module system indipendent , but if anyone has some rule distance computation for a specific system i can put some more settings for manage that.
I know there is some measure distance issue expecially with diagonals, here some details Can "reach" further to the east and Not working well with Doors on Diagonal walls, this problem is limite donly to the Dorr interaction distance calculation, the current solution for this cases is push the "Shift" button to snap out from the grid movement and move the token these 2 px the distance claculation need to validate the interaction, these cases are so few that i will not spend more time on that, anyone is welcome to ope a PR about it
The module setting "Avoid deselects the controlled token" doesn't work well with the option "Release on left click" of foundry , if you own more than a token you will find yourself to manually reselect the token anyway
It's always easiest to install modules from the in game add-on browser.
To install this module manually:
https://raw.githubusercontent.com/p4535992/foundryvtt-arms-reach/master/src/module.json
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.
A little api to use in macro cc. for check if the placeable object reachable with variant based on the string id or the string tag from the module tagger
.
The api is reachable from the variable game.modules.get('foundryvtt-arms-reach').api
or from the socket libary socketLib
on the variable game.modules.get('foundryvtt-arms-reach').socket
if present and active.
boolean
Calculate the distance between the source token and the target placeable objet Returns: boolean
- The boolean value for tell if the target is near enough to the source token
Param | Type | Description |
---|---|---|
token | Token |
The source token |
placeableObject | placeableObject |
The target placeable object |
maxDistance | number |
OPTIONAL: explicit distance (units or grid) to check |
useGrid | boolean |
OPTIONAL: if true it will explicit calculate the grid distance instead the unit distance |
userID | string |
OPTIONAL: user id for the distance checking |
Example: game.modules.get('foundryvtt-arms-reach').api.isReachable(token: Token, placeableObject: PlaceableObject, maxDistance?: number, useGrid?: boolean, userId?: string):boolean
boolean
Calculate the distance between the source token and the first target placeable objet with a specific tag, the method 'isReachableByTag' need the Tagger Module installed and active for work. Returns: boolean
- The boolean value for tell if the first target with the specific tag is near enough to the source token
Param | Type | Description |
---|---|---|
token | Token |
The source token |
tag | string |
The tag from the Tagger Module to check for start the distance calculation |
maxDistance | number |
OPTIONAL: explicit distance (units or grid) to check |
useGrid | boolean |
OPTIONAL: if true it will explicit calculate the grid distance instead the unit distance |
userID | string |
OPTIONAL: user id for the distance checking |
Example: game.modules.get('foundryvtt-arms-reach').api.isReachableByTag(token: Token, tag: string, maxDistance?: number, useGrid?: boolean, userId?: string): boolean
boolean
Calculate the distance between the source token and the target placeable objet Returns: boolean
- The boolean value for tell if the target is near enough to the source token
Param | Type | Description |
---|---|---|
token | Token |
The source token |
placeableObjectId | string |
The target placeable object id reference |
maxDistance | number |
OPTIONAL: explicit distance (units or grid) to check |
useGrid | boolean |
OPTIONAL: if true it will explicit calculate the grid distance instead the unit distance |
userID | string |
OPTIONAL: user id for the distance checking |
Example: game.modules.get('foundryvtt-arms-reach').api.isReachableById(token: Token, placeableObjectId: string, maxDistance?: number, useGrid?: boolean, userId?: string): boolean
boolean
Calculate the distance between the source token and the target placeable objet Returns: boolean
- The boolean value for tell if the target is near enough to the source token
Param | Type | Description |
---|---|---|
token | Token |
The source token |
placeableObjectIdOrName | placeableObject |
The target placeable object id or name or label or entry reference |
maxDistance | number |
OPTIONAL: explicit distance (units or grid) to check |
useGrid | boolean |
OPTIONAL: if true it will explicit calculate the grid distance instead the unit distance |
userID | string |
OPTIONAL: user id for the distance checking |
Example: game.modules.get('foundryvtt-arms-reach').api.isReachableByIdOrName(token: Token, placeableObjectIdOrName: string, maxDistance?: number, useGrid?: boolean, userId?: string): boolean
boolean
Calculate the distance between the source token and the target placeable objet Returns: boolean
- The boolean value for tell if the target is near enough to the source token
Param | Type | Description |
---|---|---|
token | Token |
The source token |
placeableObject | placeableObject |
The target placeable object |
maxDistance | number |
OPTIONAL: explicit distance (units or grid) to check |
useGrid | boolean |
OPTIONAL: if true it will explicit calculate the grid distance instead the unit distance |
userID | string |
OPTIONAL: user id for the distance checking |
Example: game.modules.get('foundryvtt-arms-reach').api.isReachableUniversal(placeableObject: PlaceableObject, placeableObject: PlaceableObject, maxDistance?: number, useGrid?: boolean, userId?: string):boolean
boolean
Calculate the distance between the source token and the first target placeable objet with a specific tag, the method 'isReachableByTag' need the Tagger Module installed and active for work. Returns: boolean
- The boolean value for tell if the first target with the specific tag is near enough to the source token
Param | Type | Description |
---|---|---|
placeableObject | placeableObject |
The source placeableobject |
tag | string |
The tag from the Tagger Module to check for start the distance calculation |
maxDistance | number |
OPTIONAL: explicit distance (units or grid) to check |
useGrid | boolean |
OPTIONAL: if true it will explicit calculate the grid distance instead the unit distance |
userID | string |
OPTIONAL: user id for the distance checking |
Example: game.modules.get('foundryvtt-arms-reach').api.isReachableByTagUniversal(placeableObject: PlaceableObject, tag: string, maxDistance?: number, useGrid?: boolean, userId?: string): boolean
boolean
Calculate the distance between the source token and the target placeable objet Returns: boolean
- The boolean value for tell if the target is near enough to the source token
Param | Type | Description |
---|---|---|
placeableObject | placeableObject |
The source placeableobject |
placeableObjectId | string |
The target placeable object id reference |
maxDistance | number |
OPTIONAL: explicit distance (units or grid) to check |
useGrid | boolean |
OPTIONAL: if true it will explicit calculate the grid distance instead the unit distance |
userID | string |
OPTIONAL: user id for the distance checking |
Example: game.modules.get('foundryvtt-arms-reach').api.isReachableByIdUniversal(placeableObject: PlaceableObject, placeableObjectId: string, maxDistance?: number, useGrid?: boolean, userId?: string): boolean
boolean
Calculate the distance between the source token and the target placeable objet Returns: boolean
- The boolean value for tell if the target is near enough to the source token
Param | Type | Description |
---|---|---|
placeableObject | placeableObject |
The source placeableobject |
placeableObjectIdOrName | placeableObject |
The target placeable object id or name or label or entry reference |
maxDistance | number |
OPTIONAL: explicit distance (units or grid) to check |
useGrid | boolean |
OPTIONAL: if true it will explicit calculate the grid distance instead the unit distance |
userID | string |
OPTIONAL: user id for the distance checking |
Example: game.modules.get('foundryvtt-arms-reach').api.isReachableByIdOrNameUniversal(placeableObject: PlaceableObject, placeableObjectIdOrName: string, maxDistance?: number, useGrid?: boolean, userId?: string): boolean
You can use the socketLib for call the same functions:
await game.modules.get('foundryvtt-arms-reach').socket.executeAsGM('isReachable', token: Token, placeableObject: PlaceableObject, maxDistance?: number, useGrid?: boolean, userId?: string):Promise<boolean>
await game.modules.get('foundryvtt-arms-reach').socket.executeAsGM('isReachableByTag', token: Token, tag: string, maxDistance?: number, useGrid?: boolean, userId?: string): Promise<boolean>
await game.modules.get('foundryvtt-arms-reach').socket.executeAsGM('isReachableById', token: Token, placeableObjectId: string, maxDistance?: number, useGrid?: boolean, userId?: string): Promise<boolean>
await game.modules.get('foundryvtt-arms-reach').socket.executeAsGM('isReachableByIdOrName', token: Token, placeableObjectIdOrName: string, maxDistance?: number, useGrid?: boolean, userId?: string): Promise<boolean>
NOTE: for now the optional parameter 'userId' is not used from the api, i hope to add in the future some filter so a specific actor for a specific user has some limitation.
The interaction distance is measure by the distance between a token and a placeable object like door, journal, stairways, ecc.
To interact with a door, journal, ecc., the player need to have a token selected (or own a token) for make the calculation distance working well
Enable the GM to select the maximum distance that players can interact with a door (needs a token selected) (DM bypass this limitation)
Pressing 'e' opens/closes a door nearest of current selected token
Holding 'e' centers the camera on current selected token
Double tapping movement on the direction of a door will interact with it
NOTE: If no token is selected and you are a GM this feature is not activated
NOTE: This feature remain for history, it will been updated, but is been "officially" transferred here Sidebar Context because make more sense on that module than this.
Adds a button to the Walls Menu to Shut all doors in the current scene. Also adds a menu to the context dropdown for the Scene Navigation and Scene Directory menus to shut all doors and delete fog in the selected scene to prepare it for a fresh visit from characters. I find it useful after QAing a new map for holes in walls/doors and checking lighting, etc.
Changes the functionality from closing ALL doors to closing ONLY opened doors. Doors that are currently locked remain locked, and are not closed.
To install this package, open your Foundry Setup screen and navigate to your Module tab and click the Install Module button.
From there, you can either search for the package unique name: foundryvtt-arms-reach or copy its manifest URL:
And paste it to the input box at the bottom of your window.
You can install this package directly to your Forge account.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Advertisement cookies are used to deliver visitors with customized advertisements based on the pages they visited before and analyze the effectiveness of the ad campaign.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.