Code Monkey home page Code Monkey logo

tension-pool's People

Contributors

bjornestol avatar sdoehren avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tension-pool's Issues

Deprecation Error: will break in Foundry v12

Describe the bug
Tension Pool throws an error as follows:

Deprecated since Version 10
Backwards-compatible support will be removed in Version 12
    at logCompatibilityWarning (commons.js:2059:19)
    at get data [as data] (commons.js:14395:7)
    at Object.fn (tension-pool.js:106:94)
    at #call (foundry.js:730:20)
    at Hooks.callAll (foundry.js:687:17)
    at Game.setupGame (foundry.js:8746:11)
    at async Game._initializeGameView (foundry.js:9990:5)
    at async Game.initialize (foundry.js:8650:5)

Foundry (please complete the following information):

  • Foundry: 11.315 (Stable)
  • System: dnd5e 3.0.2
  • Module Version: 0063

Desktop (please complete the following information):

  • OS: Win 10
  • Browser: Foundry (Electron)

Additional context
This can be fixed locally by changing the symbol in question to game.modules.get("tension-pool").version as well as several lines below it.

Broken with CoC 7th Ed

Describe the bug
When using this module with Havelocks CoC 7th Ed System, this breaks the automated rolls

To Reproduce
Steps to reproduce the behavior:

  1. Install Havelocks CoC 7th Ed System (https://github.com/Miskatonic-Investigative-Society/CoC7-FoundryVTT)
  2. Install this module
  3. Place a character from the examples in the compendium
  4. Click on any stat to trigger an autoroll
  5. Observe that the dice result uses a weird 6 sided dice that resolves to 0 every time

Expected behavior
Dice tolls with the autoroller should behave like normal d100 rolls

Screenshots
image
image
image

Foundry (please complete the following information):

  • Foundry Version Version 11 Build 305
  • CoC 7th Ed
  • 0063

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
  • Version 114.0.5736.199

Different danger levels?

More Feature Request Than Issue, but...
I was wondering if you could add the feature where I can set the die to be added based on the level of danger.

Add a d12 to the pool, because they are spending time in the enemy hideout...
Add a d8 they've caused a ruckus...
Add a d6 they've alerted the guards!
Add a d4 they've really hit the bee's nest!!

So then when you roll the pool the chances of a 1 are higher for the time spent in more dangerous areas?

Maybe this just complicates things too much.

I really like what you have done and will be using it in my game! Thank you so much.

Can't delete chat log with Tension Pool enabled

Describe the bug
Clear Chat log button doesn't respond when Tension Pool is enabled

To Reproduce
Steps to reproduce the behavior:

  1. Enable Tension Pool
  2. Try to clear chat log
  3. button is unresponsive

Expected behavior
Chat log dialog should appear

Screenshots
If applicable, add screenshots to help explain your problem.

Foundry (please complete the following information):

  • Foundry Version 9.238
  • System Dnd5e 1.5.6
  • Module Version 0056

Desktop (please complete the following information):

  • OS: macOS
  • Browser chrome
  • Version 96.0.4664.110

Additional context
Add any other context about the problem here.

Tension Pool visual display breaks with multiple GMs

Describe the bug
Tension Pool counter on the bottom right flashes rapidly when multiple GMs are logged in, and a die is added to the pool. The visual counter does not clear once full.

To Reproduce
Steps to reproduce the behavior:

  1. Log in user 1 as a Gamemaster
  2. Log in user 2 as either a Gamemaster or Assistant Gamemaster
  3. Add two tension dies

Expected behavior
Counter should visually increment, and clear when the pool is emptied.

Screenshots
If applicable, add screenshots to help explain your problem.

Foundry (please complete the following information):

  • Foundry Version [e.g. 11 Stable Build 315]
  • System [e.g. PF2e]
  • Module Version [e.g. 0063]

Desktop (please complete the following information):

  • Browser: Microsoft Edge

Additional context
Add any other context about the problem here.

Place the Tension pool at the top of the screen and always visible.

Is your feature request related to a problem? Please describe.
One of the key components of the tension pool and why it works is making it very clear to your players that taking time to do stuff is costing them. This doesn't work so well when the tension pool is a small UI element below the chat bar where it can barely be seen and is mostly ignored.

Describe the solution you'd like
I'd like it if the tension pool was instead placed over or under the scene selection bar and made chunky and noticeable. Additionally, Any time a tension dice is added, the roll is nice, but it would also be cool if a banner across the screen (Like the "your turn" module) showed up stating that "Then tension has risen." or something ominous like that.

Race condition can get `diceinpool` greater than `maxdiceinpool`

Clicking on the tension pool boxes below the chat box or clicking on the "Add dice to pool" button can sometimes double-up an addition of dice, leading to a number of dice in the pool greater than the max. Every time after that when a dice is added the pool is rolled but the number of dice is incremented and not emptied. Also attempting to manually empty the pool with "Empty the pool (no roll)" does roll and does not empty the pool.

image

Subtracting a die seems to cause the system to start working correctly with the next change (i.e. "Add dice" rolls the pool and empties correctly)

The effect is easily reproducible if you click the add dice button very quickly, but can happen on more normal usage rarely as well.

New Foundry Release

Enabling this module makes my entire viewport go black on FVTT 0.8.6
I have isolated it to this module and none of its dependencies.

Duplicate Die Drop/Messages from Timer

Describe the bug
When using the timer, either all, or every other, die drop gets duplicated. (1st noticed it was all, un/reinstalled and now it is every other die drop starting with the 2nd drop)

To Reproduce
Steps to reproduce the behavior:
Set a timer for something like 5 seconds
1st roll may or may not drop 1 die and 1 chat message
2nd roll will drop 2 die, 2 chat messages
*Note that even though the die drop and message duplicates, it still only adds 1 die to the pool.

EDIT: I just found that sometimes it will work all the way through filing the pool. Then when emptied it may start having the issue. Sometimes it starts from the very first pool/timer. Seems very intermittent so try a few times if you're not seeing it.
The only "pattern" I'm seeing is that when it happens, it often happens with every other die drop. I'm wondering if this points to a possible rounding issue somewhere?

Also I tried with disabling all mods except those dependent and issue persists.

Screenshots

Foundry (please complete the following information):

  • Foundry Version 0.8.9
  • System DnD5e 1.5.3
  • Module Version 0053

Desktop (please complete the following information):

  • OS: [e.g. windows 10]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Bug with Dice so Nice

When Dice so Nice is installed and you add a dice to the pool it rolls it on the screen.

Bug Reporter Test

Feedback Type: Bug

Core: 0.8.9
System: dnd5e v1.4.2
Module Version: tension-pool v0051
Dependency Version: Dice So Nice! v4.1.4
Dependency Version: Library: Chat Commands v1.3.3

Description:
Bug Reporter Test

Active Modules

alt5e--v1.6.0;
betterrolls5e--v1.6.8;
bug-reporter--v1.3.2;
colorsettings--v2.7.0;
dice-so-nice--v4.1.4;
dnd-randomizer--v0.5;
enhancedcombathud--v0.9.1;
foundryvtt-simple-calendar--vv1.3.23;
fpsmeter--v1.1.1;
lib-wrapper--v1.8.0.0;
ping-logger--v1.2.2;
plutonium--v1.36.0;
tension-pool--v0051;
_chatcommands--v1.3.3;

Additional Details

undefined

Partial pool shouldn't clear

Hello,
Thanks for making this! I've been itching to have something like it given the online-only games!

Unless I'm mistaken though the pool shouldn't empty when a partial pool is rolled? I just reread Angry's article on it and the only way it should empty is if it's full.

Suggestion: Way to view dice in the pool

Would be nice to have something on the UI that showed to the players/GM how many dice are in the pool. When building tension it helps if they can see there 4/6 dice in the pool already.

All Settings Available to Players

I'm not sure if this is a bug or as intended but my players can see and alter every single setting option. Obviously players have no need to do so. Please consider blocking settings access for players.

Thanks!

Remove player's ability to add dice

From what I saw the module allows players to also add dice (although it adds to their counter only and not to the DM). It might not affect much but feels unwanted, as the players don't have any rights to be adding dice and many fidgety players will click things many times (for no reason). If it does have a functionality, it'd be preferable to have it optional as a setting and the default to be only the DM adding/rolling.

[Out of Date] Does not work with v12

No longer works with v12.

Note: Using the pull request provided in #42 and altering the module.json to the appropriate version numbers (just '12' works) does allow it to work with v12.

Remove changelog pop-up.

Please remove the changelog pop-up mechanism. DMs only need to know what has changed in a module when there is some major UI or workflow change, and I can't think of any situation that requires users to know a module's changelog. Plus, if someone wants to see a module's changelog, there's a place in the module's manifest for it (which will also show up on Foundry's website).

