Giter Site home page Giter Site logo

jaltepeter / turnmarker Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 9.0 14.36 MB

Turn Marker is a module for Foundry VTT that adds an image under a token who is currently active in the combat tracker.

Home Page: https://brunhine.com/fvtt/turnmarker

JavaScript 86.24% HTML 13.67% Less 0.09%
foundry-vtt foundryvtt

turnmarker's Introduction

Turn Marker

Turn Marker is a module for Foundry VTT that adds an image under a token who is currently active in the combat tracker. This is completely system agnostic, and fully customizable to fit right into your game.

GitHub release (latest by date) GitHub latest version downloads

Twitter Follow Become a Patron Donate via Ko-Fi

Installation

It's always better and easier to install modules through in in app browser. Just search for "Turn Marker"

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://gitlab.com/brunhine/foundry-turnmarker/-/raw/master/turnmarker/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

Usage

The turn marker will move to the active token on their turn, and move with them as they move: example

Settings

Image ratio

The image ratio is related to the size of the token. 1 will be the same size as the active token, 2 will be double the size, etc.

Animate Marker

If enabled, the marker will use a rotational animation as defined by "Animation Speed" and "Animation Degrees".

Animation Speed

Defines in milliseconds how often the animation should apply a rotation. The lower the number the faster the animation.

Animation Degrees

Defines in degrees how much the marker should rotate on each tick.

Marker Image

Select from a number of included images provided by the Foundry Community:

Marker images by Rin

Runes of the Cultist Runes of Regeneration Runes of the Cosmos Runes of Earthly Dust
Runes of Reality Runes of Incendium Runes of the Believer Runes of the Mad Mage
Runes of the Blue Sky Runes of the Universe Runes of Prosperity

Custom Image Path

Sets the path to an image to be used instead of the included images

Announce Turns

If enabled, a chat message will be sent when the turn in combat changes (unless the combatant is hidden in the combat tracker).

Compatibility

Most recently tested on Foundry VTT version 0.5.5 (beta).

Feedback

