How would you do it?

I was wondering what the best way would be to make a scoreboard for a basketball board game mod. I am new to Vassal so I was either going to make two turn counters for the home and away score or a card (piece) to represent the scoreboard with layers. I don’t want to make 99 pictures for each number to increment through the layer.

I saw that a layer can increment by a value. I toyed around with this but couldn’t figure out how to display a number without an image of a number.

So how would you do it?

Thus spake “JMOxx75”:

The simplest way would be to make a 10-sided counter, with one of the
digits 0-9 on each face, and then put three of them side-by-side for
each team’s score. Of course, this means that you have to increment
them manually—I’m sure one of the gamebox design wizards will suggest
a way much more sophisticated than this which detects when points are
scored and updates the scoreboard automatically.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

simple non automated method, make the two turn counters, Home and Away

Create a Prototype called ‘Scoring’. Give it a dynamic property trait named ‘PointValue’, make it numeric, set the value to ‘0’ and give it a min/max range of 0 to 200 (enough?)
Add three key commands to the trait - CTRL A, CTRL B, CTRL C

On CTRL A give it menu command ‘2 Points’, set the type to ‘increment numeric value’ and set the increment by box to ‘2’

For CTRL B do the same except call it ‘3 Points’ and set the box to 3

For CTRL C give it a command name ‘Reset’, set the type to ‘set value directly’ and put ‘0’ in the New Value box

OK - your DP is set up
Now add a Text Label Trait to the prototype
In the text field you want to reference your DP so put ‘$PointValue$’, clear the name format and Menu Command - you can play with font size/color but set Verticals to Center and Horizontals to Center. Hit Ok when done

Now add the prototype to your 2 pieces.

Your pieces should now have a “0” in the center of them. Right clicking the pieces will access your commands to adjust the score.

You can automate all this, and do this another way, such as using action buttons etc… but this will get you going

I’ll make you up a demonstration mod if you like

Thanks that helped. I am a little confused though. I didn’t create turn counters as in the built in turn counter. I created two pieces with .png pictures as the counters with the scoring prototype. (only game pieces can have prototypes right?)

I also use player stat cards and created a player card window (map) so they can view the player cards while they play. In the case of a scoreboard though I would like to put it in a more convenient location. Is there a way to place a game piece anywhere but in a map window?

Correct - I was not thinking of using the built in Turn counter

I would assume that you might put the game score pieces on the main map which is usually always visible using an At start stack positioned somewhere.

Even so, if the counters (scoreboards) are generic enough, there is nothing wrong with having At start stacks in all the windows that are showing the same thing, but to do this we then need to reference a GP instead of a DP to follow with the Text Label - this basically means an increase of the score on one board such as the main map would also be reflected in a player map at the same time.

To do this, you would still bounce a value off of a DP on the actual piece but then use a Trigger Action to fire a Set Global Property Trait thart also sets a GP which the Text Label is reading