Different position of the cards when loading a game

In the main map, the cards are played partially assembled, from left to right. I save the game, but when I load the game, the position of the cards is different. There are cards that are completely covered by others… Why?

You’re going to have to give us an example. I don’t quite follow what’s happening (or what it should do). do you have a specific module?

  • Michael.

2009/1/14 packonn <messages@forums.vassalengine.org (messages@forums.vassalengine.org)>

Post generated using Mail2Forum (mail2forum.com)

I’m creating a module.
This is an example: I put a first card on the main map. Next, I put a second card partially assembled on the first card (slightly to the right). I save the game. When I load the game, the first card (not the second) appears partially assembled on the second card (slightly to the left). The cards have changed their position.

Have they changed their position or is the wrong one on top? It sounds like they’re in exactly the same position, but that the order in which they are drawn has changed.

  • M.

2009/1/14 packonn <messages@forums.vassalengine.org (messages@forums.vassalengine.org)>

Post generated using Mail2Forum (mail2forum.com)

First, the cards do not sound like they are in a deck and
Second, It sounds like you have not defined any type of GPL control so the drawing of pieces is going to be at the mercy of the default “top” GPL and may be why they show up differently when you reopen the module

From: Michael Kiefte mkiefte@dal.ca
To: VASSAL Engine Forums Mailing List messages@forums.vassalengine.org
Sent: Wednesday, January 14, 2009 1:03:56 PM
Subject: Re: [Module Design]Re: Different position of the cards when loading a game

Have they changed their position or is the wrong one on top? It sounds like they’re in exactly the same position, but that the order in which they are drawn has changed.

  • M.

2009/1/14 packonn <messages@forums.vassalengine.org (messages@forums.vassalengine.org)>

Post generated using Mail2Forum (mail2forum.com)

Ok. The wrong is in the top card. Before save the game, the second card is on top. When save and load the game, the first card is on top. The cards have not changed their position (sorry).
Tim: The cards are not in a deck.

I have Windows Vista, 2046 RAM, Vassal 3.1.0 beta 3, Java 6 Standar Edition.

As I thought.
The cards are not stacked w/ each other from your original description.
You said it’s a brand new module so you probably do not have any type of grid for pieces to use/snap and no game piece layer control defined
Therefore the 2 cards will currently default to the same game piece layer.

Now how Vassal decides to draw pieces that are not stacked, but overlap that also reside on the same game piece layer is probably not a function of “how it was saved” but more likely to do with when they are encountered by buildfile/executable/ editor order (?) at run time but someone else with more knowledge of the internal engine code workings would have to confirm if that is the case

From: packonn messages@forums.vassalengine.org
To: messages@forums.vassalengine.org
Sent: Wednesday, January 14, 2009 2:00:12 PM
Subject: [Module Design]Re: Different position of the cards when loading a game

Ok. The wrong is in the top card. Before save the game, the second card is on top. When save and load the game, the first card is on top. The cards have not changed their position (sorry).
Tim: The cards are not in a deck.


Messages mailing list
Messages@forums.vassalengine.org (Messages@forums.vassalengine.org)
http://forums.vassalengine.org/mailman/listinfo/messages_forums.vassalengine.org

Post generated using Mail2Forum (mail2forum.com)

I’m not getting involved in this conversation until I see a link to the module, a logfile displaying the error and a detailed explanation of how to reproduce it.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

If cards are overlapping but at different positions, then you can bring either one to the top by clicking on it. Like expanding a stack, this won’t be communicated to other players and won’t be preserved when you save a game.

rk

Post generated using Mail2Forum (mail2forum.com)

How to put a link to the module?

If it’s a freely available module that anyone can download, just cut and paste the link into your e-mail.

If it’s a module that you made yourself, you’re going to have to upload it to a server that you have access to and then tell us the link.

Otherwise, it sounds like what you need to do is put the cards in a stack and then change the stacking options under the map so that it only looks like they’re side-by-side. This is how a Player Hand works – the cards are actually stacked. Keep in mind that if you change the Stacking options, everything on that map will have the same stacking options, so you may want to make a new map for your cards… Or use a Player Hand. VASSAL will remember the order of cards in a stack or hand, but it will not remember which card is drawn first if they’re not stacked together.

  • M.

2009/1/14 packonn <messages@forums.vassalengine.org (messages@forums.vassalengine.org)>

Post generated using Mail2Forum (mail2forum.com)

This is the link to the module:
amarocimarra.googlepages.com/NaipeenelEverest

For some reason, stacking is disabled under “Stacking options” under both maps. I would uncheck that and then set vertical separation to zero and the horizontal separation wide enough so you can see each card.

  • M.

2009/1/15 packonn <messages@forums.vassalengine.org (messages@forums.vassalengine.org)>

Post generated using Mail2Forum (mail2forum.com)

Thanks mkiefte, but not work. The cards partially below other cards remain above them when load the game.

have you tried actually moving the cards around. To be in the same stack, drop a card on the first card on the left. Then they will be in the same stack. Once they’re in the same stack, their order will not change.

  • M.

2009/1/15 packonn <messages@forums.vassalengine.org (messages@forums.vassalengine.org)>

Post generated using Mail2Forum (mail2forum.com)

Problem solved! The key was stacking options of the main map (uncheck disable stacking, horizontal= 55, vertical= 0, expanded and not expanded). Now the cards are perfectly aligned and mounted when load the game!! Was a mistake of mine the trait “does not stack” in each card. Removing this trait, the game works fine. Thank you very much for all!! (especially to mkiefte)