Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not compatible with latest version #6

Open
cff29546 opened this issue Feb 27, 2022 · 7 comments
Open

Not compatible with latest version #6

cff29546 opened this issue Feb 27, 2022 · 7 comments

Comments

@cff29546
Copy link

I'm running with mono, this command used to work with game version 41.65

C:
cd "C:\Program Files\Mono\bin"
mono.exe E:\MapMap\MapMap.exe -gfxsource E:\MapMap\TexturePacks\Erosion.pack -gfxsource E:\MapMap\TexturePacks\Tiles2x.pack -gfxsource E:\MapMap\TexturePacks\Tiles2x.floor.pack -gfxsource E:\MapMap\TexturePacks\ApCom.pack -gfxsource E:\MapMap\texturepacks\RadioIcons.pack -gfxsource E:\MapMap\TexturePacks\ApComUI.pack -mapsource E:\MapMap\Mapname_lotpack -output E:\MapMap\Mapname_output\ -dolayers true -divider 4 -maxthreads 2

but when updated E:\MapMap\TexturePacks\ and E:\MapMap\Mapname_lotpack with files from 41.66, program ended with Unhandled Exception

Boundaries: minx -99999 maxx 99999 miny -99999 maxy 99999
Threads: 2
Starting programm...
Reading texture data from: Erosion.pack
Sheet count: 5
Reading texture data from: Tiles2x.pack
Sheet count: 1263557200

Unhandled Exception:
System.ArgumentException: The output char buffer is too small to contain the decoded characters, encoding 'Unicode (UTF-8)' fallback 'System.Text.DecoderReplacementFallback'.

Parameter name: chars

  at System.Text.Encoding.ThrowCharsOverflow () [0x00027] in <32116eccb94d4ed685ca661d98e36637>:0 

  at System.Text.Encoding.ThrowCharsOverflow (System.Text.DecoderNLS decoder, System.Boolean nothingDecoded) [0x00026] in <32116eccb94d4ed685ca661d98e36637>:0 

  at System.Text.UTF8Encoding.GetChars (System.Byte* bytes, System.Int32 byteCount, System.Char* chars, System.Int32 charCount, System.Text.DecoderNLS baseDecoder) [0x0023c] in <32116eccb94d4ed685ca661d98e36637>:0 

  at System.Text.DecoderNLS.GetChars (System.Byte* bytes, System.Int32 byteCount, System.Char* chars, System.Int32 charCount, System.Boolean flush) [0x00059] in <32116eccb94d4ed685ca661d98e36637>:0 

  at System.Text.DecoderNLS.GetChars (System.Byte[] bytes, System.Int32 byteIndex, System.Int32 byteCount, System.Char[] chars, System.Int32 charIndex, System.Boolean flush) [0x000a2] in <32116eccb94d4ed685ca661d98e36637>:0 

  at System.Text.DecoderNLS.GetChars (System.Byte[] bytes, System.Int32 byteIndex, System.Int32 byteCount, System.Char[] chars, System.Int32 charIndex) [0x00000] in <32116eccb94d4ed685ca661d98e36637>:0 

  at System.IO.BinaryReader.InternalReadOneChar () [0x000e8] in <32116eccb94d4ed685ca661d98e36637>:0 

  at System.IO.BinaryReader.Read () [0x0000d] in <32116eccb94d4ed685ca661d98e36637>:0 

  at System.IO.BinaryReader.ReadChar () [0x00000] in <32116eccb94d4ed685ca661d98e36637>:0 

  at MapMapLib.MMTextures.readString (System.IO.BinaryReader binReader) [0x0001a] in <36cf778331e542fdb1e14be4e7371385>:0 

  at MapMapLib.MMTextures.loadFromPackFile (System.IO.BinaryReader binReader, System.Int32 sn) [0x00023] in <36cf778331e542fdb1e14be4e7371385>:0 

  at MapMapLib.MMTextures.readPackFile (System.IO.BinaryReader binReader) [0x0001e] in <36cf778331e542fdb1e14be4e7371385>:0 

  at MapMapLib.MMTextures.Load (System.String path) [0x0003d] in <36cf778331e542fdb1e14be4e7371385>:0 

  at MapMap.Main.readTexturePacks () [0x00019] in <36cf778331e542fdb1e14be4e7371385>:0 

  at MapMap.Main.Run (System.String[] args) [0x0000c] in <36cf778331e542fdb1e14be4e7371385>:0 

  at MapMap.Program.Main (System.String[] args) [0x00006] in <36cf778331e542fdb1e14be4e7371385>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: The output char buffer is too small to contain the decoded characters, encoding 'Unicode (UTF-8)' fallback 'System.Text.DecoderReplacementFallback'.

