dev7355608 / vision-5e

Foundry VTT Module: Vision/Detection Modes for D&D 5e
https://foundryvtt.com/packages/vision-5e
MIT License
13 stars 12 forks source link

Use formula for hearing range #70

Closed txm3278 closed 9 months ago

txm3278 commented 9 months ago

Based on discussion here: https://ptb.discord.com/channels/915186263609454632/1187628233181642843 (Midi Discord).

People want a way to adjust hearing based on actor attributes, like passive perception. This PR adds a new setting to set the default hearing range to a formula instead of a number.

Value as an example, defaults to blank. When blank defaults back to number setting.

image

mohd2126 commented 9 months ago

This would've saved me so much time trying to figure out how to do it with a world script

dev7355608 commented 9 months ago

Nice! Thanks @txm3278.

I made Default Hearing Range support formulas instead of it being a separate setting. Also passing actor.getRollData({ deterministic: true }) instead of actor to the Roll. Default hearing range is now 15 + 2.5 * (@skills.prc.passive - 10) instead of flat 30.