UBOAT
[2025.1.1] Realistic Light Modes
sq_paradox  [developer] 19 Feb @ 8:31am
Bug Reports
Please post any bugs here.

Need to know what settings you are running for the mod, and preferably any errors in the output.log file.
< >
Showing 1-8 of 8 comments
When switching to different light mode, i have the effect but light color doesn't change.

[RealisticLightModes] ApplyColorMultiplier for Alarm
System.FormatException: Input string was not in a correct format.
at System.Number.ThrowOverflowOrFormatException (System.Boolean overflow, System.String overflowResourceKey) [0x0001a] in <7e05db41a20b45108859fa03b97088d4>:0
at System.Number.ParseSingle (System.ReadOnlySpan`1[T] value, System.Globalization.NumberStyles styles, System.Globalization.NumberFormatInfo info) [0x00071] in <7e05db41a20b45108859fa03b97088d4>:0
at System.Single.Parse (System.String s) [0x0001a] in <7e05db41a20b45108859fa03b97088d4>:0
at UBOAT.Mods.RealisticLightModes.PlayerShipInteriorLightingPatches+ApplyColorMultiplierPatch.Prefix (UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting __instance, UBOAT.Game.Scene.Effects.LightController[] ___lightControllers) [0x00084] in <c56ad495a1cc475889ac6575709833f5>:0
at (wrapper dynamic-method) UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting.UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting.ApplyColorMultiplier_Patch1(UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting)
at UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting.set_DominantPreset (UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting+LightSet value) [0x00011] in <eef8a62c3789475cb8437ade0a1dfe32>:0
at UBOAT.Mods.RealisticLightModes.PlayerShipInteriorLightingPatches+SetPresetPatch.Prefix (UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting __instance, UBOAT.Game.Scene.Effects.LightController+Preset newPreset, UBOAT.Game.Scene.Effects.LightController+Preset& ___currentPreset, UnityEngine.GameObject[]& ___reflectionProbeSets, System.Single& ___presetChangeTime, UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting+LightSet& ___dominantPresetIndex) [0x00200] in <c56ad495a1cc475889ac6575709833f5>:0
[RealisticLightModes] Auto Day Lighting triggered
[RealisticLightModes] ApplyColorMultiplier for Surface
System.FormatException: Input string was not in a correct format.
at System.Number.ThrowOverflowOrFormatException (System.Boolean overflow, System.String overflowResourceKey) [0x0001a] in <7e05db41a20b45108859fa03b97088d4>:0
at System.Number.ParseSingle (System.ReadOnlySpan`1[T] value, System.Globalization.NumberStyles styles, System.Globalization.NumberFormatInfo info) [0x00071] in <7e05db41a20b45108859fa03b97088d4>:0
at System.Single.Parse (System.String s) [0x0001a] in <7e05db41a20b45108859fa03b97088d4>:0
at UBOAT.Mods.RealisticLightModes.PlayerShipInteriorLightingPatches+ApplyColorMultiplierPatch.Prefix (UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting __instance, UBOAT.Game.Scene.Effects.LightController[] ___lightControllers) [0x00084] in <c56ad495a1cc475889ac6575709833f5>:0
at (wrapper dynamic-method) UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting.UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting.ApplyColorMultiplier_Patch1(UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting)
at UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting.set_DominantPreset (UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting+LightSet value) [0x00011] in <eef8a62c3789475cb8437ade0a1dfe32>:0
at UBOAT.Mods.RealisticLightModes.PlayerShipInteriorLightingPatches+SetPresetPatch.Prefix (UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting __instance, UBOAT.Game.Scene.Effects.LightController+Preset newPreset, UBOAT.Game.Scene.Effects.LightController+Preset& ___currentPreset, UnityEngine.GameObject[]& ___reflectionProbeSets, System.Single& ___presetChangeTime, UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting+LightSet& ___dominantPresetIndex) [0x00214] in <c56ad495a1cc475889ac6575709833f5>:0
[RealisticLightModes] ApplyColorMultiplier for SilentRun
System.FormatException: Input string was not in a correct format.
at System.Number.ThrowOverflowOrFormatException (System.Boolean overflow, System.String overflowResourceKey) [0x0001a] in <7e05db41a20b45108859fa03b97088d4>:0
at System.Number.ParseSingle (System.ReadOnlySpan`1[T] value, System.Globalization.NumberStyles styles, System.Globalization.NumberFormatInfo info) [0x00071] in <7e05db41a20b45108859fa03b97088d4>:0
at System.Single.Parse (System.String s) [0x0001a] in <7e05db41a20b45108859fa03b97088d4>:0
at UBOAT.Mods.RealisticLightModes.PlayerShipInteriorLightingPatches+ApplyColorMultiplierPatch.Prefix (UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting __instance, UBOAT.Game.Scene.Effects.LightController[] ___lightControllers) [0x00084] in <c56ad495a1cc475889ac6575709833f5>:0
at (wrapper dynamic-method) UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting.UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting.ApplyColorMultiplier_Patch1(UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting)
at UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting.set_DominantPreset (UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting+LightSet value) [0x00011] in <eef8a62c3789475cb8437ade0a1dfe32>:0
at UBOAT.Mods.RealisticLightModes.PlayerShipInteriorLightingPatches+SetPresetPatch.Prefix (UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting __instance, UBOAT.Game.Scene.Effects.LightController+Preset newPreset, UBOAT.Game.Scene.Effects.LightController+Preset& ___currentPreset, UnityEngine.GameObject[]& ___reflectionProbeSets, System.Single& ___presetChangeTime, UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting+LightSet& ___dominantPresetIndex) [0x001ab] in <c56ad495a1cc475889ac6575709833f5>:0
[RealisticLightModes] Auto Day Lighting triggered
[RealisticLightModes] ApplyColorMultiplier for Surface
System.FormatException: Input string was not in a correct format.
at System.Number.ThrowOverflowOrFormatException (System.Boolean overflow, System.String overflowResourceKey) [0x0001a] in <7e05db41a20b45108859fa03b97088d4>:0
at System.Number.ParseSingle (System.ReadOnlySpan`1[T] value, System.Globalization.NumberStyles styles, System.Globalization.NumberFormatInfo info) [0x00071] in <7e05db41a20b45108859fa03b97088d4>:0
at System.Single.Parse (System.String s) [0x0001a] in <7e05db41a20b45108859fa03b97088d4>:0
at UBOAT.Mods.RealisticLightModes.PlayerShipInteriorLightingPatches+ApplyColorMultiplierPatch.Prefix (UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting __instance, UBOAT.Game.Scene.Effects.LightController[] ___lightControllers) [0x00084] in <c56ad495a1cc475889ac6575709833f5>:0
at (wrapper dynamic-method) UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting.UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting.ApplyColorMultiplier_Patch1(UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting)
at UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting.set_DominantPreset (UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting+LightSet value) [0x00011] in <eef8a62c3789475cb8437ade0a1dfe32>:0
at UBOAT.Mods.RealisticLightModes.PlayerShipInteriorLightingPatches+SetPresetPatch.Prefix (UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting __instance, UBOAT.Game.Scene.Effects.LightController+Preset newPreset, UBOAT.Game.Scene.Effects.LightController+Preset& ___currentPreset, UnityEngine.GameObject[]& ___reflectionProbeSets, System.Single& ___presetChangeTime, UBOAT.Game.Scene.Effects.PlayerShipInteriorLighting+LightSet& ___dominantPresetIndex) [0x00214] in <c56ad495a1cc475889ac6575709833f5>:0
sq_paradox  [developer] 19 Feb @ 12:28pm 
@PandaGutter
Thanks, that's helpful.

I put up a patch that should have a functioning a fallback, so it won't completely fail.
Latest update shows a white light with green border:

https://s20.directupload.net/images/250219/5x92bq3z.jpg

Hope this helps - thanks for your great work
Initialized Injection Framework in 7229 ms.
Engine version: 2021.3.33f1
System version: Windows 11 (10.0.22631) 64bit
System memory: 32516 MB
Direct3D:
Version: Direct3D 11.0 [level 11.1]
Renderer: NVIDIA GeForce RTX 4090
Vendor: NVIDIA
VRAM: 24142 MB
Driver: 572.16
There can be only one active Event System.
Game version: 2025.1 Patch 10
[RealisticLightModes] Loading, version: 1.4.0
[RealisticLightModes] Patches applied!
A new fade out transition was initiated before the previous one was completed.
A new fade out transition was initiated before the previous one was completed.
There can be only one active Event System.
[RealisticLightModes] ModCharacterActionsDatabase: loading actions data.
[RealisticLightModes] ModCharacterActionsDatabase: loading row "Crew/Actions/AutomaticLightsAction".
[RealisticLightModes] ModCharacterActionsDatabase: loading row "Crew/Actions/AutomaticSilentModeAction".
Achievement U_Tonnage War was already completed
Achievement U_Iron Cross 2nd Class was already completed
Achievement U_Iron Cross 1st Class was already completed
Achievement U_German Cross in Gold was already completed
Achievement U_Knight's Cross was already completed
Achievement U_15000 GRT was already completed
Achievement U_40000 GRT was already completed
Achievement U_Reputation is Everything was already completed
Achievement U_It's a Waste of Ammo was already completed
Achievement U_Torps Ain't Cheap was already completed
Achievement U_Fresh Air... was already completed
Starting 40 achievement objects.
[RealisticLightModes] ApplyColorMultiplier for Surface
[RealisticLightModes] setting normal lights on the first pass
Slot "Conning Tower" is defined for entity type "Type VIIB (Player)" in game data, but it's missing in the entity prefab.
Entering: U-boat
Entering: Wilhelmshaven
GarbageCollector disposing of ComputeBuffer. Please use ComputeBuffer.Release() or .Dispose() to manually release the buffer.
Requested asset at path "Equipment/Port Observation Post" doesn't exist.
[RealisticLightModes] RealisticLighting Parameter was null in PlayerShip Awake, creating
Stopping 40 achievement objects.
Group "U-boat" is neutralized!
Game version: 2025.1 Patch 10
kretze 24 Feb @ 2:20pm 
After today's patch 12, scripts from this mod can no longer be compiled
I found out that the DeviceUseAction function has probably changed