Where is the Panel

I always used it with the buttons on the left panel and then I couldn't find it anymore, were they removed? If yes, it would be nice to have an option to add again. Is the scroll by time count format only available via macro?
At least the start counting mode button on the pool box would help.

Many thanks, great job!

Roll full dice pool

Describe the bug
Not sure if it is a bug, rather than an outdated function based on Angry GM's post. Possibly a bug though

To Reproduce
Clicking "Roll Full Dice Pool" button, fills the current pool, then rolls the dice, and empties the pool.

Expected behavior
Clicking "Roll Full Dice Pool" button. Should roll the max pool size in dice, leaving whatever is in the pool untouched. This is for moments when the party do something that would consume more time.
For example: Poll size is 6 dice. Each die represents 10 minutes of time. Current pool has 3 dice in it, then the party do something that would take an hour. You would roll a full pool and leave the current pool total in tact.

Screenshots
If applicable, add screenshots to help explain your problem.

Foundry (please complete the following information):

  • Foundry Version 0.8.9
  • System PF2E
  • Module Version 0055

Desktop (please complete the following information):

  • OS: Win 10
  • Browser n/a - Using foundry software
  • Version n/a

Additional context
Add any other context about the problem here.

TypeError: Cannot read property 'name' of undefined

I get an error when a dice is rolled in FoundryVTT 0.8.8 with Tension Pool 0.0.46

