Automatic prompt to Log your game

I often forget to log my games when I start a new scenario. It would be nice if, after you select a scenario, at some point soon after it prompts you if you would like to start a log file. I cannot be the only one experiencing this.

Haha true true, I have that problem all the time when I’m starting PBEM games.

Of course there are many players who play Solitaire, or “live online”, or PBEM-but-via-ACTS and so those folks usually wouldn’t want to start log files, nor to have a constant popup.

I think it would need to be a preference like “Prompt to start logfile when starting game?”

Thus spake Cattlesquat:

Haha true true, I have that problem all the time when I’m starting PBEM
games.

Of course there are many players who play Solitaire, or “live online”,
or PBEM-but-via-ACTS and so those folks usually wouldn’t want to start
log files, nor to have a constant popup.

I think it would need to be a preference like “Prompt to start logfile
when starting game?”

I thought we’d already had this for years. What am I thinking of instead?


J.

Prompt to start new logfile after user reaches the end of the current logfile?

Thus spake Flint1b:

Prompt to start new logfile after user reaches the end of the current
logfile?

Possibly that’s what I was thinking, yes.


J.

Yes precisely, and that excellent feature is what lulls me (and presumably e.g. markgravitygood) into a false sense of security. And then it’s time to start the NEXT game and I get all the Guns of August combats rolled and discover the log file wasn’t started “as usual”.

If we do something like this we’d also want it to fire when a .vsav (vice .vlog) is loaded, for the same reason.

Thus spake Cattlesquat:

Yes precisely, and that excellent feature is what lulls me (and
presumably e.g. markgravitygood) into a false sense of security. And
then it’s time to start the NEXT game and I get all the Guns of August
combats rolled and discover the log file wasn’t started.

If we do something like this we’d also want it to fire when a .vsav
(vice .vlog) is loaded, for the same reason.

Make an issue for it if there’s not one already?

(Incidentally, this is a reason I’d like to unify saves and logs in V4.)


J.

Done:
vassalengine.org/tracker/sho … i?id=13153

Okay, a little update (this will make you laugh and laugh):
#1 - We HAVE always “sort of” had this preference, actually
#2 - But it has an incomprehensible name (“Ask to start logging before a Replay?”) – WUT!!!
#3 - Annnnnd… (wait for it)… it also mostly doesn’t actually fire.

#3 happens because we mostly launch through other newer-weirder paths like (HAHAHAHAHAHA) the Wizard, that skips the place where this was implemented.

So I will dig in some more and see if there are some feasible ways to bring this thing back to life. I would definitely also rename the string “Ask to start logging when starting or loading new game?” (for the love of God)

Brian

The call to BasicLogger#queryNewLogFile(true) that WOULD offer to start the logfile is toward the end of GameState#loadGameInBackground.

It works if:
(1) You’re just sitting at the file prompt and directly load a game of any kind. Loads the game, offers to start a log file, yay.
(2) You’re sitting at the file prompt and start a new game with a “Predefined Setup” – starts the game, offers to start a log file, yay.

It does NOT work if:
(3) You’re sitting a file prompt and start a new game “from scratch” (no predefined setup). This one would I could fix in 5 seconds, because it was just left out of that path but it’s a really simple path.
(4) You do anything at all via the Wizard. This seems to take it down a whole different path of loading the game, and ends up as far as I can tell completely bypassing the normal GameState#loadGameInBackground flow, in favor of doing Fancy Wizard Stuff.

So it’s case 4 (which of course comes in three different flavors, analogous to cases 1, 2 and 3, just through the wizard) that’s a little more “fraught” and I would like some advice on. It would be GLORIOUS if this whole little query operation could be relegated to the end of GameState#setup(true), at the very end of the method, basically conditional on “gameStarting && gameStarted”. Because that would Bypass All The Fuckery. And/or it could be in an invokeLater (or perhaps invokeAndWait) if we need to let the load-game process unchoke itself before we ask.

Does that sound plausible to you guys? I think GameState#setup(true) is … probably?! … the last important thing invoked in ALL three launch paths. Could just get rid of the query call that’s in GameState#loadGameInBackground and put one there instead, rename the Totally Awful Name of the preference, and we might be rocking and rolling? Yeah? (What have I missed?)

Brian

Okay so I slept on it and realized that will totally work, so it is fixed in PR 77: github.com/vassalengine/vassal/pull/77

(1) Changed the execrable name of the preference to something comprehensible
(2) Fires on an invokeLater at the end of GameState#setup, when both gameStarting && gameStarted are true. This catches all versions of “new game”, “load game”, “new game from predefined setup”

I await your input on whether it should be ignored when an online game starts – as far as I can tell the existing preference would still have fired on that flow (on the subset of flows where it was called at all), but the implementation had grown so full of weeds its hard to tell what the original intention actually was. It would be easy enough to ignore the preference during online if that seems logical. Do online people ALSO create logfiles as they play?

Yay bugfixes.

Brian

I’ve seen a couple people on the Facebook group say that they do this.

Okay cool. Then PR should work as is.