Skip to content

FoundryVTT module that provides a number of enhancements for targetting.

License

Notifications You must be signed in to change notification settings

eadorin/target-enhancements

Repository files navigation

Target Enhancements -- FoundryVTT Module

THI MODULSE IS ABBANDONED USE INSTEAD Smart-Target

Why this module?

There are more than 100 modules in foundry vtt but for what concerns the targetting these are the main ones used:

So the scope of this module is to reduce the number of modules on your game and integrate them with each other and put together something that works (more or less, there is still some work to do).

Thanks to all the other developers who inspired this work.

I'm trying to make this module a upgrade of my favorite targetting module for all system 'Target Enhancements'.

NOTE

Another objective i will try to set up AFTER make it work this module is to build a module library for targetting on foundry system independent, in the specific a upgrade of this module lib-targeting always thanks to eadorin

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/eadorin/target-enhancements/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.

Color Settings

This module uses the color settings library like a dependency. It is a hard dependency and it is recommended for the best experience and compatibility with other modules.

FXMaster

This module uses the FXMaster library like a dependency. It is a hard dependency and it is recommended for the best experience and compatibility with other modules.

Custom Token Animations

This module uses the Custom Token Animations library like a dependency. It is a hard dependency and it is recommended for the best experience and compatibility with other modules.

Usage & features

  • Replaces the colored baubles for users targeting a token with their avatar. (Now with NPC Support!) It will fall back to token if an avatar is not supplied

  • Adds new "targeted token" indicators, including animations

New Targets

  • Adds a new button under "Basic Controls" to remove all of a user's current targets/selections

New Cancel Control

  • Allows the GM to select tokens () and then target other tokens as with the 'Alt' key button (ty to easy target)

New Target Inticators

  • Allows for easy targeting whilst holding alt. Also allows for alt+clicking inside an AoE to target all tokens within that AoE. Holding alt while placing a template will also target all tokens within that template when placed. (ty to easy target)

  • [Experimental][need more developing] If a token is not selected and you're the GM, you can use the <SHIFT> key + mousewheel to resize tokens

  • Add the choice on module settings for integration with Better Target

Better Target 1

Better Target 2

  • [Experimental][It's work but the chat a little ugly ] Write on the chat who is targeting whom, or who is being targeted by whom thanks to the lib-targetting library module

Settings

  • Display notification: Write on chat enabled (Need some developing)

  • Display notification: Write on chat but Hide name of npc/monster with "Unknown Creature" label

  • Display notification: Write on chat but show only to GM

  • Display notification: Write on chat to players but only when a player is targetting

  • Enable better target feature

  • Use player color for target indicator

  • Indicator FX: Apply Pulse Effect

  • Indicator FX: Apply Rotate Effect

  • Target indicator

  • Default Foundry Indicator

    • CrossHair 1
    • CrossHair 2
    • BullsEye 1
    • BullsEye 2
    • Better Target
  • [Experimental] Resize token with mousewheel

  • Enable target portraits

  • Enable color feature

    • Friendly color
    • Neutral color
    • Hostile color
  • Enable Colorblind-targeting features? (warning:ugly)

  • Enables a set of features to help those who are colorblind

  • Release Behaviour

Build

Install all packages

npm install

npm build scripts

build

will build the code and copy all necessary assets into the dist folder and make a symlink to install the result into your foundry data; create a foundryconfig.json file with your Foundry Data path.

{
  "dataPath": "~/.local/share/FoundryVTT/"
}

build will build and set up a symlink between dist and your dataPath.

npm run-script build

NOTE:

You don't need to build the foundryconfig.json file you can just copy the content of the dist folder on the module folder under modules of Foundry

build:watch

build:watch will build and watch for changes, rebuilding automatically.

npm run-script build:watch

clean

clean will remove all contents in the dist folder (but keeps the link from build:install).

npm run-script clean

TODO List / Known Issues / Limitations

  • [Feature][High Priority] Make it work with 0.8.X release.

  • [Bug][High Priority] I commented the "pulse" and "rotate" options on the "TargetIndicator" class because they broke foundry when i delete the token or change the scene. I will try tso fix this.

  • [Bug][High Priority] Show to others player the animated token marker of my targets (integration with game socket ?)

  • [Bug][High Priority] When i refresh the scene we lose all the target (integration with flag system ?)

  • [Bug]Switching Scenes or Deleting tokens while target locks up game

  • [Feature][Low priority] Adjust the display of the target token icons!! (currently uses a black outline + shadow)

  • [Feature][Low priority] Adjust size of target token icons

  • [Bug][High priority] When reload/refresh mantain the targets active

  • [Bug][High priority] Show to other player the PIXI.Graphics of targetted token

  • [Feature][Low priority] Make a customizable key for the selection of the targets for now is the 'Alt' button form easy target

  • [Feature][Low priority] Change the target image hover the tokens by using local image file (png,webm,ecc.), possible integration with Custom-Token-Animations

  • OTHER ISSUE CAN BE FOUND ON THE ISSUE PAGE

Issues

  • Users should report issues to the github issues. Reaching out on Discord is a good option as well, but please follow-up with a github issue
  • Try clearing all tokens using the new button before selecting/targeting other tokens. this should resolve most issues.

Any issues, bugs, or feature requests are always welcome to be reported directly to the Issue Tracker, or using the Bug Reporter Module.

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.

Credit

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

and of course a huge ty to all the developers of 'League of Extraordinary foundryvtt developers' for give me a hand every time i ask.

License

This Foundry VTT module, writen by Eadorin, is licensed under GNU GPLv3.0, supplemented by Commons Clause.

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