soulsmods / DSMapStudio

A standalone map/level editor for Demon's Souls, Dark Souls 1/2/3, Bloodborne, Sekiro, and Elden Ring.
MIT License
490 stars 60 forks source link

Unknown DCX Format with latest patch #920

Open sarkhav opened 3 months ago

sarkhav commented 3 months ago

Unable to create a new project and modify regulation.bin as of 20/6/24 update

Odashikonbu commented 3 months ago

Same issue. this is full crash log `DSMapStudio Version 1.11.0

The value cannot be an empty string. (Parameter 'path')

   at System.ArgumentException.ThrowNullOrEmptyException(String, String)
   at System.ArgumentException.ThrowIfNullOrEmpty(String , String )
   at System.IO.File.WriteAllBytes(String, Byte[])
   at StudioCore.Editor.ProjectSettings.Serialize(String path) in ./src/StudioCore/Editor/ProjectSettings.cs:line 51
   at StudioCore.MapStudioNew.SaveAll() in ./src/StudioCore/MapStudioNew.cs:line 633
   at StudioCore.MapStudioNew.AttemptSaveOnCrash() in ./src/StudioCore/MapStudioNew.cs:line 666
   at DSMapStudio.Program.Main(String[]) in ./src/Studio.App/DSMapStudio/Program.cs:line 40`
ScipiosDefence commented 3 months ago

Same issue for me as well.

DSMapStudio Version 1.11.0

Unknown DCX format.

at SoulsFormats.DCX.Decompress(BinaryReaderEx br, Type& type) in ./src/Andre/SoulsFormats/SoulsFormats/Formats/DCX.cs:line 159 at SoulsFormats.SFUtil.GetDecompressedBR(BinaryReaderEx br, Type& compression) in ./src/Andre/SoulsFormats/SoulsFormats/Util/SFUtil.cs:line 212 at SoulsFormats.MountedSoulsFile1.Read(Memory1 bytes) in ./src/Andre/SoulsFormats/SoulsFormats/Util/MountedSoulsFile.cs:line 28 at SoulsFormats.SFUtil.DecryptERRegulation(String path) in ./src/Andre/SoulsFormats/SoulsFormats/Util/SFUtil.cs:line 531 at StudioCore.ParamEditor.ParamBank.LoadParamsERFromFile(String path, Boolean encrypted) in ./src/StudioCore/ParamEditor/ParamBank.cs:line 952 at StudioCore.ParamEditor.ParamBank.LoadParamsER(Boolean partial) in ./src/StudioCore/ParamEditor/ParamBank.cs:line 878 at StudioCore.ParamEditor.ParamBank.<>cDisplayClass73_0.b0() in ./src/StudioCore/ParamEditor/ParamBank.cs:line 1112 at StudioCore.Editor.TaskManager.LiveTask.b15_0() in ./src/StudioCore/Editor/TaskManager.cs:line 183 at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b281_0(Object obj) at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread, ExecutionContext, ContextCallback, Object) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread, ExecutionContext, ContextCallback, Object) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task&, Thread )

Log 2024-6-20--11-12-27.txt

Philiquaz commented 3 months ago

Until an update supporting dlc+ is written, I recommend downpatching the game back to 1.10.1 if you intend to do any modding. Your mod won't have been affected.

I will leave this issue open so others can find it.

foxhound1220 commented 3 months ago

Will downpatching the game result in being unable to play the DLC?

Philiquaz commented 3 months ago

Will downpatching the game result in being unable to play the DLC?

You had no practical chance of playing the DLC modded so soon anyway.

SILCO332 commented 3 months ago

I have the same issue, but also these error logs:

DSMapStudio Version 1.11.1

The value cannot be an empty string. (Parameter 'path')

   at System.ArgumentException.ThrowNullOrEmptyException(String, String)
   at System.ArgumentException.ThrowIfNullOrEmpty(String , String )
   at System.IO.File.WriteAllBytes(String, Byte[])
   at StudioCore.Editor.ProjectSettings.Serialize(String path) in ./src/StudioCore/Editor/ProjectSettings.cs:line 51
   at StudioCore.MapStudioNew.SaveAll() in ./src/StudioCore/MapStudioNew.cs:line 633
   at StudioCore.MapStudioNew.AttemptSaveOnCrash() in ./src/StudioCore/MapStudioNew.cs:line 666
   at DSMapStudio.Program.Main(String[]) in ./src/Studio.App/DSMapStudio/Program.cs:line 40
DSMapStudio Version 1.11.1

