Code Monkey home page Code Monkey logo

foundryvtt-arms-reach's Introduction

FoundryVTT Arms Reach

Latest Release Download Count

Forge Installs

Foundry Core Compatible Version

Latest Version

Foundry Hub Endorsements

GitHub all releases

Translation status

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.

Known issue/Limitation

  • 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 limited only to the Door 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 calculation 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
  • When you scale a placeable object the event (click, ecc.), are limited only to the original coordinates {x, y} and not the "scaled" image

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('arms-reach').api or from the socket libary socketLib on the variable game.modules.get('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 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('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. 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('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 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('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 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('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 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('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. 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('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 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('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 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('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('arms-reach').socket.executeAsGM('isReachable', token: Token, placeableObject: PlaceableObject, maxDistance?: number, useGrid?: boolean, userId?: string):Promise

await game.modules.get('arms-reach').socket.executeAsGM('isReachableByTag', token: Token, tag: string, maxDistance?: number, useGrid?: boolean, userId?: string): Promise

await game.modules.get('arms-reach').socket.executeAsGM('isReachableById', token: Token, placeableObjectId: string, maxDistance?: number, useGrid?: boolean, userId?: string): Promise

await game.modules.get('arms-reach').socket.executeAsGM('isReachableByIdOrName', token: Token, placeableObjectIdOrName: string, maxDistance?: number, useGrid?: boolean, userId?: string): Promise

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

  • 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

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

Stairways Feature

  • If the module 'stairways' is present and active and the module settings is true there is a distance check interaction when you click on the stairways icon.

Note/Journal Feature

  • Add distance calculation for note and journal on the canvas
  • Automatically flag journal notes to show on the map without having to have your players turn it on themselves.

Token Feature

  • Add distance calculation for owned source token and generic target token on the canvas for open the sheet and emulate a loot chest
  • GM can use this feature but beware there is probably some glitch in some use case because they owned every token
  • [OPTIONAL] You can set the name of your explicit source token (not the character name) on the specific module setting
  • If no explicit source token is setted on the module setting the module take the first selected token of the player, if no selected token ias present it will try to get the first owwned token of the player
  • It's advisable for this feature to use the Tagger Module instead the name and sheet checker is more dinamic.

Light Feature (Beta need feedback)

Drawing Feature (Beta it should be working but only on the API level)

  • Add distance calculation for drawings on the canvas

Tile Feature (Beta it should be working but only on the API level)

  • Add distance calculation for tiles on the canvas

Sounds Feature (Beta it should be working but only on the API level)

  • Add distance calculation for sounds on the canvas

Templates Feature (Beta it should be working but only on the API level)

  • Add distance calculation for templates on the canvas

Wall Feature (Beta it should be working but only on the API level)

  • Add distance calculation for walls on the canvas (door are a special case with specific rule)

Tagger Feature

  • Add integration with Tagger Module, you decide specifically for which placeable objects on the canvas the distance calculation should be triggered
  • IMPORTANT: the tagger you must used for any placeable object is the string 'armsreach'
  • From 2.2.11 this feature is been splitted for each category of placeable object (Wall, Token, Note, ecc.) for a better customization

Customize the distance interaction in every placeable object Wall, Light, Stairway, ecc.

Reset Doors and Fog feature Feature (deprecated and removed on v11)

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.

### [Experimental] Integration of Combat Range Overlay

Here the documentation

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:clean

build:clean clean packs json sources in src/packs/_source. 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, but before the build:db

npm run-script build:clean

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 MIT license and the Foundry Virtual Tabletop Limited License Agreement for module development.

Credit

Thanks to anyone who helps me with this code! I appreciate the user community's feedback on this project!

A very big thanks to manuelVo, because i was to stupid to understand thing like measurement of Foundry by myself. A very big thanks to Saibot393, and his GeometricUtils class for token distance calculation.

Acknowledgements

Bootstrapped with League of Extraordinary FoundryVTT Developers foundry-vtt-types.

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

foundryvtt-arms-reach's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

foundryvtt-arms-reach's Issues

Add support for distance overrides

I would like to have some way to override the built-in accepted door interaction distance with a module for example.

The primary purpose would be to support game system specific concepts relating to it, such as limits of natural reach in Pathfinder 1e.

I wanted this so bad that I converted the original arms reach to do exactly that (https://gitlab.com/mkah-fvtt/pf1/arms-reach) before I learned of your module, but honestly I'd like for your module to have more generic support for such.

Disabled Ambient Sound Still Plays

Environment Details

  • Foundry VTT Version: 0.7.9
  • Operating System: win
  • How Are You Using Foundry: chrome
  • Which Game System: dnd5e
  • Modules Enabled?: yes

Issue Description

I've the Enable/Disable Ambient sounds unchecked and the sounds of opening/closing/locking/unlocking doors still plays.

Module list
encounter-builder--v0.2.2;
resourcesplus--v1.6.7;
about-time--v0.1.68;
actor-attribute-lists--v0.0.5;
actually-private-rolls--v0.2;
adventuremusic--v1.1.0;
atropos-maps--v1.2.1;
autocomplete-whisper--v0.3.3;
automated-jb2a-animations--v0.3.11;
journal-icon-numbers--vv1.2.3;
backgroundless-pins--v1.2.0;
baileywiki-maps--v0.2.7;
better-target--v0.1.11;
better-text-drawings--v1.0.4.4;
blood-n-guts--v0.8.7;
bug-reporter--v1.2.1;
calendar-weather--v3.1.2;
chat-images--v2.5.0;
ChatMerge--v0.2.5;
clocks--v1.3.5;
_CodeMirror--v5.58.3-fvtt3;
combat-utility-belt--v1.4.0;
CommunityLighting--v0.3.1;
blind-roll-skills--v0.6.0;
5e-training--v0.5.0;
cursor-hider--v1.1.7;
custom-journal--v1.2.1;
Custom-Token-Animations--v0.1.20;
cycle-token-stack--v0.5.4;
dndAudioBundle-HammerHome--v1.2;
dice-so-nice--v3.3.3;
dice-tooltip--v1.0.8;
dice-calculator--v0.6.6;
dnd5e-helpers--v1.10.3;
dnd-ui--v1.4.2;
dragonfiremaps--v1.1.14;
drag-ruler--v1.6.2;
foundry-drmapzo-free--v0.18.0;
Dynamic-Effects-SRD--v4.1.12;
dae--v0.2.62;
find-the-culprit--v1.3.3;
fogmanager--v0.1.6;
forien-custom-fonts--v0.1.3;
forien-quest-log--v0.5.7;
forien-unidentified-items--v0.2.5;
foundry_community_macros--v0.40;
foundry_community_tables--v0.13;
foundryvtt-arms-reach--v1.0.11;
free-loot-tavern-compendium--v1.9.1;
fxmaster--v1.0.3;
gAudioBundle-1--v2.3;
gAudioBundle-2--v2.4;
gAudioBundle-3--v2.3;
gAudioBundle-4--v2.4;
game-icons-net--v0.0.12;
gm-notes--v0.3;
group-initiative--v1.4.0;
healthEstimate--v2.5.4.1;
chat-notifications--v1.2.2;
hide-gm-rolls--v0.6.3;
itemcollection--v1.3.41;
jb2a_patreon--v0.1.8;
lazymoney--v0.9.10;
lessfog--v0.7.3;
lmrtfy--v1.14;
colorsettings--v2.5.9;
lib-df-hotkeys--v2.3.4;
lib-find-the-path--v1.4.0;
scene-packer--v2.1.0;
lib-wrapper--v1.5.2.0;
lootsheetnpc5e--v3.0.3;
lordudice--v0.1;
magicitems--v2.0.8;
_mathjs--v7.5.1-fvtt2;
midi-qol--v0.3.103;
miskasmaps--v1.2;
mikwewa-free--v1.3.0;
module-settings-sorter--v0.1;
monsterblock--v2.4.7;
moonlight-maps-free--v1.1.0;
moulinette-core--v1.5.0;
moulinette-gameicons--v1.1.0;
moulinette-imagesearch--v1.3.1;
moulinette-scenes--v1.2.0;
moulinette-sounds--v1.3.0;
moulinette-tiles--v1.8.0;
multilevel-tokens--v1.4.1;
music-d20-sampler--v1.0.0;
navigation-presets--v1.0.7;
Next-Up--v0.0.60;
tomcartos-ostenwold--v1.1.1;
fvtt-party-resources--v1.1.5.1;
pdfoundry--v0.8.5;
permission_viewer--v0.8.5;
pin-cushion--v1.4.0;
pointer--v2.3.1;
rounded-distance-for-measured-templates--v0.4.2;
smip-compendium--v0.5.0;
scenery--v0.1.4;
scene-transitions--v0.0.9;
selectiveshow--v1.1;
select-tool-everywhere--v1.1.1;
token-hud-art-button--v1.1.3;
foundryvtt-show-notes--v0.3;
foundryvtt-simple-calendar--vv1.2.35;
simple-dice-roller--v1.1.5;
simplefog--v0.1.17;
simple-name-generator--v3.1;
skill-customization-5e--v2.3.0;
smart-doors--v1.2.5;
socketlib--v1.0.5;
_sortablejs--v1.10.2-fvtt1;
SoundBoard--v1.4.0;
spellarena--v1.3.0;
stairways--v0.5.3;
tabbed-chatlog--v1.6.0;
tabletop-rpg-music--v1.2.1;
tacticalmap-free--v1.1.0;
mad-caverns-free--v1.0;
mad-cartographer-free-maps--v1.0.1;
journal-thumbnail--v1.0.4;
tidy5e-sheet--v0.4.29;
tidy-ui_game-settings--v0.1.22;
t-is-for-target--v0.4;
token-action-hud--v1.0.15;
token-attacher--v4.0.2;
token-auras--v1.8;
token-factions--v0.2.1;
token-hud-wildcard--v1.2.0;
tokenmagic--v0.5.0;
trigger-happy--v0.8.2;
dd-import--v1.1.1;
vino--v0.2.4;
WallCutter--v1.1.0;
warfare--v1.0.2;
world-anvil--v1.0.3;

No sound when iunteracting with locked doors

In order to submit an effective bug report, please include the following information along with your issue description.

Environment Details

Please share the following basic details about your setup.

  • Foundry VTT Version: 0.8.6
  • Operating System: Windows
  • How Are You Using Foundry: Native
  • Which Game System: dnd5e
  • Modules Enabled?: only arms reach and its dependencies

Issue Description

Please provide a description of your issue below. Including console error messages, screenshots or videos can be particularly helpful.

There is no sound when trying to open locked doors (left-click), the sound for locking/unlocking (right-click) is working just fine as well as open/close when unlocked.

[BUG] Token centers and placeable centers not consistent in Foundry - needs to be adjusted in module

Module Version: v2.1.7

Describe the bug
It seems that Foundry measures placeables from the center and tokens from the corner (or vice-versa, I'm not really sure). So if you inspect the X coordinates of a token and a map note that are aligned vertically, you'll see that the coordinates are off by half a grid square. The result is that the measurements this module use are off by half a grid square, because it fails to adjust.

To Reproduce
Steps to reproduce the behavior:

  1. Set the distance to interact at 5 feet
  2. Place a map note in the middle of a grid square.
  3. Place a player token one square to the west. It won't be able to interact. Place it one square to the east, and it will.

Expected behavior
The token should be able to interact from one square in any direction.

Screenshots
If applicable, add screenshots to help explain your problem.

I've verified this behavior with map notes, staircases, and doors. Changing appropriate functions like the following seems to fix the behavior:
getNotesCenter: function (note) { const noteCenter = { x: note.x - canvas.dimensions.size/2, y: note.y - canvas.dimensions.size/2 }; return noteCenter; },

In the case of door controls, the measurement seems to be the corner of the door icon, so I used this:
getDoorCenter: function (token) { const tokenCenter = { x: token.x + token.icon.width/2 - canvas.dimensions.size/2, y: token.y + token.icon.height/2 - canvas.dimensions.size/2 }; return tokenCenter; },

I also had to put back in the calls to getDoorCenter(), since that wasn't being used.

V2.0.11 is mislabeled[BUG]

Module Version: 2.0.11

Describe the bug
On the Forge the version number for 2.0.11 is labeled as 2.011. This is causing the Forge to see all new versions as older because 2.011 is greater than 2.0.x

image

Support for user rather than token owner.

I'm trying to rig this up to work for my in-person games where all the tokens are owned and controlled by a single user. In my case "The Party". Would it be possible to add an option to check if the currently selected token is owned by said User rather than a specific token? This way I can log the players in as The Party user and whichever owned token is selected will be able to walk up to a door and hit "e" or double tap the arrow to get the door to open.

Opening or closing a door randomly selects a token for GM users

Foundry VTT Version: 0.7.9
Operating System: locally windows, host unknown
How Are You Using Foundry: Chrome, hosted on Forge
Which Game System: dnd5e 1.2.4
Modules Enabled?: FVTT Arms Reach 1.0.8 and libWrapper 1.5.2.0 activated

Possibly related to hotfix solution of #2 (as a GM own very token): when a GM user interacts with a door a random token present on the map is selected. See attached video.

bandicam.2021-04-25.23-01-52-082.mp4

I also reverted briefly to the original Arms Reach and this behavior was not present. The GM could intereact freely with doors without having any token selected at all and i'd say this is the expected behavior

[BUG] 'e' interraction not working to open doors

Module Version: v2.1.4

Describe the bug
I've been unable to use the 'e' key to open and close doors while in range with a token, I see the below error in the console log. I have tested this on a newly created world with just Arms Reach and Lib Wrapper activated, both up to date as of 25/11/2021. When logged in a GM or player upon having a token selected being next to a door, the 'e' key will do nothing to open or close it, and the console will report an error. Additionally, when the selected token is outside of the maximum interaction distance, I do get notified that no door was in -token-'s reach.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a FoundryVTT canvas
  2. Create a token and a door, placing the token next to the door
  3. Press the 'e' key with door selected
  4. Nothing will happen, and console will produce the error

Expected behavior
The door should open, or close.

Screenshots
image

Browser:

  • Google Chrome
  • FoundryVTT application

Foundry Version:
0.8.9

Game System:
Simple World-Building, but also experience error with the DnD5e system

Additional context
This has been tried with a multitude of different settings, such as owned tokens/unowned tokens, active scenes, inactive scenes, freshly created worlds, different configured settings alongside default settings

Can't interact with doors when unrelated option is disabled

Environment Details

  • Foundry VTT Version: 0.8.7
  • Operating System: Windows 10
  • How Are You Using Foundry: Native Application
  • Which Game System: DnD5e
  • Modules Enabled?: Only FoundryVTT arms reach

Issue Description

When there is a token on the scene I can't interact with doors, even if the token is not selected. But for some reason it works when the option "Notifications failed interactions even for GM" is enabled. There are 0 errors on console about the module.

[BUG] GM cannot interact with doors when "Notifications for failed interactions even for GM" is checked

Module Version: v2.1.18

Describe the bug
Logged in as GM.
One PC token in scene and 10' from door (out of reach).
"Notifications for failed interactions even for GM" is checked.
PC token is unselected.
GM attempt to open door selects the token and reports token is out of reach.

Expected behavior
GM should be able to open the door when no token is selected.

Browser:
Edge

Foundry Version:
9.254

Game System:
DnD5e

Unable to interact with the canvas when arms reach is enabled.

Environment Details

  • Foundry VTT Version: 8.6.0
  • Operating System: Windows
  • How Are You Using Foundry: Native Application (Electron)
  • Which Game System: dnd5e
  • Modules Enabled?: foundry vtt arms reach, libwrapper, library find the path.

Issue Description

When I load a gridless scene with doors, I am unable to interact with the canvas at all. Cannot click, pan nor zoom.
On a scene with a grid, this does not happen, but the door controller no longer shows.
Additionally, there are several errors in the console about not being able to set properties on objects.

Distance calculation for Stairways incorrect (wrong center of stairways)

Module Version: v2.1.12

Describe the bug
I'm using ArmsReach v2.1.12 and Stairways v0.8.5 on Foundry v9.238 (yes foundry is not up to date, but the modules are). I found out that the stairways are accessable only from half of the sides (up, down, left, right, 4x diagonaly) and started a little debugging myself.

As far as i've found out, the StairwaysReach.getStairwaysCenter(stairways) function returns the coordinates of the grid-cell instead of the actual coordinates. (Found out via placing some walls and comparing coordinates from function with wall coordinates). I've drawn a red mark on my screenshot on the returned coordinates.

I've also got the debug output of dist filled by computeDistanceBetweenCoordinates(...). When standing in Position 1 (green values) dist is set to 165. As it's comparing with the setting of game.settings.get(ARMS_REACH_MODULE_NAME, 'globalInteractionMeasurement'), in my case 1.0 meters, i assume the distance should also be measured in meters, therefore a distance of 165 meters is definetly wrong. 165 is the grid size in pixels, not meters.

If i stand in Position 2 (purple values) it gets strange but the distance is by far correcter, as dist is now 0.5 (meters?). I don't know how it got 0.5 as the grid size is 1.5m and its a diagonally a half grid (pythagoras says 1.06m) away. Nevertheless from where it starts measuring, 0.5m seems incorrect for Position 2.

I'cant say if my debugging is correct or not, if i understand your functions correctly or not, but maybe they help you to identify or reproduce my problem. Maybe there are two issues, the center of stairs and a mix up of meters, grids and pixels.

To Reproduce
Steps to reproduce the behavior:

  1. Set global distance in tiles to 0 (disable)
  2. Set global distance in measurement to 1
  3. Set grid scale to 1.5 m
  4. place a stairways anywhere on your scene, but in the center of a grid cell
  5. move your character to any of the 8 adjacent grid cells (up, down, left, right, 4x diagonaly) and in the same grid cell as the stairways
  6. half of the adjacent grid cells will say out of reach (the 4 on the lower right side as far as possible away from the red mark in screenshot)

Expected behavior
All adjacent grids should be in same reach to actual center of stairways

Screenshots
grafik

Browser:
Firefox

Foundry Version:
v9.238

Additional context
All values and debugging was done with console.log() output.

Can "reach" further to the east

Arms Reach Version v2.0.11
Players can open eastern doors from 10' away. In other directions, the maximum is 5' as expected.

Option to disable door sounds

It would be helpful to have an option to disable door sounds completely as the sounds are not always desirable (e.g., sometimes a door is not a door).

[BUG] Possible conflict with Drag Ruler or lack of compatibility with V9?

Module Version: 0.8.9

Describe the bug:
This module is not working for me, it appeared that it had a conflict with Drag, I don't know if it is a conflict with it or if it is not working for V9, which is a shame, I love this module and I think it is so important that It's hard to live without it after trying it out.

To Reproduce
I don't understand, I'm not a developer and I'm a beginner.

Expected behavior
I expected to be able to access ports only close by, Journals and Starways as well, it didn't work in any case

Screenshots
I don't have Screenshots about this, this error in the console appeared a few times and other times it didn't, I couldn't take a picture of it, even when the error didn't show up on the console, the port wouldn't open and it still didn't show up in the Modules Settings.

Browser:

Foundry Version: V9

Game System: Pathfinder 2e

Additional context
Add any other context (like other modules installed) about the problem here.

Cannot open doors on one scene only

Environment Details

  • Foundry VTT Version: 0.7.9
  • Operating System: Windows
  • How Are You Using Foundry: Native Application (Electron)
  • Which Game System: PF2e
  • Modules Enabled?: Persists with all other modules disabled

Issue Description

As a GM, I am unable to open doors in one scene only, unless I have a token selected. All other scenes are fine, but I have to select a token to open a door within the effected scene. Distance between the token and the door does not matter.

If this is a feature I have enabled somehow I apologise, but I cannot find such feature and therefore I'm assuming this is in some way a bug.

Tile feature / Compatibility with Monk's Active Tile Triggers

Environment Details

  • Foundry VTT Version: 9.269
  • Operating System: Windows 10
  • How Are You Using Foundry: Native Application
  • Which Game System: dnd5e
  • Modules Enabled?: yes, Monk's Active Tile Triggers; Levels

Issue Description

Downloaded the module in an attempt to simplify the use of ladders in my maps, allowing for a clickable icon to increase elevation. Arms reach would simplify problems by requiring tokens to be next to the ladder before interacting. I'm unsure if the module isn't working as intended with the tiles, or incompatible with MATT.

Feature Request - Integration with Stairways

Stairways is neat module that creates door-like items on the canvas in order to represent portals/gateways/stairs and so on. This are a few examples of the widgets it creates:

image
image
image

I'd really like to control the proximity activation of such widgets using FVTT-AR. Would it be possible to integrate the two modules?

Edit:
I've had a brief interaction with Stairways's dev (SWW13) and he suggest this

[BUG AUTOASSIGNED] Stairway integration stop working ???

In order to submit an effective bug report, please include the following information along with your issue description.

Environment Details

Please share the following basic details about your setup.

  • Foundry VTT Version: (Example 0.5.4)
  • Operating System: [Windows, MacOS, Linux (which distro)]
  • How Are You Using Foundry: [Native Application (Electron), Chrome, Firefox, Safari, Brave, etc...]
  • Which Game System: (Example dnd5e)
  • Modules Enabled?: [yes, no] If yes, please list any which might be relevant

Issue Description

Please provide a description of your issue below. Including console error messages, screenshots or videos can be particularly helpful.

Can't load scenes with doors

In order to submit an effective bug report, please include the following information along with your issue description.

Environment Details

Please share the following basic details about your setup.

  • Foundry VTT Version: 8.6
  • Operating System: Windows
  • How Are You Using Foundry: Node JS
  • Which Game System: (dnd5e
  • Modules Enabled?: yes, no other door modules

Issue Description

following error occurs when loading a scene with doors. This appears to be a new error with v8 as the module was working fine on these scenes prior to upgrade:

image

[BUG] Close Open Doors/ Reset Doors and Fog doesn't work if doors are open

Module Version: v2.1.6

Describe the bug
Reset Doors and Fog functionality only works if all doors are already closed. The "Close Open Doors" functionality in the Wall Controls Layer does not work at all.

If all doors are closed, the function to reset fog functions, and it shows pop-ups showing that "Doors have been shut."

In both cases if one or more doors is open, the following error is thrown:

resetdoorsandfog.js:22 Uncaught (in promise) TypeError: item.update is not a function
[Detected 1 package: foundryvtt-arms-reach]
    at resetdoorsandfog.js:22
    at Array.forEach (<anonymous>)
    at Object.resetDoors (resetdoorsandfog.js:22)
    at Object.onClick (Hooks.js:64)
    at SceneControls._onClickTool (foundry.js:51380)
    at HTMLLIElement.dispatch (jquery.min.js:2)
    at HTMLLIElement.v.handle (jquery.min.js:2)

To Reproduce
Steps to reproduce the behavior:

  1. Install fresh world
  2. Enable Arm's Reach + libWrapper

Expected behavior
Open Doors should be closed (and Fog of War exploration reset, when using this option)

Screenshots
image

Browser:

  • Built-in Foundry browser

Foundry Version: v9 Build 238

Game System: PF2E 3.1.3.9639

Additional context
Add any other context (like other modules installed) about the problem here.

[BUG] Reset door and fog bug with token attacher

Module Version: Last

Describe the bug
Hi, Reset door and fog feature doesn't work
Error thrown in console :
image

The error seems to appear after moving a token to see if a door is open or close

Foundry Version:
Last v9

Game System:
Pf2e 3.3.1

As a GM, unable to lock/unlock doors

In order to submit an effective bug report, please include the following information along with your issue description.

Environment Details

Please share the following basic details about your setup.

  • Foundry VTT Version: 0.8.7
  • Arms Reach Version: 1.1.8 (latest)
  • Operating System: docker container
  • How Are You Using Foundry: Edge/Chrome/Firefox
  • Which Game System: dnd5e
  • Modules Enabled?: yes

Issue Description

As a GM, with Arms Reach enabled, I can close and open doors properly but not lock/unlock them. Even without a token selected, it seems to auto-assign the previously selected token and doesn't allow to lock/unlock as per image below:
image

I can lock/unlock only via the Walls/Door Editing functionality...

Module does not show in module settings and seems to do nothing when activated

Environment Details

  • Foundry VTT Version: 0.8.9
  • Operating System: Windows 10 64bit
  • How Are You Using Foundry: Chrome Browser as GM permission user (Hosted on Forge)
  • Which Game System: dnd5e
  • Modules Enabled?: yes (including drag-ruler v1.8.2, Libwrapper v1.10.6.0)

Issue Description

Hi bit of a strange one here...
I have just tried to switch from the old version of the previous module (Arms Reach v1.1.1), I disabled it and then uninstalled it. Then installed "Foundry VTT Arms Reach" v2.0.10, restarted server and activated it.
But the new module doesn't show at all under my module settings and doesn't do anything for me or on my player test account.
Any ideas? I've rolled back to the previous module and it works fine (but obviously I'm a bit concerned with compatibility issues with that one)

[BUG] Token unable to open door unless directly in front of it

Module Version: v2.1.18

Trying to configure the module to allow the token on diagonal to door to be able to open the door. I can't find the setting to make this happen. Increasing distance configuration settings well over 10 (feet) have no effect.

I believe this token is within 5' of the door, so expected it could open the door. Increasing interaction distances to 7.5' should definitely accommodate the angle and allow interaction.

image

Browser:
Edge

Foundry Version:
9.245

Game System:
DND5e

[BUG] cannot open any door

Module Version: v2.1.30

Describe the bug
I simply cannot open any door with just this module enabled

To Reproduce
Steps to reproduce the behavior:

  1. Select your actor token as Player
  2. Click on a door

No error in console

Expected behavior
The door should open.

Browser:

  • chrome

Foundry Version:
9.269

Game System:
D&D 1.6.2

Additional context
Disabling the module solves the bug.

Screenshot of the module setting:
image
image
image
image
image

"not found" error, there's no zip file release

In order to submit an effective bug report, please include the following information along with your issue description.

Environment Details

Please share the following basic details about your setup.

  • Foundry VTT Version: (Example 0.5.4)
  • Operating System: [Windows, MacOS, Linux (which distro)]
  • How Are You Using Foundry: [Native Application (Electron), Chrome, Firefox, Safari, Brave, etc...]
  • Which Game System: (Example dnd5e)
  • Modules Enabled?: [yes, no] If yes, please list any which might be relevant

Issue Description

Please provide a description of your issue below. Including console error messages, screenshots or videos can be particularly helpful.

V9 Update

Any plans for a V9 update? This module is really great and works well with modules like Stairways or preventing opening a door across the map.

Integration with drawings

Hi I find myself using foundry's drawings with the "@trigger[click]" feature of the module Trigger Happy to create buttons, levers and other interactive things on the scene. If its possible can you add a feature to prevent that clicking interaction with drawings if the token is not in range of the drawing? trigger happy may need a hook for arms reach to intercept the trigger

Flag "Avoid deselects the controlled token when open/close the door" is not taken in consideration

  • Foundry VTT Version: 0.7.9
  • Operating System: locally windows, host unknown
  • How Are You Using Foundry: Chrome, hosted on Forge
  • Which Game System: dnd5e 1.2.4
  • Modules Enabled?: Only those required, see below

Tested with Find the Culprit and only FVTT Arms Reach 1.0.5 and libWrapper 1.5.2.0 activated
image

Issue Description

Clicking on a door deselects the token despite both
"Avoid deselects the controlled token when open/close the door" and "Left-click to Release Objects" being checked. Here's how I tested:

  • logged in as GM
  • logged in as player on an icognito window and checked "Left-click to Release Objects"
  • got back to GM window and fired up Find the culprit selecting FVTT Arms Reach and libWrapper, saved changes and waited for both pages to reload
  • on the player window I selected a token and clicked a door. The door opened and the token was deselected.

[BUG]

Module Version: v1.1.1

Describe the bug
Constantly get warnings about opening doors when typing into sheets

To Reproduce
Have a scene with no doors, or a selected token nowhere near a door. Open any Actor sheet editable field, Item editable field, Journal, etc. Start typing, include the button used to open a door. You'll get warnings.

Expected behavior
I don't want to see warnings if I'm typing into something. Basically I want the actor to be selected with and no sheets having focus.

Browser:

  • chrome

Foundry Version: v9 242

Game System: pf1

Multiple annoying warning messages when moving multiple tokens

In order to submit an effective bug report, please include the following information along with your issue description.

Environment Details

Please share the following basic details about your setup.

  • Foundry VTT Version: 0.8.8
  • Operating System: self-hosted docker container
  • How Are You Using Foundry: chromium (Edge/chrome latest)
  • Which Game System: dnd5e 1.3.6
  • Modules Enabled?: only arms reach (also verified with "find the culprit" module)

Issue Description

Whenever I move multiple tokens simultaneously, these annoying messages pop-up all over the screen:

image

[BUG] "reset doors and fog" feature, the doors glitch and disappear.

Module Version: v2.1.1

Describe the bug
When I use the "reset doors and fog" feature, the doors glitch and disappear. Reloading the page brings back the doors. Using the feature again, triggers it again.
To Reproduce
Steps to reproduce the behavior:
It does happen often but not consistently, so I'm not sure about the steps yet.

Expected behavior
Doors to still exist after using it.

Screenshots
If applicable, add screenshots to help explain your problem.

Browser:
Tried chrome, edge, mozilla, opera

Foundry Version:
0.8.9
Game System:
dnd 5e latest version
Additional context
I tried to use "Find the culprit" to see if there's a conflict with another module, but when I use it (despite Arm's Reach being active) the feature disappears, no idea why. Refreshing the page always fixes the issue for the person refreshing.

Warning Msg when Ambient Doors/Designer Doors together with Arms Reach

Environment Details

  • Foundry VTT Version: (Example 0.8.6)
  • Operating System: [Windows]
  • How Are You Using Foundry: [Native Application (Electron), Chrome]
  • Which Game System: (dnd5e)
  • Modules Enabled?: [yes] Designer Doors, Ambient Doors

Issue Description

When you have these two modules active it still gives this warning message. If I recall correctly, that's because a while because those functionalities were incorporated into Arms-Reach, but were recently outsourced again (basically reverted to status quo).

image

Further conflicts between Drag-Ruler and FoundryVTT Arms Reach

In order to submit an effective bug report, please include the following information along with your issue description.

Environment Details

  • Foundry VTT Version: 0.8.9
  • Operating System: Windows 10 and Linux (EndeavourOS)
  • How Are You Using Foundry: Forge-VTT using both a Chromium-based browser (Vivaldi) and Firefox.
  • Which Game System: dnd5e
  • Modules Enabled?: Yes,

Drag Ruler (1.8.1); FoundryVTT Arms Reach (2.0.7); libWrapper (1.10.5.0); socketlib (1.0.9)

Issue Description

In addition to the previously reported issue with drag ruler (#23) there is also an intermittent issue when both modules are installed where when dragging a token to move it, the movement will simply not occur.
This error is incredibly intermittent and inconsistent, it occurred as frequently as every two or three moves and as infrequently as one in over thirty times. Distance does not seem to matter as I have observed this error happening in movements as small as one tile as well as over twenty.
This error occurs on both square grids as well as hex grids.

This error has also been reported on the Drag Ruler's github page:
manuelVo/foundryvtt-drag-ruler#105

Screenshots and Error Logs:

Upon start the following error appears in the console:

image

(The same error in Firefox)

image

When dragging a token a slightly different error appears

image

When the movement fails the drag ruler remains in place, and the token also does not move.

image
image

Right clicking on the canvas will cancel the movement and remove the drag ruler outputting the following error into the console:

image

the same error in Firefox:
image

Incompatibility with Smart Doors

Environment Details

  • Foundry VTT Version: 0.7.9
  • Operating System: Windows 10
  • How Are You Using Foundry: Firefox (hosted in Docker)
  • Which Game System: dnd5e
  • Modules Enabled?: yes, Smart Doors, FoundryVTT Arms Reach, libWrapper

Issue Description

Smart Doors adds functionality of Ctrl clicking doors to make them secret, this functionality does not work when FoundryVTT Arms Reach is enabled.
In addition, Foundry returns the following warning when the game is loaded in:
image
image

Note: I am also reporting this on Smart Doors page.

Fails on computeDistanceBetweenCoordinates as placeable has not _validPosition parameter

  1. Create a test scene
  2. Create a door
  3. Create a character
  4. Drop the character (token) on the test scene
  5. Click on the door, no matter close to it or not.
    5.1. Use hotkey also
    Error prompted:
    image

Any reason is not being used placeable.x property? It returns expected value.

Environment Details

Please share the following basic details about your setup.

Local Windows 10. Only translations modules enabled.

BUG: If out of reach, door still opens, revealing vision

If a token is out of reach of a door, and tries to open it, it opens the door for a brief instant, revealing all FOW behind it, and then closing it again.

It also deselects the controlled token if opening the door with a mouse click and "Left-Click to Release Objects" is checked in the Core Settings. This doesn't happen if the door is within range.

[BUG] incompatibility with tager module

Module Version: v2.1.7

Describe the bug
with the tager module active, arms doesn't work anymore and doesn't give any error

To Reproduce
Steps to reproduce the behavior:

  1. Install tager module
  2. click in any door for any reach

**Foundry Version: 9.242

Game System: D&D 5e

Bug or Feature Suggestion? - Door sounds

In order to submit an effective bug report, please include the following information along with your issue description.

Environment Details

  • Foundry VTT Version: (Example 0.8.6)
  • Operating System: [Windows]
  • How Are You Using Foundry: [Native Application (Electron) AND (to test player clients) Chrome]
  • Which Game System: (dnd5e)
  • Modules Enabled?: [yes] Ambient Doors, Designer Doors

Issue Description

When you have the Ambient Doors module active and change the Default Sound to something else. Foundryvtt-arms-reach does still play the basic door open/close sound, regardless of the settings on Ambient Doors. So you always hear the Ambient Doors sound file PLUS the standard Foundryvtt-Arms-Reach one every time you open/close a door.

Guess that's where it's either a bug report or a feature suggestion by me. It'd probably be best if there's an option for Foundryvtt-Arms-Reach to have the default door sounds can be disabled globally. Then there's no issue with the Ambient Doors module.

Otherwise I guess I'd have to report it to the Ambient Doors module so it somehow manages to disable other sounds (from Foundryvtt-Arms-Reach) on its own?

Conflict with Drag Ruler

Environment Details

  • Foundry VTT Version: 0.8.9
  • Operating System: Windows
  • How Are You Using Foundry: The Forge with Chrome
  • Which Game System: GURPS

Issue Description

When both modules, Arms Reach and Drag Ruler are enabled Drag ruler doesn't show the distance any more.

Can't open doors

Seems like when I have this module installed I can not open doors with the newest update.

Uncaught TypeError: Cannot read property 'melee' of undefined

Environment Details

  • Foundry VTT Version: 0.8.8
  • Arms Reach Version: 1.2.0 (latest)
  • Operating System: docker container
  • How Are You Using Foundry: Edge/Chrome/Firefox
  • Which Game System: dnd5e
  • Modules Enabled?: yes

Issue Description

While moving a token (logged in as a GM) i get the following error message on the console:
image

ArmsReach.js:769 Uncaught TypeError: Cannot read property 'melee' of undefined
    at actorReach (ArmsReach.js:769)
    at interactWithNearestDoor (ArmsReach.js:528)
    at ifStuckInteract (ArmsReach.js:506)
    at HTMLDocument.<anonymous> (ArmsReach.js:85)
actorReach @ ArmsReach.js:769
interactWithNearestDoor @ ArmsReach.js:528
ifStuckInteract @ ArmsReach.js:506
(anonymous) @ ArmsReach.js:85
15:12:49.710 

Token is a "test dummy":
image

designer door feature Slows game, Causes walls to disappear; opening and closing door sounds do not work

In order to submit an effective bug report, please include the following information along with your issue description.

Environment Details

Please share the following basic details about your setup.

  • Foundry VTT Version: .8.6
  • Operating System: Windows
  • How Are You Using Foundry: Self host, accessed via chrome browser
  • Which Game System: dnd5e 1.3.3
  • Modules Enabled?: tried with and with out modules, issues persist without other modules not counting dependences

Issue Description

Please provide a description of your issue below. Including console error messages, screenshots or videos can be particularly helpful.

Capture

Capture
When Designer Doors feature is turned on, game becomes unresponsive when selecting a token on a scene with multiple doors.
The walls and doors on that scene disappear as well. One a scene with few walls I was able to place a new door, but was unable to move it, or change any of its settings. first pic is the wall layer with the way the scene should be, and the second is the same scene with the only difference being the Designer Doors feature turned only.

Capture

The opening and closing door sounds of the Ambient Door Feature do not work. left the door at the default sound, and also tried copy/pasting file path from module settings(highlighted section in pic was copy/paste). The lock/unlock and locked door rattle sounds do work.

The file picker buttons(red circle in pic) on the door config window does not work either. Unable to use it to choose a file path.for sounds.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.