Play any PBF game, at the end of the turn do the turn post.
As in the past the name of the savegame should contain the thread-number and the turn number of and with the power that just performed.
2.0.20080
I have not tested PBF for some time now, so I cannot tell when this behaviour began.
Look at the savegame here:
https://www.axisandallies.org/forums/post/1410278
It is named
triplea16780680437380566071.tsvg
instead of something like
triplea-20781-Ger1.tsvg
The new naming is not intuitive and does not give any clue to which game it belongs.
What is the idea behind that? What have I maybe missed?
Relevant for #5025, IMHO.
I just remembered that this issue has been already reported here:
https://forums.triplea-game.org/topic/2052/save-file-name-for-v2-0-is-not-related-to-game-name
@RoiEXLab
I remember that we - not long time ago - talked about the file names in another issue or PR, I just cannot find it.
But I doubt, that the filename described in this issue was the conclusion or the expected result.
Do you have any idea?
@panther2 I have no idea to be honest. Doesn't ring a bell. Sometimes I'm struggling to remeber what I did yesterday ^^
I spent a brief amount of time finding the place where we actually set this name, but I couldn't find it.
I'm pretty sure this is just an type somewhere in the code, but no idea where to look for it. Maybe I can have a second look later this day
@RoiEXLab Thank you for taking care.
I have found the context meanwhile. Actually it was a conversation where @ron-murhammer had been involved.
Anyway, please see:
https://forums.triplea-game.org/topic/1728/game-file-names
So maybe or likely related to #5839 .
I doubt that specific PR caused this issue and I'm fairly sure I tested it as well. That was just changing name from triplea_
@ron-murhammer I'd agree, I don't think the PR is at fault. Besides the code is still the same until today.
We really need clear repro instructions, it's not clear to me where to search in the code for that
Probably look at PRs that touched that class or classes it pulls info from.
@ron-murhammer Sorry then, it was just a situation I remembered that delt with modifying the name of the saves.
@panther2 Oh nevermind, I just saw that you provided more detailed repro steps 馃槄
I think I found the issue:
I think the culprit is this line: https://github.com/triplea-game/triplea/blob/9d230424c6f8b0222e9f0da498309a754f60c8f2/game-core/src/main/java/games/strategy/engine/posted/game/pbem/PbemMessagePoster.java#L255
As you can see we're generating a random temporary file to store the savegame in. However before https://github.com/triplea-game/triplea/pull/4454 we explicitly passed a "correct" filename to use instead of the generated one
Awesome, thanks @RoiEXLab
Save-game filenames did come up and I remember doing work on that. We still have an issue where the save-game you select is not defaulted as the save-game to save.
Overall it appears we have at least 3 different code paths for doing almost the same thing:
The PBF save-game path being unique is a recent revelation at this point (and certainly we'll likely forget that detail in some months). All in all it speaks to the (over) complexity of the code and we should instead aggregate save-game strategy to a single module so that the different variants become obvious, more unified, and automatically tested (so we don't have to repeatedly test these variants by hand all the time).
Most helpful comment
I think I found the issue:
I think the culprit is this line: https://github.com/triplea-game/triplea/blob/9d230424c6f8b0222e9f0da498309a754f60c8f2/game-core/src/main/java/games/strategy/engine/posted/game/pbem/PbemMessagePoster.java#L255
As you can see we're generating a random temporary file to store the savegame in. However before https://github.com/triplea-game/triplea/pull/4454 we explicitly passed a "correct" filename to use instead of the generated one