Comments (8)
I have the same issue in 0.7.9; the "lightly encumbered" and "heavily encumbered" effects keep getting added and never removed, so I end up with tens of stacked "encumbered" effects.
from variantencumbrance.
Known issue with the current implementation. I'm working on a fix but the holidays have kept me busy unfortunately.
from variantencumbrance.
I've confirmed that this is a race condition caused when there are multiple clients open at the same time (which happens when there are multiple users logged in).
When an item is updated or added/removed, all clients simultaneously attempt to set the encumbrance, which causes them to stack. Because the current logic removes all previous effects and then adds its own, the stacking always happens whenever there are multiple clients open.
I attempted to fix this by updating the first found existing effect instead, but that does not solve the race condition that occurs when multiple clients try to create the effect at the same time, for the first time, or when switching between unencumbered and encumbered.
@VanirDev do you want to have a chat about how to solve this? I'm happy to have a stab at it on my own, but I'm new to Foundry development and you may have some insight that I don't. Contact me at paul@<myusername>.com
if you're interested, otherwise I'll open another pull request once I've got a solution.
from variantencumbrance.
I've got a solution, and will be raising a pull request early this week once I've cleaned up my code.
from variantencumbrance.
I've got a solution, and will be raising a pull request early this week once I've cleaned up my code.
Great work! I'd love to see how you resolved the race condition. I've been frustratingly trying to find a way to execute code from the server's perspective instead of on a per-client basis, alas that doesn't seem possible.
from variantencumbrance.
I've confirmed that this is a race condition caused when there are multiple clients open at the same time (which happens when there are multiple users logged in).
When an item is updated or added/removed, all clients simultaneously attempt to set the encumbrance, which causes them to stack. Because the current logic removes all previous effects and then adds its own, the stacking always happens whenever there are multiple clients open.
This is the same behaviour that is causing the error notifications that people are seeing such as this #20, as when a client doesn't have permission to update the actor, it'll attempt to do so anyway and produce the error.
from variantencumbrance.
PR is open; I've got a game tomorrow night where I will be testing this.
from variantencumbrance.
PR is open; I've got a game tomorrow night where I will be testing this.
Thanks for this, I'll review it tomorrow when I have a chance. Let me know how your session goes, I'll probably use my own players as guinea pigs come Wednesday.
from variantencumbrance.
Related Issues (20)
- Provide alternative weight trigger method HOT 4
- BUG when combined with Magic Items module HOT 4
- Button to calculate the weight of items HOT 2
- [BUG] HOT 3
- [BUG] Is calculating Vehicle Weight HOT 3
- [BUG] Max weight values now many times larger than they should be HOT 3
- [BUG] HOT 8
- [BUG] Throwing Errors When Used with Pop Out and Item Containers HOT 5
- [BUG] Additional Error When Used with Pop Out and Item Containers HOT 2
- Encumbrance movement penalty is doubled when DAE is enabled HOT 2
- Not enabling encumbrance effect HOT 14
- [BUG] Possible conflict between Variant Encumbrance and DF Quality of Life HOT 2
- Bulk variant HOT 16
- Can't download older versions for 8.9 compatibility HOT 1
- Variant Encumbrance prevents me from adding items to inventory HOT 7
- [Request] Increasing carry weight on single actor isn't possible, could there be a % based system? HOT 8
- [BUG] just a minor typo in the module settings HOT 1
- [BUG] Can no longer delete inventory items. HOT 1
- [Question] v10 support
- Encumbrance calculating different for DM and PC HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from variantencumbrance.