Jump to content

Recommended Posts

Hi, to edit an mdatr just open it on 3dmax (any version) using Ricky's script.

Spoiler
MacroScript Load_Mdatr
category: "Mdatr Tool"
buttonText: "Load Mdatr file"
tooltip: "Load Mdatr file"
(
    fName = getOpenFileName types:"Mdatr Files (*.mdatr)|*.mdatr"
    if fName != undefined do
    (
        f = fopen fName "rb"
        if f != undefined do
        (
            headerText = ReadString f
            if (headerText == "AttributeData") do
            (
                --messageBox("Header Check OK!")
                numOfMeshes = ReadLong f
                numOfHeightPlanes = ReadLong f
              
                if (numOfHeightPlanes > 0) do
                (
                    messageBox("Warning: Numer of HeighPlanes is greater than 0. This feature is currently unsupported.")
                )
              
                -- Mesh reading and creation
                for i = 1 to numOfMeshes do
                (
                    meshType = ReadLong f
                    meshName = ReadString f
                    toSeek = 31 - meshName.count
                    fseek f toSeek #seek_cur
                    meshX = ReadFloat f
                    meshY = ReadFloat f
                    meshZ = ReadFloat f
                    --messageBox("Mesh type " + (meshType as string) + ", position: " + (meshX as string) + ", " + (meshY as string) + ", " + (meshZ as string))
                    obj = undefined
                    case (meshType) of
                    (
                        0:
                        (
                            -- Plane mesh
                            scaleX = ReadFloat f
                            scaleY = ReadFloat f
                            obj = plane width:scaleX length:scaleY
                            obj.position = [-meshX, meshY, meshZ]
                          
                            quatX = readFloat f
                            quatY = readFloat f
                            quatZ = readFloat f
                            quatW= readFloat f
                            --messageBox("Quaternion: X " + (quatX as string) + " Y " + (quatY as string) + " Z " + (quatZ as string) + " W " + (quatW as string))
                            rot = quat quatX quatY quatZ quatW
                            eulerRot = quatToEuler rot order:2
                            rotate obj eulerRot
                        )
                        2:
                        (
                            -- Sphere mesh
                            sRadius = ReadFloat f
                            obj = sphere radius:sRadius position:[meshX, meshY, meshZ]
                          
                            quatX = readFloat f
                            quatY = readFloat f
                            quatZ = readFloat f
                            quatW= readFloat f
                            --messageBox("Quaternion: X " + (quatX as string) + " Y " + (quatY as string) + " Z " + (quatZ as string) + " W " + (quatW as string))
                            rot = quat quatX quatY quatZ quatW
                            eulerRot = quatToEuler rot order:2
                            rotate obj eulerRot
                        )
                        3:
                        (
                            -- Cylinder mesh
                            cRadius = ReadFloat f
                            cLength = ReadFloat f
                            obj = cylinder radius:cRadius height:cLength position:[meshX, meshY, meshZ]
                          
                            quatX = readFloat f
                            quatY = readFloat f
                            quatZ = readFloat f
                            quatW= readFloat f
                            --messageBox("Quaternion: X " + (quatX as string) + " Y " + (quatY as string) + " Z " + (quatZ as string) + " W " + (quatW as string))
                            rot = quat quatX quatY quatZ quatW
                            eulerRot = quatToEuler rot order:1
                            rotate obj eulerRot
                        )
                    )
                    obj.name = meshName
                )
            )
        )
    )
)

 

With this script you can open any file .mdatr or export it for new object.

 

I found a video but there is a lot of useless extra stuff. You can find it on yt by searching for "edit mdatr metin2" You simply have to create meshes like planes, boxes, spheres (based on the object) and rename them "Collision01, Collision02 etc etc" 

 

  • Metin2 Dev 2
  • Love 2

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.