This note was shared with me as an example. maybe it helps...

base.UseDevice(character, "Default", "Skill", 2, null, false, true, false);
base.UseDevice(character, "Default", "Skill", 2, null, false, SlotUsageFlags.AllowUnderWaterAlways, false);
Hello, I really like this mod but it seems to have broken with the last patch. This might not be the right place, but I would also ask whether it would be possible to make a version that only adjusts lighting colors. E.g. White to Bright, Red to Dim, Blue to Emergency. I've included the relevant part of the error log below.

D:\SteamLibrary\steamapps\workshop\content\494840\3295504965\Source\PlayerShipInteriorLightingPatches.cs(11,7): warning CS0105: The using directive for 'UBOAT.Game.Scene.Effects' appeared previously in this namespace D:\SteamLibrary\steamapps\workshop\content\494840\3295504965\Source\LightSwitchPatches.cs(57,29): error CS0200: Property or indexer 'ISilentRunningController.IsSilentRunningEnabled' cannot be assigned to -- it is read only D:\SteamLibrary\steamapps\workshop\content\494840\3295504965\Source\LightSwitchPatches.cs(64,29): error CS0200: Property or indexer 'ISilentRunningController.IsSilentRunningEnabled' cannot be assigned to -- it is read only D:\SteamLibrary\steamapps\workshop\content\494840\3295504965\Source\LightSwitchPatches.cs(17,44): warning CS0649: Field 'LightSwitchPatches.playerShip' is never assigned to, and will always have its default value null D:\SteamLibrary\steamapps\workshop\content\494840\3295504965\Source\PlayerShipPatches.cs(18,44): warning CS0649: Field 'PlayerShipPatches.playerShip' is never assigned to, and will always have its default value null D:\SteamLibrary\steamapps\workshop\content\494840\3295504965\Source\SwitchLightActionPatches.cs(18,44): warning CS0649: Field 'SwitchLightActionPatches.playerShip' is never assigned to, and will always have its default value null D:\SteamLibrary\steamapps\workshop\content\494840\3295504965\Source\PlayerShipInteriorLightingPatches.cs(23,44): warning CS0649: Field 'PlayerShipInteriorLightingPatches.playerCrew' is never assigned to, and will always have its default value null D:\SteamLibrary\steamapps\workshop\content\494840\3295504965\Source\LightSwitchPatches.cs(18,58): warning CS0649: Field 'LightSwitchPatches.silentRunningController' is never assigned to, and will always have its default value null D:\SteamLibrary\steamapps\workshop\content\494840\3295504965\Source\Actions\AutomaticLightsAction.cs(15,44): warning CS0649: Field 'AutomaticLightsAction.playerShip' is never assigned to, and will always have its default value null D:\SteamLibrary\steamapps\workshop\content\494840\3295504965\Source\PlayerShipInteriorLightingPatches.cs(22,44): warning CS0649: Field 'PlayerShipInteriorLightingPatches.playerShip' is never assigned to, and will always have its default value null D:\SteamLibrary\steamapps\workshop\content\494840\3295504965\Source\RealisticLightModes.cs(36,44): warning CS0649: Field 'OnAfterDeserialize.playerShip' is never assigned to, and will always have its default value null D:\SteamLibrary\steamapps\workshop\content\494840\3295504965\Source\SleepBehaviourPatches.cs(15,60): warning CS0649: Field 'SleepBehaviourPatches.submarineLighting' is never assigned to, and will always have its default value null D:\SteamLibrary\steamapps\workshop\content\494840\3295504965\Source\Actions\AutomaticSilentModeAction.cs(15,44): warning CS0649: Field 'AutomaticSilentModeAction.playerShip' is never assigned to, and will always have its default value null Encountered an error, while trying to load a mod named "Realistic Light Modes". System.BadImageFormatException: 0x00000169♥♥♥♥F8E0 File name: 'In memory assembly' at (wrapper managed-to-native) System.AppDomain.LoadAssemblyRaw(System.AppDomain,byte[],byte[],System.Security.Policy.Evidence,bool) at System.AppDomain.Load (System.Byte[] rawAssembly, System.Byte[] rawSymbolStore, System.Security.Policy.Evidence securityEvidence, System.Boolean refonly) [0x0000e] in <7e05db41a20b45108859fa03b97088d4>:0 at System.AppDomain.Load (System.Byte[] rawAssembly, System.Byte[] rawSymbolStore, System.Security.Policy.Evidence securityEvidence) [0x00000] in <7e05db41a20b45108859fa03b97088d4>:0 at (wrapper remoting-invoke-with-check) System.AppDomain.Load(byte[],byte[],System.Security.Policy.Evidence) at System.AppDomain.Load (System.Byte[] rawAssembly) [0x00000] in <7e05db41a20b45108859fa03b97088d4>:0 at (wrapper remoting-invoke-with-check) System.AppDomain.Load(byte[]) at RoslynCSharp.ScriptDomain.LoadAssembly (System.Byte[] assemblyBytes, RoslynCSharp.ScriptSecurityMode securityMode) [0x00006] in <e5a2a023877645489a3602a4d95fe209>:0 at UBOAT.Game.Core.Mods.Mod.Compile (System.String assemblyPath, System.String[] files) [0x004d5] in <3925cb9e11ea484093dcaf76955e7f92>:0 at UBOAT.Game.Core.Mods.Mod.LoadAssembly () [0x000bc] in <3925cb9e11ea484093dcaf76955e7f92>:0
Last edited by Vangheist; 27 Mar @ 4:06pm
sq_paradox  [developer] 27 Mar @ 5:09pm 
Thanks for the log, it's broken for sure.

I'll try to get to it this weekend, but no promises.
no problem, just doing what I can. Data Sheets are one thing but I'm useless at code.
< >
Showing 1-8 of 8 comments
Per page: 1530 50