espositos / fvtt-tokenactionhud Goto Github PK
View Code? Open in Web Editor NEWCreating a token action HUD module for Foundry VTT
Creating a token action HUD module for Foundry VTT
It seems that every time you leave the game and come back to it, you have to set this manually to Core 5e and then back to Better Rolls in order for it to work again.
This seemed fine this morning, so it must have happened in the latest update.
My group and I play Pathfinder 2e and the list of skills being abbreviated is confusing to go through unless you know it really well. Could there be an option to expand everything to its full name?
Hello, I've noticed some odd behavior when using Minor Quality of Life in conjunction with BetterRolls and Token Action Hud. MQoL recently added the ability to display the Token name in chat messages, rather than the Actor name. It seems to work perfectly with BetterRolls when rolling from the sheet, the rolls are displayed correctly and the names display the Token name. However, when pulling the BetterRolls item down to the Macro bar, or rolling from the Action Hud, it doesn't display the correct name. I think this comes down to the way BetterRolls is finding the proper Actor, but I'm not sure. I've attached a screenshot that hopefully better illustrates what I mean. In the screen shot when Richard was selected Action Hud rolled as Howard, when Howard was selected it rolled as Carl, and when Carl was selected it rolled as Richard. I can't seem to find how or why it's selecting the token's name. I'm happy to do more specific tests or get you more info if you need. Thanks!
More info I just noticed. When dragging a BetterRolls macro to the bar it uses this syntax,
BetterRolls.quickRollById("R4UI2BDw4xiqlakQ", "TjppHCK64yTIB5sF");
Where the first value is the actor ID, and the second is the item ID I think. If you do this instead,
BetterRolls.quickRollByName("Howard", "Bite");
Using the Token name and the item name it seems to work fine. I don't know if there's a way to make ActionHud have an option to have its macros use the Token name of the selected token instead of the Actor name, or if this is something that should be brought up with the author of BetterRolls.
The Magic Items module allows you to add spells on magic items - however, since they're not part of the normal spellbook, they aren't registered anywhere.
I have no idea how feasible it is, but it would be really neat if TAHUD could somehow pick up on the existence of those spells and display them somewhere, possibly with an indicator of what item they came from.
Module not functioning with any tokens in 5E. Regardless of whether there are other modules installed or not, this error in console when any token is clicked:
dnd5e-actions.js:121 Uncaught (in promise) TypeError: Cannot read property 'abilityActivationTypes' of undefined
at ActionHandler5e._getActiveEquipment (dnd5e-actions.js:121)
at ActionHandler5e._getItemList (dnd5e-actions.js:73)
at ActionHandler5e.doBuildActionList (dnd5e-actions.js:26)
at ActionHandler5e.buildActionList (actionHandler.js:38)
at TokenActionHUD.updateHud (tokenactionhud.js:258)
I understand there's a compatibility risk for the module with the latest version, unsure if this is related or if there is another bug at work here.
Thanks!
HUD isn't showing up for NPCs any longer.
Detail of the world:
Foundry Virtual Tabletop, version 0.6.4
System Core: Dungeons and Dragons 5th Edition, version 0.92
Modules Installed: VTTA PArty , version 2.2.2 + Token Action HUD, version 0.2.4
Description of the issue:
First of all ty for the great module.
Maybe i just to paranoid, but when see a "Magnifying glass" icon i think to " Passive Investigation", but it's seem you using that icon for the "Passive Perception" ?
For make more clear i put a image with the VTTA Party popout and Token Action HUD popout for a simple Acolyte NPC
So the "wrong icon" make me to think a "Passive Investigation" of 12 not 10.
The default icons of Foundry VTT are the following:
If it's not to much trouble is good to use the default icons of Foundry, and i will very happy if i can see all three passive icon on your hover popout.
Greetings.
Not sure if this is possible or not. It would help minimize the need to open the character sheet for spell casters if any spell they clicked on in the HUD was expended on click.
For prepared casters, this would have to interact with the expend spell function of the character sheet to strike through the spell.
For spontaneous spell casters, it would deduct from spells / day of that level.
Windows 10, Foundry 0.6.5, DnD5e 0.94, Token Action HUD 0.5.9 (Using Minor QoL.)
When click into HUD (target(s) chosen and current character selected):
If I use a weapon for attacking - things go as planned (attack/damage applied/etc).
If I cast a spell from Spellbook - things go as planned (Templates/damage applied/etc).
If the item has charges and spells attached on Magic Item tab and I cast the spell from the "Magic Items" pulldown of the HUD - the spell is cast as a card (as if not using QoL). The charge seems to be tabulated, but the spell does not go off through QoL the same way it does as if it were cast as a regular spell from the Spellbook tab.
Example: Trying to use a magical wand that has 3 charges per day and can cast Cure Wounds using 1 charge. The spell for the Cure Wounds shows up in the HUD. If I click it, the spell 'fires' and I get a [Cure Wounds] card pop up with a second box allowing me to click the [damage] (healing) roll for it. This is not automated, nor does it apply the healing (even if I do click it) as it would be if I had Cure Wounds in my Spellbook and cast it from there (which DOES work). It does show that a change has been spent, though.
Not sure if I have overlooked something, or if there is a slight disconnect when casting from an item as opposed to casting from 'just a spell'.
Attached a screenshot of casting a healing spell from the Spells tab on HUD vs casting a healing spell from under Magic Items.
When I have no normal 2nd level spell slots remaining 2nd level spells do not display even though I have 2nd level pact slots remaining, this also applies to lower level spells (I have 2nd level pact slots, but no normal spell slots remaining, level 1 and level 2 spells do not display in the action hud)
Hello, I'm not sure this is a bug but based on my reading of the setting in question it isn't working right. This is in 5e D&D. I have the Show HUD Title option selected and it is displaying the Actor that the token represents, and not the Token's name. If it's possible to have an option to display the token name instead of the Actor name that might be useful to some folks.
Allow for the user to translate the text in the HUD so my players can use it without having to ask everytime, making it unusable
This is a weird request, probably, but possibly something others want if you want to take the time to provide the option.
Currently the HUD has the relocate handle on the left and populates buttons from left to right, top to bottom.
An option to mirror the HUD horizontally would put the relocate handle on the right and populate buttons from right to left (making it easier to locate on the right side of the screen).
An option to mirror the HUD vertically would populate bottoms from bottom to top (making it easier to locate on the bottom of the screen).
Personally I often find myself wanting to locate the HUD in the bottom right corner of my screen to be closer to where the chat action is, but a modular approach to the settings would allow for more scenarios that others might prefer.
I was wonder if there would ever be a support format for this module, as it does not update after using ammo and such.
Both can be supported in a new last tab in the HUD.
For 5E, buttons Gain Inspiration and Spend Inspiration. You can spend only if you have one.
For PF2, value of the Hero Points (0-3), and Gain Hero Point and Use Hero Point buttons. You can spend only if you have at least one.
Currently the Spell section only shows spells that are marked as prepared, but Cantrips can't be prepared on any of the character sheets that I've seen, so perhaps they should be placed into their own category or otherwise be somehow flagged as always prepared by Token Action HUD so that they'll show in the Spells section.
Hello, I'd like to say first that I think this is an excellent module, but I noticed a little issue when hovering over a button. The buttons would all jump a couple of pixels as the border was added to the hovered button. I fixed it by just adding a transparent border around the buttons instead of leaving it as none when not hovering. I included the tweaked style below, I don't know much about web design so I don't know if this has other negative effects elsewhere. Anyway, thanks for all your great work on the module!
.tah-title-button {
width: auto;
height: auto;
color: #fff;
background: rgba(52, 52, 52, 0.95);
padding: 3px;
margin: 3px;
border: 1px solid transparent;
cursor: pointer;
}
Resources aren't being consumed when you use them through the token action hud, for example Longbow using arrows, or wand of fireballs
When I update NPCs attacks that I have imported from compendiums the changes don't show up in the HUD. Specifically, Since only the Strikes have their actual values displayed, they are the only ones I can see. The changes DO actually work however.
In the image below the War Flail should be +12 (which it does roll appropriately) but the HUD only displays the original +10. Also, completely new strike entry don't display that data at all but do roll correctly.
Also, any new, custom created NPC shows up just like the new entry (undefined) but does in fact work.
I believe you're still working on incorporating it for NPC so I just thought I would list this.
Per nikolaj-a I developed a script for setting rollOptions for Sneak Attack dice and one for the player to toggle the 'flat-footed' condition to roll Sneak Attack. nikolaj-a helped me develop these scripts which are essentially his code for making rollOptions with a little bit of feedback for the player. So first they use the following macro to set their Sneak Attack dice:
https://github.com/Valdacil/FoundryPF2EMacros/blob/master/Sneak.Attack.Set.Dice.Player.js
Then use the following macro to toggle 'flat-footed' rollOption so Foundry rolls Sneak Attack with the damage:
https://github.com/Valdacil/FoundryPF2EMacros/blob/master/Sneak.Attack.Toggle.Player.js
This was all working a day or two ago. Tonight while trying to run the game my player could not get Foundry to roll Sneak Attack in the way described by nikolaj-a. Using console.log(actor) on his token showed that the damageDice for Sneak Attack was present conditional on 'flat-footed' and rollOption 'flat-footed' = TRUE, so it should have been rolling Sneak Attack, but wasn't. After the session I disabled Token Action Hud and Sneak Attack immediately started working as nikolaj-a described. So it appears to be an interaction when TAH is enabled that blocked the rollOptions from working properly.
Unlike player actors, monster skills appear as abbreviated values. Also, skills that are not defined in a monster still appear on the Skills list.
Everything had been working well previously, but today only the Skills/Checks/Utility buttons do anything. The other buttons for Inventory/Spells/Features do nothing when clicked if I have Better Rolls set as the roll handler. If I change the setting to using Core 5E or Minor QoL, the buttons work again (although curiously on my test subject, an Acolyte from the SRD Monsters, clicking the spell Light through Token Action HUD doesn't do anything, but the other spells work).
I verified that Better Rolls still works through the character sheet buttons. I also verified that the problem persists when only Token Action HUD, Better Rolls, and Tidy UI Settings are enabled.
If an on-the-fly modifier needs to be added to a roll there’s no current way to do that.
However since the “shift” key isn’t mapped I’m requesting that it be added.
When the “shift” key is depressed TAHUD should simply display the standard roll dialog (with the entry field for modifiers and the regular buttons).
When using Better Rolls configured to show a save dc with an attack, the save DC does not appear on the roll. Triggering the roll normally via the character sheet shows the save DC. Using the hud link does not.
FVTT 0.6.5:
TAHUD 0.5.9
Error:
foundry.js:2222 Foundry VTT | Error thrown in hooked function
_call @ foundry.js:2222
foundry.js:2223 TypeError: this.actions.isLinkedCompendium is not a function
at TokenActionHUD.isLinkedCompendium (tokenactionhud.js:508)
at init.js:104
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 Compendium._render (foundry.js:3902)
Tried removing all mods and it still doesn't work. I deleted the mod and reinstalled and it still doesn't work.
Better Rolls allows you to roll with several modifiers - none for default, shift for advantage, ctrl for disadvantage, and alt for an secondary roll that you can customize.
Currently, Token Action Hud will always use the secondary roll as if alt is pressed. This secondary roll will still interact appropriately with shift and ctrl but the default roll cannot be activated. Holding alt has no effect. The intended functionality would be for a secondary toll to only be activated if alt is pressed.
After right-clicking on the token to bring up the action hud, clicking anywhere else does not cause the action hud to disappear, although the core player hud dissapears.
Detail of the world:
Foundry Virtual Tabletop, version 0.6.4
System Core: Dungeons and Dragons 5th Edition, version 0.92
Modules Installed: Token Action HUD, version 0.2.10
Description of the issue:
On the configuration of the module i checked the checkbox "Show all non-preparable spells", but it's seem not show the spell if i'm not set "Prepared" on the details of the spell.
When i set "Prepared" the tab spell show and work like expected.
There are some things in the HUD that still need translation, I'm using the file I created on #23 for the screencaps
Item names are shown properly (I have some in english)
And somehow it is translating "Save" to "Guardar" (which is correct, just, not here, it should be "Tiradas de salvación", or something shorter 😄 )
Monster attacks are different from player strikes and do not populate on HUD. Devteam might make the uniform at some point in the future but for now, monster attacks are a legacy format that needs to be specially supported.
Right now the HUD displays the text "(Recharge)" after features that need to recharge, but it would be amazing if there was a way to roll that recharge from within the HUD rather than having to open the character sheet. Maybe middle mouse button on the Recharge text?
Handling skill checks and saving throws for multiple tokens is currently a slow process: select each one individually, navigate to the proper token action, click (the details here may be different depending on what kind of rolling framework you use, I use BeterRolls, which means it's one click and it rolls).
I wonder if it's possible to display Token Action HUD, limited to checks and saves, for multiple token selection, and then allow them to roll their checks simultaneously (with the same advantage/disadvantage setting for all rolls)?
Token Action HUD already supports PF2 spellbooks, and recognizes level slots and focus points to display their number in the header of each action list inside Spells. This can be taken a step further to add a system block at the beginning of each spell level or spellbook that allows the user to manually change focus points remaining or spell slots remaining per level inside a spellbook.
Why this is needed? Unlike 5E, PF2 doesn't yet have a step before posting a spell in the chat that allows to consume that spell or spell slot or focus point related to that spell. This means while the player can enjoy the Action HUD he must go into the inventory to remove the spell slot. Naturally players forget to dot his in their own favor.
How it looks? For any spellbook level that uses focus point or spell slots, create a brick that contains icons to + and - a value between it. This way the user can manually tweak the value without opening their character sheet.
What about prepared spells? Using prepared spells is a bit different and can be done by adding a X button inside the brick of a spell so the player consumes it manually after he posts the spell in the chat to cast it.
The word "actiosn" should be corrected to "actions".
Line that should be corrected:
fvtt-tokenactionhud/lang/en.json
Line 79 in 0662a1f
If I use Better Rolls as the HUD roll handler, target a token, and cast Cure Wounds through the Token Action HUD, hit points are subtracted from the targeted token instead of added to them.
Casting the same spell through the character sheet properly adds hit points for healing. If I switch the HUD roll handler to Minor QOL or Core 5E, the healing is also treated correctly and adds hit points to the targeted token. Only using Better Rolls through the HUD seems to cause the problem.
I just updated to beta version 0.6.5. Now, my clicks are not triggering any actions/rolls. The mouseover still opens up the HUD and sub-menus, but I can't roll anything from the HUD.
It's possible that the timing is coincidental and that the underlying cause is incompatibility with another module. But I'm not aware of anything.
Edit: I believe that it's an incompatibility with the Better Rolls module, because it rolls to the Core 5e roller correctly.
During today's session players brought to me that the HUD doesn't have tab for Player Actions, a tab in the character sheet that lists actions (usually attack, but also dragged ones like Battle Medicine) from the Actions compendium.
System: Pathfinder 2E
Token Action HUD v0.3.0
If a strike MAP results in a negative number, there are 2 minus signs preceding the number instead of just one.
Currently in PF2E TAH shows the list of spells the character has memorized. However, if you click the button, it outputs the entire spell text into chat along with the Attack and Damage buttons if applicable. My players don't like a huge wall of text dump to chat and thus are still rolling spells from the character sheet. I don't know if it is possible, but potential enhancement for spells would be to show the Attack/Damage buttons (as applicable) with the spell in the HUD.
Would love to see the shift-click functionality to allow additional modifiers be added to the damage buttons for attacks as well. Currently only available for the strike buttons. Also, really love this mod! Thanks for making it. :)
If I try to activate a feat with 0/1 uses remaining through the Tidy 5E character sheet, I receive an error across the top of the scene reading "No charges left" and nothing is sent to the chat window for that feat.
It would be very nice if Token Action HUD could replicate that behavior rather than sending the feat to chat as though it had uses left.
Also it would be nice if the [2/2] style of notation after an item with limited uses would display [0/2] when all uses are expended. Currently it disappears if no uses remain, but showing it as [0/2] would be a nice quick visual reminder that the resources have been all used up.
Hi, Id love to see a built in Pathfinder 2e support! The categories could be essentially the same as they are set in DnD 5e honestly.
This can be confusing for players, as "feats" are a separate thing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.