I’m developing a module which has 4 scenarios. Each scenario uses a different map with at-start pieces. Each map also has a related Chart Window (which includes both charts and maps unique to a given map).
My question is how can I ‘package up’ each map along with its associated Chart Window so that on selection at start-up only the selected map and accompanying chart window is displayed and accessible to the user? There doesn’t appear to be any way to do this using Pre-Defined Setups unless I’m missing something. Any help would be appreciated.
P.S. I have spent some time looking through the forum topics but have not found an answer to this question so far!
You can certainly hide those maps and chart windows from players - by devising a front end set up structure, likely mediated through global properties. There will need to be some kind of trigger system that hides/shows only the map that you want displayed.
Have you tried anything like that yet?
PS Nice to see that modified C&C Napoleonics British Rifles as your avatar!
I know of two ways to do this, and I doubt you will like either.
First one. I expand on what Mark said. Create two separate hidden Chart windows. How do you make them hidden? Leave the command and icon fields blank but still give it a command to activate. You will need a unique command for each because if you don’t (e.g. alt-C), the command will open both. I suggest you define command strings instead of command keys to prevent accidental opening of these windows.
You will probably need a module-level GKC. It won’t directly open a chart, but it sends a GKC to a piece (a proxy) who handles it. The piece knows which window to open, and it does it via a hot key trait.
Second one. You make a gigantic piece that sits in a normal window. You create a Layer trait. You make two big images that each contain a chart. You stick them in the piece, one or both in the Layer trait, depending on how you want to do it. You display the correct chart by showing a Layer trait level.
Thanks for the reply and your suggestion. I hadn’t thought of that approach. I will have to dig a bit deeper and do some experimentation to see how this might work.
As far as the avatar is concerned, I’m a fan of both C&C Napoleonics and the Bernard Cornwell Sharpe series of books so I thought I would combine them together!
1 Like
Thank you shilinski for adding to Mark’s suggestion. I think I understand both approaches you mention for solving this. I will attempt to implement the first suggestion (as it seems less contrived than the second approach). My problem may be getting the actual implementation right however! I have used Global Key Commands, but not at the module level before. Also I will need some way of identifying which map the user selected during start-up.
Define a module a la
Now when you load the module and start a new game, you will be prompted for a board for the map Main and a board for map Charts. Choose one of the boards for each map (A or B for Main, C or D for Charts).
When the module has started up, place your pieces as needed. Then say File→Save game … and save the setup as say AC.vsav. Repeat for all the set-ups you want.
Now re-open the module in the editor, and add to the module
Now save the module.
Next time you open the module, you will be prompted for a set-up. If you choose New..., then you will again be prompted for choices of boards for each of the maps.
If you choose the setup AB, then the AB.vsav will be read from the module, and the boards will have been chosen - including any other set-up you may have done.
If you choose the setup BD, then the BD.vsav is read instead, and the board and other set-up done by that save.
Yours,
Christian
Thanks Christian for your very detailed process and explanation, and for all the replies by others on this thread so far. All contributions have been very helpful and hopefully will point me in the right direction. It’s great to be able to pick the brains of others who understand Vassal module design a lot better than me! Regards, Rob.