Hello
I’m working on my first VASSAL module and unfortunately I’ve hit a brick wall with it. I was wondering if anyone had any words of wisdom that they’d like to share.
The Designer’s Guide suggests that you can use a Turn-Based Global Hotkey to trigger a Global Key Command (Map Window Level), which then could be used to activate a Key Command.
NB I’ve used inverted commas below to help with clarity. They aren’t present in my module configuration.
My idea was to have a turn called “Night” which would then apply Map Shading (Type: Background) also called “Night”, which worked in conjunction with an Area of Effect Unit Trait called “Night Vision”.
Now I can toggle the [Map Shading] on and off using its Toolbar button or its Hotkey Ctrl+D, and it works perfectly with the Unit’s Area of Effect. However I can’t get VASSAL to do it automatically based on what turn the game is currently in. Is this possible?
I have a [Turn Counter] called “Turn” with a [Counter] called “Day” and a nested [List] called “Time”. There are several “Time” values. One of them is called “Night”.
I have a [Global Hotkey (Turn)] called “Night Vision” with the Global hotkey Ctrl+P and its Match Properties is {Time==Night}.
NB I used the expression builder tool for this, but I guessed that the 2nd part would be the same as the Time value that I was looking to match, and be written in that format. I’m prepared to be wrong.
I also have a [Global Key Command] in the Main Map hierarchy called “Make it night”. Its hotkey is Ctrl+P and its Global Key Command is Ctrl+D.
The Global Key Command doesn’t activate the [Map Shading] when triggered either by its “Make it night” Toolbar button or the Hotkey Ctrl+P. I’m not sure what I’ve done wrong. Any ideas? Hopefully if that’s fixed the [Global Hotkey (Turn)] will then trigger it. Or is there a possible gremlin in there too?
If anyone has any advice on this, I’d be very grateful. Although I’ve played a few games on VASSAL before, I’ve only been trying my hand at module design for a week and I’m wishing I’d started earlier. There’s so many possibilities!
Thanks in advance.