Giter VIP home page Giter VIP logo

fvtt-sense-walls-multisystem's Introduction

Sense Walls Multisystem

Latest Release Download Count

Forge Installs

Foundry Core Compatible Version

Latest Version

Foundry Hub Endorsements

GitHub all releases

A module for Foundry VTT that allows to add and remove walls based on the active effects applied on the token.

Just something i have done for understands how levels and other module work with WallLayer and Sightlayer.

This project is a started idea , maybe this can be evolved in something more articulate.

img

Installation

It's always easiest to install modules from the in game add-on browser.

To install this module manually:

  1. Inside the Foundry "Configuration and Setup" screen, click "Add-on Modules"
  2. Click "Install Module"
  3. In the "Manifest URL" field, paste the following url: https://raw.githubusercontent.com/p4535992/fvtt-sense-walls-multisystem/master/src/module.json
  4. Click 'Install' and wait for installation to complete
  5. Don't forget to enable the module in game using the "Manage Module" button

libWrapper

This module uses the libWrapper library for wrapping core methods. It is a hard dependency and it is recommended for the best experience and compatibility with other modules.

socketlib

This module uses the socketlib library for wrapping core methods. It is a hard dependency and it is recommended for the best experience and compatibility with other modules.

Supported Systems

How can i add my system ? That's is pretty easy on the code level ty to the design pattern so i just need some information on the system rules or better give me a table like the ones below.

Features

Walls can be configured to only show up to a certain level of vision. For example, if the "Piercing Vision Level" is set to "Darkvision" then a character with darkvision or greater darkvision can see and move through the wall (depend on the configuration of the wall), but one with only low-light vision cannot.

You can set the value on the wall config dialog from a dropdown.

You can use any active effect where the name is founded from the following code

// regex expression to match all non-alphanumeric characters in string
const regex = /[^A-Za-z0-9]/g;
// use replace() method to match and remove all the non-alphanumeric characters
effectNameToCheckOnActor = effectNameToCheckOnActor.replace(regex, "");
effectNameToCheckOnActor.toLowerCase().startsWith(effectIdOfTheModule);

Tables

These tables are essential because they help the communtity to decide how to calculate a hierachy between the Active Effect

The calculation is done with this formula:

Maximum vision wall level >= token vision level (Active Effects) >= Minimum vision level

System Dnd5e

Image Effect\Vision Level effectId used on the module Minimum Maximum Check Elevation
None none -2 -1 false
Normal normal 0 1 false
Blinded blinded -1 0 false
Darkvision darkvision 0 3 false
Tremor Sense tremorsense 0 10 true
See invisible seeinvisible 0 5 false
Blind Sight blindsight 0 6 false
True Sight truesight 0 7 false
Devil's sight devilssight 0 8 false

System Pf2e

Image Effect\Vision Level effectId used on the module Minimum Maximum Check Elevation
None none -2 -1 false
Normal normal 0 1 false
Blinded blinded -1 0 false
Low Light Vision lowlightvision 0 2 false
Darkvision darkvision 0 3 false
Greater Darkvision greaterdarkvision 0 4 false

API

This api is redundant it can be easily replace from other macros or modules, is advisable to use other module like CUB or Dfred convenient effects

addEffect(actorNameOrId: string, effectId: string, distance: number) โ‡’ void

Calculate the distance between the source token and the target placeable objet Returns: void -

Param Type Description
actorNameOrId string The name or the id of the actor, if applied on a token must be linked to a actor.
effectId string The effectId used from this module
distance number OPTIONAL: explicit distance in units not grid to add to the Active Effects

Example: SenseWalls.API.addEffect('Zruggig Widebrain','darkvision',60) game.sense-walls-multisystem.API.addEffect('Zruggig Widebrain','darkvision',60)

Issues

Any issues, bugs, or feature requests are always welcome to be reported directly to the Issue Tracker, or using the Bug Reporter Module.

License

This package is under an MIT license and the Foundry Virtual Tabletop Limited License Agreement for module development.

Credit

fvtt-sense-walls-multisystem's People

Contributors

p4535992 avatar jdcalvert avatar

Watchers

James Cloos avatar  avatar

fvtt-sense-walls-multisystem's Issues

[BUG] FPS drop while moving npc tokens

Module Version: v0.0.16

Before open any issue

No exeption thrown

Describe the bug
When using Foundry's "left-drag" movement, there are significant FPS drops when moving an "npc" token. (59 -> ~24 fps during movement). No noticeable performance losses when using a "pc" token. (59 -> 59 fps during movment).
If both tokens are dragged at the same time, no performance drop is noticed. If the npc token is moved and, while movement hasn't finished, the pc token is selected, fps rises instantly.
As soon as the module is deactivated, both tokens produce the same performance (59FPS)

To Reproduce
Steps to reproduce the behavior:

  1. Create empty scene, set token vision to active (changes to vision range / fog exploration have no impact)
  2. Place some polygon walls
  3. Add two tokens (pc and npc) to the scene. Vision / Senses equal on both
  4. left-drag each token around

Expected behavior
Performance for both tokens should be the same.

Screenshots
Settings
image

FPS Test
https://user-images.githubusercontent.com/93077838/185461608-82f6454f-e839-4d73-b9c5-71542b72edbe.mp4

Browser:
Chrome Version 104.0.5112.81

Foundry Version:
v9 Build 269
Game System:
dnd5e 1,6,3
Additional context
No additional modules besides the dependencies

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.