• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

WZ HaRepacker is broken

Newbie Spellweaver
Joined
Jan 14, 2018
Messages
14
Reaction score
0
I downloaded the v62 setup from here: http://forum.ragezone.com/f425/maplestory-client-archive-gmsdlreborn-1101897/

So for map id = 100020000 check the node Map.wz/Map/Map1/100020000.img/back/0. It references Map.wz/Back/midForest.img/back/0. If I go in game, it is a blue background but when I load it in HaRepacker, it is a useless blob.

I also tried this with WzRepacker and it also shows the gray blob rather than the blue. Can somebody help me find a .wz explorer that isn't broken?

I will attach some screenshots



JJc0lMn - HaRepacker is broken - RaGEZONE Forums




hek5WMK - HaRepacker is broken - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Newbie Spellweaver
Joined
Sep 5, 2015
Messages
14
Reaction score
3
So for map id = 100020000 check the node Map.wz/Map/Map1/100020000.img/back/0. It references Map.wz/Back/midForest.img/back/0. If I go in game, it is a blue background but when I load it in HaRepacker, it is a useless blob.
I also tried this with WzRepacker and it also shows the gray blob rather than the blue. Can somebody help me find a .wz explorer that isn't broken?
This is a consistent issue through all public Hare versions and any other wz application - to my knowledge. It's probably due to a small issue with maplelib or something with that particular images basedata. I don't really know the root of the problem as analyzing code isn't my forte.

What I can tell you from a WZ editor standpoint is that unless you plan to export/import midForest, just leave it be and it'll be loaded fine in-game. If you do plan to export it, just replace the image with a similar blue png like the one in grassySoil and move on with your work. IME, it's only been that one particular bg image in midForest that has an issue. Not something worth getting hung up on.
 
Upvote 0
Junior Spellweaver
Joined
Feb 18, 2018
Messages
117
Reaction score
10
Do you want that Background for another map? you can use HaCreator to edit any map using the background you like:
 
Upvote 0
Experienced Elementalist
Joined
Feb 15, 2010
Messages
201
Reaction score
297
It's format 517 image.But HaRepacker decode code is wrong.Change these code in WzPngProperty.cs and
recompile the source.
Code:
  case 517:
                    argb = GetPixelDataForm517(pixel, this.w, this.h);
                    pngDecoded = new Bitmap(this.w, this.h, PixelFormat.Format16bppRgb565);
                    bmpdata = pngDecoded.LockBits(new Rectangle(0, 0, this.w, this.h), ImageLockMode.WriteOnly, PixelFormat.Format16bppRgb565);
                    Marshal.Copy(argb, 0, bmpdata.Scan0, argb.Length);
                    pngDecoded.UnlockBits(bmpdata);
break;

......
......
 public static byte[] GetPixelDataForm517(byte[] rawData, int width, int height)
        {
            byte[] pixel = new byte[width * height * 2];
            int lineIndex = 0;
            for (int j0 = 0, j1 = height / 16; j0 < j1; j0++)
            {
                var dstIndex = lineIndex;
                for (int i0 = 0, i1 = width / 16; i0 < i1; i0++)
                {
                    int idx = (i0 + j0 * i1) * 2;
                    byte b0 = rawData[idx];
                    byte b1 = rawData[idx + 1];
                    for (int k = 0; k < 16; k++)
                    {
                        pixel[dstIndex++] = b0;
                        pixel[dstIndex++] = b1;
                    }
                }

                for (int k = 1; k < 16; k++)
                {
                    Array.Copy(pixel, lineIndex, pixel, dstIndex, width * 2);
                    dstIndex += width * 2;
                }

                lineIndex += width * 32;
            }
            return pixel;
}
 
Upvote 0
Newbie Spellweaver
Joined
Jan 14, 2018
Messages
14
Reaction score
0
Awesome. I changed the code and recompiled, and now it's working fine.



x0EQJzm - HaRepacker is broken - RaGEZONE Forums



Thank you so much @Elem8100!
 

Attachments

You must be registered for see attachments list
Upvote 0
Back
Top