Player hand GKC affecting other player hand

Hi there !

1st, Vassal Engine is quite amazing ! Just loving it. ;)

So far, i am creating my 1st module as a pen and paper RPG support regarding the Cardinal’s Blades RPG. All the mechanics are managed using a card game.

However, for each side, i created 2 hands : one is where all cards are managed and the second one contains a character sheet scan (Currently, the board image is the character sheet.). I’ve created 10 at-start markers representing player’s life, each having 3 layers : unchecked, checked and double checked, for each player’s character sheet. For each marker, I put a shortcut to reset to layer 1 (Unchecked) and created a GCK in the Player hand - charater sheet module to reset all life markers. Parameters are : Matching Properties : CurrentBoard = Player_character_sheet_board.

All shortcuts use the same hotkey. However, using this GCK playing online resets all players markers when I want it to reset the playing character only. A workaround would be to define a different shortcut for each GCK (and each player life marker). I guess that the map level (GameTable) is the only parameter that seems to be checked by the GCK (and this map is shared by all players and so, the GCK and shortcuts are working as intended. Is there a way to have a common shortcut for all players but that will reset hp markers of the playing player only ?

Moreover, where can I find all functions and parameters available in Vassal ? I searched in the wiki, tutorials, Module Designer Guide but didn’t find a complete definition of all functions, parameters and syntaxes.

Thx for reading. :slight_smile:

Cordially,
Yannick H.

You could add another property to the markers, that specifies the owner of the marker. If the owner is static for each window you simply have to add a Marker Trait to each of your HP marker which has the same value as the side the player is playing with. Then your GKC could also include the property in its condition like:

$CurrentBoard$ == $Player_character_sheet_board$ && $Owner$ == $PlayerSide$

As PlayerSide is the side the player uses. Would that solve your problem?

Regarding the overview of properties, I find this site quite useful:
vassalengine.org/wiki/Properties
It lists which game pieces and entities can specify which properties. The actual links then provide further information of those properties.

Well, I tried this solution and it does not work. I checked several things but could not find where the problem is. I used temporary text labels attached to a HP marker to check everything but i should have missed something.

I tried the following things :
Text label : $PlayerSide$ correctly returns “Peirolin”. So does $CurrentBoard$ with Peirolin_sheet. Syntax of these properties is ok.
Marker, Name : Owner, Property : Peirolin. The text label (with text parameter = $Owner$ ) correctly returns Peirolin.
Marker, Name : Owner, Property : $PlayerSide$. It does not work. It only returns $PlayerSide$ in the Text Label. I can’t find out what mistake i do : Syntax ? Wrong trait ? I tried $PlayerSide$, {$PlayerSide$}, ($PlayerSide$)… trait not suitable ? I also tried using CP… Anyway, it is not working. As long as I can make this part work, I won’t be able to succeed in my GCK definition.

Thx in advance.

The Problem is the Marker Trait. This trait can only be used for static properties which can’t change and which are never calculated by Vassall. That’s why $PlayerSide$ will be interpreted as a pure String and thus put into the label the same way. A Calculated Property would to the trick and return the correct player side, when you put it in curlcy braces like:

Name : Owner
Property: {$PlayerSide$}

However if you add the property like this to all your items the owner would change and the value would depend on who is currently playing. This means when the “Peirolin” player is playing all items would have the “Peirolin” property attached and your problem wouldn’t be solved. What you want is a marker trait that simply states the player side for each of your life markers. So add a marker with “Peirolin” to all your life markers in the window of the “Peirolin” player and change the GKC’s matching property to:

{$Owner$ == $PlayerSide$}

Now when the “Peirolin” player activates the GKC only the life markers that have the “Peirolin” marker should be activated by it.

However I realized that you defined your GKC INISIDE each players own character window. If that is the case there should be the option “Apply to counters on this map only”. When you tick this it actually does the same thing as I mentioned without using the additional Marker traits. So the GKC should only apply to the life markers within the map you activate it, so only of one player. If that’s not the case I think it might be a bug.

Hi !

I realized my mistake, having a variable so that the matching property was always true. Your message confirmed my thoughs. I made some changes (as you suggested) and it worked like a charm. ! Thanks ;)

Indeed, I put the GCK inside the player hand but it is still not working. Don’t know why. Maybe the term “map” inside the “Apply to counters on this map only” refers only to map levels and a board is not considered as one. If someone can confirm that, I would be pleased. Or it could be a bug. :slight_smile:

I wanted to use the $PlayerSide$ parameter to have more flexibility in the player characters. But as you noticed, it could never work since the condition would, in this case, be always true.
A trick would be to use this : https://forum.vassalengine.org/t/player-name-associated-with-player-side/6264/1

In this case, I should have to change Owner parameters (currently characters name) to P01, P02, and so. I’ll give it a try.

Again, thanks for your help ! ;)

Ah okay, so I guess you have only one window with different boards. Yeah then it is as you said, the GKC will be applied to all boards within the map. I Thought you had one window per player. However that’s one of the reasons why I think boards are a bit misleading and their actual power is very limited and mostly they are more complicated to use than their benefit.

Yes, I have a similar solution, to the one in the thread, in my module. At game startup each player selects one of the faction he wants to use for playing through a key command. When this command fires the owner property will be set to the player side that used this command and it also propagated to all pieces in the game that share the same faction name. This way I can use the $PlayerSide$ test, which is quite nice. It’s a bit more complicated to realize since you have to take some further things into account, but it offers some great flexibility.