Attachable Pieces

I would like to create game pieces which can be attached to a larger piece. When the larger piece is moved, all the attached stuff stays with it.

This would allow implementation of games that have vehicles & passengers like trains, boats, horse + buggy, or for games where you add on stuff in game, like StelCon Infinity with the ships that get engines, guns and fighters attached to them, or any “RPG / Dungeon / Zombie” scenario where you have equippable items for the heroes

So far my workaround is to have a whole bunch of layered markers on the “mother piece” and then each layered marker can be cycled through all the possible items with Ctrl + 1, Ctrl + 2, Ctrl + 3, and so on. However, it would be much nicer to be able to literally snap stuff to game pieces, and then maybe unsnap and re-snap later, possibly moving them between “mother pieces” or “vehicles” or whatever.

Just in case it helps, here is a picture of what I am talking about with the board game StelCon: Infinity. The image shows how the ships have slots for equipment.

I would love to hear suggestions on how to make it so that you can literally drag & drop a small marker onto a larger marker and have it stick.

I’m trying to do something similar and am interested in a solution also.
VASL has something like this for tank turrets but for the life of me I can’t reverse engineer how they did it?

You could try using the Layer trait (not to be confused with game piece
layers) to achieve this effect.
I believe that is what is done with the tank turret.
I think there was once a tutorial that showed that being done, but I can’t
seem to locate it right now.

So instead of a separate piece or marker, you just make the marker image
part of the base piece and then either make it visible or not. It will
then easily accompany the owning piece as you move it around.

On Wed, Aug 21, 2013 at 5:56 AM, barthheart vances@rogers.com wrote:

I’m trying to do something similar and am interested in a solution also.
VASL has something like this for tank turrets but for the life of me I
can’t reverse engineer how they did it?

_____________**
Read this topic online here:
vassalengine.org/**forum/vie … 9#**p41749<https://forum.vassalengine.org/t/attachable-pieces/6134/4

_____________**
messages mailing list
messages@vassalengine.org
vassalengine.org/**mailman/listinfo/messageshttp://www.vassalengine.org/mailman/listinfo/messages

Yeah that will work but then it hides info on the main counter that I’d to be able to see with a mouse over. A separate counter would allow this.

Maybe I’m misunderstanding the problem, but how is the desired behavior any different from a stack of pieces with no offset?

The stack can move as one unit.

Parts (pieces) can be dragged and dropped onto the base, or removed.

:question:

Hey Shad,

Yeah that’s what I do now. I was just looking for a different way to do this. In VASL you can just click on the tank and the turret moves with it. When you do a mouse over the turret does not show up in the expanded panel. Just seemed like a slick way to do this that I’d like to copy but can’t figure how it’s done.

The OP probably has other reasons so I’ll stop hijacking his question now… sorry. :wink:

VASL is heavily-laden with custom Java code, so the effect you’re describing may well be one of those custom bits.

Yeah, that’s probably it and what I was afraid of. Oh well.