Moving pieces onto map and triggers

To clarify some things, I’m on a Windows 7 system and using VASSAL 3.1.20 with an up to date 64-bit Java. Another user is on a Linux box using 64-bit Java and can’t seem to replicate this despite dozens of attempts…

Same behavior (still totally unpredictable) in 3.2 build 8355.

Andean Abyss has a similar set up where moving counters about the map causes a tally that is kept for those specific counters to be adjusted based on location. This sounds similar to what you are trying to do although not identical. Also, I did create a similar setup in one of Rob Doane’s modules (Guilford - I think it was) where the score was tracked on a totally different map.

Between these two modules, how they do their tracking, I think you should be able to fix your duplication issue.

Usually what is needed is an independent true/false property toggle embedded, that insures that duplicate firing does not occur during the sequence

I don’t fully understand what this means in terms of implementation, but I’ll download the Guilford module and poke around in it.

Just a guess but the double/triple hits you are experiencing at times might be due to the piece dragging not being clear cut and the piece not landing precisely but bouncing around a few times, albeit imperceptibly. I know that there is a check on OldMap but maybe that attribute doesn’t fully update till the piece finishes movement completely.

If I understand correctly, your SCM’s alternate between increasing and decreasing the VP total. In other words, there is no situation when they need to increase - or decrease - the score twice in a row.

If so, maybe you could add a couple GP’s to store OldSCM_name and OldSCM_direction (=increase or decrease). Then add a check on the SCM’s triggers to activate only when the SCM being played has a different name from the previously used one OR the same name but there is a request for a different direction of adjustment. The triggers themselves should take care of storing OldSCM_name and OldSCM_direction when successfully firing, with some Set Global Properties traits.

Yep, that’s right. A single SCM moving onto the map or off of the map adjusts a player’s score once–never more or less than once.

Ok, so the solution I proposed might work then.

I can’t seem to get this to happen on my Windows 7 64 bit machine. I have Java version 1.6.0_23.

What do you mean by ‘Up to date’ Java? are you using Java 7? Can you try installing Java 6 (1.6) and see if it still happens. There have been a number of funnies with Java 7, this could possibly be another.

Ok, Well, I have managed to get some strange behaviour, but not when moving a single SCM marker, only when selecting and moving two at once.

Your scheme for moving the VP markers is so complex, it is difficult to see whether there might be a problem in there somewhere. You could try a simpler scheme where you maintain the VP count in a Global Property, set the VP track up as an irregular grid with a region for each number, and use the ‘Send to Location - Named Region’ option to move the VP counter around.

I can fix this

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of Brent Easton
Sent: Tuesday, September 18, 2012 4:49 PM
To: messages@vassalengine.org
Subject: Re: [messages] [Technical Support & Bugs] Moving pieces onto map
and triggers

Ok, Well, I have managed to get some strange behaviour, but not when moving
a single SCM marker, only when selecting and moving two at once.

Your scheme for moving the VP markers is so complex, it is difficult to see
whether there might be a problem in there somewhere. You could try a simpler
scheme where you maintain the VP count in a Global Property, set the VP
track up as an irregular grid with a region for each number, and use the
‘Send to Location - Named Region’ option to move the VP counter around.


Read this topic online here:
https://forum.vassalengine.org/t/moving-pieces-onto-map-and-triggers/5284/10

Sorry, I tried to be exhaustive with the pertinent info and slipped up. On the Windows 7 box I have 64-bit Java 1.6 update 35 installed, that’s what I meant by current (I’ve seen enough in other threads to dissuade me from using Java 7).

Each power’s VP total is already maintained in a Global Property. The sequence of events is as follows:

  1. Drag an SCM from the power card to the main map (or vice versa) and the key command applying to all units ending movement on map is received
  2. This executes one of two triggers based on the property match (if the OldBoard was the Power Cards or the Main Map)
  3. Trigger sends a GKC to the power’s VP marker
  4. VP marker does a Set Global Property to increment/decrement the VP Global Property by the correct amount
  5. VP marker executes a Send to Location to move itself to the new correct location on the track

I haven’t ever tried moving 2 or more SCMs simultaneously, as that should never occur in the game.

You have the same setup as me and I have not been able to get it to fail.

It may seem retarded, but expand the expression and add your Maps, make the
expression ironclad - be sure.
The boards are not on the same map. Sometimes the pme neglects this I have
found (why I have no idea), same with Map/board setups

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of Brent Easton
Sent: Tuesday, September 18, 2012 8:29 PM
To: messages@vassalengine.org
Subject: Re: [messages] [Technical Support & Bugs] Moving pieces onto map
and triggers

You have the same setup as me and I have not been able to get it to fail.


Read this topic online here:
https://forum.vassalengine.org/t/moving-pieces-onto-map-and-triggers/5284/13

Thanks, I’ll try that tomorrow! At least it’s encouraging that no one can seem to replicate this. I have been testing on my iMac (OS 10.7.4, 64-bit Java 1.6u35) and just now got a tripled score adjustment when moving a French SCM to the map.

Actually I tried fleshing out the PME just now to specify CurrentMap, CurrentBoard, OldMap, and OldBoard. I still get the occasional doubled or tripled score adjustment, at least on my Mac here. Grrr. Am I this big of a klutz at dragging and dropping things?

What’s wrong with my proposed fix, anyway? Just make sure the triggers don’t fire if the piece name and direction is the same as the latest stored SCM’s names and direction…

Unless it’s the GCK itself firing multiple times by itself, for unknown reasons, that should cure it…

I’m trying your idea today.

Unfortunately the method of using a variable to store the name of the previous map and checking against that doesn’t work. Somehow the GKC sent to the VP marker that tells it to increment/decrement the VP Global Property is only sometimes occurring more than once. I’m stumped.

Of the previous map? My suggestion was to store the name of the previous SMC itself, assuming they have an unique BasicName. If the latter is not the case then store their PieceId but careful that won’t work if they came from the same game piece palette slot. In that case you gotta make sure they get an unique id (use a Dynamic Property called ID or something) when drawn from the palette (use a global property to keep track of all SMCs drawn). Moreover, you should also store the direction (increase or decrease) requested by the previous SMC.

Do you mean you are sure it’s the GCK itself misteriously duplicating himself while the trigger invoked to run it is only firing once? That sounds very surprising, if so. Make sure by adding a report action on the triggers…?

These square control markers all have the same BasicName–it didn’t occur to me to give them different names, they are all functionally identical. They aren’t in any palette at all, so never get drawn from one. They are items in At-Start Stacks.

I’ll pop a Report in to see if it’s the Trigger that’s actually firing 2+ times. I guess it would have to be.