Cannot load a saved game

Post here if you need help getting started with Daggerfall Unity or just want to clarify a potential bug. Questions about playing or modding classic Daggerfall should be posted to Community.
Post Reply
KasperJanssens
Posts: 1
Joined: Tue Jan 01, 2019 8:30 pm

Cannot load a saved game

Post by KasperJanssens »

Last version, 0.7.2, used DaggerfallSetup for the daggerfall files. Started privateer's hold, saved halfway, loading the game does not crash but as soon as I load the game itself does not render, I keep on seeing the 'Load Saved Games' screen. Saved game can be attached if necessary. Not sure how to provide more debugging info, do not really see anything in the console. Oh yes, Ubuntu 18.04.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Cannot load a saved game

Post by Interkarma »

Welcome to the forums KasperJanssens. :)

Please provide a copy of your save game amd we will take a look at it. You'll find save games in the persistent data path that is shown at the bottom of startup UI when launching game. This varies by platform.

The bug guidelines topic has some more information on persistent data path identifying saves.

User avatar
LypyL
Posts: 512
Joined: Sun Mar 22, 2015 3:48 am

Re: Cannot load a saved game

Post by LypyL »

I just tested this w/ Ubuntu in a VM & using Build 0.72 and experienced the same issue. This was the exception in the log:
KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2[System.Int32,DaggerfallConnect.Arena2.FactionFile+FactionData].get_Item (Int32 key) [0x00000] in <filename unknown>:0
at DaggerfallWorkshop.Game.Serialization.SerializablePlayer.RestoreFactionData (DaggerfallWorkshop.Game.Serialization.FactionData_v2 factionData) [0x00000] in <filename unknown>:0
at DaggerfallWorkshop.Game.Serialization.SerializableStateManager.RestoreFactionData (DaggerfallWorkshop.Game.Serialization.FactionData_v2 factionData) [0x00000] in <filename unknown>:0
at DaggerfallWorkshop.Game.Serialization.SaveLoadManager+<LoadGame>c__Iterator2.MoveNext () [0x00000] in <filename unknown>:0
at UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) [0x00000] in <filename unknown>:0
Trying to load a classic save resulted in the same error.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Cannot load a saved game

Post by Interkarma »

This is a fairly common issue where user has a bad copy of FACTION.TXT. I'm not sure, but I think one of the translation packs or unofficial fixes in Daggerfall Setup is the culprit.

Try downloading the known-good "DaggerfallGameFiles.zip" from Live Builds and replacing your FACTION.TXT file with the one from that archive. You should also delete the "FactionData.txt" file from your affected save.

Lypyl, without a save game from OP there's no way of knowing if you two have the same issue or not. But an incompatible FACTION.TXT is a fairly common problem and has been raised several times. :)

User avatar
LypyL
Posts: 512
Joined: Sun Mar 22, 2015 3:48 am

Re: Cannot load a saved game

Post by LypyL »

Ah, I see the problem. DaggerfallSetup gives you faction.txt (depending on if you select the patches it seems), while FactionFile wants FACTION.TXT, which was an issue on Linux as it's case sensitive. I'm using the same install for both so I knew the file itself was fine.

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

Re: Cannot load a saved game

Post by pango »

I thought .NET runtime (Mono in this case I assume) was doing case matching on its own to avoid this problem... (?)
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
LypyL
Posts: 512
Joined: Sun Mar 22, 2015 3:48 am

Re: Cannot load a saved game

Post by LypyL »

I just went and double checked by renaming the known good faction file to faction.txt and making a new save with it - Faction data in this save game is empty resulting in the exception I mentioned above. I don't have the editor installed so I can't go deeper than that atm.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Cannot load a saved game

Post by Interkarma »

Right, I'm officially done with FACTION.TXT causing issues. Every time someone has a problem with starting the game for the first time, this file is almost always the culprit. I've been dealing with problems from this file for years thanks to unpatched game files, custom edits and translations, bad or missing data, and now casing in case-sensitive file systems. There's only so much I can handle. :)

From now on, I'm including a known-good and nicely patched version of FACTION.TXT in StreamingAssets/Factions folder. Where previously FACTION.TXT was loaded from Arena2, it will instead be loaded from StreamingAssets. End users are still free to edit or replace this file if they wish.

In the near future, I'm likely to replace the entire FACTION.TXT file with a JSON export of this data, which is a much better fit for this kind of data in any case.

Post Reply