How to add at-start stack to pre-defined setups?

I have added an At-Start Stack to the TBB module. It is intended to hold an invisible counter that I can use for setting some Global Properties when a game starts, or a player changes sides. At first I could not get it to work, but when I changed the counter to be visible, I found out what was wrong: The At-Start Stack does not appear in my pre-defined setups, only in the “New” setup. And the GPs are set correctly in the “New” setup, but not in any others.

I performed a “refresh predefined setups”, but the At-Start Stack still only appears in the “New” setup.

Is there a way to come around this? I would rather not want to rebuild all the scenarios with hundreds of counters.to be placed.

As of the most recent Vassal updates, there is a feature that may help you. Refresh now includes an option to trigger a Post-Refresh Hotkey, described at the end of the Refresh Counters section of the Reference manual.

You will unfortunately still need to do some work coding up placing the pieces in the At-Start Stack; however this might be more palatable than placing each piece within lots of separate PDS files. Another user has just had success using the feature to populate new decks (similar to At-Stack Stacks) - you can find out more about his experience by following the Discord chat about it.

Initialising a set of Global Properties is also a lot easier using this feature. Simply add a Change-Property trait that sets each Global Property to the required initial value and trigger that trait with the hotkey VassalPostRefreshGHK.

Shout if you need further help.

Thanks, Mark. I would like to take a look at the Discord Chat, but I don’t seem to have access to a server that carries this chat. Which server is it?

There’s a link to our Discord server at the top of the page. You’re looking for this icon: image

Thanks Joel.

@martb1961: I have looked through the chat posts looking for VassalPostRefreshGHK. I see that I should find an existing counter, add a temporary command to it that does something, and fire that with the VassalPostRefreshGHK.
But I still do not understand how to get my At-Start Stack into the Pre-Defined Setups. Is there a command for a counter that can place an At-Start Stack?

Or should I ditch the stack, and use “Place Marker” instead?

There is also the problem that there are no counters on the main map in the scenarios. Can I fire a command on a counter that is only present in the palette?

The At-Start Stack is only relevant for Vassal’s concept of a “new game”. Once you have a map created (as in a vsav file), the At-Start Stack isn’t referenced at all.

Place Marker is relevant if you wish to place new pieces in an existing game (e.g. a vsav / pds). At-Start Stack is more simple and efficient for creating the game from scratch.

Dispensing with At-Start Stacks and just using Place Marker is possible and might have a use but I suggest you go with what you have for now, as it is more straightforward. Keep At-Start Stacks to initialise a game from scratch and use them as the source for pieces that you place into existing game files during your update.

Unfortunately, no. However, you could use a counter on a different map - you’ll just need to have a (temporary) Send to Location trait on the pieces that you want to place on the main map.

In fact you could even create an “update piece” this way, and that piece would be the one that does all the other placements using offsets on the main map.

Final thought, keep a back up of your current module, so that the original PDS files are safe. The refresh update will be easy to correct and repeat but you don’t want to give yourself the new problem of undoing bad updates.

Keep firing the questions. I’m happy to help.

1 Like

Depending on the number of pre-defined scenarios, the simplest and safest way may well be just to load each PDS, pull the counter you need from the Palette and save the new version.

1 Like

Thanks Mark and Brent. I took the easy way and copied the counter from the At-Start Stack to the Palette, and added it to the PDSs, saved them and reimported them. I then removed the counter from the Palette, but kept the counter in the At-Start Stack, because it is still needed for the “New” (or as I call it “Design Your Own”) PDS.

I did have some initial trouble moving the counter from the Palette when it is invisible, can’t stack, can’t be selected, and can’t move. It turned out that giving it the ability to move when selected, made it possible to move it from the Palette, and then it can never be selected, or moved again.

My mind slipped for a moment, and I managed to overwrite the file with the scenarios without the special counter, but I have an older copy, that I’ll be more careful to preserve.

Now my module is ready for Vassal 8! (This edit cannot be appreciated in 3.7.8)