Giter Club home page Giter Club logo

patrol's Introduction

Patrol

Before opening an issue read THIS

Automatic Patrol Routes for NPCs

Latest Release Download Count Forge Installs Foundry Core Compatible Version alt-text alt-text

You can find the documentation on the WIKI

patrol's People

Contributors

346184 avatar bfrench6 avatar blaukreuz avatar lozanoje avatar rheynsza avatar theripper93 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

patrol's Issues

Instant spotting

Hello,

I seem to have encountered a problem. It might be on my side, but I've gone through your indications several times to make sure, and it persists. I've set up a patrol with one NPC (free patrol or with a rectangle drawn, same thing happens), where the NPC instantly detects my players on the map, even though he does't see them (I've selected his token to check the vision. He sees no one from his starting possition). If I deselect "Spot Player Characters" he patrols normaly as intended. I've tried different tokens, from different positions in the map. Restarting, reinstalling the module...

I would greatly appreciate it if you could look into that, and why it might happen.
Thank you in advance and have a good day.

Spot is not honoring "Limited Vision" walls OR not calculating based on sight, but instead movement.

Walls generally have 3 modes
Normal
Limited
None

When a creature is Patrolling with "Spot" on and there is a Normal wall between the creature and the players, Spot works fine.

Limited Walls are designed to block after passing through 2 "Limited". But Spot is going all the way across the canvas and ignoring walls if they are Limited.

take a map and make a bunch of "Bushes" (enclosed square or polygons), using walls that are set to
Movement restriction: None
Light, Sight, Sound Restriction: Limited

put PCs on one side of the bush(es), and the Patrolling w/ Spot creature on the other side.
Enable Patrol and unpause game

Creature will spot players,
even though you can test Line of sight and it is blocked (because the polygon has at least 2 Limited Sight walls between)

Question/inquiry

Is there a macro available that will flag selected tokens as being 'random patrol'?

Context: I set up a large map with all of my tokens (about 100) and forgot to set the patrol flag on the 1st token that I used for copy-pasting the others. The number of clicks needed to set patrol for this many tokens is far too high for the value I want to garner.

Thank you on advance

Patrol Speed should not be capped at 10 seconds

Hi, really like the concept, but imo there should be an option to go way beyond 10 seconds patrol speed. I would like to use patrols mostly as an atmospheric element for large city maps to bring them to life with guards patrolling walls hundreds of feet long at night. 10 seconds to traverse a distance of 150feet+ is just way too fast and gives off the impression of the guards sprinting for their lives rather than actually patrolling.

Requested Feature

Speed option, maybe a slider or a number input box. I use Patrol for city maps and would like to slow down the guards on patrol for when using a large scale map. The other option is to break a drawing into lines per grid, since I think speed depends on the size of the path.

Checkbox to turn off world pause

First off I want to say great module. This is more of a feature request vs a bug/issue. I would love have a means to turn off the world pause that occurs after an NPC spots a character. The use case I am using in my campaign is a merchant or known NPC will greet a PC once alerted to them. This works really well other than it pauses the game. I am a bit aware this is slightly misusing the tool, perhaps there are better ways to do this via macros, but just a thought. Feel free to disregard this issue/request, if its not something you want to get into. Thanks!

Tile movement

I am not sure if I am doing something wrong here, but whenever a patrol is enabled the tokens will start to slide through their random patrol area instead of moving tile by tile as in your demo video. The issue is that whenever a player is spotted, any given number of patrolling creatures can be in the middle of two grid tiles, forcing me to manually move them back to the middle of a square. I know that this might still happen even if they are properly moving in 5ft intervals, but I find it to be very less likely to happen if that was the case.

Random Selection of Sounds

Could it be made possible to specify a directory containing sounds and pick one at random? Or a playlist would also do the job. It would give some variety to the sound effects.

Option to allow patrols to continue during combat

E.G., I'm using this to create a busy urban environment with lots of tokens following paths. It would be great if this motion could continue during combat, either smoothed or perhaps on a lair action. Maybe defining their movement speed and having tokens advance on their patrol or route on their turn.

Guide or manual?

Any more information about how to use the module?