VM2627:8 TypeError: Cannot read property 'name' of undefined
    at DiceFactory.addDicePreset (DiceFactory.js:311)
    at Dice3D.addDicePreset (Dice3D.js:131)
    at tension-pool.js:64
    at Function._call (eval at <anonymous> (listeners.js:56), <anonymous>:4:14)
    at Function.call (foundry.js:179)
    at Dice3D.js:225
    at Image.images.<computed>.onload (DiceColors.js:562)

"Add Dice to Pool" Button in Token Controls Probably Unnecessary.

Hey there! Awesome mod. Been using it lately and its great.

You released an update recently, that added a "Tension Pool Controls" tool providing 5 options which are greatly appreciated. However there is still a button in the Token menu to add dice to the pool. This button already exists in "Tension Pool Controls" so I feel the duplication is unnecessary.

Cheers and thanks again for the mod :)

Tension Pool does not update on Player Side

FoundryVTT: v0.7.9
Tension Pool: v0.0.12

I'm experimenting with the Tension Pool module, and I've noticed that the Tension Pool itself does not reflect the number of dice rolled on the player's screens.

The notifications appear, and the rolls are all reflected, however the visible pool beneath the chatbox only updates on a player's screen when they refresh. It's possible that the function updatedisplay(diceinpool) is not being run locally on the player side.

[Suggestion] Sound on dice addition

Besides the notification and possibly a a really cool feature would be to play a sound, like a dice falling in cup, to get everyone's attention.

Remove Chat Commands Lib as a dependency

Chat Commands seems to be depreciated and is no longer receiving updates. It still appears to be working, but it would be great to not have that crutch. I rely on this module too much! Great job, btw!

Button / command for "add a die and roll"

Is your feature request related to a problem? Please describe.
In many circumstances, a PC takes an action that is both Time-Consuming and Reckless. If I'm reading your README.md correctly, there is not currently a command to handle this.
It would be convenient to be able to do this in a single command.

Describe the solution you'd like
I would like there to be a command (button and chat command) to simultaneously add a die and roll. The basic concept would be something like this pseudocode:

async function adddieandroll(){
  await adddie_do_not_roll();
  await rollpool();
  // == because a count>1 is not yet handled anyway.
  if (diceinpool == maxdiceinpool) {
    // These rolls will both have max dice!
    await rollpool();
    await emptypool();
  }
}

