07th-mod / umineko-question

93 stars 9 forks source link

Protect patched Steam version? #18

Closed SomeGuy87 closed 6 years ago

SomeGuy87 commented 8 years ago

Hey everyone,

not sure if this is the right place for it, but I didn't know where else I could put it:

I am playing the Steam version of this game. When I started the game yesterday, I noticed that my saves were completely corrupt: Both are still very early in the game - one when the epitaph was shown for the first time, and one at a dinner table. When loading these saves, all of a sudden Beatrice (who I have never met yet) was in both, with a slashing animation effect in the epitaph save and some dialogue that went out of the window on the other one...

I noticed that Steam silently replaced my 0.utf and Umineko1to4.exe - replacing them again fixed the issue fortunately.

Still, is there any way to prevent this in the future? Being unable to disable game updates I can't think of any way. And I'm getting kind of scared now if I will be able to fix issues like that this easily every time. Even more concerning is that there was no official update...

drojf commented 8 years ago

I already discussed this a little in the other thread

Probably when you went to load your old save, it would try to load the old line number in the updated script. Because we added in so many voice lines, it would shift you forward in the script by some amount.

Does steam actively delete files added to the game folder when the game updates? If it doesn't, we could fix this by using a different exe file name and telling it to load a different script by command line arguments (eg Umineko-patched.exe -script patched_0.utf). Of course, you could also just move the entire game folder somewhere else to prevent updates since there's no DRM (I think), but that would break steam achievements.

By far the easiest way is to just move the umineko folder to a different location so steam can't update it - but then you don't get any steam achievements.

When I get home I'll try the 'rename the files' method and see if steam deletes my extra files. If steam keeps the files, then my 'renaming' method should work.

SomeGuy87 commented 8 years ago

Sorry, didn't take a look at that one...

At least I can guarantee that my ".bak" renamed files are still present and untouched.

drojf commented 8 years ago

No problem, we needed a new issue for this anyway


It appears that if you specify the -script option to the game, it enters some special mode where all your saves don't exist, as if you started the game for the very first time. I think this will cause problems so better not do it that way.

I had some stuff written here, long story short, we can just patch the .exe to launch 's.utf' instead of '0.utf'

Unfortunately, it seems to always prefer '0.utf', but I could easily patch the exe to launch 's.utf', as long as the filename string is the same length.

So in other words

  1. patch the exe to launch s.utf
  2. rename umineko.exe -> widescreen-umineko.exe
  3. rename 0.utf -> s.utf

If either the .exe or the 0.utf are replaced, it doesn't make any difference to our files (infact, you can use both if you want and it will still run).


OK, just updated steam and it keeps all the files, so this should work.

drojf commented 8 years ago

well, looks like that won't work

https://sekaiproject.github.io/ponscripter-fork/doc/rn01re01.html

0.utf Native script in human-readable form.

Human-readable scripts can be multipart: the engine checks all numbers from 1 to 99 (both with and without leading zeroes, for numbers below 10), and appends them to script 0.

Guess we'll have to go with my final option, which is to make a loader which checks that the script has right checksum, and only then launch the game. The .exe does not have to be checked, because it can be renamed and the game will still run fine. But may be a good idea to tell the user if the .exe has been changed so they know if an update has occured.

drojf commented 8 years ago

This batch file should do the trick (place it in the game folder, and launch it instead of the game). Your backup files should be called "patched_0.utf" and "patched_Umineko1to4.exe" respectively.

https://gist.github.com/drojf/7e1698a5807509a6258095d4e50464af

Don't close this issue till the next release actually includes it, since this is something easy to forget to include in a release.

SomeGuy87 commented 8 years ago

Didn't know Windows had that fc feature, nice idea! Interestingly, it looks like Steam is silent after I replaced the files once after the update, but you never know.

drojf commented 6 years ago

We now have methods of protecting the script file from being overwritten, and to prevent you loading the save files for the wrong version of the game - see here: https://github.com/07th-mod/umineko-answer/issues/43