I have drawn a polygon and named it Patrol. But nothing happens, even with the "patrol" button active.
And the other two options - where do I see them?

Patrol.js line 40

Foundry v0.8.6
dnd5e 1.3.3

Seeing the following error in the console log:
image

Tokens stop moving after a few seconds

Tokens bounce around briefly and then stop. Console provides the following errors:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'x')
at nn.doPatrol [as fn] (pathPatroller.js:134:57)

FVTT: v11.313
DnD5e: v2.3.1
Patrol: 1.3.4

Feature-Request: Different Paths for Day and Night

Hey,
first: awesome work you've done here. I wondered if it was possible to add a new setting where I can specify different patrol paths for a token depending on the darkness level (as with the vision limitation threshold)? I often don't know at wich time my players enter a map and for realism I often have to manually move many tokens if I planned for them to enter at night (where many are sleeping in beds) but they want to do it during the day (where many are working / patrolling / ...) or vice versa. Thanks in advance!

Can't get path to work

0.9.2 with foundry 0.8.8, installed this for first time and have tried to follow the example but I can't get a path to work
Only this and the two support modules are active

  • created a scene
  • drop a default acolyte token on it
  • draw a two segment line drawing
  • name it Path1 in the text box
  • update position tab of the token to tick path patrol and put Path1 into the name field
  • pause/unpause the game to be sure
  • click the reset paths/nodes button
  • click the toggle patrol button
    nothing happens..

Patrol Hooks not working

When trying to use the hooks, they don't seem to function.

The logic put into place doesn't seem to actually be used by the guards to spot anything, in fact the guards completely stop spotting the player tokens.

The guards on patrol will also stop moving entirely while the player token is within line-of-sight, even thought they are not spotted or alerted.

Hooks.on('prePatrolSpotted', (spotter, spotted) => {
// Only actually spotted if the Spotter has a higher passive perception than the target's DC
console.log('spotter', spotter, 'spotted', spotted)
return spotted.actor.system.skills.ste.passive <= spotter.actor.system.skills.per.passive;
});
console.log('SPOTTER HOOK REGISTERED')

Spotting and alerting ignoring sight distance

Hi, love the module but it seems to be ignoring sight distance.

image
Orc has 60ft bright vision and vision sight limit set in token
image

This is using the 3.5e ruleset and perfect vision module
image

Dead guy walking :)

ALL OTHER MODULES DISABLED? (False)
**Module: Patrol, 0.9.5
Conflicting Module (if applicable):
Foundry and System version: 0.9 DnD3.5e 0.99.1
OS, Hosting, Browser (if applicable): Windows 10, Edge Chromium
Short Description of bug: My dead guy (npc) started following its patrol path after combat.
Simple steps to reproduce the bug:
Screenshots and/or console errors:

[FeatureRequest] npc can be of type character

Hello,

in my game system (Shadown 5e) player and non-player character both are of type character. So patroling tokens spot each other the whole time. In

this.characters = canvas.tokens.placeables.filter((t) => t.actor && (t.actor?.type == "character" || t.actor?.type == "char" || t.actor?.hasPlayerOwner));
you check for type or owner. Would it be feasible to remove the type or add a setting to only check for owner?

Thanks

Combat

I think it would be better to set the patrol to stop only during an active combat and not if there is any combat simply created, if that is possible. Some DMs, me included, like to set things up before a session, as in already leaving the a combat scenario configured so we would simply have to click Begin Combat to set things rolling. More so when it comes to the Maestro module that allows you to configure a playlist to any given combat encounter beforehand so that you already have everything ready for when the players get there, but if the patrol is halted for simply having a combat created (and not only when it starts) we cannot do all this prep work and have a patrol enabled at the same time.

Tokens come back on visited tiles with smooth movement

Tokens come back on visited tiles with smooth movement. I've spotted an issue with the array that stores the visited locations. The first stored coordinates are fine but the second are not aligned with the grid anymore. Example :
1500, 1500
1570, 1500
1501.30548, 1500
It's as if the new location was calculated when the movement is not finished yet. And indeed, tokens are not aligned anymore with the grid on the map !
I've seen another issue and I don't know if it's related to this one but it might be. With smooth movement activated, lights don't move with the moving token (ex torch).

