League-of-Foundry-Developers / torch

Simple torch module for Foundry VTT
10 stars 20 forks source link

Add wildcard support for custom items #74

Open jpreston84 opened 6 months ago

jpreston84 commented 6 months ago

In our Rise of the Runelords PF1 campaign, a player has ended up with two "Torch Kukri" items, each of which acts like a torch of a different color. I've worked around the issue for now, by hard-coding the name of each item with a separate config. However, I think it would be ideal to be able to define the ability to use wildcards or RegEx, something like "(.) - Torch (Blue)" and "(.) - Torch (Orange)". This way, we could just add a couple of presets with different colors for these kind of items, and very quickly add new torches in-game as needed, without having to go back and modify a json file again.

lupestro commented 6 months ago

I think I see what you're looking for and why, but I think this could add a lot of complexity for only occasional gain. It would be a hard feature to describe well. So I'm already a little reluctant.

Let's see if I understand correctly by parroting back what I think you are saying:

Another way to do that would be to make "Torch Kukri - Torch (Blue)" an alias for "Torch (Blue)" in the JSON. If we had a way of applying additional aliases directly in the Module Config as well as in the JSON, would that suffice? That would also provide some relief for games run in other languages, being able to supply localized names without making a JSON file.

It would be a feature with more uses and also be a much easier feature to understand.

jpreston84 commented 6 months ago

Yes -- I very much like the idea of being able to configure aliases directly in the Module Config. That would make it super easy to update on-the-fly when a player gets a new item -- just a quick visit to the Module Settings UI and you're off to the races. In the future, you might also consider packaging a set of sane presets (I personally don't have a big issue with uploading a JSON file, being a web dev myself, but I can see where others might).

lupestro commented 6 months ago

you might also consider packaging a set of sane presets

What would qualify as "sane"? (I'm a GM so my sanity is often in question ;) ) I left the visuals that ship in the base sources.json pretty bland. Clearly a torch or candle could afford to feel more like a torch or a candle than I supplied, but I didn't want to make it so atmospheric that it became a distraction - gameplay/interaction matters so much more than ambiance and stagecraft - figuring folks could "season to taste", but they could stand to be turned up a notch.

I could supply pre-built JSON files - light-physics.json with colors and styles tuned to the light colors and behavior that actual candles, torches, lanterns, flashlights, etc. really exhibit and an amped-light.json that exaggerates the effects, making it more cinematic. (This would be even likelier to happen if somebody happened to open a PR of sample light sources containing the desired properties. :)).

Of course, a module can do just about anything, but it all takes work:

Any of these would take more time, and my time is always very limited. I did the simplest possible thing initially to get a badly needed feature into play. While I have one or two features I'm committed to that will simplify use of Torch by casual GMs and players, I'd like to focus most of my Foundry development time streamlining gameplay in my system implementation for Fudge-based RPGs, as I think that's probably the best contribution I can offer to the community.

Even so, I will mark this ticket as a potential enhancement, as spinning up aliases on the fly will improve the GM experience.

jpreston84 commented 6 months ago

Thanks for even considering all this. I know how much time and effort goes into GMing (so much that I stepped back after a couple of years, and now just do software and character sheet stuff to help out), and completely agree that gameplay matters a lot more. It's already huge for my party, being able to toggle on/off light.

To the goal of making it easier for people to GM and improving gameplay, I think being able to configure on-the-fly aliases would be huge, and would resolve 90%+ of the problem. (I'm not opposed to contributing some presets too, but the ones I have are very much tailored to my current party, and we've only played with them for one session so far, so I'm not sure they'd be helpful...yet.)