Mark Unmoved for one side

So I’m creating a module and was wondering if this is possible:

I would like to do one of two things … either Have the ‘moved’ marker disappear for all models for a particular player when either a button is pressed or when the turn changes. Example:

Player 1 moves some pieces around during the movement phase of his turn.
Player 1 knows who moved (affects how much a unit can shoot) because the moved markers are there.
The turn counter now goes to Player 2 … at this point if I hit the Mark Unmoved, all the markers are removed.
Player 2 moves some pieces around.
Player 2 shoots … now some of the pieces that Player 1 didn’t move are harder to hit, but with mark unmoved removing all markers, without an additional marker they would all look like they weren’t moved.
Starting Turn 2, player 1 resets all of his “Moved pieces” but Player 2 still requires his markers to facilitate player 1’s shooting

Now, not hitting the mark unmoved button until the end of the turn would only help player 2, because the ‘unmoved’ status would still carry over into turn 2.

I hope that makes sense …

It might be possible using the Marked When Moved trait. You can assign that trait a keyboard command for both player 1’s pieces and player 2’s pieces. You can then make two trigger actions which triggers the commands on each piece. This first triggers command would be applied to all pieces that move on the map, which is done in the map properties itself. The trigger should have a Moved!=“true” Matching Property so that the piece is only marked as moved once when it moves.The second trigger should have a similar command, also triggering the Marked When Moved traits, but having a Matching Property of Moved==“true”.

Now you could make a couple Global Key Commands on the module level, each one using the key command of each players second trigger. Then make a Multi Action Button containing these two Global Key Commands. Set the Matching Properties of each command to check for the player side associated with that command, like the first GKC would see if PlayerSide==“Player 1” in order to send player 1’s key command to their second trigger.

Once done when ever any player clicks that button, it should unmark only their pieces. I hope that all makes sense, I’m not sure I was too coherent with the explanation. But I can make an example module if you’d like.

Thinking about it, you could probably ditch the first trigger altogether, I don’t actually use Marked When Moved options much at all so I’m unsure. Be sure to prototype what ever it is you do though.

an example module would be great. I haven’t messed with multi-action or global key commands AT ALL! Most of what I’ve learned has been a lot of trial and error, looking at other modules, and reading these forums. I’ll try it out and see what I can do in the meantime!

Also, the pieces involved aren’t associated with a single player I don’t think. The game is based on a tabletop miniature game. Players pick a nation to build their armies from, and players could potentially have the same armies thus using the same peices. Does this have an affect? Or will it only matter if Player 2 pulls those pieces?

I get what your saying, and it does complicate things a tad. Thankfully I’ve just made a module with a similar mechanic, so I’ll make an example module for you to use and look at. :slight_smile:

Okay here it is, this is as basic as it gets.

Both player 1 and 2 can take pieces from the same place, and the example will recognize who owns which Piece. When the “Unmarked Moved Pieces” button is pressed, only the player who pressed it pieces will be unmarked.

Its a fairly simple system and probably a good place to start in getting into more advanced functions of vassal, hope it proves helpful! :smiley:

Edit: The forum kinda buggered out on me trying to post this, was kind of strange. o.o

Alright, let me attempt to wrap my head around this so I have a better understanding of what you’ve done:

Player 1 please “Gun Guy” and places it (if I have player trays as Map Windows, does it matter where I place it?) in his Map Window. This triggers the “Piece Sharing” property via the Setup Trigger, this triggers Owned 1, which sets the Dynamic Property to ‘1’ for that guy. Placing “Gun Guy” also triggers setup within the “Movement Marker” trait. This changes placed from no to yes. This triggers “moving”, which triggers Marked as Moved. In turn this provides the move marker.

Now, when I press the Undo Mark, it activates the Undo Mark trigger, this in turn activates Undo 1 and Undo 2, so then it looks to see who touched the button and then searches for pieces from that player’s Set, as long as it’s marked as moved and belongs to player 1 it’ll be marked as moved.

So my next question. I have multi prototype definitions to add the mark as moved icon two different pieces. Pieces are different sizes and I wanted the icon to be in relatively the same location. Can I replace the “Marked when Moved” trait in the Movement Marking prototype with the prototype to put the marker where I want?

Alright, let me attempt to wrap my head around this so I have a better understanding of what you’ve done:

Player 1 please “Gun Guy” and places it (if I have player trays as Map Windows, does it matter where I place it?) in his Map Window. This triggers the “Piece Sharing” property via the Setup Trigger, this triggers Owned 1, which sets the Dynamic Property to ‘1’ for that guy. Placing “Gun Guy” also triggers setup within the “Movement Marker” trait. This changes placed from no to yes. This triggers “moving”, which triggers Marked as Moved. In turn this provides the move marker.

Now, when I press the Undo Mark, it activates the Undo Mark trigger, this in turn activates Undo 1 and Undo 2, so then it looks to see who touched the button and then searches for pieces from that player’s Set, as long as it’s marked as moved and belongs to player 1 it’ll be marked as moved.

So my next question. I have multi prototype definitions to add the mark as moved icon two different pieces. Pieces are different sizes and I wanted the icon to be in relatively the same location. Can I replace the “Marked when Moved” trait in the Movement Marking prototype with the prototype to put the marker where I want?

You’ve pretty much got it down pat. :slight_smile: For someone this new to vassal I’m impressed you figured it out so quickly.

Anyway, about your first question: “If I have player trays as Map Windows, does it matter where I place it?”

No, you can use any map, window, tray, or what not to place and hold the piece. BUT said window should have the Setup command sent to any piece which moves in said window. This can be set in the properties of every window.