Feature - Stealth Check

This could use LMRTFY or Monk's Token HUD to request a stealth check from the players (via a HUD button or maybe even just a macro), the result could be stored in the token data and used to compare with a spotter's passive perception to trigger or not the actual spotting as long as the player character isn't within an automatic spotting range, if they get to close the roll is ignored and the players get instantly spotted or at least trigger the alert status.

Another way to do this is to allow these rolls to configure the alert delay, the higher the roll the longer the delay would be until the GM resets it (again via a HUD button or maybe even just a macro), but then I think the code would need to be changed to consider a delay per player as opposed to a global setting.

[Bug] Random Patrols on Hex Grids aren't Random

So I was testing out using Patrol to simulate wandering monsters on a Hexcrawl Map, and ran into a bit of a perplexing issue.

With the grid set to Hexagonal Rows, all of the tokens that are patrolling seem to always make their way to the right side of the map, and won't leave from there. This behavior is mimicked with Hexagonal columns, but all tokens trend downwards instead.
This behavior isn't replicated with a square grid at all, even after leaving the game running for quite a while to test.

Odd or Even Hex grid setting doesn't change anything.
Diagonal movement allowed doesn't change anything.
Tested with Patrol being the only active module, no difference.
With or without the polygon binding them in place, no difference.

I've attached two screenshots I took, This was 60 seconds with 500MS delay between movements, so 120 total movements from all 5 tokens.

Starting Point
Starting Point
Ending Point
Ending Point

Foundry Version: 10.291
Module Version : 1.1.6

It don't work for player

Hi.

The movement is not appering to the player.
The pause from Patrol is lagging.
There are lots of errors:
image

5dcf39356eee23f573066c394015557a.mp4

changelog

Hi!

Can you add a changelog to your module?

Thank you!

Alert and Random Patrols Don't Respect Wall In Levels

If you are using the Levels Module, then the patrolling tokens will both walk through walls and alert through walls built within Levels. This is particularly jarring in the PF2e system where most vision types do not have max ranges, so the patrolling tokens would alert from the other side of the map through the walls of several buildings.

It's not working with SWADE

It's working fine in DnD.

But, I can't make it work in swade. I can't turn the patrol button on.

3c0a4fb23817c4e8402a230b0a67f23a.mp4

I did not get the Patrol to work properly

I did not get the Patrol to work properly. The token moves as it should, but it does not detect the players. I have drawn a polygon and also some walls.
Do you have any advice?

Suggestion: randomization of patrol speed by token

Suggestion: randomization of patrol speed by token. Perhaps a variation +/- defined in milliseconds or something similar in the speed a token moves when using smoothed movement.

E.G. I'm using this to simulate a busy urban environment with a lot of tokens following paths. They tend to clump up, which wouldn't be an issue if there were a small variation in their speed.

Tokens end up in corner given time

I've been testing this out, and don't know why or how you would fix it, but all patrolling tokens end up working their way to a corner if given enough time. I've walked away from a scene for a break, etc. and every time I return, any patrolling tokens are bouncing around in a corner.

Maybe, once they hit a wall or patrol perimeter, they don't choose that direction again for 3 or 4 recalculations? That would at least get the tokens heading away far enough to give them a chance find a different wall to bounce off.

Enhancement - Alternate patrol sets

I am preparing a stealth mission for my players. They will have a choice of what time of day they will go into the facility that they are trying to infiltrate. I would love the option for different times of day being able to provide different patrol routes. Ways I could see this being implemented would be either interfacing with a time of day add on (seems like a pain), or, more realistically, having a "patrol sets" menu, wherein you can group patrols into different sets that are active at a time. For instance, a token could be set up to, no matter the set, always do the same patrol, or switch its patrol based on sets. That way, once everything is set up with the various routes, I can, as a GM, in only a few clicks to change which patrol set is active, change how all the different tokens on the map are patroling.

Another use case for this might be in a mission where the guards of an area might go onto higher alert on a failed stealth check, but not loud immediately, and, if the "I might have seen something" signal goes out, the patrol routes switch up on the PCs midway through

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.