Cities2Modding / MOOB

Map Optimization and Ongoing Bug-fixing mod for Cities Skylines 2
GNU General Public License v2.0
9 stars 1 forks source link

It doesnt import a PNG heightmap without a .CIV file #7

Closed CeAcatl86 closed 9 months ago

CeAcatl86 commented 10 months ago

When I export a heightmap, it generates a .cid file, and if I use that same heightmap while the .cid is in the same folder, the game correctly imports the heightmap back into a new map. I only did all this for testing. But if I delete the .cid file, or worse, generate my own height map that is obviously not accompanied by the .cid file, the game gives this error:

[ERROR] Error in trigger binding callback 'editorPanel.invoke' 'editorPanel' 'invoke' NullReferenceException: Object reference not set to an instance of an object at Game.Simulation.TerrainSystem.ToR16 (UnityEngine.Texture2D textureRGBA64) [0x00034] in :0 at Game.Simulation.TerrainSystem.ReplaceWorldHeightmap (UnityEngine.Texture2D inMap) [0x00000] in :0 at Game.UI.Editor.TerrainPanelSystem.OnLoadWorldHeightmap (Colossal.Hash128 guid) [0x0001e] in :0 at Game.UI.Editor.LoadAssetPanel.OnConfirm () [0x00016] in :0 at Game.UI.Widgets.Button.Invoke () [0x00006] in :0 at Game.UI.Widgets.InvokableBindings+<>c.b__0_0 (Game.UI.Widgets.IWidget widget) [0x0000a] in :0 at Colossal.UI.Binding.TriggerBinding1[T].Callback () [0x00013] in <437b352228684112b49dc956da07b388>:0 Colossal.Logging.CustomLogHandler:LogFormat(LogType, Object, String, Object[]) UnityEngine.Logger:LogFormat(LogType, String, Object[]) Colossal.Logging.UnityLogger:Log(Level, String, Exception) Colossal.Logging.UnityLogger:Error(Exception, Object) Colossal.UI.Binding.TriggerBinding1:Callback() System.Reflection.RuntimeMethodInfo:InternalInvoke(RuntimeMethodInfo, Object, Object[], Exception&) System.Reflection.RuntimeMethodInfo:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) System.Reflection.MethodBase:Invoke(Object, Object[]) cohtml.Net.Invoker:ExecuteAndSendResult(Binder, Delegate, Object[], Boolean) cohtml.Net.Invoker:Invoke(Int32) cohtml.Net.cohtmlNativePINVOKE:View_MouseEvent(HandleRef, HandleRef) cohtml.Net.View:MouseEvent(IMouseEventData) Colossal.UI.UIInputSystem:DispatchInputEvents(UIView, Boolean, InputEventType) Colossal.UI.UIInputSystem:DispatchInputEvents() Game.SceneFlow.GameManager:Update()

And of course, no change is generated in the map.

What am I doing wrong or what am I not understanding?

optimus-code commented 9 months ago

Importing heightmaps is no longer current MOOB functionality. Any issues with this are game related and liable to be fixed with official game updates soon.