Open mclemente opened 5 months ago
Thanks for the report. Will investigate when back from vacation.
I can reproduce this issue. However, I do not yet know why it might happen.
@Larkinabout This issue is somehow related to static registerHandlebars ()
in Token Action HUD Core. This does not appear to be a TAH2e bug.
Specifically, commenting out the following Handlebar helper makes the issue go away: or: function () { return reduceOp(arguments, (a, b) => a || b) },
I don't really know what this means, but adding logging to "or", gives this when viewing a Breastplate (without any additional traits):
{ "0": null, "1": [], "2": [ "PF2E.ArmorTypeMedium", "+4 AC Bonus", "1 Dex Modifier Cap", "-2 Check Penalty", "-5 Speed Penalty" ], "3": { "name": "or", "hash": {}, "data": { "root": { "item": { "img": "icons/equipment/chest/breastplate-collared-steel.webp", "name": "Breastplate", "system": { "description": { "gm": "", "value": "<p>Though referred to as a breastplate, this type of armor consists of several pieces of plate or @UUID[Compendium.pf2e.equipment-srd.Item.pRoikbRo5HFW6YUB]{Half Plate} armor that protect the torso, chest, neck, and sometimes the hips and lower legs. It strategically grants some of the protection of plate while allowing greater flexibility and speed.</p>" }, "rules": [], "slug": "breastplate", "_migration": { "version": 0.925, "lastMigration": null, "previous": { "schema": 0.917, "foundry": "11.315", "system": "5.14.1" } }, "traits": { "otherTags": [], "value": [], "rarity": "common" }, "publication": { "title": "Pathfinder Player Core", "authors": "", "license": "ORC", "remaster": true }, "level": { "value": 0 }, "quantity": 1, "baseItem": "breastplate", "bulk": { "value": 2 }, "hp": { "value": 0, "max": 0 }, "hardness": 0, "price": { "value": { "gp": 8 } }, "equipped": { "carryType": "worn", "invested": null, "inSlot": true, "handsHeld": 0 }, "containerId": null, "size": "med", "material": { "type": null, "grade": null }, "identification": { "status": "identified", "unidentified": { "name": "Unusual Breastplate", "img": "systems/pf2e/icons/unidentified_item_icons/armor.webp", "data": { "description": { "value": "" } } }, "misidentified": {} }, "category": "medium", "group": "plate", "acBonus": 4, "strength": 3, "dexCap": 1, "checkPenalty": -2, "speedPenalty": -5, "runes": { "potency": 0, "resilient": 0, "property": [] }, "subitems": [], "specific": null }, "type": "armor", "flags": { "core": { "sourceId": "Compendium.pf2e.equipment-srd.Item.r0ifJfoz8aqf0mwk" } }, "effects": [], "folder": null, "sort": 0, "ownership": { "default": 0, "gd5uUSqED0vnZDop": 3 }, "_stats": { "systemId": "pf2e", "systemVersion": "5.14.3", "coreVersion": "11.315", "createdTime": 1704177749253, "modifiedTime": 1710477354108, "lastModifiedBy": "sH6NmMsgyYgpP1oQ" }, "_id": "WbqQMGW9cUmnNtUD" }, "description": "<p>Though referred to as a breastplate, this type of armor consists of several pieces of plate or <a class=\"content-link\" draggable=\"true\" data-uuid=\"Compendium.pf2e.equipment-srd.Item.pRoikbRo5HFW6YUB\" data-id=\"pRoikbRo5HFW6YUB\" data-type=\"Item\" data-pack=\"pf2e.equipment-srd\" data-tooltip=\"Armor Item\"><i class=\"fa-solid fa-shirt-long-sleeve\"></i>Half Plate</a> armor that protect the torso, chest, neck, and sometimes the hips and lower legs. It strategically grants some of the protection of plate while allowing greater flexibility and speed.</p>", "identified": true, "isCreature": true, "chatData": { "rarity": null, "description": { "gm": "", "value": "<p>Though referred to as a breastplate, this type of armor consists of several pieces of plate or <a class=\"content-link\" draggable=\"true\" data-uuid=\"Compendium.pf2e.equipment-srd.Item.pRoikbRo5HFW6YUB\" data-id=\"pRoikbRo5HFW6YUB\" data-type=\"Item\" data-pack=\"pf2e.equipment-srd\" data-tooltip=\"Armor Item\"><i class=\"fa-solid fa-shirt-long-sleeve\"></i>Half Plate</a> armor that protect the torso, chest, neck, and sometimes the hips and lower legs. It strategically grants some of the protection of plate while allowing greater flexibility and speed.</p>", "addenda": [], "override": null }, "material": null, "traits": [], "properties": [ "PF2E.ArmorTypeMedium", "+4 AC Bonus", "1 Dex Modifier Cap", "-2 Check Penalty", "-5 Speed Penalty" ] }, "selfEffect": null } }, "blockParams": [ null ], "loc": { "start": { "line": 2, "column": 10 }, "end": { "line": 2, "column": 66 } } } }
In the above, element 3 of the collection objects has a "name" of "or":
"3": { "name": "or", ...
I'd suspect that either Foundry or PF2e has its own or
handler that TAH Core is overriding with its own. When I first created the module I hadn't considered the uniqueness of handlebar helper function names. I'll have a look at renaming them when I'm back in a few days.
Armor tags ("medium armor", "+X to AC") aren't showing on actor sheet.
Reproduction steps: