r/OpenMW • • 20d ago

Cross-Platform Cloud Saves.

Not the most exciting news, but I've rigged up a way to have cross platform cloud saves between openmw on my pc, and openmw-andoid on my phone.

The awkward part is that openmw-andoid puts saves in a private directory, only visible to native andoid apps. I had to replace a few lines of code within this file to hardcode the save directory to a folder that syncthing can access.

"openmw android\openmw_src\smali\utils\MyApp.smali"

Then recompile the apk using apktool. From here, pretty simple to link the save folders. I'm actually syncing each system to a nas folder as a middleman, but you could do with same thing directly between 2 systems.

A real programmer could do a better job and make the save directory configurable in-app instead of hard coding it. It's dirty, but delightful that it works at all.

https://github.com/Andiweli/OpenMW-Android

To change save directory. Replace "/storage/emulated/0/Documents/Games/openmw" with whatever directory you prefer.

OLD text within MyApp.smali

:goto_0

.line 82

sget-object v0, Lconstants/Constants;->INSTANCE:Lconstants/Constants;

NEW text within MyApp.smali

:goto_0

new-instance v2, Ljava/io/File;

const-string v3, "/storage/emulated/0/Documents/Games/openmw"

invoke-direct {v2, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V

invoke-virtual {v2}, Ljava/io/File;->mkdirs()Z

.line 82

sget-object v0, Lconstants/Constants;->INSTANCE:Lconstants/Constants;

10 Upvotes

2 comments sorted by

1

u/Cassoule 17d ago

Omg I've wanted this for so long

1

u/MewsCaster_ 16d ago

If you want to mess with it I would be happy to answer any questions you might have.