Comments (3)
I am working to implement this as a pull request, though I do not understand enough about Tactical Grid to know how to test the functionality. It is easy enough to merge and adjust the code from the DnD5e module and see that the events are firing. @Aedif Can you describe a scenario where this could be used from Token Action HUD and how I might test it? Also, which UI elements would be useful for firing the hover events; 'action', 'feat', 'item', and 'spell' seem obvious choices. Perhaps 'elementalBlast', 'familiarAttack' and 'strike' as well? Thank you.
from fvtt-token-action-hud-pf2e.
What Tactical Grid does is highlight the range of an item if it has one.
All I need from these hover events is the instance or reference to an Item
on mouseover, and for mouseleave it would suffice that it just fires.
Tactical Grid would be calling the following method on mouseover:
TacticalGrid.rangeHighlight(token, { item });
and this on mouseleave:
TacticalGrid.clearRangeHighlight(token);
With the hooks provided by the DnD5e version the module currently does this:
// Get the token the Action HUD has been opened for
let token;
Hooks.on('renderTokenActionHud', (hud, html, opts) => {
if (!itemRangeHighlightEnabled()) {
token = null;
return;
}
token = hud.token;
});
// Highlight Item range if it has one
Hooks.on('tokenActionHudSystemActionHoverOn', (event, item) => {
if (token) TacticalGrid.rangeHighlight(token, { item });
});
// Clear range highlight
Hooks.on('tokenActionHudSystemActionHoverOff', (event, item) => {
if (token) TacticalGrid.clearRangeHighlight(token);
});
I'd be nice to have these hooks fire for any item that could conceivably have a range. Tactical Grid's support is not completel for PF2e yet, but I will be improving it, so it'd be nice if some future proofing was in place and you registered these hooks for items with ranges even if TG is not currently showing them.
from fvtt-token-action-hud-pf2e.
Added in 1.5.5.
from fvtt-token-action-hud-pf2e.
Related Issues (20)
- 5.10.0 Weapon and Shield Support HOT 2
- Comparisons against 5.* system versions provide incorrect results in version 5.10.* HOT 3
- Incorrect labels & missing kineticist impulses following 2e system update HOT 6
- 'Blank ARMY' when no token selected HOT 2
- [Enhancement] Disallow Initiative Rolls After Combat Start HOT 1
- Spell casting does not use the proper rank as of PF2e 5.12.0
- Rolling initiative from the Attributes menu does not honor the roll dialog option as of PF2e 5.12.3 HOT 2
- Bug : Unable to cast spell from HUD since 5.12.x HOT 4
- Missing Toggles for various abilities HOT 16
- Versatile Unarmed strikes cannot have their damage types toggled. HOT 5
- HUD working for some PC's but not for others (PF2E) HOT 3
- [BUG] Shields Causing HUD to Stop Working HOT 30
- Token Action Hud won't open for players or NPCs - Console error: TypeError: Cannot read properties of undefined HOT 3
- Recovery Check opens perception check popup HOT 4
- Cannot read properties of undefined (reading 'filter') for Monster Tokens HOT 9
- Equipment tags aren't being shown on the actor sheet HOT 7
- Kineticist toggles no longer show up under Strike HOT 4
- Rolling initiative from Attributes rolls default skill instead of skill clicked. HOT 1
- Shift + Click does not change roll dialog behavior HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fvtt-token-action-hud-pf2e.