Describe alternatives you've considered
One might suppose that you could simply use a macro to issue /TPadddie followed by /TProllpool. However, this is not quite the same in the case when there are five dice in the pool.
As noted in Angry's article at https://theangrygm.com/definitive-tension-pool/ (after some edits he added; see "Rolling the Pool Twice"), when there are five dice in the Tension Pool and a sixth die is added, you typically roll the pool once.
He does talk about rolling it twice in some circumstances (although doesn't make it clear if this is two rolls of a full pool, or what). This is something that could be managed by a Setting or a popup query.

Additional context
I wrote something similar to this privately for Roll20. When I did that, I found that handling this situation really added complexity to the logic; I ended up having to refactor a lot of the code to handle these concepts. So I have empathy for why you may not have written this yet, but being able to quickly resolve an action correctly is important for a GM.

Remove Dependency on Dice So Nice

Is your feature request related to a problem? Please describe.
I'm frustrated that I can't use this module without Dice So Nice.

Describe the solution you'd like
Allow the module to use Dice So Nice but don't require it. Allow it to just roll the pool to the chat.

Describe alternatives you've considered
I don't want to use Dice So Nice because I hate 3D dice rolling in VTTs.

Bug Reporter Test2

Feedback Type: Bug

Core: 0.8.9
System: dnd5e v1.4.2
Module Version: tension-pool v0051
Dependency Version: Dice So Nice! v4.1.4
Dependency Version: Library: Chat Commands v1.3.3

Description:
Bug Reporter Test2

Module Settings
scenecontrols: true,
maxdiceinpool: 6,
emptythepool: false,
dropdie: true,
dicesize: d4,
outputto: notfications,
SafeMessage: You are safe for now.,
DangerMessage: <strong style='color:red'>Complication!</strong>,
PauseOnComplication: true,
MacroName: ,
outputsum: false,
secsautodiceadd: 120
Active Modules

alt5e--v1.6.0;
betterrolls5e--v1.6.8;
bug-reporter--v1.3.2;
colorsettings--v2.7.0;
dice-so-nice--v4.1.4;
dnd-randomizer--v0.5;
enhancedcombathud--v0.9.1;
foundryvtt-simple-calendar--vv1.3.23;
fpsmeter--v1.1.1;
lib-wrapper--v1.8.0.0;
ping-logger--v1.2.2;
plutonium--v1.36.0;
tension-pool--v0051;
_chatcommands--v1.3.3;

Additional Details

undefined

Visual dice not shown to players when adding dice to pool

Describe the bug
When adding dice to the dice pool and having the "dropdie" option on, a die is only dropped for the GM.

To Reproduce
Add a die to the pool.

Expected behavior
The die to be shown to all players, not just the GM.

Foundry (please complete the following information):

  • Foundry Version 9 - Build 269
  • Pathfinder 2e & DnD 5e
  • Module Version 0058

Additional context
Easily fixed, I'll make a pull request that fixes the problem for me.

Enhancement: Call Hook when rolling the Tension Pool

Last one I promise!

While I know "Auto Roll on a Roll Table if a Complication occurs" is in the future pipeline, I wondered if it would be possible to add a hook to the rollpool() function to allow others to extend automation functionality further? Something like Hooks.call("tensionpoolrolled", dice, complication); on line 195 of tension-pool.js would potentially allow the users to hook into the tension roll and react accordingly.

Including the amount of dice in addition to whether or not a complication occurs would also give users the ability to scale the complication to the amount of dice in the pool for example.

TypeError: Cannot read properties of null (reading 'clear')

Feedback Type: Bug

Core: 0.8.9
System: dnd5e v1.4.3
Module Version: tension-pool v0052
Dependency Version: Dice So Nice! v4.1.5
Dependency Version: Library: Chat Commands v1.3.3

Description:
When running with the Perfect Vision Module, I receive the following error:

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'clear') PolyBuilder.ts:8
at Y.clear (PolyBuilder.ts:8)
at ControlIcon.draw (foundry.js:35392)

Module Settings
scenecontrols: true,
maxdiceinpool: 6,
emptythepool: false,
dropdie: true,
dicesize: dt,
outputto: notfications,
SafeMessage: You are safe for now.,
DangerMessage: <strong style='color:red'>Complication!</strong>,
PauseDuringRoll: true,
PauseOnComplication: true,
MacroName: ,
outputsum: false,
secsautodiceadd: 300
Additional Details

undefined

Enhancement: Alternate ways to add, roll, or clear Tension Dice

Using Minimal UI, I often play with the Scene Tools hidden, and during our session I found myself wondering about alternative methods to add Tension Dice:

  1. Using chat commands (such as /addtd, /rolltd, or /filltd for example) to initiate the adddie() or rollpool() functions.
  2. Allowing GMs to click the Tension Pool itself to add or remove dice. It feels like an intuitive next step based on the design, and I found myself more than once trying to click on the tension dice to roll them.

[v10] Tension Pool breaks Scene Controls

