Pholith / ONI-Mods

Mods for Oxygen Not Included
https://steamcommunity.com/profiles/76561198263471888/myworkshopfiles/?appid=457140&sort=score&browsefilter=myfiles&view=imagewall
40 stars 13 forks source link

Linux Compatibility - I Love Slicksters - Morphs ! #2

Closed Tellik closed 5 years ago

Tellik commented 5 years ago

I'm pretty sure this is a Linux only bug, as you don't seem to have run into this before that I've noticed.

On standard installation and running, creating a new game, on the asteroid selection screen is blank. Backing out to the main menu causes a soft crash and disables all mods with the following error:

[02:33:36.817] [1] [INFO] Error occurred with mods active. Disabling all mods (unless dev mods active).
DirectoryNotFoundException: Could not find a part of the path "/home/deus/.steam/steam/steamapps/common/OxygenNotIncluded/OxygenNotIncluded_Data/StreamingAssets/worldgen/PholithWorld/subworlds/notSoFrozen/notSoFrozen.yaml".
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at System.IO.File.OpenRead (System.String path) [0x00000] in <filename unknown>:0 
  at System.IO.File.ReadAllBytes (System.String path) [0x00000] in <filename unknown>:0 
  at Klei.RootDirectory.ReadBytes (System.String filename) [0x00000] in <filename unknown>:0 
  at Klei.FileSystem.ReadBytes (System.String filename) [0x00000] in <filename unknown>:0 
  at Klei.YamlIO.LoadFile[SubWorld] (System.String filename, Klei.ErrorHandler handle_error, System.Collections.Generic.List`1 tagMappings) [0x00000] in <filename unknown>:0 
  at ProcGen.SettingsCache.LoadSubworlds (System.Collections.Generic.List`1 subworlds, System.Collections.Generic.List`1 errors) [0x00000] in <filename unknown>:0 
  at ProcGen.SettingsCache.LoadFiles (System.Collections.Generic.List`1 errors) [0x00000] in <filename unknown>:0 
  at ProcGenGame.WorldGen.LoadSettings () [0x00000] in <filename unknown>:0 
  at DestinationSelectPanel.OnSpawn () [0x00000] in <filename unknown>:0 
  at KMonoBehaviour.Spawn () [0x00000] in <filename unknown>:0 
Rethrow as Exception: Error in ColonyDestinationScreen2.DestinationSelectPanel.OnSpawn
  at KMonoBehaviour.Spawn () [0x00000] in <filename unknown>:0 
  at Util.SpawnComponent (UnityEngine.Component cmp) [0x00000] in <filename unknown>:0 
  at MyCmp.OnStart (.KMonoBehaviour c) [0x00000] in <filename unknown>:0 
  at KMonoBehaviour.Spawn () [0x00000] in <filename unknown>:0 
  at KMonoBehaviour.Start () [0x00000] in <filename unknown>:0 

(Filename:  Line: -1)

The key thing to note here is that Linux seems to store mod information differently than it stores game information.

The game is located in ~/.steam/steam/steamapps/common/OxygenNotIncluded/ The mod information is stored in ~/.config/unity3d/Klei/Oxygen Not Included/

The mod appears to be looking into my "/home/deus/.steam/steam/steamapps/common/OxygenNotIncluded/OxygenNotIncluded_Data/StreamingAssets/worldgen/PholithWorld/subworlds/notSoFrozen/notSoFrozen.yaml". for a specific file, however it doesn't exist. (It probably will attempt to look for all the files your mod adds, but crashes on the first failure.)

https://gyazo.com/ac8f28705eef48133d985a6e02dccb44

It does, however, exist here: "~/.config/unity3d/Klei/Oxygen Not Included/mods/Steam/1847165596/worldgen"

https://gyazo.com/d5c5b428b7d45087af5de04e40159587

This is issue 1.

Issue 2:

And this definitely confirms it's a Linux only error, since the biggest issue with Linux vs Windows is case sensitivity for file/folder names. In Windows, it doesn't matter if it's CONFIG.TXT or CoNfIG.txt, it's the same file. In Linux, they're all different files.

