Closed Larkinabout closed 5 months ago
I cannot view Discord.
All tests that I performed with shields work without issue. Will need more details.
From what I can glean it's related to Shield Ally and Shield Block. I'll ask anyone that has issues to post more info and hopefully error messages here.
Thanks.
The only thing you can do from the HUD is raise the shield or change grip, sheathe, drop, etc. Blocking is done via the chat options. I created a Champion with Shield Ally and do not see any obvious issues.
I've posted asking for input, so maybe we just leave this open for a while and see if anything comes in.
I run 2 servers.
On one server, the person has shield ally received at a higher level.. And I'm not able to replicate on there.. But, the one I run for PFS2e, that was the one where I had a person with a broken shield ally.. I dropped character to level 0, then back to level 7. And chose shield ally.. Drop a new shield on him. The moment I edit the shield HP, it drops to 0, and won't let me change it from 0. Turn off TAH-PF2e, and the shield behaves.. I haven't checked the differences between the 2 servers yet, since I'm at work to see what modules are selected in both.. But, I did test his character just now in the other world and it's working fine..
NotWorkingPackageList.json
WorksFinePackageList.json
fvtt-Actor-sapphire-acacia-root-lliQ3g8gZYSDt0Xd.json
Thanks for the additional information. I am unable to reproduce using the basic steps outlined. If you can double-check the following: Does this happen with the latest versions of PF2e System, Token Action HUD Core, and token Action HUD PF2e and no other modules enabled?
No.. But, I get an error about Socketlib.. The moment I enable socketlib -- the failure of shield ally kicks back in..
socketlib 1.0.13 -- Yet, verified on my other server that it's the same version..
When able, please provide the full error trace messages from the browser's console (F12 -> Console) and I can look further.
I don't have errors in the console, nor do I have a problem where the HUD stops working, but I can reproduce the issue where the shield HP drops to 0 after adjusting the shield HP value.
The problem is with this Rule Element:
{"itemType":"shield","key":"ItemAlteration","mode":"multiply","predicate":["item:equipped"],"property":"hp-max","value":1.5}
However, since no error is thrown, and because I have no immediate idea as to why this would cause a problem with Token Action HUD PF2e, I am not sure where to start looking.
I can confirm that disabling Token Action HUD PF2e resolves the issue of editing the HP, but I am not sure as to why this happens.
Even more confusingly, the issue does not happen with a test character that I created that is also a level 7 Champion with Shield Ally.
@Silvertower -- If you leave TAH PF2e on, but turn off Socketlib -- for me the shield works like one expects.. What about for you?
And, I still don't know why on one server it works and the other it doesn't.
Something is very, very wrong with Saphire's character, as best as I can find.
I created an identical character and everything works fine.
I would recommend re-building the character from scratch.
Attached is my export. Can you test importing this when able?
fvtt-Actor-sapphire-acacia-root-(new)-lakkPpUhMQU5S7Dm.json
My guess is that this character was exported and imported from different versions of PF2e system or other modules and something in JSON is bad or didn't get migrated correctly.
Hmm, I suspect, my export might have fixed it.. Since I exported to a different server and it works there.. Your import also works fine.. So, I don't have an original of his file.. So, I'm going to have to agree with you, there is something very wrong with his import of the character..
@Silvertower I imported the one you linked above, and the shield is still broken.. But not on my other server.
May have to wait till I have some free time.. Take a look at my settings for socketlib and TAH. Maybe one has something selected the other does not.
Also, here's the original json: fvtt-Actor-sapphire-level-7.json
It looks like I spoke too soon. I tried importing my exported version again and the shield is messed up again on the new character as well. The multiplier rule element is being applied multiple times or is multiplying the wrong number, etc. This didn't happen after fresh character creation, however. Very odd.
Every time the character is dragged onto a scene, the shield modifiers are multiplied, cumulatively.
Strangely, I have isolated the issue to the buildSpells() function in TAH2e. Investigating further.
Going down the rabbit-hole, the problem is from getTooltipData().
The issue is the following statement in getTooltipData() in action-handler.js:
await entity.getChatData()
As soon as the above is called, even if the data is not used in any way (e.g. just assigning the result to a variable), then shields become corrupted.
This is beyond my skillset to resolve, as I have tried several potential solutions, and nothing works for me.
@Larkinabout perhaps you have an idea.
As an interesting aside to the above, the section of code that triggers this is buildSpells(), which has nothing to do with shields.
The section of buildSpells() that calls getTooltipData() is contained in a rather strange (to me) construct of multiple types of maps:
const items = new Map(activeSpells.map(spell => [spell.id, spell]))
const actions = await Promise.all(
[...items].map(async ([itemId, itemData]) => {
...
const tooltipData = await this.#getTooltipData(actionType, itemData)
})
Oh just wanted to give an update.. My shield ally user in the other game on the other server, was working fine, until he tried to repair it back to full, then it went to 0 and effed up.. So, turning off the module so I can continue running
Also, I wonder if the 'Shield Ally' feat uses the 'spell effect' to apply the changes to shields.
Looking at shield ally: {"itemType":"shield","key":"ItemAlteration","mode":"multiply","predicate":["item:equipped"],"property":"hp-max","value":1.5} {"itemType":"shield","key":"ItemAlteration","mode":"add","predicate":["item:equipped"],"property":"hardness","value":2}
I have developed an ugly workaround for this issue. I will publish the fix sometime tomorrow, but I am going to leave this issue open until the root cause can be found and a permanent fix can be issued.
Having a similar issue; as a workaround for GMs, you can do the following with the rule elements for Shield Ally:
shield-ally-applied
.Example:
{
"key": "ItemAlteration",
"itemType": "shield",
"mode": "multiply",
"predicate": ["item:equipped", {
"not": "shield-ally-applied"
}],
"property": "hp-max",
"value": 1.5,
"priority": 110
}
{
"key": "ItemAlteration",
"itemType": "shield",
"mode": "add",
"predicate": ["item:equipped", {
"not": "shield-ally-applied"
}],
"property": "hardness",
"value": 2,
"priority": 111
}
{ "key": "RollOption", "option": "shield-ally-applied", "priority": 112 }
Might not help you fix the bug in the addon but it'll at least let GMs keep the addon loaded.
Thanks for sharing. At this point in time, I do not believe the bug is with TAH2e. But I don't have the time or knowledge to troubleshoot the root cause on the PF2e system side.
This issue is resolved in PF2e System 5.14.0 and later. The workaround mentioned above will be removed from Token Action HUD PF2e in the next release.
Fixed in Token Action HUD PF2e version 1.5.11.
Reported on Discord: https://discord.com/channels/170995199584108546/697845559435853865/1207226792725717002