Create account / Log in

Automatic prompt to Log your game

Suggestions for additional features for the module editor and Vassal engine.

Moderators: uckelman, Tim M

Automatic prompt to Log your game

Postby markgravitygood » July 8th, 2020, 2:04 pm

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.
markgravitygood
 
Posts: 2
Joined: January 15th, 2010, 12:09 pm

Re: Automatic prompt to Log your game

Postby Cattlesquat » July 8th, 2020, 5:47 pm

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?"
User avatar
Cattlesquat
 
Posts: 947
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Automatic prompt to Log your game

Postby uckelman » July 8th, 2020, 6:20 pm

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.
User avatar
uckelman
Site Admin
 
Posts: 8989
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Automatic prompt to Log your game

Postby Flint1b » July 8th, 2020, 6:25 pm

Prompt to start new logfile after user reaches the end of the current logfile?
User avatar
Flint1b
 
Posts: 461
Joined: May 19th, 2020, 12:27 am
Location: Colonia Agrippina

Re: Automatic prompt to Log your game

Postby uckelman » July 8th, 2020, 6:33 pm

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.
User avatar
uckelman
Site Admin
 
Posts: 8989
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Automatic prompt to Log your game

Postby Cattlesquat » July 8th, 2020, 6:38 pm

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.
User avatar
Cattlesquat
 
Posts: 947
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Automatic prompt to Log your game

Postby uckelman » July 8th, 2020, 6:48 pm

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.
User avatar
uckelman
Site Admin
 
Posts: 8989
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Automatic prompt to Log your game

Postby Cattlesquat » July 8th, 2020, 7:50 pm

User avatar
Cattlesquat
 
Posts: 947
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Automatic prompt to Log your game

Postby Cattlesquat » July 9th, 2020, 2:05 am

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
User avatar
Cattlesquat
 
Posts: 947
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Automatic prompt to Log your game

Postby Cattlesquat » July 9th, 2020, 2:42 am

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
User avatar
Cattlesquat
 
Posts: 947
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Automatic prompt to Log your game

Postby Cattlesquat » July 9th, 2020, 2:31 pm

Okay so I slept on it and realized that will totally work, so it is fixed in PR 77: https://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
User avatar
Cattlesquat
 
Posts: 947
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Automatic prompt to Log your game

Postby JoelCFC25 » July 9th, 2020, 8:38 pm

Cattlesquat wrote:Do online people ALSO create logfiles as they play?


I've seen a couple people on the Facebook group say that they do this.
JoelCFC25
 
Posts: 748
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN

Re: Automatic prompt to Log your game

Postby Cattlesquat » July 9th, 2020, 8:43 pm

Okay cool. Then PR should work as is.
User avatar
Cattlesquat
 
Posts: 947
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest