Skip to content

Commit

Permalink
Merge pull request #20 from SebaSOFT/develop
Browse files Browse the repository at this point in the history
v9 Support
  • Loading branch information
SebaSOFT authored Feb 28, 2022
2 parents 3b43e22 + f280b1c commit eeab26d
Show file tree
Hide file tree
Showing 9 changed files with 1,813 additions and 2,245 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,5 @@ dist
# IntelliJ IDEs
.idea/
.vscode/

walls-have-ears.lock
64 changes: 64 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# CHANGELOG

## [1.0.0] 2022-02-28

### CHANGED

- Added compatibility with v9, all other versions are not compatible now.

### ADDED

- Better logging for debugging. End users not affected.

## [0.1.0] 2021-06-19

### CHANGED

- Better initialization of scripts and the new global `WHE` object

### ADDED

- Gihub badges to README
- A proper CHANGELOG file

## [0.0.4] 2021-06-05

### CHANGED

- Better event detection (opening doors)
- Simpler logic will ignore far away, occluded sounds
- Better support for async initialization of sound

### ADDED

- GitHub workflow for easier release workflow

## [0.0.3] 2021-06-03

### CHANGED

- Cleaned a lot of code
- Sounds now update in more events
- A new logic for estimating muffling levels. See:
![Test cases for Muffling logic](https://raw.githubusercontent.com/SebaSOFT/walls-have-ears/develop/mufflingLogic.jpg)

### FIXED

- Remove cosnole logs

### ADDED

- Added 4 levels of muffling

## [0.0.2-beta] 2021-06-02

### CHANGED

- Added some translations (pt, de)
- Now compatible with 0.8.x

## [0.0.1-alpha] 2020-10-19

### ADDED

- First initial release
53 changes: 36 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,63 @@
# Foundry VTT - Walls have ears

"A simple-as-possible module to muffle sounds that are behind a wall for a player."
[![GitHub license](https://img.shields.io/github/license/SebaSOFT/walls-have-ears)](https://github.com/SebaSOFT/walls-have-ears/blob/main/LICENSE)
[![GitHub release](https://img.shields.io/github/downloads-pre/SebaSOFT/walls-have-ears/latest/module.zip?label=downloads)](https://github.com/SebaSOFT/walls-have-ears/releases/)
[![Forge Installs](https://img.shields.io/badge/dynamic/json?color=green&label=Forge%20installs&query=package.installs&suffix=%25&url=https%3A%2F%2Fforge-vtt.com%2Fapi%2Fbazaar%2Fpackage%2Fwalls-have-ears)](https://forge-vtt.com/bazaar#package=walls-have-ears)
[![Foundry HUB Endorsements](https://img.shields.io/badge/dynamic/json?label=FoundryHUB%20Endorsements&query=%24.endorsements&url=https%3A%2F%2Fwww.foundryvtt-hub.com%2Fwp-json%2Fhubapi%2Fv1%2Fpackage%2Fwalls-have-ears)](https://www.foundryvtt-hub.com/package/walls-have-ears/)
[![Minimum Foundry VTT version](https://img.shields.io/badge/dynamic/json?label=Foundry%20VTT%20version&query=%24.minimumCoreVersion&suffix=%20or%20later&url=https%3A%2F%2Fgithub.com%2FSebaSOFT%2Fwalls-have-ears%2Freleases%2Flatest%2Fdownload%2Fmodule.json)](https://github.com/SebaSOFT/walls-have-ears/releases/latest/download/module.json)

"A simple-as-possible module to muffle sounds that are behind a wall for a player or token."

## Installation

In the setup screen, use the URL https://raw.githubusercontent.com/SebaSOFT/walls-have-ears/main/module.json to install the module.
In the setup screen, use the URL https://github.com/SebaSOFT/walls-have-ears/releases/latest/download/module.json to install the module.


## Release Notes

- v0.0.1: Initial release.
- v0.0.2: Added translations and now compatible with FoundryVTT 0.8.x
- v0.0.3: Cleaned up a lot of code, console logs. Update on more events. Added 4 levels of muffling
- v0.0.4: Better event detection
- Better event detection when opening doors etc.
- Simpler logic won't take into consideration har await sounds, occluded sounds and more.
- Better initialization detection. All sound needs to start after first user interaction.
- GitHub Workflow for more automated releases
See [CHANGELOG](CHANGELOG.md)

## Features

- Detects sound that are in range but through a wall, and muffles them
- Ignores open doors so sound should not be muffled if listened throughan open door

## How it works
- Set sound occlussion to limited or none as needed
- It will detect walls and muffle the sound
- It also works with sound easing
- Windows are less likely to muffle
- Terrain walls dont muffle
- Enable Token Vision on the scene (this is a **MUST**)
- **EITHER** Set sound occlussion on Walls to limited or none as needed
- **OR** Disable "Constrained by Walls" on the Sound
- It works with sound easing (volume changing)
- It will detect walls and muffle the sound (see table below)
- Windows are less likely to muffle (see table below)
- Terrain walls don't contribute to muffling (see table below)
- Ethereal Walls don't contribute to muffling (see table below)

See:

![Test cases for Muffling logic](https://raw.githubusercontent.com/SebaSOFT/walls-have-ears/develop/mufflingLogic.jpg)

Demo videos:


### Nightclub demo
<a href="http://www.youtube.com/watch?feature=player_embedded&v=EXkrlQVEeAo
" target="_blank"><img src="http://img.youtube.com/vi/EXkrlQVEeAo/0.jpg"
alt="Nightclub demo" width="240" height="180" border="10" /></a>

### Test suite demo
<a href="http://www.youtube.com/watch?feature=player_embedded&v=hlsi4gw1YIA
" target="_blank"><img src="http://img.youtube.com/vi/hlsi4gw1YIA/0.jpg"
alt="Test suite demo" width="240" height="180" border="10" /></a>

## TO DO

- Estimate L shaped rooms and track sound bouncing, so it doesn't get muffled (possible echo/delay effect)
- Have three or more muffling densities and assign them to the wall they are listening through
- Have a setting for disable sound muffling, useful for muffled sounds or ambient global sounds you may want to eclude
- ~~Have three or more muffling densities and assign them to the wall they are listening through~~
- ~~Have a setting for disable sound muffling, useful for muffled sounds or ambient global sounds you may want to eclude~~

## Known Issues

- If the first action you do when accessing the site is selecting a token, it won't be muffled, just select another token or move it one time.

## Contributing

Expand Down
96 changes: 53 additions & 43 deletions module.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,53 @@
{
"name": "walls-have-ears",
"title": "Walls Have Ears - Muffled sounds behind walls",
"description": "A simple-as-possible module to muffle sounds that are behind a wall for a player.",
"author": "SebaSOFT",
"version": "0.0.4",
"minimumCoreVersion": "0.8.5",
"compatibleCoreVersion": "0.8.6",
"esmodules": [
"scripts/settings.js",
"scripts/walls-have-ears.js"
],
"languages": [
{
"lang": "de",
"name": "Deutsch (German)",
"path": "languages/walls-have-ears.de.json"
},
{
"lang": "en",
"name": "English",
"path": "languages/walls-have-ears.en.json"
},
{
"lang": "es",
"name": "Español (Spanish)",
"path": "languages/walls-have-ears.es.json"
},
{
"lang": "fr",
"name": "French (French)",
"path": "languages/walls-have-ears.fr.json"
},
{
"lang": "pt-BR",
"name": "Português (Portuguese)",
"path": "languages/walls-have-ears.pt-BR.json"
}
],
"url": "https://github.com/SebaSOFT/walls-have-ears",
"manifest": "https://github.com/SebaSOFT/walls-have-ears/releases/latest/download/module.json",
"download": "https://github.com/SebaSOFT/walls-have-ears/releases/download/0.0.4/module.zip"
}
{
"name": "walls-have-ears",
"title": "Walls Have Ears - Muffled sounds behind walls",
"description": "A simple-as-possible module to muffle sounds that are behind a wall for a player.",
"author": "SebaSOFT",
"authors": [],
"url": "https://github.com/SebaSOFT/walls-have-ears",
"flags": {},
"version": "1.0.0",
"minimumCoreVersion": "9",
"compatibleCoreVersion": "9",
"scripts": [],
"esmodules": [
"scripts/settings.js",
"scripts/main.js"
],
"styles": [],
"languages": [
{
"lang": "de",
"name": "Deutsch (German)",
"path": "languages/walls-have-ears.de.json"
},
{
"lang": "en",
"name": "English",
"path": "languages/walls-have-ears.en.json"
},
{
"lang": "es",
"name": "Español (Spanish)",
"path": "languages/walls-have-ears.es.json"
},
{
"lang": "fr",
"name": "French (French)",
"path": "languages/walls-have-ears.fr.json"
},
{
"lang": "pt-BR",
"name": "Português (Portuguese)",
"path": "languages/walls-have-ears.pt-BR.json"
}
],
"packs": [],
"system": [],
"dependencies": [],
"socket": false,
"manifest": "https://github.com/SebaSOFT/walls-have-ears/releases/latest/download/module.json",
"download": "https://github.com/SebaSOFT/walls-have-ears/releases/download/1.0.0/module.zip",
"protected": false,
"coreTranslation": false
}
Loading

0 comments on commit eeab26d

Please sign in to comment.