Best Studio 1
Best Studio
romegames 1
romegames
Reklam vermek için turkmmo@gmail.com

M2 Granny Tools - Blender extensions for import/export

Hi everyone,

I'm releasing m2_granny_tools, a Blender extension that imports and exports Metin2's Granny2 (.gr2) models and motions, together with the script files the client loads alongside them. The goal is simple: take a model out of the client, edit it (or make one from scratch) in Blender, and put it back in a form the client loads exactly like its own files, without needing 3ds Max and the old Granny exporter.

Download:
Virustotal (EXE):
Virustotal (ZIP):
How it works

Blender can't load the Granny SDK, so the extension ships a small converter, gr2tool.exe, built against the Granny 2.11.8 runtime (the client links also has to use this version). Every .gr2 is read and written by Granny itself, never by a reapplication of the format. The extension handles everything on the Blender side and calls the converter for you; there's nothing to set up.

The rules it follows come from reading the client source (EterGrnLib, GameLib, EterLib), not from guesswork, and they were checked against a full client: over 16,000 .gr2 files round-trip through the converter, and over 9,500 models and 7,000 motions round-trip through Blender with no differences.

features

Models
  • Import and export of characters, arms, monsters, NPCs, weapons and zone buildings.
  • Always writes a file the client accepts: 32-bit, the model named after its root bone, and only the two vertex layouts the client handles (skinned PWNT3432 and rigid PNT332).
  • Lossless round trip: importing and exporting a shipped file without changes gives back the same data, odd entries included. Only what you edited changes.
  • Weapons and buildings: an unrigged mesh exports as a single-bone rigid model, as the Max exporter wrote them. Optional vertex colors, matching Max's output.
  • Keeps the bind pose of scaled bones (the cloth and attachment helps on player rigs) that Blender's rest pose can't represent, so skinned vertices don't drift.

Motions
  • Import and export of .gr2 motions. Motions you didn't touch keep their original curves exactly; edited ones are resampled and fitted to B-splines with the same tolerance and degree options as the Granny Max exporter.
  • Motions + Motion List writes the whole set the client needs: one .gr2 and one .msa per action, plus motlist.txt.
  • .msa extras from action features: loops, accumulation (movement), motion events (effects, sounds, fly, screen waving, show/hide, warp, ...), attack data (AttackingData: hit type, stiffen/invisible time, swept hit segments) and combo input windows. Each is checked against what the client's loader requires, so a bad entry is reported instead of breaking the whole motion.

Textures and materials
  • Per-material texture paths, editable in the export dialog, with the path it will write show before you export. Files under a ymir work folder automatically become d:\ymir work\... pack paths.
  • Follows the client's material rules: diffuse alpha is the specific mask (not transparency), two-sided materials, and alpha cut-outs (helmet crests, leaves) through an opacity map.
  • Warns you when moving a texture would silently break a .msm skin swap (monster color variants).

Client scripts besides the model
  • .msm race scripts: reads them and writes them back with your new paths. Everything else (attach points, effects, comments) is kept byte for byte. Collision spheres and attacked effects are editable as empties on the bones.
  • .mdatr collision and height: imports collision shapes and walkable height meshes for zone objects, and writes them back. It can also write an empty file, so a building is walk-through on purpose instead of getting the client's automatic binding box. All 2,912 .mdatr files of a client round-trip byte-identical.

Working with 3ds Max
  • Export a model's skeleton as FBX for 3ds Max (File > Export > Granny2 Skeleton for 3ds Max): every bone at its bind pose, in centimeters with Max's axes, ready to skin against. Max brings the bones in as Dummy helps, which skin and animate like bones.
  • A model rigged and skinned in Max can come into Blender as FBX and go out as a client .gr2. Bind Pose from FBX recovers the bone scales Blender drops on import.

Quality of life
  • Export presets (safe JSON, never run as code), with a 3ds Max weapon preset included that matches a Max exporter setup.
  • Clear reports after every export: what path each material got and why, what was left out, and what to fix.

Tested in game
  • A new armor on an existing skeleton, with new materials.
  • A model skinned in 3ds Max against an exported skeleton.
  • A monster's .msm collision and an attacked effect, then restored to the original.
  • Textures in a custom folder under d:\ymir work\.

requirements
  • Windows x64.
  • Blender 4.2 or newer (developed on Blender 5.2).
  • Your client's .dds texts on disc if you want to see them in Blender. The .gr2 stores only texture paths, and the extension never copies or converts images.

Installation
  1. Download io_scene_gr2-0.1.0.zip from the release page. Don't unzip it.
  2. In Blender: Edit > Preferences > Get Extensions, then the dropdown in the top right, Install from Disk..., and pick the zip.
  3. Everything is under File > Import and File > Export as Granny2 ....

Known limitations
  • Blender pose keys can't hold shear, so resampling a sheared bone is approximate. Motions you don't edit are affected.
  • Of the two curve modes, the quantized one fits a few motions slightly less precisely (under half a centimeter).
  • It targets clients on the Granny 2.11 runtime (32-bit .gr2).

Feedback wanted

This is the first public release, and it's only been tested on my own client, so your input matters. Please reply in this thread, or message me on Discord (carbust), if you:
  • Found a bug: a file that won't import, an export the client refuses or crashes on, or a model that looks or moves differently in game than in Blender.
  • Have a file that behaves oddly: clients differ, and odd files are exactly what I need to test against.
  • Miss a feature or have an idea for your workflow.
  • Just used it: what worked, what was confusing, what took too many steps.

For bugs, it helps a lot to include:
  • The Blender version and the extension version (0.1.0).
  • What you did, step by step (import, what you edited, which export options).
  • The export report or error message (copy the text from Blender's Info area or the system console).
  • The file itself or the client path of the model (eg ymir work/monster2/raptor), plus a screenshot if it's visual.

Don't want to share your model publicly? No problem. Send it to me privately on Discord (carbust) instead. I'll only use it to reproduce and fix the issue, and won't share it with anyone.

Thanks, and have fun modeling!
 
Moderatör tarafında düzenlendi:

Trojan File Found. Please Update the Links or Your File.
Not going to bother, that was the download, there's no "trojan", only false detections.

Not my problem, that's the binary that was built.

You can always drop it on or any other sandbox and analyze it.
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst