New Saved Game Updater - Discussion

I’ve finally got a version of the new Saved Game Updater running to my satisfaction. I’d just like to review what I’ve done and how it works and lay out a few issues for discussion.

The new Updater is invoked by a player directly from the menu and applies to the currently open game.

It replaces each piece with a new piece, created from the same PieceSlot it was originally created from. The original PieceSlot is found using the GamePieceId (GpId) that is displayed in the Piece Definer and saved with each piece. If no match on GpId can be found, then it will use a PieceSlot whose GamePiece has exactly the same Type (i.e. same traits with same options)

There is one main limitation :- You cannot update any pieces in the game that are Hidden or Masked by other players. In this case, your opponent would also have to refresh the game. This shouldn’t be a problem for standard scenario setups as these do not normally begin with ‘owned’ pieces.

Some questions to ponder:

  1. What is the best way to invoke the updater? Currently, I have added a new menu next to File and Help named Tools that has the single entry ‘Refresh Counters’. I’m not sure if we will ever have any more ‘tools’ - I don’t like menus with a single option!

  2. What other facilities are needed? I’m thinking a ‘Batch’ mode fired off from the Editor that will load each pre-defined setup in a module in turn, refresh it, then replace the old version with the refreshed version.

  3. What sort of error reporting do you need for counters that cannot be refreshed due to no matching PieceSlot? Just list them in the Chat Window? Or in a report in a Dialog box at the end of the update run?

  4. Anything else?

Thanks,
B.

Thus spake “Brent Easton”:

I do not like single-option menus, either, but if we think hard we might
be able to come up with something else which should join the updater there.

Actually, now that you mention it, I think this should go in the Module
Manager, where there’s already a Tools menu.

I think a report dialog would be good.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

I don’t know that it makes sense to put it in the module manager. I was thinking a ‘Batch’ mode update of a module would be initiated in the Module Editor, which also has an existing Tools menu with the current Game Updater options on it. This would seem the logical place.

However, the option to ‘Refresh all counters now in the current game I am playing’ option really does seem to belong in the Module Player. The other option I thought of was to add it to the Help menu. Or even in the Preferences dialog.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

Hmm. Hold on. Is there any reason to present this as a menu item at all?
Why not show the user a dialog asking whether to update the counters when
the user loads a saved game containing old counter definitions?


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Wouldn’t that require saving metadata of the Module version to the saved
game / log and then comparing upon load up if that saved meta data version
is older than the current in use module?

Seems like a can of worms there if your depending on module designers to use
a specific version/revision system that works with the code unless you
enforce that also

Post generated using Mail2Forum (mail2forum.com)

No, this could be done by checking when each piece is added to the map (AddPiece command) whether it’s Type matches the Type of the PieceSlot that originally created it.

However, I think we will still need an option to do this manually. For example, 2 players online using a module with masked counters who agree to update their game, each need to run the update in turn.

B.

[quote]
Wouldn’t that require saving metadata of the Module version to the saved
game / log and then comparing upon load up if that saved meta data version
is older than the current in use module?

Seems like a can of worms there if your depending on module designers to
use
a specific version/revision system that works with the code unless you
enforce that also

Post generated using Mail2Forum (mail2forum.com)