ChasarooniZ / pf2e-rpg-numbers

Damage number pop ups as well as possible other similar combat visual addons for pf2e.
GNU General Public License v2.0
3 stars 4 forks source link

[Bug] Crit animations fail to work on PCs and skill checks, throws console errors #21

Closed MichalGolaszewski closed 7 months ago

MichalGolaszewski commented 7 months ago

Let me preface this with the fact that my world runs a lot of modules, so while I think the conflict is unlikely, it is not out of the question.


## My settings: ![image](https://github.com/ChasarooniZ/pf2e-rpg-numbers/assets/46850235/8512f7e2-3333-455e-a3b4-51a0f10b135c) ### This + Debug enabled

And here's what I was able to scrap from around my world about the issue:

All crits were forced using manual rolls (works on NPCs)

### An error thrown for PC attack roll ![image](https://github.com/ChasarooniZ/pf2e-rpg-numbers/assets/46850235/0baf1b85-2688-4399-a8f4-e93826547253)
#### Object logged beforehand: ``` { "msg": { "user": "pzY3m5I7G5fBoDSe", "type": 5, "content": "28", "sound": "sounds/dice.wav", "speaker": { "scene": "BDb75TAOyhTzNzte", "token": "8vaJtwdrRSXk6JcQ", "actor": "gmVVlKjQp0mMuG1M", "alias": "Altazar" }, "flavor": "

Cios Dystansowy: Łuk Krótki

\n
Cel: Altazar (19 KP)
\n
Wynik: Krytyczne Trafienie o +9
\n
Atak
Śmiercionośność k10Inkrement Zasięgu 60 stóp