All feedback and suggestions are welcome. Please contact me on Discord (Brunhine#2182).

Any issues, bugs, or feature requests are always welcome to be reported directly to the Issue Tracker

Support Development

Want to help improve the module? Send a pull request, or contact me on Discord (Brunhine#2182)

Want to show support another way? Recommend this module to other users and/or consider becoming a patron on Patreon or donating through Ko-Fi

Licensing

Turn Marker is a module for Foundry VTT by Jeremiah Altepeter and is licensed under a Creative Commons Attribution 4.0 International License.

This work is licensed under Foundry Virtual Tabletop EULA - Limited License Agreement for module development v 0.1.6.

The included images are created by Rin (rin#0002 on Discord)

turnmarker's People

Contributors

dependabot[bot] avatar devnagui avatar jaltepeter avatar kckaiwei avatar mikelococo avatar tmcclintock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

turnmarker's Issues

[BUG] Leaving ghost icons for start movement only on player side

Describe the bug
Players were left seeing ghost icons for movement start location. As the GM I code not see this, I had to have them send a snap. It appears that player view was not policing the graphic after turn change....
https://media.discordapp.net/attachments/729428633885737031/734481323288297482/Capture.JPG

Environment Details
Foundry VTT Version: Example 0.6.5
Turn Marker Version: Example 2.6.9

To Reproduce
Not sure, just normal play.

Expected behavior
A clear and concise description of what you expected to happen.
Start icons icons should clean up on next player/mob turn.

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

Additional context
Add any other context about the problem here.

Animate turn marker option doesn't save

Describe the bug
I have deselected the checkbox to animate the turn marker but when I save settings, and the application reloads, the checkbox is selected again and the turn marker animates.

Environment Details
Foundry VTT Version: 0.6.2
Turn Marker Version: 2.6.9

To Reproduce
Steps to reproduce the behavior:

  1. Open Configure Settings menu
  2. Click Module Settings
  3. Uncheck Animate Marker? in Turn Marker settings
  4. Save Settings
  5. After app reloads, open module settings and note that it is checked again and if you begin combat the marker animates

Expected behavior
Marker should not animate and setting should be saved

[BUG] Turn Marker order

Describe the bug
The turn marker designate the wrong actor during a new turn in the combat tracker. During each new turn the turn marker designate the first PC character created, not the first Actor on combat tracker

Environment Details
Foundry VTT Version: 0.6.2
Turn Marker Version: 2.6.9
Savage World Adventure : 0.9.0

Screenshots
image

Additional context
it s happen with Savage World Adventure System. The initiative don't use numeric system but a deck of playing card.

Feature Request: choose token name instead of actor name for Turn announcement

imported from GitLab: https://gitlab.com/brunhine/foundry-turnmarker/-/issues/22

Currently, Turn Marker uses the actor name of a token to announce its turn. The token name is used in the “xxxxx’s turn” chat, but it is shown as originating from the actor name.
This makes it difficult to obscure a token’s true identity during intrigue-style encounters. Can a setting be added to change this behavior depending on the GM’s needs?
Thanks!

[BUG] turn marker does not animate for the GM

Describe the bug
The turn marker doesn' animate for the GM but does for the player.
settings are the same for both (I checked)

Environment Details

  • Foundry VTT Version: 0.6.6
  • Turn Marker Version: 2.6.9

To Reproduce
Steps to reproduce the behavior:

  1. add actors to the combat
  2. Begin the combat
  3. check the current playre marker
  4. more to the next actor turn and check the turn marker again

Expected behavior
turn marker should animate if configured to do so

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

Additional context
Add any other context about the problem here.

Feature Request: Make Start Turn marker hidden when token is still in that square

imported from GitLab: https://gitlab.com/brunhine/foundry-turnmarker/-/issues/20

Feature Summary
When the token is still on the square, you can see the Start Turn Marker through the Current Turn marker. This is especially tricky because the default icons provided are mostly transparent. Using an icon based off of the original art, it is not too jarring, but if the colors or art style is different it can be noticeable.

User Experience
Ideally, the Start Tile would be hidden until the token moved away. When it does, the Start token would ideally be immediately visible (or after the move is completed, if necessary).
Note that it may be more important to have the start tile be immediately visible, than hidden when the square is occupied.

Priority/Importance
Low

[Feature]more options what is shown in chat

Is your feature request related to a problem? Please describe.
players shouldn't see the monsters name

Describe the solution you'd like
option to show only players (same as now just no monsters)
option to show players with name and picture but only picture of monster (no name or question marks)

[BUG]Turn marker appears before combat is started or initiative is rolled

Describe the bug
When creating an encounter, the turn marker is added to the first Actor in the encounter list, even if the Encounter has not been started, and initiative has not yet been rolled.

This makes it difficult to "pre-set" encounters, as the players may be able to see the turn marker through walls.

Environment Details
Foundry VTT Version: 0.6.4
Turn Marker Version: 2.6.9

To Reproduce
1: Add some Actors to a new encounter
2: The turn marker appears on the first actor in the encounter list

Expected behavior
Turn marker should not appear until the GM clicks "Begin Encounter"

[BUG] A error message on the browser console but the module seem work fine

Describe the bug

A error message appaer on the error browser console

Environment Details

Foundry VTT Version: 0.6.5
System Core: Dungeons and Dragons 5th Edition, version 0.93
Turn Marker Version: 2.6.9

To Reproduce

Steps to reproduce the behavior:
Just Move the token on the map, with or without a battle ongoing and afer a while this error show up.

_turnmarker.js:56 Uncaught (in promise) TypeError: Cannot read property 'token' of undefined
at turnmarker.js:56
at Function._call (foundry.js:2220)
at Function.call [as _furnace_original_call] (foundry.js:2205)
at Function.callOriginalFunction (Patches.js:57)
at Function. (Debug.js:42)
at foundry.js:10150
at Array.reduce ()
at Scene.updateEmbeddedEntity (foundry.js:10138)
at TokenLayer.updateMany (foundry.js:12852)
at TokenLayer.moveMany (foundry.js:12794)

Expected behavior
No errore on browser console

Screenshots
Image

Additional context

[Feature] Show who's the next visible Actor in the initiative

It would be very usefull to know not only whos turn currently is, but also whos the next player to play.
This would help players prepar for there turn or at least be alert.

I think this should be done in two steps

  1. the message that indicates whos turn is could also include whos next.
    Since it's possibl to hide actors from the initiative, I think it would make sence for this feature to only show the immediatelly next actor and only if they are visible in the initiative list.

  2. in order to give a better "alert" to the next players to play, It would be cool (if possible) to show an overlay notification in the center of the screen for the next player to alert it. Ideally, the notification would disapear automatically, but a "close" button would work too

  3. this last step is an extra. It would be great to have an End Turn button for the players, instead of having to have the DM fo this work all the time...

Notes: Plase consider the case where the current player is hidden and th next one is the player. The chat should show the next player anyway. I would suggest showing a turn chat msg for the "hidden monsters" anyway (which it doesnt at the moment) but show it has "unknow creature" or something like that.

[BUG] Unhandled `null` in updateCombat hook, Turn Marker not removed from previous combatant when switching to a tokenless combatant.

Describe the bug
In the hook for updateCombat starting at line 62 in turnmarker.js, an exception is thrown if a combatant has no token associated with it.

Environment Details
Foundry VTT Version: 0.7.5
Turn Marker Version: 2.6.9

To Reproduce
Steps to reproduce the behavior:

  1. Set up a combat
  2. run game.combat.addCombatant({ name: "DUMMY" });
  3. Move the turn to the dummy combatant.
  4. An uncaught exception is logged and the turn marker is not removed from the previous combatant until the next switch.

Expected behavior
The turn marker should be removed from the previous token, even if the next combatant has no token.

Screenshots
image

Additional context
I ran into this while developing a module that modifies the initiative behavior, but this occurs with no modules as well.

[BUG] Console errors when moving tokens w/o combatants in combat tracker

Describe the bug
Moving tokens when combat tracker is empty causes console errors

Environment Details
Foundry VTT Version: 0.7.7
Turn Marker Version: 2.6.9
All other modules deactivated
Happens in Chrome (86.0.4240.198) and Firefox (82.0.3)

To Reproduce
Move a token without having anyone in the combat tracker and check the console for errors

Expected behavior
No errors

Stack Trace
turnmarker.js:56 Uncaught (in promise) TypeError: Cannot read property 'token' of undefined
at turnmarker.js:56
at Function._call (foundry.js:2496)
at Function.call (foundry.js:2481)
at foundry.js:29906
at Array.reduce ()
at Scene.updateEmbeddedEntity (foundry.js:29893)
at TokenLayer.updateMany (foundry.js:12402)
at TokenLayer.moveMany (foundry.js:12344)
at KeyboardManager._handleMovement (foundry.js:3059)
at foundry.js:3028
(anonymous) @ turnmarker.js:56
_call @ foundry.js:2496
call @ foundry.js:2481
(anonymous) @ foundry.js:29906
updateEmbeddedEntity @ foundry.js:29893
updateMany @ foundry.js:12402
moveMany @ foundry.js:12344
_handleMovement @ foundry.js:3059
(anonymous) @ foundry.js:3028
setTimeout (async)
_onMovement @ foundry.js:3028
_handleKeys @ foundry.js:2805
_onKeyDown @ foundry.js:2760

[BUG] Shown targets not displaying correctly

Describe the bug
A clear and concise description of what the bug is.

Environment Details
Foundry VTT Version: 0.6.0
Turn Marker Version: 2.6.7

To Reproduce
Steps to reproduce the behavior:
player selects target
target not displayed to GM.

Expected behavior
When a player selects a target I am not seeing who they are targeting. I have disabled all the other modules and it seems to be this module that has the problem.

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

Additional context
Add any other context about the problem here.

[BUG] Compatibility with FXMaster

Describe the bug
When using TurnMarker and FXMaster, moving to a new turn causes the weather effect to reload. On reload, weather effects vanish and re-coalesce (as though the scene were reloaded). The effect is quite jarring.

Environment Details
Foundry VTT Version: 0.6.6
Turn Marker Version: 2.6.9

To Reproduce
Steps to reproduce the behavior:
_1. Enable the Turn Marker and FXMaster modules
2. Load a scene and turn on a fog effect in FXMaster
3. Start a combat encounter and move to the next turn
4. On each new turn, the weather effect reloads

Expected behavior
The process by which the TurnMarker moves the marker token should be able to avoid triggering the weather effect reload for FXMaster.

Screenshots
Not applicable

Additional context
Not applicable

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.