Since it's looking for notSoFrozen.yaml, the mod is providing NotSoFrozen.yaml

So to resolve issues 1 and 2, I attempted to merge and rename the files to the correct locations. However, this lead me to issue 3.

Issue #3:

ArgumentException: An element with the same key already exists in the dictionary.
  at System.Collections.Generic.Dictionary`2[System.String,ElementBandConfiguration].Add (System.String key, .ElementBandConfiguration value) [0x00000] in <filename unknown>:0 
  at ProcGen.ComposableDictionary`2[System.String,ElementBandConfiguration].Merge (ProcGen.ComposableDictionary`2 other) [0x00000] in <filename unknown>:0 
  at ProcGen.BiomeSettings.Merge (ProcGen.BiomeSettings other) [0x00000] in <filename unknown>:0 
  at ProcGen.SettingsCache.MergeLoad[BiomeSettings] (System.String filename, System.Collections.Generic.List`1 errors) [0x00000] in <filename unknown>:0 
  at ProcGen.SettingsCache.LoadBiome (System.String longName, System.Collections.Generic.List`1 errors) [0x00000] in <filename unknown>:0 
  at ProcGen.SettingsCache.LoadSubworlds (System.Collections.Generic.List`1 subworlds, System.Collections.Generic.List`1 errors) [0x00000] in <filename unknown>:0 
  at ProcGen.SettingsCache.LoadFiles (System.Collections.Generic.List`1 errors) [0x00000] in <filename unknown>:0 
  at ProcGenGame.WorldGen.LoadSettings () [0x00000] in <filename unknown>:0 
  at DestinationSelectPanel.OnSpawn () [0x00000] in <filename unknown>:0 
  at KMonoBehaviour.Spawn () [0x00000] in <filename unknown>:0 
Rethrow as Exception: Error in ColonyDestinationScreen2.DestinationSelectPanel.OnSpawn
  at KMonoBehaviour.Spawn () [0x00000] in <filename unknown>:0 
  at Util.SpawnComponent (UnityEngine.Component cmp) [0x00000] in <filename unknown>:0 
  at MyCmp.OnStart (.KMonoBehaviour c) [0x00000] in <filename unknown>:0 
  at KMonoBehaviour.Spawn () [0x00000] in <filename unknown>:0 
  at KMonoBehaviour.Start () [0x00000] in <filename unknown>:0 

(Filename:  Line: -1)

And issue 3 is where I leave it with you. I'm hoping by fixing Linux compatibility it'll also resolve this issue as well, since as it is, it's a little over my head to go code digging to find out exactly where it's breaking.

Pholith commented 5 years ago

I don't have a way to test on Linux if the changes have worked well, can you please test and tell me if the issues are still there?

Tellik commented 5 years ago

I can if you have a direct download link, otherwise I'd have to wait for Steam to push an update. (Steam is still reporting last updated Nov 7th for me.)

Pholith commented 5 years ago

I'm not updating the update on steam until I'm sure, you can download the .zip archive of the repo and this mod is in the /Mods/I Love Slickster folder. Then if you need help to install it manually there's a guide in the readme Thanks

Tellik commented 5 years ago

Ah, that's where it is. I didn't look too deep into the repo and just tried the /releases page. Give me a bit and I'll give it some testing.

Tellik commented 5 years ago

Okay, so I loaded up the new version.

Things seem to work so far. The first issue of the asteroid selection screen is fixed. I loaded up a slickster world. I'm seeing antigen/frozen slicksters, an excessive amount of ethanol slicksters, and some robot slicksters. (Might not be excessive, it just seemed like a lot at first glance.)

Ooo, there's an OWO slickster too.

So it looks like everything is working now. Looks like the log file is clean as well with no issues. (Also, I was running about 99 other mods at the same time, so it also maintains some good compatibility with massive amounts of other mods.)

Pholith commented 5 years ago

Thank you for the help !