O-n-y / oxy.mods

Oxy.BugTracker
18 stars 2 forks source link

Schedule Master #5

Closed Tellik closed 4 years ago

Tellik commented 4 years ago

Version: 1.0.0.64 OS: Linux Enabled Mods: Schedule Manager/Mod Manager

Problems:

First test: Create two new schedules, as default, leave them empty. Save preset. Files created in /schedule folder. Import preset. Immediately rearranges the schedule out of order. With Schedule 3/Default/Schedule 2.

Second Test: Saved this new schedule as preset, import again. No change. Repeated a few times. No reordering.

Third Test: Created new map. Import preset. Imported identical to end of 2nd test. Create new schedule slot. Name defaults to schedule 8. (There are only 4 total schedule slots now.) Save as preset, import, rearranges it. Create new schedule. This time the game names it as schedule 13. (Next one is named schedule 14.)

Last Test: Create 11 total schedules. Save preset. Import preset. Game freezes for about 10-15 seconds. Paused game to repeat, same behavior. (I'd test more, but last time I tried doing it with 24 schedules it froze for a very long time.)

O-n-y commented 4 years ago

Can you please screenshot list of schedule files in OS, ordered by timestamp? If it will match order or not

O-n-y commented 4 years ago

also, please provide .zip archive of schedules you had, so i can check if i will be able to reproduce same load problems

Tellik commented 4 years ago

So for timestamps, it doesn't matter too much. Each time I save a preset, it deletes all schedule files, remakes them, and creates new created and modified timestamps.

https://gyazo.com/7e6d902da03515ed7ce3d4673f978829 https://gyazo.com/d15bf06178cd75eced139f05253f2938

Deleted all schedule files, and saved schedule again.

https://gyazo.com/e47b2221ccd7b28f86351c8439c6be3e

Then saved, imported, no change. New map:

schedule1.zip (new map, 3 schedules, saved preset) - https://gyazo.com/55a7de2ea75b57b1fd3ea252ba4af571

schedule2.zip (imported previous preset) - https://gyazo.com/4e2753ff47f3197d33ee8ca158655a18

O-n-y commented 4 years ago

Thank you for provided data, will be checking out

dawnmist commented 4 years ago

I'm also seeing the issue:

On inspecting the schedule files, they all had an identical timestamp as previously reported. Opening them in a text editor let me at least see which file belonged to each schedule (file is binary so I couldn't see much, however the title text e.g. "Schedule 4" was visible in the file anyway). I then proceeded to 'touch' each file in the order I wanted them to be loaded so that the file timestamps were updated to different times for each file, with the Default schedule being the first touched, then Schedule 2, etc.

After triggering the update to the file timestamps the game was able to reliably import the schedules in the correct order. So I can confirm that the "load according to timestamp" part is working if the files have different timestamps. The issue appears to be that the files are all being created with the same timestamp which is ruining the ability to import them in the correct order.

O-n-y commented 4 years ago

Yes, i checked that, didn't had a chance yet to check saving, but my initial thought was timestamp for unix not saving full timestamp, but only till some round like seconds. I will check more as i got some free time from work.

O-n-y commented 4 years ago

i uploaded 1.0.1.67 version, please checkout and let me know if you still have issue with ordering or not also issue with long UI update on loading should be fixed

O-n-y commented 4 years ago

p.s. you would need to re-save schedules

dawnmist commented 4 years ago

I've just downloaded 1.0.1.67, and the ordering is still a problem. Now when clicking the "Import" button the original schedule is not replaced, and the saved preset is added to the list after the original schedule in the wrong order again. So once I'd hit the "Import" button twice, I had my initial set of schedules + 2 sets of unordered schedules.

So instead of having 1-2-3-4-5-6-7-8-9-10-11-12 after the first import of the scheduled I'd just saved, I ended up with 1-2-3-4-5-6-7-8-9-10-11-12-11-6-7-3-1-5-8-2-4-12-10-9.

O-n-y commented 4 years ago

@dawnmist write me PM in discord please https://discord.gg/By2C6RC

O-n-y commented 4 years ago

I uploaded 1.0.1.75, issue should be fixed by now (now we won't be rely on file timestamp provided by .net 3.5). Waiting for confirmation on this version, as i can't test myself (on windows there is no such issue)

Tellik commented 4 years ago

I might be able to get to it this weekend to check it out. After hundreds of nonstop hours in ONI, I burned myself out and am taking a break from it. If no one else gets to it here in a few days I'll run through some testing.

dawnmist commented 4 years ago

Sorry about discord - I had gone to sleep (Australia timezone).

That's working correctly for me now, thank you very much! :)

Order is correct, and it is properly replacing the existing schedule again now too.

dawnmist commented 4 years ago

Moved to #6 as requested. :)

O-n-y commented 4 years ago

Please create proper separate ticket as this is different mod