Zręczność +4Wytrenowanie +4
", "flags": { "core": { "canPopout": true }, "pf2e": { "context": { "type": "attack-roll", "identifier": "slnivuJtWdC6HZ1l.shortbow.ranged", "action": "strike", "title": "Cios Dystansowy: Łuk Krótki", "actor": "gmVVlKjQp0mMuG1M", "token": "8vaJtwdrRSXk6JcQ", "origin": { "actor": "Actor.gmVVlKjQp0mMuG1M", "token": "Scene.BDb75TAOyhTzNzte.Token.8vaJtwdrRSXk6JcQ" }, "target": { "actor": "Actor.gmVVlKjQp0mMuG1M", "token": "Scene.BDb75TAOyhTzNzte.Token.8vaJtwdrRSXk6JcQ" }, "altUsage": null, "damaging": true, "domains": [ "shortbow-base-attack-roll", "bow-group-attack-roll", "slnivuJtWdC6HZ1l-attack", "shortbow-attack", "shortbow-attack-roll", "weapon-attack-roll", "ranged-attack-roll", "ranged-strike-attack-roll", "strike-attack-roll", "attack-roll", "attack", "check", "all", "trained-attack", "dex-attack", "dex-based" ], "options": [ "action:strike", "armor:base:leather-armor", "armor:category:light", "armor:equipped", "armor:group:leather", "armor:id:tDHCFo5mRsXugLVB", "armor:leather-armor", "armor:level:0", "armor:rarity:common", "armor:slug:leather-armor", "attack", "attack:advanced:rank:0", "attack:martial:rank:1", "attack:simple:rank:1", "attack:unarmed:rank:1", "attribute:cha:mod:-1", "attribute:con:mod:2", "attribute:dex:mod:4", "attribute:int:mod:1", "attribute:str:mod:1", "attribute:wis:mod:3", "class:ranger", "deadly-d10", "defense:heavy-barding:rank:0", "defense:heavy:rank:0", "defense:light-barding:rank:0", "defense:light:rank:1", "defense:medium:rank:1", "defense:unarmored:rank:1", "deity", "deity:primary:dranngvit", "deity:primary:favored-weapon:light-pick", "deity:primary:font:harm", "deity:primary:font:heal", "deity:primary:sanctification:can:unholy", "feat:additional-lore", "feat:animal-companion-ranger", "feat:beastmaster-dedication", "feat:crafters-appraisal", "feat:dwarven-lore", "feat:eye-for-treasure", "feat:hunted-shot", "feat:specialty-crafting", "feat:specialty-crafting:woodworking", "feat:tattoo-artist", "feature:clan-dagger", "feature:flurry", "feature:hunt-prey", "feature:hunters-edge", "grants-hunt-prey", "grants-hunt-prey:1", "hands-free:1", "hands-free:but-really:1", "heritage:ancient-blooded-dwarf", "hp-percent:97", "hp-remaining:33", "hunted-prey", "ignore-range-penalty:2", "item:ammo:id:dkFKE1by0hHoVfFL", "item:ammo:level:0", "item:ammo:slug:arrows", "item:base:shortbow", "item:bulk:1", "item:category:martial", "item:damage-dice:1", "item:damage:category:physical", "item:damage:die:faces:6", "item:damage:die:number:1", "item:damage:type:piercing", "item:equipped", "item:group:bow", "item:hands-held:1", "item:id:slnivuJtWdC6HZ1l", "item:level:0", "item:proficiency:rank:1", "item:range-increment:60", "item:ranged", "item:rarity:common", "item:reload:0", "item:shortbow", "item:slug:shortbow", "item:trait:deadly", "item:trait:deadly-d10", "item:type:weapon", "item:usage:hands:1+", "map:increases:0", "perception:rank:2", "proficiency:trained", "ranged", "save:fortitude:rank:2", "save:reflex:rank:2", "save:will:rank:1", "self:action:slug:strike", "self:action:trait:attack", "self:ancestry:dwarf", "self:armored", "self:creature", "self:deity:slug:dranngvit", "self:heritage:ancient-blooded-dwarf", "self:level:2", "self:mode:living", "self:signature:69cd0292-e8f5-5a94-99a2-1b87a1d1dbda", "self:size:2", "self:size:medium", "self:trait:dwarf", "self:trait:humanoid", "self:type:character", "skill:acr:rank:1", "skill:arc:rank:0", "skill:ath:rank:1", "skill:cra:rank:1", "skill:dec:rank:0", "skill:dip:rank:0", "skill:itm:rank:1", "skill:med:rank:1", "skill:nat:rank:1", "skill:occ:rank:0", "skill:prf:rank:0", "skill:rel:rank:1", "skill:soc:rank:1", "skill:ste:rank:1", "skill:sur:rank:1", "skill:thi:rank:1", "speed:land", "target", "target:action:slug:strike", "target:ancestry:dwarf", "target:armored", "target:creature", "target:deity:slug:dranngvit", "target:distance:0", "target:heritage:ancient-blooded-dwarf", "target:level:2", "target:mode:living", "target:range-increment:1", "target:signature:69cd0292-e8f5-5a94-99a2-1b87a1d1dbda", "target:size:2", "target:size:medium", "target:trait:dwarf", "target:trait:humanoid", "target:type:character" ], "notes": [], "dc": { "scope": "attack", "slug": "armor", "value": 19 }, "traits": [ "attack" ], "rollTwice": false, "substitutions": [], "dosAdjustments": {}, "mapIncreases": 0, "createMessage": true, "skipDialog": true, "rollMode": "gmroll", "outcome": "criticalSuccess", "unadjustedOutcome": "criticalSuccess", "isReroll": false }, "modifierName": "strike", "modifiers": [ { "slug": "dex", "label": "Zręczność", "domains": [], "modifier": 4, "type": "ability", "ability": "dex", "adjustments": [], "force": false, "enabled": true, "ignored": false, "source": null, "custom": false, "damageType": null, "damageCategory": null, "critical": null, "traits": [], "hideIfDisabled": false, "kind": "modifier", "predicate": [] }, { "slug": "proficiency", "label": "Wytrenowanie", "domains": [], "modifier": 4, "type": "proficiency", "ability": null, "adjustments": [], "force": false, "enabled": true, "ignored": false, "source": null, "custom": false, "damageType": null, "damageCategory": null, "critical": null, "traits": [], "hideIfDisabled": false, "kind": "bonus", "predicate": [] } ], "origin": { "actor": "Actor.gmVVlKjQp0mMuG1M", "uuid": "Actor.gmVVlKjQp0mMuG1M.Item.slnivuJtWdC6HZ1l", "type": "weapon", "rollOptions": [ "origin:action:slug:strike", "origin:action:trait:attack", "origin:type:character", "origin:signature:69cd0292-e8f5-5a94-99a2-1b87a1d1dbda", "origin:creature", "origin:level:2", "origin:heritage:ancient-blooded-dwarf", "origin:deity:slug:dranngvit", "origin:ancestry:dwarf", "origin:trait:dwarf", "origin:trait:humanoid", "origin:mode:living", "origin:armored", "origin:size:2", "origin:size:medium", "origin:item:type:weapon", "origin:item:id:slnivuJtWdC6HZ1l", "origin:item:shortbow", "origin:item:slug:shortbow", "origin:item:trait:deadly-d10", "origin:item:trait:deadly", "origin:item:rarity:common", "origin:item:level:0", "origin:item:equipped", "origin:item:hands-held:1", "origin:item:category:martial", "origin:item:group:bow", "origin:item:base:shortbow", "origin:item:bulk:1", "origin:item:usage:hands:1+", "origin:item:range-increment:60", "origin:item:reload:0", "origin:item:damage:type:piercing", "origin:item:damage:category:physical", "origin:item:damage:die:number:1", "origin:item:damage:die:faces:6", "origin:item:damage-dice:1", "origin:item:ranged", "origin:item:ammo:id:dkFKE1by0hHoVfFL", "origin:item:ammo:slug:arrows", "origin:item:ammo:level:0" ] } }, "df-chat-enhance": { "ChatTime": { "WorldTime": -43117326 } }, "foundryvtt-simple-calendar": { "sc-timestamps": { "id": "default", "timestamp": -43117326 } }, "pf2e-dorako-ux": { "userAvatar": { "name": "Altazar", "image": "https://foundryvtt.s3.us-west-2.amazonaws.com/website-media-dev/avatars/user-25053.jpg", "type": "avatar" }, "combatantAvatar": null, "tokenAvatar": { "name": "Altazar", "image": "worlds/nowa-sciezka/Postacie/Altazar_Token_v2.png", "type": "token", "scale": 1, "isSmall": false }, "actorAvatar": { "name": "Altazar", "image": "worlds/nowa-sciezka/Postacie/Altazar.png", "type": "actor" }, "wasTokenHidden": false } }, "rolls": [ "{\"class\":\"CheckRoll\",\"options\":{\"type\":\"attack-roll\",\"identifier\":\"slnivuJtWdC6HZ1l.shortbow.ranged\",\"action\":\"strike\",\"domains\":[\"shortbow-base-attack-roll\",\"bow-group-attack-roll\",\"slnivuJtWdC6HZ1l-attack\",\"shortbow-attack\",\"shortbow-attack-roll\",\"weapon-attack-roll\",\"ranged-attack-roll\",\"ranged-strike-attack-roll\",\"strike-attack-roll\",\"attack-roll\",\"attack\",\"check\",\"all\",\"trained-attack\",\"dex-attack\",\"dex-based\"],\"isReroll\":false,\"totalModifier\":8,\"damaging\":true,\"rollerId\":\"pzY3m5I7G5fBoDSe\",\"showBreakdown\":true,\"degreeOfSuccess\":3},\"dice\":[],\"formula\":\"1d20 + 8\",\"terms\":[{\"class\":\"Die\",\"options\":{},\"evaluated\":true,\"number\":1,\"faces\":20,\"modifiers\":[],\"results\":[{\"result\":20,\"active\":true}]},{\"class\":\"OperatorTerm\",\"options\":{},\"evaluated\":true,\"operator\":\"+\"},{\"class\":\"NumericTerm\",\"options\":{},\"evaluated\":true,\"number\":8}],\"total\":28,\"evaluated\":true}" ], "_id": "Ko5rc6dfqNCMBlmV", "timestamp": 1711443137354, "whisper": [ "pzY3m5I7G5fBoDSe" ], "blind": false, "emote": false } } ```
### Object logged on a nat20 NPC skill check (nothing happens in-game) ``` { "msg": { "user": "pzY3m5I7G5fBoDSe", "type": 5, "content": "22", "sound": "sounds/dice.wav", "speaker": { "scene": "BDb75TAOyhTzNzte", "token": "Xonl6dxECe9Q9mGx", "actor": "KSFGGxU3qxYJzWpe", "alias": "Morlok Łupieżca" }, "flavor": "Test Siły", "flags": { "pf2e": { "context": { "type": "" }, "origin": null }, "core": { "canPopout": true }, "df-chat-enhance": { "ChatTime": { "WorldTime": -43117326 } }, "foundryvtt-simple-calendar": { "sc-timestamps": { "id": "default", "timestamp": -43117326 } }, "pf2e-dorako-ux": { "userAvatar": { "name": "Morlok Łupieżca", "image": "https://foundryvtt.s3.us-west-2.amazonaws.com/website-media-dev/avatars/user-25053.jpg", "type": "avatar" }, "combatantAvatar": null, "tokenAvatar": { "name": "Morlok Łupieżca", "image": "modules/pf2e-abomination-vaults/assets/bestiary-tokens/ch-02/morlock-scavenger.webp", "type": "token", "scale": 0.8, "isSmall": true }, "actorAvatar": { "name": "Morlok Łupieżca", "image": "modules/pf2e-abomination-vaults/assets/bestiary-portraits/ch-02/morlock-scavenger.webp", "type": "actor" }, "wasTokenHidden": false } }, "rolls": [ "{\"class\":\"Roll\",\"options\":{},\"dice\":[],\"formula\":\"1d20 + 2\",\"terms\":[{\"class\":\"Die\",\"options\":{},\"evaluated\":true,\"number\":1,\"faces\":20,\"modifiers\":[],\"results\":[{\"result\":20,\"active\":true}]},{\"class\":\"OperatorTerm\",\"options\":{},\"evaluated\":true,\"operator\":\"+\"},{\"class\":\"NumericTerm\",\"options\":{},\"evaluated\":true,\"number\":2}],\"total\":22,\"evaluated\":true}" ], "_id": "cgDNCxkGqBZWEz6o", "timestamp": 1711441917318, "whisper": [], "blind": false, "emote": false } } ```
### Object logged on nat20 PC skill check (nothing happens in-game): ``` { "msg": { "user": "pzY3m5I7G5fBoDSe", "type": 5, "content": "22", "sound": "sounds/dice.wav", "speaker": { "scene": "BDb75TAOyhTzNzte", "token": "IRp70kwtETmsWEU8", "actor": "vDcoC8iYaRJfgZ1s", "alias": "Luigios" }, "flavor": "

