Closed sevrick closed 19 hours ago
Yes, the compound power is internally converted to individual items, like a multipower. Foundry doesn't have the concept of a container withing a container. I'll have to do a bit of research to see how this might be done.
Possible workaround: Your going to have to move each compound power sub-item into the compendium, then back to your actor sheet. Not pretty. A good naming scheme might help.
Inspiration REF: https://gitlab.com/tposney/itemcollection
The core sheet currently supports dropping a Folder of Items to create all items as owned items. async _onDropFolder(event, data)
You have to override the Sidebar class If you look into your foundry installation folder (where Foundry.exe is, not the data) look at "FoundryVTTresources\app\templates\sidebar\sidebar.html" to see how the sidebar is rendered You'll find that it iterates the tabs with {{#each tabs as |tab id|}} Then from foundry, open the console and paste Sidebar.prototype.getData to see how the tabs are generated
This all seems rather technical. To what end is this supposed to do. I am not sure how the link to the mod is supposed to be used.
I pasted it in the console but it just showed this:
How does this translate into being able to store items in a compendium.
I did however find that you can create a folder drag a compound power into it, then drag the folder into a compendium and it keeps the structure of the 1st power but not the 2nd.
Edit: I also notice you can't even move the compound power from the exported file onto another character.
Sorry about that, I was making some coding notes here, that weren't meant for you. Your welcome to read along as I try to figure out how to drag/drop compound powers. I saw the folder drag/drop support, it still treats each item in the folder as distinct items, no relationships to each other. That is something I'm working on.
Making some progress. Items and sub-items are sorted alphabetically by default. Probably not an issue. I wasn't intending to use a folder. Some sort of collapsible UI may be nice.
That's awesome! I can't wait to see the final result. Turns out there are a lot of compound powers as weapons in the Hero System Equipment Guide.
I almost have the compendium working with compound powers as well. Turns out there is a missing core FoundryVTT feature that I need for the compendiums, but I can mostly get around that. I think I can get something working for this weekends publish. Likely won't be perfect, but better than the current no-support for drag/drop of compound powers.
Ended up using folders as compendiums were tricky. This feature will be included in the next release (3.0.80).
So I imported a revolver that was a compound power but when I drag it to a compendium it doesn't show any of the contence of the compound power. What it looks like before copying:
What it looks like after moving it to a compendium:
![image](https://github.com/dmdorman/hero6e-foundryvtt/assets/2902311/393c7b61-e822-4e2e-9d4d-4c2fe40426c5)
I am trying to create a library of equipment but this is kind of a road block.