fantasycalendar / FoundryVTT-ItemPiles

Other
33 stars 51 forks source link

[REQUEST] - Actorless dialog using only currency and a array of items #559

Open p4535992 opened 2 months ago

p4535992 commented 2 months ago

Is your feature request related to a problem? Please describe.

No problem related.

I am trying to emulate a pick pocketing action, but the use case occurs to me in other contexts as well.

I want to have items retrieved while avoiding "touching" the target token or even in its absence of it.

Describe the solution you'd like

The idea is to show only the dialog interface for retrieving objects without being bound to the presence of an actor/token target.

For now I can solve with the createItemPile method and create a token on the canvas, but it is not ideal for other use cases.

I would like to be able to have something like that:

const options = {
  currency: "1d4gp 10sp", // classic currency label
  items: [...] // array of itemsData or uuid to the items
}

game.itempiles.API.showItemPileDialog([interactingToken], options);

Obviously, if the dialog is closed, the content is lost.

Describe alternatives you've considered

LockAndKey has some pick pocket code, but i really like the ui interface from item piles.

Additional context

Start something on a pr here https://github.com/p4535992/FoundryVTT-ItemPiles/tree/add_no_actor_dialog, but is more complicated than excpeted, and i'm not sure if is the right direction for this feature either...