Jagusti / fvtt-wfrp4e-gmtoolkit

Utility module with tweaks, enhancements and macros to help GMs with game management when running Warhammer Fantasy Roleplay (4e) sessions in Foundry Virtual Tabletop.
MIT License
15 stars 9 forks source link

Add support for non-integer vision range #223

Closed Jagusti closed 1 year ago

Jagusti commented 1 year ago

A question: the "Normal Vision Range" in the Module's settings, is it possible to set it so we can input a value between integers? We're experimenting with having vision in darkness expand to 0.5 yards (or similar) instead of 2 yards. That's mainly because we use 1 yard square maps instead of the default 2 yards.

Originally posted by @TheFirst05 in https://github.com/Jagusti/fvtt-wfrp4e-gmtoolkit/discussions/193#discussioncomment-5770569

Jagusti commented 1 year ago

This line is forcing integer/stepped validation: https://github.com/Jagusti/fvtt-wfrp4e-gmtoolkit/blob/09dc6dfb8fdd9faeb02ff24ab46d88532255e851/modules/gm-toolkit-settings.mjs#L349

I prefer not to remove it for all cases, as integers are useful most of the time. But this is the starting point. It may be enough s.integer = true instead.