dmdorman / hero6e-foundryvtt

MIT License
7 stars 6 forks source link

Moving a compound power into a compendium #1068

Closed sevrick closed 19 hours ago

sevrick commented 1 week ago

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: image What it looks like after moving it to a compendium: image

I am trying to create a library of equipment but this is kind of a road block.

aeauseth commented 1 week 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.

aeauseth commented 1 week ago

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.

aeauseth commented 6 days ago

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

sevrick commented 5 days ago

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: image 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.

aeauseth commented 4 days ago

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.

aeauseth commented 3 days ago

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.

image

image

sevrick commented 2 days ago

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.

aeauseth commented 2 days ago

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.

aeauseth commented 19 hours ago

Ended up using folders as compendiums were tricky. This feature will be included in the next release (3.0.80).

image