Portable install mod or feature?

Talk about the mods you'd like to see in Daggerfall Unity. Give mod creators some ideas!
Post Reply
AuntiePixel
Posts: 44
Joined: Sat Jan 30, 2021 6:24 pm
Location: US-central KY

Portable install mod or feature?

Post by AuntiePixel »

Hi, Not sure if this mod capable or would need to be a feature. Is it possible to mod DFU such that the entire installation stays in one folder? The idea being that you could keep your DFU game on a single USB drive to take with you and play on any computer, or a single folder in your dropbox so you can easily keep your game synced across multiple computers.

Symlinks are a workaround for the dropbox syncing, though kind of a fuss to set up. I was wondering if a single solution option were possible.

Thanks

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Portable install mod or feature?

Post by pango »

That question has already been asked and answered here: viewtopic.php?f=5&t=3798
and more recently here viewtopic.php?f=5&t=4148

TL;DR: Daggerfall Unity is just using the file system layout (and underlying mechanisms) provided by the Unity Engine
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

AuntiePixel
Posts: 44
Joined: Sat Jan 30, 2021 6:24 pm
Location: US-central KY

Re: Portable install mod or feature?

Post by AuntiePixel »

Thanks for the reply. Sorry for not searching first.

Hurricane Otter
Posts: 35
Joined: Wed Nov 30, 2016 12:09 am

Any way to make DFU portable?

Post by Hurricane Otter »

I love to play Daggerfall, but my life is so hectic that I'm seldom in front of the same computer two nights in a row. For this reason it would be ideal if I could install Daggerfall Unity on the cloud such that the game files, mods, and saves can sync between my desktop and laptop computers. However, it doesn't seem to be possible, since the game insists on pulling everything from local AppData. Is there a way to modify this behavior into the game by way of editing a config file, etc.? If not, is portability something that's under consideration for future release?

User avatar
DunnyOfPenwick
Posts: 275
Joined: Wed Apr 14, 2021 1:58 am
Location: Southeast US

Re: Portable install mod or feature?

Post by DunnyOfPenwick »

I've never tried this, but it might be possible to make a link from your Daggerfall folder in AppData to a cloud drive.

See the mklink /? command line.

For example, microsoft OneDrive uses C:/Users/<username>/OneDrive for storage on my PC.

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Portable install mod or feature?

Post by pango »

DFU only enumerates existing SAVE numbers the first time it saves or loads a game, so be sure to always have only one instance running at a time.
It's also not defensive against write errors, saving directly on a network share (where connectivity makes storage less reliable) could exacerbate latent issues like partial writes. Make "hard saves", avoiding overwrites as much as possible.
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
XJDHDR
Posts: 258
Joined: Thu Jan 10, 2019 5:15 pm
Location: New Zealand
Contact:

Re: Portable install mod or feature?

Post by XJDHDR »

I decided to make a PortableApps.com formatted launcher for DFU. If you run the game using the launcher, it will keep the contents of the game's LocalAppData folder inside a Data folder next to the launcher.

Keep in mind that this launcher won't stop the game from putting files in the LocalAppData folder. Instead, it will move the contents of the Data folder into the correct location in LocalAppData before running the game, then move the contents back into the Data folder after exiting. To use this, just copy DFU's files into the App\DaggerfallUnity folder.
Attachments
DaggerfallUnityPortable.7z
(494.19 KiB) Downloaded 68 times

Hurricane Otter
Posts: 35
Joined: Wed Nov 30, 2016 12:09 am

Re: Portable install mod or feature?

Post by Hurricane Otter »

Hey, thanks a lot for doing this. It took a few tries, but I think I got it working. I really appreciate you going to the effort to meet my humble request. :)

One thing I'll say-- and this is pertaining to the Daggerfall Unity Project, not your workaround-- Sonic 3 AIR is another engine remake of an old game that came out recently, and it does something interesting with local files. Like DFU, it stores save data under AppData by default... but it has this nifty feature where if it detects a folder named "SaveData" in the same directory as the executable, it does an override and pulls from that folder instead. It's great, and it has the advantage of making the game 100% portable out of the box.

I don't know how difficult something like this would be to implement, or if it might be considered for a QoL improvement/refinement. I know DFU is pretty darn late in development. I'm not a programmer, but it doesn't seem like it ought to be very difficult to implement... In my mind, it's just an if/then statement, "if this directory is present pull data from here, if not pull data from AppData." Maybe I'm wrong and it's a great deal more complex. I just wanted to put the idea out there. I definitely appreciate your workaround, just wonder if this isn't a functionality that couldn't be built into DFU innately to avoid all the copying/deleting of files. Only a suggestion for the consideration of people much smarter than me!

Post Reply