Object reference not set to an instance of an object.

   at StudioCore.SettingsMenu.DisplaySettings_MapEditor() in ./src/StudioCore/SettingsMenu.cs:line 257
   at StudioCore.SettingsMenu.Display() in ./src/StudioCore/SettingsMenu.cs:line 943
   at StudioCore.MapStudioNew.Update(Single deltaseconds) in ./src/StudioCore/MapStudioNew.cs:line 1018
   at StudioCore.MapStudioNew.Run() in ./src/StudioCore/MapStudioNew.cs:line 368
   at DSMapStudio.Program.Main(String[]) in ./src/Studio.App/DSMapStudio/Program.cs:line 36

But last time I had a startup crash:

DSMapStudio Version 1.11.1

The value cannot be an empty string. (Parameter 'path')

   at System.ArgumentException.ThrowNullOrEmptyException(String, String)
   at System.ArgumentException.ThrowIfNullOrEmpty(String , String )
   at System.IO.File.WriteAllBytes(String, Byte[])
   at StudioCore.Editor.ProjectSettings.Serialize(String path) in ./src/StudioCore/Editor/ProjectSettings.cs:line 51
   at StudioCore.MapStudioNew.SaveAll() in ./src/StudioCore/MapStudioNew.cs:line 633
   at StudioCore.MapStudioNew.AttemptSaveOnCrash() in ./src/StudioCore/MapStudioNew.cs:line 666
   at DSMapStudio.Program.Main(String[]) in ./src/Studio.App/DSMapStudio/Program.cs:line 40
LaykaKiro commented 3 months ago

Same issue when opening my project to update it. Here's the errors. 2024-06-21 21_09_43-Dark Souls Map Studio version 1 11 1  -  Layka

melak47 commented 3 months ago

The new compression type is ZSTD. The header looks pretty much the same as DCX_KRAK.
I had a quick go at adding de/compression support for it here: https://github.com/melak47/DSMapStudio/commit/c7b685825fa7d7871cd375f63c2b07d000786753

While that allowed me to open and save the new regulation bin, the game crashes when trying to load it. I've tried using different compression levels, and turning some optional Zstd parameters on and off (storing a checksum, for example), but no luck.

sarkhav commented 3 months ago

Just a quick heads up to anyone wanting to edit regulation.bin for their own personal mods, check out the ?ServerName? Discord (modding discord) and check the Tools and Resources section, Smithbox was updated to allow reading and saving.

https://discord.gg/GDkuryY2

Philiquaz commented 3 months ago

Thank you for the efforts, melak. This is similar to what's being getting done on ?servername? (with varying zstd libs), though the issue of recompression is something we also ran into. Recompressing with existing formats, the game seems to be holding up. But I'm cautious on rushing something out without investigation, or blindly updating numbers so that things look like they work.

Riskyyu commented 3 months ago

Got Issue today 27/06/24 Untitled Untitled2

zhu-zisheng commented 3 months ago

Same Issue.

DSMapStudio Version 1.11.1

Unknown DCX format.

at SoulsFormats.DCX.Decompress(BinaryReaderEx br, Type& type) in ./src/Andre/SoulsFormats/SoulsFormats/Formats/DCX.cs:line 159 at SoulsFormats.SFUtil.GetDecompressedBR(BinaryReaderEx br, Type& compression) in ./src/Andre/SoulsFormats/SoulsFormats/Util/SFUtil.cs:line 212 at SoulsFormats.MountedSoulsFile1.Read(Memory1 bytes) in ./src/Andre/SoulsFormats/SoulsFormats/Util/MountedSoulsFile.cs:line 28 at SoulsFormats.SFUtil.DecryptERRegulation(String path) in ./src/Andre/SoulsFormats/SoulsFormats/Util/SFUtil.cs:line 531 at StudioCore.ParamEditor.ParamBank.LoadParamsERFromFile(String path, Boolean encrypted) in ./src/StudioCore/ParamEditor/ParamBank.cs:line 952 at StudioCore.ParamEditor.ParamBank.LoadParamsER(Boolean partial) in ./src/StudioCore/ParamEditor/ParamBank.cs:line 878 at StudioCore.ParamEditor.ParamBank.<>cDisplayClass73_0.b0() in ./src/StudioCore/ParamEditor/ParamBank.cs:line 1112 at StudioCore.Editor.TaskManager.LiveTask.b15_0() in ./src/StudioCore/Editor/TaskManager.cs:line 183 at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b281_0(Object obj) at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread, ExecutionContext, ContextCallback, Object) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread, ExecutionContext, ContextCallback, Object) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task&, Thread )