Recording optional rules - examples/suggestions

Some of the games I play (and update modules for) have a large number of optional rules. I would like to add the ability to record (for any particular play-thru) which optionals we are and are not playing with…

This could be text, checkboxes, etc. Ideally, I would like to have the ability for Vassal to read the settings/property for future growth.

In some cases, the options are predefined (e.g., YES/NO), while in other cases not…

Example (Europe Engulfed):
Optional German 6th SA (official): NO
Terrain Stacking (official): NO
Terrain Stacking (variant): YES
Reduced Sub Builds (variant): YES

Any suggestions or examples of modules that have done something similar?

Create Global Properties to store the option values. This makes them available to be used by your counters to provide alternate functionality based on the rule options selected and the values of the GP’s will be stored in save games.

You can then use any standard Vassal mechanism to show the values of the global variables and allow them to be updated. Perhaps an Option window with dummy counters with labels showing the option descriptions and values and right-click menu options to change them via Set Global Property traits?

1 Like


I had thought of the dummy counter idea, but I was wondering if there was an easier way to do it…

Something like a property sheet or interactive “chart” at the module, rather than the counter level…

I’ll play with some ideas…

I think the ideal solution would be to have the equivalent of the module-defined preferences that aren’t actually preferences.

They would create a preference tab that you could name (Scenario Preferences?) and would work just like the custom preference, updating global variables, but instead of being saved locally in the preferences file, they would be saved into and set from the Global Variables in saved game files.

(We are actually discussing a limited 3.7 new feature release).

Are you thinking that that would be in a Tabbed Pane in a Chart Window?

I’m guessing that would have maybe one piece with a bunch of text labels, some displaying the values of these variables (properties) and others would be static to clue the viewer in as to what the displayed values represent. Example: “Preference A:” value of Preference A

I’m thinking it would be an actual Preferences tab and look just like preferences. So you would have check boxes, drop-down lists etc. just like preferences. My reasoning is that all the code is there to do this already, I just have to stop these ‘scenario preferences’ being written to the prefs file, it would not be hard to implement.

If you want to display the current value of these preferences elsewhere in the module, you would just use any usual techniques for displaying the value of Global properties.

Brent - what you describe is pretty much what I was hoping for… Would be great if it made it into the feature set…

Two further thoughts on this…

  1. Given that it’s stored differently and intended to be used differently from regular preferences, I would not simply make it another TAB in the preferences menu, but break it out into it’s own thing.

  2. If you choose to do #1, it might be helpful to be able to define multiple tabs to better logically organize the information (see example):
    (tab) Axis Options
    (tab) Allied Options
    (tab) Soviet Options
    (tab) Universal Options

Agreed, I was looking into this and entangling this with the Preferences is a bad idea.

My current thought is to implement an Option Panel that can be added to a ‘widget’ which are the things that get added to chart windows. Any tabs you need you would create like you do for charts, but then add an Option Panel, to which you can add multiple ‘Scenario Options’. Each ‘Scenario Option’ would look just like a custom preference.

Been thinking more about this. That last approach I outlined has problems as the Global Properties associated with Custom Preferences are not fully featured GP’s.

My new thought is to add the ‘Scenario Option’ functionality as a child component that can be added to any existing Global Property. Functionally, a ‘Scenario Option’ is a lot like a Change Property Toolbar button, it’s a thing that allows you you to change the value of a GP in a controlled way.

Each Scenario Option would specify a Tab name and description, and these could all be collected into a new tabbed ‘Scenario Options’ window that would appear under Preferences in the File menu if a) you have specified any and b) a game is in progress.

Hi @Korval, @Cattlesquat ,

Have a play with the VASSAL-3.6.11-SNAPSHOT-ae4efec-11932-Scenario-Preferences build. It’s a proof of concept built on 3.6.11. The real thing will have to wait for 3.7.0.

Module level GP’s can have a child ‘Scenario Option’ component that allows you to specify a tab name and, prompt, a report format if the scenario option is changes and a Hotkey to fire when it changes.Also a list of allowable values for List Scenario Options).

There is a new Scenario Options menu option that appears under Preferences and is enabled when a game is in progress and there is at least one Scenario Option defined.

The new menu option opens a new window (wrong size at the moment) showing the tabs of Scenario options.

Changing a Scenario option sets the new value into the parent Global Property. If the Global Property value changes, then the report format is displayed and the Hotkey fired.

Please have a play and let me know what you think.

Making the Scenario Options children of existing Global Properties makes the design vastly simpler.

On MacOS, I just see what was there before:

(“Settings…” is what the latest version of MacOS calls what was “Preferences…” - it bring up the Vassal Module preferences windows).

I have defined this GP, but I don’t see a way to access it:-

I’m testing this in a version of C&C Ancients. The scenario is one that Vassal will think is an existing game already in progress (i.e. the Debug show property functions are disabled).

Is it something to do with MacOS ?

It always something to do with MacOS!

Can you show me your File menu please?

Looks like it always does:

One thing that is different about MacOS is that it has this menu for the App (ie module) where Preferences (now Settings…) sits. Whereas that is under File… on Windows (if I recall correctly).

Ok, I think I see what is happening. The menu handling code is quite different for Macs and I managed to miss adding the new option altogether. I am just making a new build that should add the Scenario Options below the ‘End Logfile’ option, after another separator.

Try build VASSAL-3.6.11-SNAPSHOT-2528a2c-11932-Scenario-Preferences

The option is there but greyed out. This is the only scenario gp I’ve defined so far:

Did you start a game?

I’ve definately done that now - two ways; brand new setup (PreDefined setup = null, prompts for boards etc) and also opening a refreshed game. In both cases, “Scenario Options” remains resolutely greyed out.


Same experience as Mark…

Defined new global property; added STRING SCENARIO OPTION.

Started game w/ NEW SCENARIO (i.e., no pre-defined setup) and new scenario option was grayed out.

1 Like