Best way to imitate an infinite at-start stack?

As far as I know, the only infinite supply sources in Vassal are piece palettes.

If you want the functionality of an at-start stack or deck, what is the best way to give the appearance of an infinite supply of drag and drop pieces?

One idea: one or a few pieces, map trigger causes the piece to place a marker identical to the piece, and the after placement trigger sends the marker to the at-start stack.

Another idea: have an arbitrary large number of pieces and hope they don’t run out.

One last idea: require the player to click to generate the piece to drag (I don’t like the additional step involved here).

Without getting into custom classes I think the closest equivalent, that would appear to be the most seamless, would be:

  1. Make a Deck with at least two of the type of piece in it (more if you want it to look like a really tall stack).
  2. When a piece is dragged out of the Deck to somewhere (which it would figure out by receiving an apply-on-move keystroke from the map it was dropped on, and would check its old location and realize it came from the deck), have it do a “Place Marker” of a new copy of itself, and then the apply-on-place keystroke of that (new) copy of the marker would do a Return-to-Deck on it.

So the result would be you could keep dragging pieces off the deck, and it would never run out.


Thanks, that is the first option I wrote, yes? The only difference is using a deck instead of an at-start stack. Is that significant in any way?

Yes, because if you just use a piece (or group of pieces), then the player is able to “grab the whole thing” and move it off all together. And so it will look like there’s nothing left on the original spot (until you put something back after the move is complete).

With a deck, it is already designed to have you drag one thing off at a time, and as long as the deck has at least one thing left in it, it will not look like there is nothing there.

Thus the deck version looks/feels more like an infinite supply of something.

Group select that includes a deck can move the whole stack even if you don’t allow multiple card draw, just like an at-start stack.

I suppose the graphical effect of multiple cards in a deck is one difference, and the ability to include pieces that lack a does not stack trait.

Thanks anyway, nice to have confirmation that I haven’t missed a better option, or an unexpected problem.

I can’t get any of my decks to select in a group-select. Yours select? sounds like a bug?

Oh I made it do it – you have to group select a box around a deck that also gets another (non-deck) piece. It won’t look like the deck is selected. But then if you drag the (not-in-a-deck) piece, it drags the entire contents of the deck out with it.

That, for what it’s worth, is clearly a bug.

But in any event you can work around it with the triggers, to make sure that only one piece dragged out of your deck at a time “counts”.

I am curious. Why would anyone want an infinite stack? I mean VASSAL is supposed to imitate a boardgame and you could never have an infinite physical stack.

(The game piece palette is different, because I use that when the rules say a particular resource, e.g. Fame&Fortune, is infinite.)

Many games state that the components are not limited, and yet provide a limited supply. You can always supplement a physical game with coins, counters, whatever, while that is not the case in Vassal.

Also, an infinite supply hack like this can obviate the need for hundreds of pieces to start in play, which just appeals to me.

Game piece palettes are very limited in their uses, while pieces on a map can be made to do all sorts of interesting things with GKCs.

Yes I can see that. I hope that in VASSAL 4, Game piece pallettes can be optionally implemented to look like at-start stacks. I think that would be easy.

What functionality does a deck or at-stack provide that you want? Normally I put pieces in decks or a-s stacks to limit how many are available, but you want the opposite, so what is it you really want to accomplish?

For example, simply wanting to keep supplies of finite pieces and infinite pieces adjacent to each other for aesthetic and UI purposes is one reason. I really don’t like having to call up unnecessary extra windows.

As another example, you can use a GKC on another piece with a sendto trait to send a piece in a deck somewhere, while you cannot do that with a game piece palette.

I just realised that this would change all the modules I have worked on. There is always some infinite resource and I always need some way of giving it to another player. I can drag it from the palette to their hand (well if I am allowed to), but a key command works better.

I’m glad you found the thread useful!

Also note that the “place marker” trait can be a great way to call on an infinite supply of pieces for some purposes, as it doesn’t require a supply source.

I’ll have to bear that in mind. It seems to function a bit like a mothership that can offload an infinite number of pieces. I can’t think of any VASSAL module that appears to have used it.

For the People has interchangeable “strength point” markers for basic troops, of which there is an unlimited supply. I use it to let the Army markers “drop off” strength points as they move around, and even for e.g. a big 6-SP marker to “drop off” a 1 SP marker, etc. Very useful in this context.

In the newer modules I’ve made, I have added (invented) a new generic piece I call the “grabber,” “getter,” or “go-fer.” Sometimes I put one in each player window, sometimes in the main window, and sometimes in both. Its job is to be a servant; click or right click on him, he gets whatever I want.

The idea started with “Race! Formula 90,” where players often had to draw a race card from the race deck to get a random number printed on the card. This involved opening the “decks” window, dragging and dropping cards, and then closing the window. A pain in the ass. So I made a go-fer whose job was to draw a race card and put it where the go-fer was.

It worked so well that I decided to add a whole menu of items to his right-click options that the go-fer would get. It’s come to the point that I really don’t need visible piece palettes anymore or even deck windows. I do everything I can via the go-fer. I implement him with “place marker” traits and “send to piece” traits. Sometimes too I may click on a stack or piece and send it/them to particular go-fers, sometimes based on PlayerSide. This approach may be one way to get around your problems.

I also do not tend to use game piece palettes or deck windows, for the same reasons. In my latest module, right-clicking anywhere on the map has a similar location-specific Place Marker function. Nevertheless, I still need an infinite supply stack or four, and the first idea I had still looks like the best way to do it (and is working great).