But what if you just wanna reveal it to one player?
You might wanna try programming Vassal modules with the module editor (not with Java). I’m attempting to redo the Pandemic module. It’s a fast game, 1 hour at most to play with board pieces. But after I automate it (within the next 2 days), it will take 15 minutes to play each game.
You may want to use the Pandemic module to see how Vassal programming can be done. I’m gonna be working with the latest Vassal (v3.2 trunk), and showing off all the bells and whistles possible with the latest-and-greatest Vassal.
Basically, every game piece will have functions (behaviors). Within each function, you can have if-else blocks, and even for-loops.
All programming is done via “Traits” for each and every game piece. One Trait you must know well is the TriggerAction trait.
If you are a programmer, think of a Trait as a single line of code. 2 Traits is 2 lines of code.
To do function names: use TriggerAction (v3.2, use the trunk)
if-else: use TriggerAction
for-loops: use TriggerAction
So, yeah. TriggerAction is your flow control, pretty much.
Believe me, even if you’re not a programmer, you’ll get the hang of Vassal programming within a day or 2.
Just remember this!! The flow control flows “bottom up”. Just reverse your way of thinking and reading to go from bottom up.
There’s probably a traditional reason for this “bottom up” thing. “Traits” probably used to be just that — traits of game pieces. The first trait (top one) is the trait that is the most primal, or basic, or fundamental. This first trait will override any other traits that are less fundamental (below). Eg, having 2 Traits that set the name of the game piece will mean only the top trait taking effect. Hmm. Sounds like I may have gotten the history wrong.
Anyways, it works. You can do very complex programming and logic with Vassal.
If you’re a programmer, note one caveat. Don’t do re-usable functions. None of the functions (done with Traits) are re-entrant. There is no stack (since there are no array data structure) in Vassal programming. Hence, no re-entrant functions possible. Well, this isn’t entirely true. You can actually create linked lists and stacks in Vassal, but that is pretty clunky to do.