No description
Find a file
Renovate Bot e4d65d7352
Some checks failed
ci/woodpecker/push/checks Pipeline failed
chore(deps): update yarn to v4
2024-10-21 01:03:11 +00:00
.husky ci: remove gulp and add auto publishing 2021-12-20 06:23:56 +01:00
.reuse ci: switch to Gitea 2023-06-21 22:47:23 +02:00
.vscode Even more cleanup 2021-06-29 20:46:48 +02:00
.woodpecker ci: switch to Gitea 2023-06-21 22:47:23 +02:00
.yarn chore(deps): update yarn to v4 2024-10-21 01:03:11 +00:00
img Add usage section to the README 2021-06-29 21:51:18 +02:00
lang refactor: restructure files 2022-02-01 13:11:13 +01:00
LICENSES Add usage section to the README 2021-06-29 21:51:18 +02:00
src fix: make the DDV Config work with the Default Token Config 2022-08-21 23:33:34 +02:00
templates refactor: restructure files 2022-02-01 13:11:13 +01:00
tools ci: switch to Gitea 2023-06-21 22:47:23 +02:00
.editorconfig Initial commit 2021-06-29 05:40:25 +02:00
.eslintignore ci: remove gulp and add auto publishing 2021-12-20 06:23:56 +01:00
.eslintrc.cjs chore(deps): update dependency rollup to v3 2022-10-17 21:56:45 +02:00
.gitignore Add configuration to directly inject the ddv config into the token config 2021-07-13 14:02:59 +02:00
.nvmrc Initial commit 2021-06-29 05:40:25 +02:00
.nvmrc.license Initial commit 2021-06-29 05:40:25 +02:00
.prettierignore ci: remove gulp and add auto publishing 2021-12-20 06:23:56 +01:00
.prettierrc.cjs chore(deps): update dependency rollup to v3 2022-10-17 21:56:45 +02:00
.yarnrc.yml chore(deps): update yarn to v4 2024-10-21 01:03:11 +00:00
.yarnrc.yml.license chore: update to the latest yarn version 2021-12-04 11:53:18 +01:00
commitlint.config.cjs chore(deps): update dependency rollup to v3 2022-10-17 21:56:45 +02:00
LICENSE.md refactor: restructure files 2022-02-01 13:11:13 +01:00
module.json chore(release): 0.3.13 2023-06-21 20:59:18 +00:00
module.json.license refactor: restructure files 2022-02-01 13:11:13 +01:00
package.json chore(deps): update yarn to v4 2024-10-21 01:03:11 +00:00
package.json.license Initial commit 2021-06-29 05:40:25 +02:00
README.md ci: switch to Gitea 2023-06-21 22:47:23 +02:00
renovate.json chore: enable renovate lockFileMaintenance 2022-07-25 01:57:05 +02:00
renovate.json.license Add renovate.json 2021-07-23 23:48:38 +02:00
rollup.config.js chore(deps): update dependency rollup to v3 2022-10-17 21:56:45 +02:00
yarn.lock chore(deps): update yarn to v4 2024-10-21 01:03:11 +00:00
yarn.lock.license Initial commit 2021-06-29 05:40:25 +02:00

Darkness Dependent Vision

status-badge REUSE status Forge installs Supported foundry versions Ko-fi

A module for Foundry Virtual Tabletop that provides functionality to make the dim and bright vision of tokens depend on the scene's darkness level.

Installation

To install and use the Darkness Dependent Vision module for Foundry Virtual Tabletop, simply paste the following URL into the Install Module dialog on the Setup menu of the application.

https://git2.f3l.de/api/packages/saluu/generic/darkness-dependent-vision/latest/module.json

libWrapper

This module uses the libWrapper library for wrapping core methods. It is only a soft dependency (a shim is provided) but it is highly recommended to install libWrapper as a module for the best experience and compatibility with other modules.

Usage

In order to configure the darkness range in which a token has dim and bright vision, a dialog is provided that can be accessed from a header button in the Token Configuration:

Usage 1

Usage 2

In the next image, you can see an example of the module in action: The token is configured to only have bright vision at a darkness level between 0 and 0.5, but the scene's darkness level is set to 0.6, so the token has no bright vision. On the other hand, the token is also configured to have dim vision at a darkness level between 0 and 0.7, so it does have dim vision.

Usage 3

Development

Prerequisites

In order to build this module, recent versions of node and yarn are required. Most likely using npm also works but only yarn is officially supported. We recommend using the latest lts version of node. If you use nvm to manage your node versions, you can simply run

nvm install

in the project's root directory.

You also need to install the project's dependencies. To do so, run

yarn install

Building

You can build the project by running

yarn build

Alternatively, you can run

yarn build:watch

to watch for changes and automatically build as necessary.

Linking the built project to Foundry VTT

In order to provide a fluent development experience, it is recommended to link the built module to your local Foundry VTT installation's data folder. In order to do so, first add a file called foundryconfig.json to the project root with the following content:

{
  "dataPath": "/absolute/path/to/your/FoundryVTT/Data"
}

(if you are using Windows, make sure to use \ as a path separator instead of /)

Then run

yarn link-project

On Windows, creating symlinks requires administrator privileges, so unfortunately you need to run the above command in an administrator terminal for it to work.

Licensing

This project is being developed under the terms of the LIMITED LICENSE AGREEMENT FOR MODULE DEVELOPMENT for Foundry Virtual Tabletop.

The project itself is licensed under multiple licenses. REUSE is used to specify the licenses for the individual files. Most of the licenses are specified either inside the source file or by an accompanying .license file, but for some files, the licenses are specified in .reuse/dep5.