Storing a collection of Items in an Item?

Use cases would be:
  • containers could contain other Items
  • some items have prerequisites, which consist of other Items
I'm trying to figure out the best way to represent that. It seems logical that adding Items to an item should be done via drag and drop from a compendium (or from the game items SideBar tab).

I can use the BasicDocAppshell.svelte example from essenial-svelte-esm as a reference for drag and drop... but what do I do with the drop?

Option 1

Add them as an embedded collection? As far as I can tell, one can't just arbitrarily add an embedded collection or Items to an Item?

Option 2

I could just write the uuids or ids to an array in the Item's .system node. But I feel like that's probably expensive as it would involve a db lookup on each item?

Option 3

...?
Was this page helpful?