League-of-Foundry-Developers / torch

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

[Feature Request] Make mod compatible with Item Containers/Collection #51

Open Dddsasul opened 1 year ago

Dddsasul commented 1 year ago

After I installed the add-on I spent quite some time trying to figure out why it wasn't working. I gave up on it and moved on but then I realized that some of the other add-ons might be messing with it. It turns out that Item Containers does not play well with it. It's a super useful mod, especially if using ddb-importer. I'd really appreciate it if you could make it compatible. Either way awesome module.

lupestro commented 1 year ago

I'll read up on Item Containers, install it and take a look. It looks like it is dnd5e specific. It seems strange that the two aren't working well together, as I wouldn't expect them to touch the same places.

To give me a starting place for reproducing the problem, what version of each of the following are you using?

Sorry for the delay in responding. I need to turn on notification of issues arriving .

Dddsasul commented 1 year ago

Hi, thanks for taking the time for this: Foundry: Version 10 - Build 291 DnD5e: release-2.1.5 Item Containers: 10.0.9 Torch: 2.6.0

Also I just realized I might have not been clear enough when I said compatible. Torch works fine as long as you don't have the torches in the containers. It does not detect any items stored in the Item Collections. Once again thanks for taking the time with this.

lupestro commented 1 year ago

Ah, that is possible. Right now, variations in how we find items are based on system. In all of the systems we explicitly support, except for GURPS, for which we provided special topology code, an actor's items are in an actor's item collection. GURPS has an internal bag structure within the actor system data and methods to call to access things.

I'll have to bring up an instance of dnd5e with Item collection, put the data in the collection, and see how the data gets structured. The most compatible involves keeping all of the items flat in the actor's item collection, but tagging each one with it's container's item ID, if any, so specialized software can figure out and show how they nest. In that approach, nothing really changes for storage and general tools that are indifferent to the hierarchy of storage will work with it as they always did.

I'm guessing the Item Collection module doesn't do that, or you wouldn't be having a problem. Assuming that the Item Collection module stores data differently, we'd have to add a dnd5e-with-item-collection topology to be able to handle the two different approaches together. (Perhaps they add additional nested collections to an actor or do something like what GURPS did.)

I'll find out how much work it would involve. It seems doubtful at this point that we'd do anything about it until we make at least two or three pressing usability changes that are already earmarked for implementation, but that doesn't mean that it is off the calendar. I'm just not willing to commit to a priority at this point. (None of this is likely to happen until I deliver five-point FUDGE over on that system, but I finally got halfway there on that one this weekend after a couple of months of developmental torpor, so there is hope.)

Dddsasul commented 3 months ago

Hi, I was wondering if this is still being considered and if there are any updates on the feature you mentioned that needs to be finished first.

lupestro commented 2 months ago

Nothing yet, unfortunately, but there should be some motion on the backlog of stuff later this month.