AlphaGaming7780 / ExtendedRadio

3 stars 1 forks source link

[Bug] Failure to load Mod #16

Closed Lion-Lawliet closed 22 hours ago

Lion-Lawliet commented 1 week ago

Hello there, I recently installed Cities Skylines 2 and decided to try out this mod, I placed it at the "AppData\LocalLow\Colossal Order\Cities Skylines II\Mods" folder, when loading the game, it gives me an error and freezes when I try to create a new city. When I check the logs, I have the following:

[2024-06-29 05:02:45,288] [INFO]  Modding runtime: Builtin
[2024-06-29 05:03:01,085] [INFO]  Mods registered in 47.3139ms
[2024-06-29 05:03:01,521] [INFO]  Loaded ExtendedRadio, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null in 0ms
[2024-06-29 05:03:01,534] [ERROR]  Error initializing mod ExtendedRadio, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (ExtendedRadio, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)
NullReferenceException: Object reference not set to an instance of an object
  at Game.UI.InGame.RadioUISystem.OnCreate () [0x0001d] in <90d6bddbab32420b8eff223b00d71586>:0 
  at Unity.Entities.ComponentSystemBase.CreateInstance (Unity.Entities.World world) [0x00093] in <adcf32f8c4f54ffe80a1d47a3227e68a>:0 
  at Unity.Entities.World.AddSystem_OnCreate_Internal (Unity.Entities.ComponentSystemBase system) [0x00011] in <adcf32f8c4f54ffe80a1d47a3227e68a>:0 
  at Unity.Entities.World.CreateSystemInternal (Unity.Entities.SystemTypeIndex type) [0x0000f] in <adcf32f8c4f54ffe80a1d47a3227e68a>:0 
  at Unity.Entities.World.GetOrCreateSystemManaged (Unity.Entities.SystemTypeIndex typeIndex) [0x0000b] in <adcf32f8c4f54ffe80a1d47a3227e68a>:0 
  at Unity.Entities.World.GetOrCreateSystemManaged[T] () [0x00028] in <adcf32f8c4f54ffe80a1d47a3227e68a>:0 
  at ExtendedRadio.Systems.MainSystem.OnCreate () [0x00006] in E:\__CODE\ExtendedRadio\MOD\Systems\MainSystems.cs:27 
  at Unity.Entities.ComponentSystemBase.CreateInstance (Unity.Entities.World world) [0x00093] in <adcf32f8c4f54ffe80a1d47a3227e68a>:0 
  at Unity.Entities.World.AddSystem_OnCreate_Internal (Unity.Entities.ComponentSystemBase system) [0x00011] in <adcf32f8c4f54ffe80a1d47a3227e68a>:0 
  at Unity.Entities.World.CreateSystemInternal (Unity.Entities.SystemTypeIndex type) [0x0000f] in <adcf32f8c4f54ffe80a1d47a3227e68a>:0 
  at Unity.Entities.World.GetOrCreateSystemManaged (Unity.Entities.SystemTypeIndex typeIndex) [0x0000b] in <adcf32f8c4f54ffe80a1d47a3227e68a>:0 
  at Unity.Entities.World.GetOrCreateSystemManaged[T] () [0x00028] in <adcf32f8c4f54ffe80a1d47a3227e68a>:0 
  at Game.UpdateSystem.UpdateAt[SystemType] (Game.SystemUpdatePhase phase) [0x00018] in <90d6bddbab32420b8eff223b00d71586>:0 
  at ExtendedRadio.ExtendedRadioMod.OnLoad (Game.UpdateSystem updateSystem) [0x00181] in E:\__CODE\ExtendedRadio\ExtendedRadioMod.cs:64 
  at Game.Modding.ModManager+ModInfo.OnLoad (Game.UpdateSystem updateSystem) [0x00015] in <90d6bddbab32420b8eff223b00d71586>:0 
  at Game.Modding.ModManager+ModInfo.Load (Game.UpdateSystem updateSystem) [0x001b9] in <90d6bddbab32420b8eff223b00d71586>:0 
  at Game.Modding.ModManager.InitializeMods (Game.UpdateSystem updateSystem) [0x00058] in <90d6bddbab32420b8eff223b00d71586>:0 

[2024-06-29 05:03:01,552] [INFO]  Loaded 0Harmony, Version=2.2.2.0, Culture=neutral, PublicKeyToken=null in 0ms
[2024-06-29 05:03:01,553] [INFO]  Mods initialized in 0ms
[2024-06-29 05:03:01,568] [INFO]  Registered UI Module {"m_ModuleId":"ExtendedRadio","m_Author":"Triton Supreme","m_ModuleVersion":{"Major":1,"Minor":0,"Build":0,"Revision":-1,"MajorRevision":-1,"MinorRevision":-1},"m_UIModuleDependencies":[""]} from ExtendedRadio (UIModuleAsset:9f1d7193142f92e42f16bccf01751b90)

That was for version 1.3.0, I tried to download version 1.2.3.2 to see if it would work and it did work, so something happened to this version. To note, this is a freshly installed game with no mods whatsoever.

Thank you for the mod and the attention!

AlphaGaming7780 commented 1 week ago

Why don't you download the mod from PDX mods in game ? The issue comes from the game itself and not my mod, that's what I see from the logs you give me.

Lion-Lawliet commented 6 days ago

Well I've done it, I downloaded in game and from Paradox's site https://mods.paradoxplaza.com/mods/75862/Windows the result is still the same, it says 1 out of 2 mods successfully loaded with ExtendedRadio being the faulty one and it's weird because I have completely reinstalled the game to make sure it wasn't something I've done by mistake. Again, the previous version 1.2.3.2 does work fine, only 1.3.0 seemingly doesn't.

Edit: Something weird happened as well, sometimes it works, sometimes it doesn't. This is when I download in game, when I download from the site and add to AppData\LocalLow\Colossal Order\Cities Skylines II\Mods it fails consistently.

AlphaGaming7780 commented 6 days ago

Well I've done it, I downloaded in game and from Paradox's site https://mods.paradoxplaza.com/mods/75862/Windows the result is still the same, it says 1 out of 2 mods successfully loaded with ExtendedRadio being the faulty one and it's weird because I have completely reinstalled the game to make sure it wasn't something I've done by mistake. Again, the previous version 1.2.3.2 does work fine, only 1.3.0 seemingly doesn't.

Edit: Something weird happened as well, sometimes it works, sometimes it doesn't. This is when I download in game, when I download from the site and add to AppData\LocalLow\Colossal Order\Cities Skylines II\Mods it fails consistently.

So from what I see from the comments on the mod page, you can try to only use the pdx version from the game, remove the one in the mods folder, disable all radio mod and ExtendedRadio, not uninstall, just disable it from the pdx mod manager in game. Restart the game, load a save, see if the game radio works. If yes, enable ExtendedRadio back and restart the game. Reload a save and see if it works now. And enable your radio mods back to see if it was caused by a radio mod.

Lion-Lawliet commented 5 days ago

Alright, I did that, now I only use the pdx version from the game, the mod seems to work most of time. I got the "no program" issue once but it started working fine on the next playthrough. What seems to happen often is that, I when I open/play the game twice, for example, then the next time I open the game it fails to load the mod, for no good reason, even if it was working earlier on, then closing the game and reopening causes it to work again, I'm confused but I guess I can work with this.