Parameter name: chars

  at System.Text.Encoding.ThrowCharsOverflow () [0x00027] in <32116eccb94d4ed685ca661d98e36637>:0 

  at System.Text.Encoding.ThrowCharsOverflow (System.Text.DecoderNLS decoder, System.Boolean nothingDecoded) [0x00026] in <32116eccb94d4ed685ca661d98e36637>:0 

  at System.Text.UTF8Encoding.GetChars (System.Byte* bytes, System.Int32 byteCount, System.Char* chars, System.Int32 charCount, System.Text.DecoderNLS baseDecoder) [0x0023c] in <32116eccb94d4ed685ca661d98e36637>:0 

  at System.Text.DecoderNLS.GetChars (System.Byte* bytes, System.Int32 byteCount, System.Char* chars, System.Int32 charCount, System.Boolean flush) [0x00059] in <32116eccb94d4ed685ca661d98e36637>:0 

  at System.Text.DecoderNLS.GetChars (System.Byte[] bytes, System.Int32 byteIndex, System.Int32 byteCount, System.Char[] chars, System.Int32 charIndex, System.Boolean flush) [0x000a2] in <32116eccb94d4ed685ca661d98e36637>:0 

  at System.Text.DecoderNLS.GetChars (System.Byte[] bytes, System.Int32 byteIndex, System.Int32 byteCount, System.Char[] chars, System.Int32 charIndex) [0x00000] in <32116eccb94d4ed685ca661d98e36637>:0 

  at System.IO.BinaryReader.InternalReadOneChar () [0x000e8] in <32116eccb94d4ed685ca661d98e36637>:0 

  at System.IO.BinaryReader.Read () [0x0000d] in <32116eccb94d4ed685ca661d98e36637>:0 

  at System.IO.BinaryReader.ReadChar () [0x00000] in <32116eccb94d4ed685ca661d98e36637>:0 

  at MapMapLib.MMTextures.readString (System.IO.BinaryReader binReader) [0x0001a] in <36cf778331e542fdb1e14be4e7371385>:0 

  at MapMapLib.MMTextures.loadFromPackFile (System.IO.BinaryReader binReader, System.Int32 sn) [0x00023] in <36cf778331e542fdb1e14be4e7371385>:0 

  at MapMapLib.MMTextures.readPackFile (System.IO.BinaryReader binReader) [0x0001e] in <36cf778331e542fdb1e14be4e7371385>:0 

  at MapMapLib.MMTextures.Load (System.String path) [0x0003d] in <36cf778331e542fdb1e14be4e7371385>:0 

  at MapMap.Main.readTexturePacks () [0x00019] in <36cf778331e542fdb1e14be4e7371385>:0 

  at MapMap.Main.Run (System.String[] args) [0x0000c] in <36cf778331e542fdb1e14be4e7371385>:0 

  at MapMap.Program.Main (System.String[] args) [0x00006] in <36cf778331e542fdb1e14be4e7371385>:0 

@R4to0
Copy link

R4to0 commented Mar 28, 2022

Pack format was updated it seems. Theres an extra header at start for some of the .pack file now and might have other internal structural changes, I haven't looked further. The tool will need an update.

@cff29546
Copy link
Author

cff29546 commented Apr 1, 2022

Game version 41.66 introduced a new version of the texture pack file. The latest version has different behavior for serializing png files. I wrote a tool in python to convert map data into Deep zoom that can correctly parse it. Here is the part related to texture version parsing: https://github.com/cff29546/pzmap2dzi/blob/main/pzmap2dzi/texture.py#L47

@blind-coder
Copy link
Owner

@cff29546 Hey, that looks pretty cool! Mind if I take a poke at it?

@cff29546
Copy link
Author

cff29546 commented Apr 1, 2022

@blind-coder No problem, serve yourself.

@blind-coder
Copy link
Owner

@cff29546 I think with a bit of work I could use that to generate the official map instead. Needs some documentation, and a tiny change to make layer 0 jpg instead of png. I'll look into it.

@cff29546
Copy link
Author

cff29546 commented Apr 1, 2022

@blind-coder I think I can add a config to set the image file extension.

@cff29546
Copy link
Author

cff29546 commented Apr 1, 2022

@blind-coder just added an option to use jpg for layer0, cff29546/pzmap2dzi@4b58a09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants