WzComparerR2 Documentation

repository·master·Indexed 20 days ago

https://github.com/kagamia/wzcomparerr2

A C#-based toolset for extracting and simulating MapleStory (冒险岛) WZ data files. It supports string searching, client comparison, equipment and map simulation, and Spine animation previews. The project targets .NET 4.6.2 or .NET 8 and includes modules for WZ file reading (WzLib), a Lua console for batch exports, an avatar viewer, and map rendering.

Tokens
4K
Snippets
6
Records
32
Agent score
69%

What's inside WzComparerR2

  1. Overview of WzComparerR2

    master

    WzComparerR2 is a MapleStory (冒险岛) data extractor built with C# targeting .NET 4.6.2 or .NET 8. It provides advanced features for analyzing WZ files, including:

    • String WZ Search: Searching for specific strings within WZ data.
    • Client Comparison: Comparing data between different clients.
    • Equipment Simulation: Simulating how equipment looks/behaves.
    • Map Simulation: Visualizing and simulating maps.

    Note on Maintenance: The project is currently in deep maintenance status. Only critical bugs or breaking changes to the WZ file format are addressed. Expect slow responses to issues.

  2. System Requirements for WzComparerR2 2.0.1

    master

    Starting from version 2.0.1, the application has been upgraded to use C# 6.0 and .NET 4.0. Due to the implementation of the Monogame 3.4/DX11 drawing engine for the Image Browser and Image Saving modules, the following requirements apply:

    • Operating System: Windows 7 or higher.
    • Graphics: A graphics card supporting DirectX 11 or higher.

    Note: Support for Windows XP or OpenGL is not officially planned, though it may be possible via manual compilation.

  3. Save Images and GIFs with Advanced Options

    master

    The image saving module has been rewritten. When saving GIFs, you now have access to additional options, including:

    • Image background settings
    • File naming methods

    Note on Drag-and-Drop: To save an image via drag-and-drop, you must hold the Ctrl key. A standard drag-and-drop operation will only move the item.

  4. Prerequisites for WzComparerR2

    master

    Depending on the version you are targeting, ensure your environment meets the following requirements:

    Version 2.x

    • OS: Windows 7 SP1 or higher
    • Framework: .NET 4.6.2 or higher
    • Graphics: DirectX 11.0 or higher

    Version 1.x

    • OS: Windows XP or higher
    • Framework: .NET 2.0 or higher
    • Graphics: DirectX 9.0 or higher
  5. Programmatically manipulate the Avatar Canvas

    master

    The AvatarCanvas class (used within the Entry class) provides a high-level API for constructing and rendering character avatars (paper dolls).

    Key capabilities include:

    • Loading Assets: Use LoadZ(), LoadActions(), and LoadEmotions() to prepare the canvas with WZ data.
    • Adding Parts: Use AddPart(Wz_Node node) to add specific image nodes (e.g., hair, face, clothing) to the avatar.
    • Frame Management:
      • GetActionFrames(string actionName): Retrieves the sequence of frames for a specific animation.
      • GetFaceFrames(string emotionName): Retrieves frames for a specific facial emotion.
      • CreateFrame(ActionFrame frame, Wz_Node faceFrame, Wz_Node weapon): Creates a composite frame structure.
      • DrawFrame(Bone bone): Renders the composite frame into a bitmap.
    • Animation Generation: The canvas can be used to generate Gif objects by iterating through action frames and combining them with facial expressions.
    AvatarCanvas canvas = new AvatarCanvas();
    canvas.LoadZ();
    canvas.LoadActions();
    canvas.LoadEmotions();
    
    // Add character parts
    canvas.AddPart(PluginManager.FindWz("Character\\00002000.img"));
    canvas.AddPart(PluginManager.FindWz("Character\\Face\\00020000.img"));
    
    // Set current state
    canvas.ActionName = "stand1";
    canvas.EmotionName = "shine";
    
    // Retrieve and render frames
    var actionFrames = canvas.GetActionFrames("stand1");
    foreach (var frame in actionFrames)
    {
        var bone = canvas.CreateFrame(frame, null, null);
        var bmp = canvas.DrawFrame(bone);
        // bmp.Bitmap contains the rendered frame
    }