5E Product Walkthrough Playlist
Page 1 of 4 123 ... Last
  1. #1

    [Any Ruleset] Patrol Duty: Automated Token Pathing

    Forge Link: https://forge.fantasygrounds.com/shop/items/1811/view

    Patrol Duty allows the GM to create paths for tokens. Tokens will then travel along the path at configurable intervals. Perfect for any scenario where many NPC tokens move independently of the party, and allows the GM to focus on running the game instead of moving tokens around.

    Getting Started

    See the extension in action on Youtube: https://www.youtube.com/watch?v=YH21EMqIGio. Laerun and I recorded a short session that goes over all the major features for this extension and how to use them.

    To get started creating a path for a token, simply right-click the token and select the "Open Path Editor" option at the bottom of the radial menu. Alternatively, you can select the token and click the "Open Path Editor" button on the image toolbar. This will open the path editor for that token.

    Paths for most tokens are saved with the token and image, and will be deleted if you delete the token. The exception for this is if the token is associated with a combat tracker entry, in which case the path will persist even if the token is delete and re-added.

    When setting up paths for tokens that are part of an Encounter, the data for those paths is saved with the Encounter and is added to the token when the encounter is added to the combat tracker. This way you can pre-make your paths when designing your encounters and pre-placing tokens, and then have those paths activate as soon as you add the Encounter to the combat tracker.

    Paths

    Paths are assigned to tokens, and they are made up of a collection of waypoints. When a token moves along its path, it moves from waypoint to waypoint in sequential order. When it reaches the end, the token will either stop moving, loop back to the start of the path, or travel the path in reverse based on how the path is configured by the GM.

    Tokens move at a set speed, and each path has a configured trigger that moves the token. These triggers are:

    • At the end of the round
    • Every turn
    • On the token's turn (only works for tokens of combat tracker entries)
    • In real time, on an interval of seconds


    Paths also have the following settings:

    • Speed. This is the raw speed that the token moves per round. This is measure
    • Period. Sets how many trigger events must occur before the token moves. For example, a Period of 2 means the token will move only every second trigger. A Period of 3 means the token only moves every third trigger
    • Jitter. Sets how precise a token's movement is. A value of 0 means the token will most exactly on the most straight line between waypoints. The higher this value (up to a max of 100) means the token's movement will have a random deviation. The closer the token gets to its target waypoint the less this deviation gets.
    • Snap to Grid. If enable, tokens will snap to the grid of the image after it moves.


    Waypoints

    Waypoints are denoted with one of three map pin tokens. You can add them to a path by drag/dropping them from the path editor onto the image with the token whose path you are editing. A green waypoint marks the start of a path, a red waypoint marks the end, and yellow waypoints mark out points between the beginning and end.

    Each waypoint in a path has a few options for it specifically.

    • Behavior when reached. When a token reaches a waypoint, the waypoint can be configured such that the token either pauses its movement until the next movement trigger, or stop for a number of movement triggers. Useful if you want a token to linger at a waypoint
    • Speed override. Modifies a token's speed between the current waypoint and its target waypoint. This can either override the base speed set in the Path, or it can act as a multiplier for the base speed. Useful when you want a token to move more slowly or quickly through an area
    • Warping. Instead of physically traveling from one waypoint to the next, this tells the system to instead instantly teleport the token from one waypoint to the next. Waypoints can be configured so that the token either teleports from the current waypoint to the next waypoint, teleports from the previous waypoint to the current waypoint, or both of these properties.


    Change History
    June 12th, 2024 - Initial release

    https://ko-fi.com/saagael
    Last edited by Saagael; June 25th, 2024 at 21:10.

  2. #2
    HUZZAH!!!!

    Thank you
    We do not stop playing because we grow old.
    We grow old because we stop playing.

    www.islandkingdoms.org

  3. #3
    This sounds like it might be really neat

  4. #4
    This is really cool. I've been testing it out.

    Love it. I did notice that it doesn't snap into the center of a grid square, is it possible to make this happen as an option?

    Advice to people that the waypoints set are to show the pathing but not where exactly the tokens land, they are to set the path so the tokens don't go the wrong way, it can also jump LOS walls, so use the pathing to set it for that.

  5. #5
    Quote Originally Posted by MrDDT View Post
    This is really cool. I've been testing it out.

    Love it. I did notice that it doesn't snap into the center of a grid square, is it possible to make this happen as an option?

    Advice to people that the waypoints set are to show the pathing but not where exactly the tokens land, they are to set the path so the tokens don't go the wrong way, it can also jump LOS walls, so use the pathing to set it for that.
    Unfortunately I couldn't find a way to tell FG to "snap to the center", and the only way I could figure to do it is to rewrite the token position math and I didn't feel like doing that. That or actually implement a pathfinding algorithm that worked on a per-square basis. I'll keep thinking on it, but for now it's not something I have the energy to do.

    EDIT: I also justified it to myself that for things that are automatically moving on a patrol it's less important to know exactly what square they're in, so it's fine if they sit on the edges or vertices.

    Regarding the second point, you are correct that the tokens are not "moving" in the technical sense, so they can go through line of sight. However they will always exactly hit a waypoint before moving to the next one.
    Last edited by Saagael; June 13th, 2024 at 05:16.

  6. #6
    @Saagael, there is an Image.snapToGrid API.
    https://fantasygroundsunity.atlassia...age#snapToGrid

    Regards,
    JPG

  7. #7
    Quote Originally Posted by Moon Wizard View Post
    @Saagael, there is an Image.snapToGrid API.
    https://fantasygroundsunity.atlassia...age#snapToGrid

    Regards,
    JPG
    That's what I'm using, but it will snap to the nearest center, edge, or vertex. Based on the documentation, I can't tell it to only snap to a subset of those points.

  8. #8
    That's correct; it snaps to the nearest snap point as if you were dragging.

    Regards,
    JPG

  9. #9
    It'd be nice if it indicated if that snap point is an intersection, center or edge. That would be very useful for a number of reasons.

  10. #10
    Nice one!
    Savage Rifts© on Fantasy Grounds Store
    Ultimate Edition Fantasy Grounds - ONLY ON Linux
    Twitch Channel

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Fantasy Grounds Merchandise

Log in

Log in