As for your second question, you will likely want to make multiple prototype for each size piece you have. Maybe even name them Big Marker, Medium Marker, ect. There are a few ways of doing it, but the simplest is to simply copy the “Movement Marking” prototype and rename it to something more size fitting. Then change the offset location of the Mark when Moved trait in the new prototype, and put said new prototype on the pieces which need it.

That is a basic explanation though, you might be required to make and arrange quite a few prototypes, I kind of went prototype heavy for the heck of it. But it is good to use prototypes almost excessively, to make it easier to add and edit traits and commands across multiple pieces.

What you will probably end up doing is making a Small/Medium/Large prototype out of the “Movement Marking” one, then add to that any other prototypes you need, like Piece Sharing, or other basic stuffs. After that you simply apply the newly sized prototypes onto the appropriate pieces separately and it should work just fine.

Will it mess anything up moving the piece from one map window to the next? From the Player’s ‘tray’ to the ‘table’?

Not that I can think of, actually if the tray is just a holding place, then you DONT want to give it the Setup command. That command should only be on maps that are being played on, not holding pieces.

There may be some things that linger if you move pieces from and to the table a lot, but extra commands can be added to “reset” a piece if it is returned to the tray or discarded for what ever reason.

Edit: And I keep getting a strange error page when I try to post on the forums, is anyone else by chance?

thanks for help reddblu. If I run in to any problems implementing it into my module, i’ll be coming back to ask for sure.

I’m getting the error as well, but seems that my posts are still going through.

No problem, It’s been slow around here so I’m glad to have something to preoccupy me for a bit.

Okay, so I have a Piece Sharing prototype and it matches the one from your example. The only difference is I’ve increased the players from 2-4 but all the Trigger Actions look the same. I then created a prototype for the Mark Moved, the only differences between mine and your example being that I increased the number of Triggers to account for more players, and the Marked as Moved trait matches what I need for the size of the unit base. I placed the Piece Sharing prototype into the Mark Moved prototype. I don’t have a “Normal Stuff” prototype in that bundle, as that’s already a prototype I have attached to the unit.

I tried both pulling straight to the player tray, then to the table and straight to the table. Moving the unit does bring up the moved icon where I want it, however when I push the “Unmarked moved” button, nothing happens. I switched back and forth between Player 1 and Player 2, again … nothing. I’ve also pulled the “Piece Sharing” prototype out of the Mark Moved and just put both the Mark Moved and Piece Sharing prototype as traits on the unit itself. Still nothing, I’ve also tried a restart of Vassal because I’ve read some things don’t really ‘take’ until you’ve saved and restarted.

Finally, does it matter if the “Unmarked Moved” button is not in the Map Window for the ‘Table’? It shows up in the window where the chat box and all that stuff is. I thought perhaps that may be a factor but haven’t tried it yet.

What else should I be looking to check? I feel like, see moved marker is showing up … it’s not properly labeling the pieces as belonging to a specific player … I don’t know. I’m certainly not a programmer.

Did you add Triggers in the Movement Marking prototype for players 3 and 4? As well in the Undo Mark trigger you will need two extra keystrokes for players 3 and 4.

As well, did you change the Dynamic Property Owner in Piece Sharing to set a 3rd and 4th player?

If you want I can take a look at it if you upload it here. If all else fails I suggest checking to make sure every key command, every property, every everything is spelt exactly the way it should be! When making the module I had a hard time getting it working, because I accidentally typed the Owner property as Owned. :laughing:

The trigger actions for Player 3 and 4 to Set 3 and Set 4 are both there in the Piece Sharing as well as being added to the Dynamic Property for setting the Owner. I have also added the Undo Mark trigger in the Movement Marking prototype for 3 and 4. I’ve only attempted to test 1 and 2.

I’ve gone though several times in order to make sure all the keystrokes match, and everything matches your example (which works) but my module is not working.

I tried to upload but it says, “The extension is not allowed.” It’s 6.6 MB so might be to large.

Even when I made another tiny mod that was only 8kb and copied my work (still doesn’t work) it said the extension was not allowed. So hopefully the link below for drop box will work

https://www.dropbox.com/s/zm904l3v5qc54rg/Kiwis%20Attempt%20at%20Mark%20Move

Seems the reason it says the extension isn’t allowed, is because you forgot to give it an extension. I know this may seem strange but you have to manually type .vmod at the end of your file name when you save the module. That’s okay though cause I can open the one from dropbox just fine and I’ll get back to you once I figure out whats wrong here.

Alright I got it working again. There were a couple things you were missing, specifically in the Setup and Moving triggers of MM Small, their properties {Placed==no} and {Placed==yes} needed quotation marks around the no and yes parts, like so: {Placed==“no”} {Placed==“yes”}.

Even then, you did not put the Setup command on the main map, which is the very thing that starts this whole system to begin with. Without it is like trying to drive a car without the key.

EVEN then, it still would not work for me! Stumped until I figured out the Setup and Move triggers just needed to swap places, and then it was fine! I don’t remember them swapping places in my example but what ever it works now.

Also, I decided to nix the Mark When Moved trait and system altogether. When you start building your own supplement systems like this, you usually want to go all the way and not rely on trying to make vassals default systems work with it. Hope you don’t mind.

The only reason I used the Mark When Moved trait was because it was an example, and I don’t have much experience with how Mark When Moved works. As such the move marker is now a Layer, instead of an actual move marker. Works the same way, same amount of traits, less unforeseen difficulties in the future. Oh, and uses a different property now but you can easily check it.

So it was a mix of common mistakes, and weird vassal juju, both of which plague me consistently. Good luck on your project. :slight_smile:

And it now works! Thanks reddeblu!