Are Counters/Cards aware of their position in a stack?

I would like to use an Inventory Window rather than the default “Draw Specific Cards” for the discard pile, mainly because I can control better what information is displayed (and I can also right click directly on the entries to send these cards back to the board). However I do notice that when I specify no sorting parameters the list doesn’t correspond with the Discard deck when that one also isn’t sorted.

The Discard Deck shows you the stack, top to bottom for picking stuff out. The Inventory Window, without any sorting guidance seems to display pieces in a haphazard order.

Is there a way to sort an Inventory by stacking order top to bottom? Is there also a way to limit the number of cards displayed in the discard deck inventory to say… the top 4 or 5 cards? Like putting this in the matching properties: DeckName==“Discards” && StackPosition<=5 or some such?

Unfortunately I don’t think any kind of StackPosition property is exposed for deck members.

You could theoretically create & maintain one yourself for your discard pile (global key commands whenever cards were added and removed, and a dynamic property “DeckPosition” on each card).

Brian

Thanks Brian! I did consider that, I was hoping for something easier. One advantage is that unlike “Send to Location”, “Return to Deck” does seem to trigger map movement commands, which would allow me (in theory) to perform an update based on just one command (though not much of a gain since a trigger could respond to both the map movement command and the discard command)

If you used a Global Property to track the size of your discard pile, and then gave newly discarded cards their position in “reverse order” (i.e. first card discarded and thus on the bottom gets “1”, second card discarded gets “2”, etc) then you wouldn’t need any GKC’s when discarding cards, nor when taking one back off the top. You’d only need a GKC when something pulled out of the middle.

And that’s exactly the case here. I do need to take into account when something gets pulled in the middle because all the cards above that card (above, because it’s reverse order, excellent idea thank you!) will need their position updated. Which shouldn’t be too hard.

Decks already provide a map level property with the number of cards in the pile, it’s _numPieces.