Describe the bug
Tension pool breaks scene controls in v10.

To Reproduce
On v10, launch a world only activate Tension Pool (with _chatcommands)
Activate a scene
Note: This is with both the Enable Scene Controls setting enabled and disabled
The following controls do not work:

  • Measurement Controls
  • Wall Controls
  • Journal Notes
  • Tension Pool Controls (when enabled)

Expected behavior
Controls aren't blocked

Screenshots
If applicable, add screenshots to help explain your problem.

Foundry (please complete the following information):

  • Foundry v10.285
  • System DnD5e
  • Module Version [e.g. 0.0.50]

Desktop (please complete the following information):

  • OS: [e.g. windows 10]
  • Browser [e.g. chrome, safari]
  • Version v0058

Additional context
Error message for Measurement Controls:

Uncaught TypeError: Cannot read properties of undefined (reading 'zIndex')
    at foundry.js:30294
    at Array.reduce (<anonymous>)
    at TemplateLayer.getZIndex (foundry.js:30293)
    at TemplateLayer.activate (foundry.js:30235)
    at SceneControls._onClickLayer (foundry.js:66882)
    at HTMLLIElement.dispatch (jquery.min.js:2)
    at HTMLLIElement.y.handle (jquery.min.js:2)

Error message for Wall Controls:

Uncaught TypeError: Cannot read properties of undefined (reading 'zIndex')
    at foundry.js:30294
    at Array.reduce (<anonymous>)
    at WallsLayer.getZIndex (foundry.js:30293)
    at WallsLayer.activate (foundry.js:30235)
    at SceneControls._onClickLayer (foundry.js:66882)
    at HTMLLIElement.dispatch (jquery.min.js:2)
    at HTMLLIElement.y.handle (jquery.min.js:2)

Error message for Journal Notes:

Uncaught TypeError: Cannot read properties of undefined (reading 'zIndex')
    at foundry.js:30294
    at Array.reduce (<anonymous>)
    at NotesLayer.getZIndex (foundry.js:30293)
    at NotesLayer.activate (foundry.js:30235)
    at SceneControls._onClickLayer (foundry.js:66882)
    at HTMLLIElement.dispatch (jquery.min.js:2)
    at HTMLLIElement.y.handle (jquery.min.js:2)

Error message for Tension Pool Controls:

Uncaught TypeError: Cannot read properties of undefined (reading 'activate')
    at SceneControls._onClickLayer (foundry.js:66882)
    at HTMLLIElement.dispatch (jquery.min.js:2)
    at HTMLLIElement.y.handle (jquery.min.js:2)

Enhancement: Clear the Tension Pool without rolling

In one of their comments, the Angry GM clarified that "When a scene ends the tension pool goes away and a new one starts."

At the moment, this system has no means of clearing the pool to initiate a new scene, without rolling the tension pool as a whole. In the given example of the tension pool representing a bomb's timer running out: what happens to the tension pool when the bomb is defused? The tension should be let out, however there's no option for that right now.

Tension Pool display

Describe the bug
The tension Pool display count, below the chat log, does not render properly after you right click the chat log icon at the top right menu. It renders fine normally, but bugs out when you want the chat in it's own window.

To Reproduce
Steps to reproduce the behaviour:

  1. Go to the menu, top right in foundry.
  2. Right click on the chat log
  3. See the tension pool display kind of squashing the chat window that opens, and not displaying correctly.

Expected behaviour
To display as though still attached to the main menu window on the right.

Screenshots
If applicable, add screenshots to help explain your problem.
example of chat window

Foundry (please complete the following information):

  • Foundry Version 0.8.9
  • System [PF2E]
  • Module Version [e.g. 0.0.55]

Desktop (please complete the following information):

  • OS: [windows 10]
  • Browser [N/A Using program]
  • Version [N/A]

Additional context
Add any other context about the problem here.

Whisper results of roll to GM setting.

Is your feature request related to a problem? Please describe.
At the moment, when the tension pool is rolled the results are in the chat for all to see including the players. There seems to be no way to change this.

Describe the solution you'd like
I'd like there to be a setting which hides the results of a tension pool roll from the players.

Thanks!

Tension Pool replaces all other Dice So Nice Presets

I have a custom face preset set up, but once Tension Pool is installed I cannot access my other dice face presets. Would prefer to have Tension Pool preset included in the options or have an option to turn off Tension Pool settings for Dice So Nice.

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.