"Best" way to translate a phisical game gesture in a module?

In the real boardgame, at the beginning of the Round each player needs to roll Nd8 (N is a scenario property). The d8 have these faces: 3 Green, 2 Blue, 1 Red, 1 Purple, 1 Yellow. Once rolled, the player pick N tokens of the colours showed by the d8.

The module i’m modifying implemented this by creating a deck of tokens, from which you right-click to draw multiple cards, enter “N” in the popup that appears, drag from the deck, and finally right-click on the stack of tokens you just dragged and click “reveal”: this randomizes the 8-level layer in each of the tokens, and you finally know what tokens you got.

This is … “too far” from the real experience. And also, you dont have green/blue/red/purple/yellow tokens, but just “generic tokens”, forcing me to do tests and tricks if i want to allow specific action to different colour tokens.

Instead, i would like to have specific-colour tokens, and maybe a piece on the board that fires an action that sends (creates? summons? Clones?) these tokens to a specific zone in the board. The token are visible to all the players, but a bonus thing will be if they are owned by the player that fired the action (so they could be only moved/played by him).

How this could be implemented?

I would put the tokens in separate decks, one for each colour, and use a random number from 1 to 8 to send a token from the correct colour deck into the stack of the player who picks the tokens.

There is a “Send to Location” trait you can use to send a token to a destination on the board.

As for the generic tokens, you probably will have to add a Marker trait to each token that indicates the colour of the token.

If the number to draw N is fixed by the scenario, it presumably does not change over the game. In that case, it can be set, and locked, in a ScenarioOption. It can of course also be set via a ChangePropertyButton. In any case, it can define a global property named NTokens.

Next, add a Turn counter, and add a Hotkey when entering a new round. That hotkey - say RollTokens is then send to some hidden piece.

The Hidden piece then has traits a la

Edit: I forgot to put in the “roll of a d8”

  • TriggerAction
    • Key: RollTokens
    • Actions:
      • RollD8
      • TakeToken
    • Loop: true
    • Loop type Fixed
    • Loop count NTokens
    • Pre loop ResetTokenCount
    • Post loop PlaceTokens
  • DynamicProperty
    • Target: TokenRoll
    • Key: RollD8
      • Expression: {Random(8)}
  • DynamicProperty
    • Target: NGreenTokens
    • Key: ResetTokenCount
      • Expression: {0}
    • Key: TakeToken
      • Expression: {NGreenTokens + (TokenRoll < 4 ? 1 : 0)}
  • DynamicProperty
    • Target: NBlueTokens
    • Key: ResetTokenCount
      • Expression: {0}
    • Key: TakeToken
      • Expression: {NBlueTokens + (TokenRoll == 4 || TokenRoll == 5 ? 1 : 0)}
  • DynamicProperty
    • Target: NRedTokens
    • Key: ResetTokenCount
      • Expression: {0}
    • Key: TakeToken
      • Expression: {NRedTokens + (TokenRoll == 6 ? 1 : 0)}
  • DynamicProperty
    • Target: NPurpleTokens
    • Key: ResetTokenCount
      • Expression: {0}
    • Key: TakeToken
      • Expression: {NPurpleTokens + (TokenRoll == 6 ? 1 : 0)}
  • DynamicProperty
    • Target: NYellowTokens
    • Key: ResetTokenCount
      • Expression: {0}
    • Key: TakeToken
      • Expression: {NYellowTokens + (TokenRoll == 6 ? 1 : 0)}
  • TriggerAction
    • Key: RollTokenCounts
  • TriggerAction
    • Key PlaceTokens
    • Actions
      • PlaceGreen
    • Loop: True
    • Loop type: Fixed
    • Loop count NGreenTokens
  • … and similar for Blue, Red, Purple, and Yellow
  • PlacePiece:
    • Key PlaceGreen
    • Post key: MoveToTokenStack
  • … and similar for Blue, Red, Purple, and Yellow

and the token pieces should define a SendtoLocation trait with the key MoveToTokenStack to move the token piece to an appropriate place on the board or similar.