Create account / Log in

Attachable Pieces

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

Attachable Pieces

Postby Tank7 » July 12th, 2013, 4:55 am

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.
Tank7
 
Posts: 8
Joined: May 3rd, 2013, 4:22 pm

Re: Attachable Pieces

Postby Tank7 » July 18th, 2013, 6:51 pm

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.
Image
Tank7
 
Posts: 8
Joined: May 3rd, 2013, 4:22 pm

Re: Attachable Pieces

Postby Tank7 » July 29th, 2013, 4:54 am

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.
Tank7
 
Posts: 8
Joined: May 3rd, 2013, 4:22 pm

Re: Attachable Pieces

Postby barthheart » August 21st, 2013, 12:56 pm

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?
barthheart
 
Posts: 15
Joined: July 21st, 2010, 7:33 pm

Re: Attachable Pieces

Postby tar » August 21st, 2013, 10:16 pm

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 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:
> http://www.vassalengine.org/**forum/vie ... 9#**p41749
>
> ______________________________**_________________
> messages mailing list
> messages@vassalengine.org
> http://www.vassalengine.org/**mailman/listinfo/messages
>
User avatar
tar
 
Posts: 772
Joined: January 2nd, 2008, 6:53 pm
Location: Los Angeles area

Re: Attachable Pieces

Postby barthheart » August 22nd, 2013, 12:42 am

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.
barthheart
 
Posts: 15
Joined: July 21st, 2010, 7:33 pm

Re: Attachable Pieces

Postby Shad » August 22nd, 2013, 2:16 am

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.

:?:
User avatar
Shad
 
Posts: 167
Joined: December 28th, 2007, 4:45 am
Location: USA

Re: Attachable Pieces

Postby barthheart » August 22nd, 2013, 12:32 pm

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:
barthheart
 
Posts: 15
Joined: July 21st, 2010, 7:33 pm

Re: Attachable Pieces

Postby JoelCFC25 » August 22nd, 2013, 2:30 pm

VASL is heavily-laden with custom Java code, so the effect you're describing may well be one of those custom bits.
JoelCFC25
 
Posts: 589
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN

Re: Attachable Pieces

Postby barthheart » August 22nd, 2013, 4:42 pm

JoelCFC25 wrote: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.
barthheart
 
Posts: 15
Joined: July 21st, 2010, 7:33 pm


Return to Module Design

Who is online

Users browsing this forum: No registered users and 2 guests

cron