Test Umiejętności: Przyroda


Mądrość +2Niewyszkolenie +0
", "flags": { "core": { "canPopout": true }, "pf2e": { "context": { "actor": "vDcoC8iYaRJfgZ1s", "token": "IRp70kwtETmsWEU8", "origin": { "actor": "Actor.vDcoC8iYaRJfgZ1s", "token": "Scene.BDb75TAOyhTzNzte.Token.IRp70kwtETmsWEU8" }, "target": null, "type": "skill-check", "identifier": null, "domains": [ "nature", "wis-based", "skill-check", "wis-skill-check", "all", "check", "nature-check" ], "dc": null, "notes": [], "options": [ "armor:base:full-plate", "armor:category:heavy", "armor:equipped", "armor:full-plate", "armor:group:plate", "armor:id:fGK8Ca4HiGxbMsfp", "armor:level:2", "armor:rarity:common", "armor:slug:full-plate", "armor:trait:bulwark", "attack:advanced:rank:0", "attack:martial:rank:1", "attack:simple:rank:1", "attack:unarmed:rank:1", "attribute:cha:mod:0", "attribute:con:mod:1", "attribute:dex:mod:0", "attribute:int:mod:3", "attribute:str:mod:4", "attribute:wis:mod:2", "check:statistic:nature", "check:type:skill", "class:magus", "defense:heavy-barding:rank:0", "defense:heavy:rank:1", "defense:light-barding:rank:0", "defense:light:rank:1", "defense:medium:rank:1", "defense:unarmored:rank:1", "feat:armor-proficiency", "feat:battle-medicine", "feat:continual-recovery", "feat:expansive-spellstrike", "feat:fleet", "feat:general-training", "feat:medic-dedication", "feat:risky-surgery", "feature:arcane-cascade", "feature:arcane-spellcasting-magus", "feature:conflux-spells", "feature:hybrid-study", "feature:inexorable-iron", "feature:spellstrike", "hands-free:0", "hands-free:but-really:0", "heritage:versatile-human", "hp-percent:100", "hp-remaining:26", "origin:ancestry:human", "origin:armored", "origin:caster", "origin:caster:tradition:arcane", "origin:creature", "origin:effect:light", "origin:effect:przychylność-pharazmy", "origin:heritage:versatile-human", "origin:level:2", "origin:mode:living", "origin:shield:equipped", "origin:signature:ae54114d-c63b-53ef-80db-9cbc69e236b4", "origin:size:2", "origin:size:medium", "origin:trait:human", "origin:trait:humanoid", "origin:type:character", "perception:rank:1", "proficiency:untrained", "save:fortitude:rank:2", "save:reflex:rank:1", "save:will:rank:2", "self:ancestry:human", "self:armored", "self:caster", "self:caster:tradition:arcane", "self:creature", "self:effect:light", "self:effect:przychylność-pharazmy", "self:heritage:versatile-human", "self:level:2", "self:mode:living", "self:shield:equipped", "self:signature:ae54114d-c63b-53ef-80db-9cbc69e236b4", "self:size:2", "self:size:medium", "self:trait:human", "self:trait:humanoid", "self:type:character", "skill:acr:rank:0", "skill:arc:rank:1", "skill:ath:rank:1", "skill:cra:rank:0", "skill:dec:rank:0", "skill:dip:rank:0", "skill:itm:rank:0", "skill:med:rank:2", "skill:nat:rank:0", "skill:occ:rank:1", "skill:prf:rank:0", "skill:rel:rank:1", "skill:soc:rank:1", "skill:ste:rank:1", "skill:sur:rank:0", "skill:thi:rank:0", "speed:land" ], "rollMode": "roll", "skipDialog": false, "rollTwice": false, "substitutions": [], "dosAdjustments": {}, "traits": [], "title": "Test Umiejętności: Przyroda", "createMessage": true, "isReroll": false, "outcome": null, "unadjustedOutcome": null }, "modifierName": "nature", "modifiers": [ { "slug": "wis", "label": "Mądrość", "domains": [ "nature", "wis-based", "skill-check", "wis-skill-check", "all" ], "modifier": 2, "type": "ability", "ability": "wis", "adjustments": [], "force": false, "enabled": true, "ignored": false, "source": null, "custom": false, "damageType": null, "damageCategory": null, "critical": null, "traits": [], "hideIfDisabled": false, "kind": "modifier", "predicate": [] }, { "slug": "proficiency", "label": "Niewyszkolenie", "domains": [ "nature", "wis-based", "skill-check", "wis-skill-check", "all" ], "modifier": 0, "type": "proficiency", "ability": null, "adjustments": [], "force": false, "enabled": true, "ignored": false, "source": null, "custom": false, "damageType": null, "damageCategory": null, "critical": null, "traits": [], "hideIfDisabled": false, "kind": "bonus", "predicate": [] }, { "slug": "przychylność-pharazmy", "label": "Przychylność Pharazmy", "domains": [ "nature", "wis-based", "skill-check", "wis-skill-check", "all" ], "modifier": 2, "type": "status", "ability": null, "adjustments": [], "force": false, "enabled": false, "ignored": true, "source": "Actor.vDcoC8iYaRJfgZ1s.Item.jcQ1dNiPODx8GyiB", "custom": false, "damageType": null, "damageCategory": null, "critical": null, "traits": [], "hideIfDisabled": false, "kind": "bonus", "predicate": [ "Prophetic Vision" ] } ] }, "df-chat-enhance": { "ChatTime": { "WorldTime": -43117326 } }, "foundryvtt-simple-calendar": { "sc-timestamps": { "id": "default", "timestamp": -43117326 } }, "pf2e-dorako-ux": { "userAvatar": { "name": "Luigios", "image": "https://foundryvtt.s3.us-west-2.amazonaws.com/website-media-dev/avatars/user-25053.jpg", "type": "avatar" }, "combatantAvatar": null, "tokenAvatar": { "name": "Luigios", "image": "worlds/nowa-sciezka/Postacie/Luigios_Token_v2.png", "type": "token", "scale": 1, "isSmall": false }, "actorAvatar": { "name": "Luigios", "image": "worlds/nowa-sciezka/Postacie/Luigios_v2.png", "type": "actor" }, "wasTokenHidden": false } }, "rolls": [ "{\"class\":\"CheckRoll\",\"options\":{\"type\":\"skill-check\",\"action\":null,\"domains\":[\"nature\",\"wis-based\",\"skill-check\",\"wis-skill-check\",\"all\",\"check\",\"nature-check\"],\"isReroll\":false,\"totalModifier\":2,\"damaging\":false,\"rollerId\":\"pzY3m5I7G5fBoDSe\",\"showBreakdown\":true},\"dice\":[],\"formula\":\"1d20 + 2\",\"terms\":[{\"class\":\"Die\",\"options\":{},\"evaluated\":true,\"number\":1,\"faces\":20,\"modifiers\":[],\"results\":[{\"result\":20,\"active\":true}]},{\"class\":\"OperatorTerm\",\"options\":{},\"evaluated\":true,\"operator\":\"+\"},{\"class\":\"NumericTerm\",\"options\":{},\"evaluated\":true,\"number\":2}],\"total\":22,\"evaluated\":true}" ], "_id": "IFTlOG8dMLjgKMJU", "timestamp": 1711442018571, "whisper": [], "blind": false, "emote": false } } ```

Additionally even on a successfull NPC crit attack animation, the following warnings get logged: image

MichalGolaszewski commented 7 months ago

Update: Confirmed it to be the case, even if PC crits are set to use Token arts, instead of portraits

ChasarooniZ commented 7 months ago

Hi, try again on newest update and let me know if you have issues (11.9.3).

The warning you're seeing shouldn't be an issue, as I am aware of it, and am working to find a better wah to access said data that will work for future updates.

MichalGolaszewski commented 7 months ago

Thank you, works like a charm now :)

The warning you're seeing shouldn't be an issue, as I am aware of it, and am working to find a better way to access said data that will work for future updates.

Yeah, that's fair. Just wanted to note anything of use, while I was at it.