Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wildcard support for custom items #74

Open
jpreston84 opened this issue Mar 14, 2024 · 4 comments
Open

Add wildcard support for custom items #74

jpreston84 opened this issue Mar 14, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@jpreston84
Copy link

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
Copy link
Collaborator

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:

  • "Torch Kukri" doesn't have any entry in the light sources JSON.
  • You'd have wildcard entries in the light sources JSON like "{item} - Torch (Blue)".
  • In your inventory, you'd have "Torch Kukri - Torch (Blue)", which would then be available as a light source with the appropriate settings for Torch(Blue).

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
Copy link
Author

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
Copy link
Collaborator

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:

  • I could work a tighter item integration and provide UI for the light source qualities of the item. (There's new document support for that sort of thing that wasn't there before 10.x.)
  • I could probably create a light source item type that could be associated with another item through a reference on a flag, and then those could end up in compendia.

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.

@lupestro lupestro added the enhancement New feature or request label Mar 19, 2024
@jpreston84
Copy link
Author

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants