Register

FoundryVTT Arms Reach

An Add-on Module for Foundry Virtual Tabletop

Author: 4535992 Project Source: Project URL Versions 10+ (Verified 10) Last Updated 6 months, 2 weeks ago

FoundryVTT Arms Reach

Attention for v11 the new module id is "arms-reach" not "foundryvtt-arms-reach", so go https://foundryvtt.com/packages/arms-reach for v11 and later

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.

Translation status

NOTE: If you are a javascript developer and not a typescript developer, you can just use the javascript files under the dist folder

Known issue/Limitation

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-arms-reach/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

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.

Module compatibility

API

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.

isReachable(token: Token, placeableObject: PlaceableObject, maxDistance?: number, useGrid?: boolean, userId?: string):boolean ⇒ boolean

Calculate the distance between the source token and the target placeable objet Returnsboolean - 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

Examplegame.modules.get('foundryvtt-arms-reach').api.isReachable(token: Token, placeableObject: PlaceableObject, maxDistance?: number, useGrid?: boolean, userId?: string):boolean

isReachableByTag(token: Token, tag: string, 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. Returnsboolean - 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

Examplegame.modules.get('foundryvtt-arms-reach').api.isReachableByTag(token: Token, tag: string, maxDistance?: number, useGrid?: boolean, userId?: string): boolean

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 Returnsboolean - 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

Examplegame.modules.get('foundryvtt-arms-reach').api.isReachableById(token: Token, placeableObjectId: string, maxDistance?: number, useGrid?: boolean, userId?: string): boolean

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 Returnsboolean - 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

Examplegame.modules.get('foundryvtt-arms-reach').api.isReachableByIdOrName(token: Token, placeableObjectIdOrName: string, maxDistance?: number, useGrid?: boolean, userId?: string): boolean

isReachableUniversal(placeableObject: PlaceableObject, placeableObject: PlaceableObject, maxDistance?: number, useGrid?: boolean, userId?: string):boolean ⇒ boolean

Calculate the distance between the source token and the target placeable objet Returnsboolean - 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

Examplegame.modules.get('foundryvtt-arms-reach').api.isReachableUniversal(placeableObject: PlaceableObject, placeableObject: PlaceableObject, maxDistance?: number, useGrid?: boolean, userId?: string):boolean

isReachableByTagUniversal(placeableObject: PlaceableObject, tag: string, 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. Returnsboolean - 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

Examplegame.modules.get('foundryvtt-arms-reach').api.isReachableByTagUniversal(placeableObject: PlaceableObject, tag: string, maxDistance?: number, useGrid?: boolean, userId?: string): boolean

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 Returnsboolean - 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

Examplegame.modules.get('foundryvtt-arms-reach').api.isReachableByIdUniversal(placeableObject: PlaceableObject, placeableObjectId: string, maxDistance?: number, useGrid?: boolean, userId?: string): boolean

isReachableByIdOrNameUniversal(placeableObject: PlaceableObject, placeableObjectIdOrName: string, maxDistance?: number, useGrid?: boolean, userId?: string):boolean ⇒ boolean

Calculate the distance between the source token and the target placeable objet Returnsboolean - 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

Examplegame.modules.get('foundryvtt-arms-reach').api.isReachableByIdOrNameUniversal(placeableObject: PlaceableObject, placeableObjectIdOrName: string, maxDistance?: number, useGrid?: boolean, userId?: string): boolean

Integration with Socketlib module

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.

Features

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

Door Feature

NOTE: If no token is selected and you are a GM this feature is not activated

Stairways Feature

Note/Journal Feature

Token Feature (Beta need feedback)

Light Feature (Beta need feedback)

Drawing Feature (Beta need feedback)

Tile Feature (Beta need feedback)

Sounds Feature (Beta need feedback)

Templates Feature (On developing)

Wall Feature (On developing)

Tagger Feature

Reset Doors and Fog feature Feature

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.

Categories

Available Versions

  1. Version 2.2.14

    6 months, 2 weeks ago
    Foundry Version 10+ (Verified 10) Manifest URL Read Notes
  2. Version 2.2.13

    Foundry Version 10+ (Verified 10) Manifest URL Read Notes
  3. Version 2.2.12

    Foundry Version 10 - 10 (Verified 10) Manifest URL Read Notes
  4. Version 2.2.8

    Foundry Version 10 - 10 (Verified 10) Manifest URL Read Notes
  5. Version 2.2.5

    Foundry Version 10 - 10 (Verified 10) Manifest URL Read Notes
  6. Version 2.2.1

    Foundry Version 10 - 10 (Verified 10) Manifest URL Read Notes
  7. Version 2.2.0

    Foundry Version 10 - 10 (Verified 10) Manifest URL Read Notes
  8. Version 2.1.32

    Foundry Version 9 - 9 (Verified 9) Manifest URL Read Notes
  9. Version 2.1.31

    Foundry Version 9 - 9 (Verified 9) Manifest URL Read Notes
  10. Version 2.1.27

    Foundry Version 9 - 9 (Verified 9) Manifest URL Read Notes
  11. Version 2.1.24

    Foundry Version 9 - 9 (Verified 9) Manifest URL Read Notes
  12. Version 2.1.10

    Foundry Version 0.8.9 - 9 (Verified 9) Manifest URL Read Notes
  13. Version 2.1.3

    Foundry Version 0.8.6 - 9 (Verified 0.8.9) Manifest URL Read Notes
  14. Version 2.1.0

    Foundry Version 0.8.6 - 9 (Verified 0.8.9) Manifest URL Read Notes
  15. Version 2.0.13

    Foundry Version 0.8.6 - 9 (Verified 0.8.9) Manifest URL Read Notes
  16. Version 2.0.6

    Foundry Version 0.8.6 - 9 (Verified 0.8.9) Manifest URL Read Notes
  17. Version 2.0.3

    Foundry Version 0.8.6 - 9 (Verified 0.8.8) Manifest URL Read Notes
  18. Version 1.1.9

    Foundry Version 0.8.6 - 9 (Verified 0.8.8) Manifest URL Read Notes
  19. Version 1.0.14

    Foundry Version 0.7.9 - 9 (Verified 0.7.9) Manifest URL Read Notes
  20. Version 1.0.13

    Foundry Version 0.7.9 - 9 (Verified 0.7.9) Manifest URL Read Notes
  21. Version 1.0.12

    Foundry Version 0.7.9 - 9 (Verified 0.7.9) Manifest URL Read Notes
  22. Version 1.0.11

    Foundry Version 0.7.9 - 9 (Verified 0.7.9) Manifest URL Read Notes
  23. Version 1.0.9

    Foundry Version 0.7.9 - 9 (Verified 0.7.9) Manifest URL Read Notes
  24. Version 1.0.8

    Foundry Version 0.7.9 - 9 (Verified 0.7.9) Manifest URL Read Notes
  25. Version 1.0.6

    Foundry Version 0.7.9 - 9 (Verified 0.7.9) Manifest URL Read Notes
  26. Version 1.0.5

    Foundry Version 0.7.9 - 9 (Verified 0.7.9) Manifest URL Read Notes
  27. Version 1.0.4

    Foundry Version 0.7.9 - 9 (Verified 0.7.9) Manifest URL Read Notes
  28. Version 1.0.3

    Foundry Version 0.7.9 - 9 (Verified 0.7.9) Manifest URL