moo-man / WFRP4e-FoundryVTT

The premiere system for running grim and perilous games of Warhammer Fantasy Role-play in the Foundry VTT environment.
Apache License 2.0
89 stars 52 forks source link

[Death on the Reik] Size and Damage calculations breaks equipping vehicle weapon #1854

Closed moo-man closed 4 months ago

moo-man commented 9 months ago

From MooMan's homebrew options, have "Size and Damage calculations" active breaks equipping vehicle weapons. You can drag weapons onto the sheet but cannot click "equip" I tried this on several types of boat, and with several weapons
From: .simonius
foundry: 11.315
wfrp4e: 7.0.3
wfrp4e-altdorf: 4.0.1
wfrp4e-archives1: 4.0.2
wfrp4e-archives2: 4.0.2
wfrp4e-core: 4.0.2
wfrp4e-dotr: 4.0.2
wfrp4e-eis: 4.0.1
wfrp4e-empire-ruins: 4.0.2
wfrp4e-horned-rat: 4.0.2
wfrp4e-middenheim: 4.0.2
wfrp4e-owb1: 4.0.2
wfrp4e-pbtt: 4.0.2
wfrp4e-rnhd: 4.0.1
wfrp4e-salzenmund: 4.0.1
wfrp4e-starter-set: 4.0.0
wfrp4e-ua1: 4.0.1
wfrp4e-ua2: 4.0.2
wfrp4e-up-in-arms: 4.0.1
wfrp4e-wom: 4.0.1
wfrp4e-zoo: 4.0.1
Active Modules: ATL, adventuremusic, ambiences-vol-1-michael-ghelfi, ambiences-vol-2-michael-ghelfi, ambiences-vol-3-michael-ghelfi, ambiences-vol-4-michael-ghelfi, ambiences-vol-5-michael-ghelfi, ambiences-vol-6-michael-ghelfi, compendium-navigator, cursor-hider, dice-so-nice, dungeon-draw, forge-vtt-shared-compendiums-wfrp-custom-1, forien-quest-log, foundry-ready-big-city-slums-1-levels-and-flats, foundry-ready-dock-town, foundry-ready-gothic-mansion, foundry-ready-medium-city-1, foundry-ready-medium-city-2, foundry-ready-sewers, foundry_community_macros, healthEstimate, hide-gm-rolls, initiative-double-click, lib-wrapper, louder-whispers, monks-combat-marker, multi-token-edit, music-permissions, permission_viewer, popout, settings-extender, simple-dice-roller, simplefog, toggle-snap-to-grid, token-action-hud, tomcartos-anglers-wharf, tomcartos-bandit-hideout, tomcartos-bifrond-bazaar, tomcartos-ostenwold, tomcartos-pub-crawl, tomcartos-shilby-corporation-warehouse, vtt-resource-tracker, wfrp4e-gm-toolkit, wfrp4e-random-treasure, zsync, forge-vtt

Forien commented 9 months ago

Error seems to be caused by mooSizeDamage, specifically by trying to access the actor.sizeNum on vehicle.

It's these lines in modules/item/item-wfrp4e.js: https://github.com/moo-man/WFRP4e-FoundryVTT/blob/5387bce286a9950c62221a21adb68e2093b44503/modules/item/item-wfrp4e.js#L1974-L1975

Or on effect-refactor branch these lines in modules/model/item/weapon.js: https://github.com/moo-man/WFRP4e-FoundryVTT/blob/a9e0eb1d152fdb85a4c56258ac8063ba7da6e116/modules/model/item/weapon.js#L109-L110