The default screenshots are fine. But I have been playing this game for a decade or so, and I'm getting tired of looking at them. I just want to look at my own screenshots. So I manually delete the default screenshots. However, the game downloaded them again.
So I made a script that deletes them when the game loads:
// Collect list of screenshots to delete.
%deleteList = filePath($Con::File) @ "/toDelete.txt";
%f = new FileObject();
%f.openForRead(%deleteList);
%numShots = 0;
while (!%f.isEOF()) {
%line = %f.readLine();
if (trim(%line) !$= "") {
%delShots[%numShots] = trim(%line);
%numShots++;
}
}
%f.close();
%f.delete();
// Delete screenshots.
for (%i = 0; %i < %numShots; %i++) {
fileDelete("screenshots/" @ %delShots[%i]);
}
But for some reason, this gets the initial loading phase (after the launcher has finished) stuck in a loop.
So I put a delay on the script:
// Collect list of screenshots to delete.
function delDefScreenshots() {
%deleteList = filePath($Con::File) @ "/toDelete.txt";
%f = new FileObject();
%f.openForRead(%deleteList);
%numShots = 0;
while (!%f.isEOF()) {
%line = %f.readLine();
if (trim(%line) !$= "") {
%delShots[%numShots] = trim(%line);
%numShots++;
}
}
%f.close();
%f.delete();
// Delete screenshots.
for (%i = 0; %i < %numShots; %i++) {
fileDelete("screenshots/" @ %delShots[%i]);
}
}
schedule(33, 0, "delDefScreenshots");
This solved the problem of the endless loop and successfully deleted the default screenshots. However, the deleted screenshots were replaced with a blank, white screenshot in their place. This is not ideal, and in fact quite an eyesore. I would rather just look at the default screenshots instead.
I tried exporting all the global variables and searching for the screenshot names. But nothing came up. I assume the names of the screenshots are stored within some GUI object. If anyone knows what this object is called, it's name would be much appreciated. Even if I just got the name of the function that initializes the main menu's creation, I could try packaging it and have the screenshots deleted before the list of screenshots is created. Although keeping the screenshots from loading in the first place would be ideal.
The only thread I could find on this topic was
this. The thread never reached a solution.
I know Return to Blockland interacts with the main menu (e.g. adding buttons), so I might look there for some answers.
Anyone tried doing this before with any luck? Any suggestions on what else I could try?