davelens / fvtt-party-resources Goto Github PK
View Code? Open in Web Editor NEWA simple module for FoundryVTT to manage (and track) custom party-wide numeric values.
License: MIT License
A simple module for FoundryVTT to manage (and track) custom party-wide numeric values.
License: MIT License
As brought forth by @venomweb99 in #60
As an example: If you want to track apples, and you'd want the value to be measured in kilograms, you could add "kg" as unit of measurement and the dashboard would display "Apples: 10 kg".
foundry.js:135 Uncaught (in promise) Error: This is not a registered game setting
[Detected 1 package: fvtt-party-resources]
at ClientSettings.get (foundry.js:135:182)
at ResourcesApi.get (resources_api.mjs:37:26)
at eval (eval at _executeScript (foundry.js:1145:20), :4:21)
at Macro.eval (eval at _executeScript (foundry.js:1145:20), :5:7)
at Macro._executeScript (foundry.js:1145:80)
at Macro.execute (foundry.js:1141:102)
at MacroConfig._onExecute (foundry.js:4783:108)
Allow the option to dynamically show()/hide() the status bar for all players/GM at the same time.
Useful when you want to show party resources only during particular scenes/sequences.
I have reinstalled the module and it still does not appear. It's fully installed too.
Think resource bars at the top/bottom of the screen in games like Civilization or Age of Empires.
Should use both text and any assigned icon images, and should be togglable through Foundry's module settings.
Foundry v10
Console error (see below)
Uncaught (in promise) Error: Setting Model Validation Errors
[Setting.value]: may not be undefined
[Detected 1 package: fvtt-party-resources]
at SchemaField._validateType (commons.js:3630)
at SchemaField.validate (commons.js:3357)
at Setting.validate (commons.js:4994)
at new DataModel (commons.js:4771)
at new Document (commons.js:5310)
at new BaseSetting (commons.js:9319)
at new ClientDocumentMixin (foundry.js:12942)
at new Setting (foundry.js:21144)
at ClientSettings.get (foundry.js:2723)
at ResourcesApi.get (modules/fvtt-party-resources/src/resources_api.mjs:37)
at Function.all (modules/fvtt-party-resources/src/resources_list.mjs:3)
at ResourcesApi.resources (modules/fvtt-party-resources/src/resources_api.mjs:82)
at Function.getData (modules/fvtt-party-resources/src/resources_status_bar.mjs:6)
at Function.render (modules/fvtt-party-resources/src/resources_status_bar.mjs:16)
at Object.fn (modules/fvtt-party-resources/src/init.mjs:25)
at Function.#call (foundry.js:688)
at Function.callAll (foundry.js:645)
at Game.setupGame (foundry.js:7769)
at async Game._initializeGameView (foundry.js:8820)
at async Game.initialize (foundry.js:7630)
Asked by a user on the FoundryVTT Discord whose name I sadly didn't jot down.
There are times in the thick of battle, when I need to hit Escape to clear out various targets I have or for other reasons. Unfortunately, this also closes the Party Resources window. Is there any way we can have it not close the window?
It would be nice for things like a shared party treasury to beable to numerically change the resource on the fly, instead of needing to go in and alter the "default value" field for large changes. An easy approach might be to make the +/- buttons scalable ie, hold shift for increments of 10, ctrl for increments of 100, or something.
Is it possible to have the popup be resizable so that resources can be viewed horizontally or vertically depending on the popup aspect ratio?
Was setting up this Module to use in a survival and travel campaign, and my party are going to be using a Mule to carry a lot of their heavy equipment for them, and I was looking for a way to get the NPCs items to be counted towards the total.
Unless I'm overlooking something, It's not possible to track resources on any sheet types besides Player Characters, if there's something I'm missing, Please let me know.
And If it's not possible right now, here's my official feature request!
Feature: add api wrapper for easier interactions with this module through macros
I have this feature already implemented, will create a PR shortly
Hi, im try to create a macro to open party resources.
Like this
if (Party Resources.window.rendered)
Party Resources.close();
else
Party Resources.(true);
Can you help me?
The ability for players to edit the resources and/or add new ones would be cool, less overhead for the GM. Keeping track of everything in a system with lots of stuff like that gets pretty time-consuming.
Allow GMs to adjust resources that have notifications enabled without sending a notification (say by adding a hotkey to hold by making it silent, or a second "silent" arrow), without having to disable notificatoins, make the change, reenable notifications.
Usecase: I have a magical item in my party that summons a number of ducks that can be used to grant advantage on ability checks in some circumstances. The ducks follow the party around. I want to be able to say, have a duck wander off and wait for the players to notice, or have another player, who has been wanting to eat the ducks steal them, without the rest of the party noticing, but I DO want most changes to the duck count to be notified to players. Basically, I want the OPTION to stealth adjust.
I have the following setup:
Party Resources set to track gold across all players
Whenever any player changes their gold (or I change it) all players get a red error notification saying:
Uncaught (in promise) Error: User lacks permission to update Setting [ai2WtiaeaY04G3g7]
Setting with ID ai2WtiaeaY04G3g7 is:
key: "fvtt-party-resources.gp"
value: 244.9 (current party gold)
Disabling tracking of the resource removes the error.
Same issue is for objects tracked by the module, ie. I'm tracking all rations across all characters and if any character has his/her rations changed all players get relevant error just with ID of a different setting.
Players are NOT suposed to change the values and the setting "Allow players to manage this resource" is NOT checked for any of those.
Hello,
I have an issue with chat message option. When i check this button my comment never appear with with message about value change. Am I doing something wrong or is it just not working at the moment?
Pretty much what the title says. Not everyone reads Github, and I've noticed a few people be confused as to where the dashboard is located.
Hi !
fr.json file provided here,
Thanks !
{ "FvttPartyResources.Dashboard.AddButtonTitle": "Augmenter la quantité", "FvttPartyResources.Dashboard.BlankWarning": "Les blocs de ressources apparaitront uniquement une fois ajoutés.", "FvttPartyResources.Dashboard.DeleteButtonTitle": "Supprimer la ressource", "FvttPartyResources.Dashboard.EditButtonTitle": "Editer la ressource", "FvttPartyResources.Dashboard.MakeInvisibleButtonTitle": "Cacher cette ressource aux joueurs", "FvttPartyResources.Dashboard.MakeVisibleButtonTitle": "Afficher cette ressource aux joueurs", "FvttPartyResources.Dashboard.SubtractButtonTitle": "Soustraire la quantité", "FvttPartyResources.FirstTimeNotification": "Bienvenu à <strong>Party Resources v{version}</strong>!<br>Si c'est la première fois que vous utilisez ce modile<br>suivez ce lien pour être guidé : {anchor}.", "FvttPartyResources.ResourceForm.AddFormTitle": "Ajouter une nouvelle ressource", "FvttPartyResources.ResourceForm.AllowPlayersToModifySettings": "Permettre aux joueurs de modifier la configuration", "FvttPartyResources.ResourceForm.CreateResource": "Créer une ressource", "FvttPartyResources.ResourceForm.DefaultValue": "Valeur par défaut", "FvttPartyResources.ResourceForm.DefaultValueHint": "La valeur initiale de la ressource.", "FvttPartyResources.ResourceForm.EditFormTitle": "Editer la ressource", "FvttPartyResources.ResourceForm.Headers.Label": "Nom", "FvttPartyResources.ResourceForm.Headers.Notifications": "Notifications", "FvttPartyResources.ResourceForm.Headers.Settings": "Configuration", "FvttPartyResources.ResourceForm.Headers.Values": "Valeurs", "FvttPartyResources.ResourceForm.IconImage": "Chemin de l'icone", "FvttPartyResources.ResourceForm.Identifier": "ID de la ressource", "FvttPartyResources.ResourceForm.IdentifierHint": "L'identifiant qui représent la ressource dans l'API. Ne doit pas contenir d'espaces ou de chiffres, and uniquement en minuscules.", "FvttPartyResources.ResourceForm.MaxValue": "Valeur maximum", "FvttPartyResources.ResourceForm.MaxValueHint": "Lorsque cette valeur (optionnelle) est renseignée, vous ne pourrez pas incrémenter la ressource au dessus de cette valeur.", "FvttPartyResources.ResourceForm.MinValue": "Valeur minimum", "FvttPartyResources.ResourceForm.MinValueHint": "Lorsque cette valeur (optionnelle) est renseignée, vous ne pourrez pas décrémenter la ressource en dessous de cette valeur.", "FvttPartyResources.ResourceForm.Name": "Nom de la ressource", "FvttPartyResources.ResourceForm.NameHint": "Le nom affichée dans la barre de ressources.", "FvttPartyResources.ResourceForm.NotifyChat": "Notifier les joueurs des changements de valeur", "FvttPartyResources.ResourceForm.NotifyChatHint": "Affiche un message dans le tchat quand la ressource change de valeur.", "FvttPartyResources.ResourceForm.NotifyChatMessage": "Message de tchat", "FvttPartyResources.ResourceForm.NotifyChatMessageHint": "Le message affiché dans le tchat lorsqu'une valeur change.", "FvttPartyResources.ResourceForm.PlayerManaged": "Autoriser les joueurs à gérer cette ressource.", "FvttPartyResources.ResourceForm.PlayerManagedHint": "Activer ce choix permettra aux joueurs de changer la valeur de la ressource.", "FvttPartyResources.ResourceForm.PlayerManagedRestriction": "Cette checkbox peut seulement être activé en autorisant les joueurs à modifier la configuration.", "FvttPartyResources.ResourceForm.Reset": "Reset du formulaire", "FvttPartyResources.ResourceForm.SaveChanges": "Sauvegarder les changements", "FvttPartyResources.ResourceForm.UseIcon": "Utiliser une icone au lieu d'un nom de ressource.", "FvttPartyResources.GMSettingsForm.IconImagesOrientation": "Change l'apparence de l'image d'icône.", "FvttPartyResources.GMSettingsForm.IconImagesOrientationBelow": "Texte en dessous de l'icone", "FvttPartyResources.GMSettingsForm.IconImagesOrientationHint": "Affecte la manière dont les images sont affichées dans la barre des ressources. Vous pouvez afficher un texte au dessus de l'icone, ou bien avoir le texte aligné en dessous de l'icone.", "FvttPartyResources.GMSettingsForm.IconImagesOrientationOnTop": "Texte au dessus de l'icone", "FvttPartyResources.GMSettingsForm.ShowActorsButtonForPlayers": "Afficher le bouton des Ressources de Groupe.", "FvttPartyResources.GMSettingsForm.ShowActorsButtonForPlayersHint": "Lorsque décoché, les joueurs ne verront plus le bouton des Ressources de Groupe en haut des Acteurs. Seulement le MJ peut le voir et l'utiliser.", "FvttPartyResources.GMSettingsForm.ShowStatusBar": "Afficher la barre de statut.", "FvttPartyResources.GMSettingsForm.ShowStatusBarHint": "Affiche une barre de statut en haut de l'écran, en affichant la valeur courante de chaque ressource.", "FvttPartyResources.GMSettingsForm.StatusBarLocation": "Change la position de la barre de statut", "FvttPartyResources.GMSettingsForm.StatusBarLocationHint": "Détermine à quel endroit la barre de statut est affichée.", "FvttPartyResources.GMSettingsForm.StatusBarLocationAtBottom": "En bas", "FvttPartyResources.GMSettingsForm.StatusBarLocationOnTop": "En haut", "FvttPartyResources.Title": "Ressources de Groupe" }
Just to notify players who aren't watching their dashboard. I can imagine you don't want this for every resource though, so it should be a setting to toggle in the resource's form.
Hi, in the settings of this module I gave the players the permission to change the resources. Unfortunately this doesn't work. They can't change anything. Do you have any idea what I can do?
Weird question I'm sure, but I have a huge use for these being able to be called in damage formulas. Other spots too, but this would be the best. Is it currently possible, and if not, could this even be added?
Thanks for the great module, just found it. I like the way to add up gold and items in 5e.
Whenever I want to edit a resource, I have to navigate to the actors tab first. Depending on the frequency, this might get annoying.
Leaving the window open is not option due to limited screen real estate.
Clicking (or double-clicking) on the resource bar opens the "Party Resources" window.
If accepted, I'd be willing to draft a PR.
Players can add resources
Here's an idea: allow resources to be consumed or produced per-time-unit using Simple Calendar's API.
Would require additional configuration for each resource that would let you put in 'change per time unit' and 'type of time unit'. Additionally the resource would also need a storage underneath that would keep last update date.
Example:
Let's say that I have party food and I want it consumed every day. So I'd put in as a negative number in 'change per time unit' and "day" in 'type of time unit'.
Then you'll need a hook on SimpleCalendar.Hooks.DateTimeChange, (data) that is exported by Simple Calendar and just parse the data object that it returns to figure out what day is it. If it is different than last day (from resource) and it's an increment (gotta take into account that these can reset back to 1 but that's still increase) then we just add 'change per time unit' to current resource value and it's done - in this case since change is a negative number the resource will decrease.
fvtt-party-resources is showing a compatibility error with the Foundry VTT 0.7.9 production release. The module appears to still work.
When adding a resource, add a "link existing resource" with a dropdown of choices to the resource form. The obvious first option would be "gold", which counts all gold across the party and displays a total as a resource. Not sure which other resources I could track yet (hitpoints current/max totals?).
Note that I can't make it that when you add a resource and you call it "gold", it'd set this tracking up automatically because that would screw existing installs out of their values.
Provided by user JeansenVaars on the FoundryVTT Discord.
ResourcesApi.register_setting(name, options) and ModuleSettings.static register() should have empty as default value
Currently the behaviour is to hide or show resources in the top panel to players but regardless of the option the GM is always seeing everything. It'd be useful to allow hiding resources also from GM as when having more resources tracked at the same time it can clutter the screen a lot
Hello. I have been having a blast with this module for running dungeons and wilderness exploration for OSE. The macro scripts are perfect for what I needed. I was hoping to suggest two things. One is a general enhancement and the other is me wanting that green grass on the other side of the fence.
Notification on Target Number: Notify the player/DM either the depletion of a resource (0), >=, <=, or =.
Benefit: This would allow an explicit reminder if resources run out or if the party only has enough light for another two turns in a dungeon, etc.
OSE Compatibility: Would it be possible to add linked resource tracking compatibility for OSE?
Benefit: This is plainly something I would appreciate as a user. I understand if this is beyond what you hope to work on with this module, and I thank you for offering the features you already have as a system neutral module. I can assist with any system questions.
I'd like to keep track of some ressources which are only important for me and some of my players, but not all of them. I don't want the others to see them at all times and clutter their window.
Could you add a permission based filter, instead of the binary "Hide/Reveal", similar to the default foundry permissions for actors, items, journals, ...?
The module Award XP creates a nice pop-up that asks, which players you want to select, if you need inspiration.
Hi,
In games where it's important to keep things lower (or higher) such as tracking madness or oxygen, it'd be great if there could be separate kinds of notifications for resources when decreasing vs. increasing, since one is often preferable to the other and the message adds a lot of gravitas to the change.
Regardless, thanks for the module, really useful for maddening tabletops!
An option to let you incrase or decrease the resource by n with one Klick at "+" or "-".
Hi.
Please remove the foundry vtt warning.
Replace "compatibleCoreVersion":"0.9.0" by "compatibleCoreVersion":"9".
Docs: https://gitlab.com/foundrynet/foundryvtt/-/issues/5635
Heya, love the mod!
Just requesting the ability to move resources up and down the list of all resources (as in my session I run, it is a kingdom building one with many different resources, and I like to keep resources together, so all food types together, followed by basic building materials then complex ones, if I create a new food type I would like to be able to drag it next to the other food types at the start of the list).
I would also like the option to hide resources from the top bar but not from players (as I think the currently existing hide option hides it from players in both the overview and topbar) so if I have some lesser needed resources but still want players to see them they can go into the overview without it showing on the topbar.
Cheers!
Post-script:
What are the chances of a Patreon? I would rather monthly donate via Patreon rather than Paypal (to keep monthly donations all in once place).
I have enabled "Allow players to manage this resource." for all my resources but when players try to do so it says "User lacks permission to update Setting[]".
Any idea why this is the case?
I am running the latest version of the module and version 0.8.7 of foundry
Hi there,
could you please make a macro code available for increasing and decreasing resources. Maybe something like
To add 1 value: window.pr.api.add('resourceA', 1, { notify: true })
Hi!
We sometimes have resources where we want to show an approximate idea of the resource, but not exact numbers, like a loading bar, the life of the final boss, how much is filled the holy water container... Could be done?
if I have a resource set to not be visible to the players, but I edit that resource it toggles visibility and the players can now see it.
I've tried to set up a bunch of resources for my players to track. Does not work. Keeps telling them they don't have permission.
At the moment, the party resource value can be no lower than 0. For specific things, like say a "Karma" system or faction reputation system, where you might want values to be negative (or any other applicable case), being able to reduce the value below 0 would be nice.
Ideally, 0 should only be a limit for resources without a maximum, but I could see this also working as a universal toggle for the resource.
I'd like to be able to split items into different categories. I have tried doing so by making an item that works as a title (just a really wide image with text), however drag and dropping does not work as you would expect.
In my case I was trying to use this to know who was carrying what, but I think this feature would come in handy on some other context, perhaps when managing resources on different towns or something.
I'd also like to request the option to have both text and image show up in the menu.
Probably more of a power user type of thing, and probably related to #40 . I think it would be nice to have widgets that can be popped out from the party resource list, so you can show that singular resource as a bar/gauge or something (with the option to move and hide it), as opposed to showing all resources at once with the status bar.
Double points if you can replicate BarBrawl's function to use custom images for the bars, using a background image and foreground image to make something like this:
I believe bar brawl does this by hiding the foreground image by width.
The idea is to display a tooltip (containing a specific text entered by the GM) when a player puts the mouse over a ressource in the status bar.
This (optionnal) text can be configured thru the ressource editor dialog.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.