Help with card movement on Star Trek: Fleet Captains

I’ve been redoing some of the ST:FC module to fix some bugs with the UI, clarify some things, and add support for players 5 and 6. In the process I managed to break some things, and have been unable to fix them. I’d love some help.
‘draw card’ commands are broken
‘take cards to hand’ expression is busted
–I am pretty sure these two are both related to the ToHand prototype definitions, but am not sure.

‘draw cards’ goes to the wrong location on the mission cards (found under the ‘game box’ button: science, influence, combat)
–no idea on this one. My best guess is something wrong with the science, influence, combat prototype definitions.

I’d also like to add a “move to docks” command that will move the selected ship card to the next available ship spot in the correct docks (Federation docks for the two Federation players, etc), but have no idea how to do so.

Lastly, is there any way to reorder elements in an extension?

Any help would be greatly appreciated!
Base module
Romulan expansion

Perhaps someone could help me out with error-checking the expressions I’m using.
Some background: I’ve changed the player names to Federation1, Federation2, Klingon1, Klingon2, Romulan1, Romulan2. I want to make sure that this expression return ‘true’ for any window that is NOT named " Hand".

{CurrentMap!=“Federation\d” && CurrentMap!=“Klingon\d” && CurrentMap!=“Romulan\d”}

In another instance, I want to send a card to a particular deck. Is there a nicer way to write this function? What I want is “if the player is Federation, the card goes to the Federation deck”, etc.

{(playerSide==“Federation1” || playerSide==“Federation2”) ? “Federation Mission Deck” : (playerSide==“Klingon1” || playerSide==“Klingon2”) ? “Klingon Mission Deck” : “Romulan Mission Deck”}

Any help in general figuring out the expression language would be appreciated. I notice that there’s an outstanding ticket to document the language. Perhaps there’s a preliminary document somewhere?

Thanks!

CurrentMap != Federation1 || CurrentMap != Federation2 || CurrentMap != Klingon1 || CurrentMap != Klingon2 || CurrentMap != Romulan1 || CurrentMap != Romulan 2

if(playerSide = Federation1 || playerSide = Federation2, Deckname = Federation Mission Deck, (if(playerSide = Klingon1 || playerSide = Klingon2, Deckname = Klingon Mission Deck, Deckname = Romulan Mission Deck)))

I do not claim to be correct - just guessing though as it has been a very long time since I wrote expressions in Vassal but that is probably how I would have written them

Thanks a lot for the expression help! I’m moving right along. Hopefully I’ll have no more questions.

The first one can optionally be condensed like this:

CurrentMap !~ Federation1|Federation2|Klingon1|Klingon2|Romulan1|Romulan 2

Thanks, everyone! v1.5 is now out if anyone would like to take a look.
vassalengine.org/wiki/Module … t_Captains