Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorting save games #758

Open
MatthiasKunnen opened this issue Nov 22, 2020 · 3 comments
Open

Sorting save games #758

MatthiasKunnen opened this issue Nov 22, 2020 · 3 comments

Comments

@MatthiasKunnen
Copy link

MatthiasKunnen commented Nov 22, 2020

Currently the order of the saves in the load menu is quite confusing. It appears to me that the entries are alphabetically sorted however the naming does not work well with that fact.

image

Perhaps the saves could be sorted by the save count parameter. Alternatively the format could be changed from {name} {progress}% {saveIndex} to {name} {saveIndex} {progress}% where preferably the saveIndex is padded with 0's to make 3 into 003.

I see that the code suggest that the data is read in order but that does not seem to be the case for me.

METHOD(receiveRecordData)
params [P_THISOBJECT, P_ARRAY("_recordData")];
OOP_INFO_0("RECEIVE RECORD DATA:");
{
OOP_INFO_1(" %1", _x);
} forEach _recordData;
// Unpack serialized data
pr _recordDataLocal = _recordData apply
{
_x params ["_recordName", "_headerSerial", "_errors"];
pr _header = NEW("SaveGameHeader", []);
DESERIALIZE_ALL(_header, _headerSerial);
[_recordName, _header, _errors];
};
// They are in order of when they were created so reverse them so we get newest at the top
reverse _recordDataLocal;
T_CALLM0("clearRecordData");
T_SETV("recordData", _recordDataLocal);
T_CALLM0("updateListbox");
ENDMETHOD;

@Sparker95
Copy link
Owner

Hi, yes it was in my plan to add better sorting at some point. Starting from arma 2.00 there is this command:
https://community.bistudio.com/wiki/systemTime
So now we have access to the system date and time. We should save it to the saved game and sort by that value. I hope I can do this at some point.

@MatthiasKunnen
Copy link
Author

MatthiasKunnen commented Nov 22, 2020

Would a temporary fix, aka changing the format of the file, be in order or do you prefer to just implement it properly later down the line?

@Sparker95
Copy link
Owner

It will require some change of save game header layout (in SQF side) but due to save game versioning we use in the code it's not a big issue, it can be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants