Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Coding Corner
You last visited: Today at 18:23

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release] FileStructure (JMXVDOF 0101)

Discussion on [Release] FileStructure (JMXVDOF 0101) within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2009
Posts: 314
Received Thanks: 686
[Release] FileStructure (JMXVDOF 0101)

There as been a small debate about Map-Editors this week.
Starting with showing off...


...and ending with the release of a (partly?)-decompiled version


Now, that is by no means a Map-Editor that brings a refreshing breeze to this game.
I kind of teased in the last thread with some older pictures from my Dungeon-Editor project, but I won't be a dick and release the file structure progress as it was on that day, which had some incomplete modifiers, yet is fully readable and A* path-finding compatible.


Code:
// File structure for: Dungeon File(*.dof)
// Created by: DaxterSoul - 2014
// Encoding: Windows Codepage: 949 (Korean) as some of the roomObjectName, entryNames or pointNames are Korean.

12  byte[]  Header                                         //JMXVDOF 0101 supported only
4   uint    pointerRoomObjects
4   uint    pointerObjectConnections
4   uint    pointerLinks
4   uint    pointerObjectGroups
4   uint    pointerIndexNames
4   uint    pointerUnk5                                    // Has been 0 in every file...
4   uint    pointerUnk6                                    // Has been 0 in every file...
4   uint    pointerDungeonBoundingBoxes                    
2   ushort  unk_ushort0                                    // Has been 0xFFFF in every file...
2   ushort  unk_ushort1                                    // Has been 0x0400 in every file...
2   ushort  dungeonNameLength                              
*   string  dungeonName                                    // Has been "Noname" in every file... -> used as projectName in MapEditor.
4   uint    unk_uint0                                      // Has been 0xFFFFFFFF in every file...
4   uint    unk_uint1                                      // Has been 0xFFFFFFFF in every file...
2   ushort  regionID                                       // Used in packets and database for whole Dungeon. Used in minimap_d as center- or origin-region (stores _default_).
                                                           
//pointerDungeonBoundingBoxes will get you here                       
24  float[]  dungeon_AABB                                  // width = AABB[3] - AABB[0], height = AABB[4] - AABB[1], length = AABB[5] - AABB[2]
24  float[]  dungeon_OOBB                                  // width = OOBB[3] - OOBB[0], height = OOBB[4] - OOBB[1], length = OOBB[5] - OOBB[2]

//pointerRoomObjects will get you here
4   uint    roomObjectCounter
for (int roomObjectIndex = 0; roomObjectIndex < roomObjectCounter; roomObjectIndex++)
{
    2   ushort  roomObject.PathLength
    *   string  roomObject.Path    
    
    2   ushort  roomObject.NameLength
    *   string  roomObject.Name
    
    4   float   roomObject.unk_floot0                      // Has been 0 in every file...
    4   float   roomObject.X
    4   float   roomObject.Z
    4   float   roomObject.Y
    4   float   roomObject.YAW                             // Google it... and use this: 57.2957795 for calculation
    4   float   roomObject.PITCH                           // Google it... and don't ask for missing roll, this is no flight simulator...
    24  float[] roomObject.AABB                            // width = aabb[3] - aabb[0], height= aabb[4] - aabb[1], length = aabb[5] - aabb[2]
    4   float   roomObject.unk_float12                     // Seems fixed to -2,848866E+38    
    4   float   roomObject.unk_float13                     // Seems fixed to -2,288091E+38
    4   float   roomObject.unk_float14                     // Example: -150
    4   float   roomObject.unk_float15                     // Example: 1456
    4   float   roomObject.unk_float16                     // Example: 0,001
    
    1   byte    roomObject.extraFlagA                       
    if(roomObject.extraFlagA == 0x01)
    {
        4   float   roomObject.ExtraA.unk_float0           // Example: 750
        4   float   roomObject.ExtraA.unk_float1           // Example: 680
        4   float   roomObject.ExtraA.unk_float2           // Example: 50
        4   float   roomObject.ExtraA.unk_float3           // Example: 0,08        
    }
    
    1   byte roomObject.extraFlagB
    if(roomObject.extraFlagB == 0x02)
    {
        4   float   roomObject.ExtraB.unk_float0           // Example: 0,1871207
        4   float   roomObject.ExtraB.unk_float1           // Example: 0
        4   float   roomObject.ExtraB.unk_float2           // Example: -0,8803339
        4   float   roomObject.ExtraB.unk_float3           // Example: 0  
        4   float   roomObject.ExtraB.unk_float4           // Example: 2,932153
        4   float   roomObject.ExtraB.unk_float5           // Example: 0
        4   float   roomObject.ExtraB.unk_float6           // Example: 3,503246E-42        
    }

    4   uint    roomObject.unk_uint0                       // Has been 0 in every file...
    4   uint    roomObject.roomIndex                       // Used for roomNames   
    4   uint    roomObject.floorIndex                      // Used for floorNames
    
    4   uint    roomObject.connectedObjectCount            //List of directly-connected objects. Example: 70, 146
    for (int i = 0; i < roomObject.connectedObjectCount; i++)
    {
        4   uint    objectIndex
    }
    
    4   uint    roomObject.indirectConnectedObjectCount    //List of indirectly-connected objects. Example: 70, 4, 146, 80
        for (int i = 0; i < roomObject.indirectConnectedObjectCount; i++)
    {
        4   uint    objectIndex
    }
    
    4   uint    roomObject.entryCounter
    4   uint    roomObject.unk_uint1                        //Either 0 or 1
    for (int entryIndex = 0; entryIndex < roomObject.entryCounter; entryIndex++)
    {
        //Contains Flames, Stones, Jewelry, Water, and other stuff...        
        2   ushort  entry.NameLength
        *   string  entry.Name
        
        2   ushort  entry.PathLength
        *   string  entry.Path        
        
        4   float   entry.X
        4   float   entry.Z
        4   float   entry.Y     
        
        4   float   entry.Roll
        4   float   entry.Yaw
        4   float   entry.Pitch    
        
        4   float   entry.ScaleWidth
        4   float   entry.ScaleHeight
        4   float   entry.ScaleLength
        
        4   uint    entry.extraFlag                        // I've seen this as 0x00 for Flames (Torch & Lamps), 0x02 for Stones (impassable), 0x04 for Water
        if(entry.extraFlag == 0x04) //Water...
        {
            4   uint    waterExta
        }
        
        4   uint    entry.ID
        4   float   entry.unk_float0                         
        //1962.75232 for out_obj_stone
        //902.9495 for out_obj_door
        //-3.18711172E+38 and similar for water        
    }
    
    4   uint    roomObject.pointCounter
    for (int pointIndex = 0; pointIndex < roomObject.pointCounter; pointIndex++)
    {
        2   ushort  point.NameLength
        *   string  point.Name 
        
        4   float   point.X
        4   float   point.Z
        4   float   point.Y
        
        4   float   point.Roll
        4   float   point.Yaw
        4   float   point.Pitch
        
        4   float   point.Width
        4   float   point.Height
        4   float   point.Length
        
        4   float   point.float09                          // also Roll        
        4   float   point.float10                          // also Yaw
        4   float   point.float11                          // also Pitch
        4   float   point.float12                          // Example: 0,8
        4   float   point.float13                          // Example: 0,007
        4   float   point.float14                          // Example: 3E-05
    } 
}

//pointerLinks will get you here
4   uint    unk_uint2
4   uint    unk_uint3
4   uint    unk_uint4
4   uint    linkCounter
for (int linkIndex = 0; linkIndex < linkCounter; linkIndex++)
{
    4   uint    link.ID
    4   uint    link.connectionCount
    for (int i = 0; i < link.connectionCount; i++)
    {
        4   uint    objectIndex
    }
}

//pointerObjectConnections will get you here
4   uint    objectConnectionCounter                        //Always equal to roomObjectCounter?
for (int objectIndex = 0; objectIndex < objectConnectionCounter; objectIndex++)
{
    4   uint    connectedObjectCount
    for (int i = 0; i < connectedObjectCount; i++)
    {
        4   uint    connectedObjectIndex
    }
}

//pointerIndexNames will get you here
4   uint    roomCounter
for (int roomIndex = 0; roomIndex < roomCounter; roomIndex++)
{
    //Some of them might be empty but thats no problem...
    2   ushort  roomNameLength
    *   string  roomName
}
4   uint    floorCounter
for (int floorIndex = 0; floorIndex < roomCounter; floorIndex++)
{
    //Some of them might be empty but thats no problem...
    2   ushort  floorNameLength
    *   string  floorName
}

//pointerObjectGroups
4   uint    objectGroupCounter
for (int i = 0; i < objectGroupCounter; i++)
{
    2   ushort  group.NameLength
    *   string  group.Name
    4   uint    group.Flag                                 //0 or 1 -> Service?
    4   uint    group.objectCount
    for (int ii = 0; ii < group.objectCount; ii++)
    {
        4   uint    objectIndex
    }
}
//EOF
Before you start dreaming about plans of your new minecraft-alike-dungeons with dragons, epic bosses, loot and shit. I'd like to tell you:
As you can "read" above, a dungeon consists of room resource(s) (*.bsr) linked together. There is no "terraforming", only static modeled objects. It is possible, but far more time consuming than creating open-world terraformed-surface.

I've been working on emulator and associated stuff on and off, switched between working on my packet documentation and Map-Editor. So there are a lot of things partially finished to some degree.

I won't promise anything here, so depending on contribution, feedback and whether or not I can spare some time, I'll try to complete most of the structure definitions and even my work-in-progress Map Editor, which will be released all for free and open source. I hope some of you, who are interested in the development perspective would join me on this (especially those blessed with reverse engineering skills unlike me, hehe).

This might end up in a small series about all the file structures you need for the Map(&Dungeon)Editor you want (think Warcraft III).
Featuring the following file structures:
Code:
*.pk2 - Pack File - "JoyMax File Manager!n", Version: 0x01000002

*.nvm - Nav Mesh File - "JMXVNVM 1000"
*.dof - Dungeon File - "JMXVDOF 0101"

*.bsr - Resource - "JMXVRES 0108", "JMXVRES 0109"
*.cpd - Compound - "JMXVCPD 0101"

*.bms - Mesh - "JMXVBMS 0110"
*.bmt - Material - "JMXVBMT 0102"
*.ddj - Texture - "JMXVDDJ 1000"

*.o - MapObject - "JMXVMAPO1001"
*.o2 - MapObject - "JMXVMAPO1001"
*.m - MapMesh - "JMXVMAPM1000"
*.t - MapTexture - "JMXVMAPT1001"
*.mfo - Map Project Info - "JMXVMFO 1000"
*.ifo - Map Info Files - "JMXVCAMR1002", "JMXVENVI1003", "JMXVOBJL1000", "JMXV2DTI1001"

*.bsk - Skeleton - "JMXVBSK 0101"
*.ban - Animation - "JMXVBAN 0102"
*.efp - Particle - "JMXVEFF 0011"
You might saw something familiar here, which has been a great start:
DaxterSoul is offline  
Thanks
18 Users
Old 09/05/2015, 08:04   #2
 
Royalblade*'s Avatar
 
elite*gold: 85
Join Date: Feb 2014
Posts: 1,056
Received Thanks: 1,643
**** dude. Looks like somebody had tons of free time.
If you need help with something hit me up on skype (Akasch on skype).

Plus did you actually go and decrypt all the mentioned file formats ... ?
Royalblade* is offline  
Old 09/05/2015, 10:40   #3
 
elite*gold: 0
Join Date: Nov 2007
Posts: 959
Received Thanks: 602
Add me on skype,I probably got some useful info,as I have a functional editor that can add colliding objects
vorosmihaly is offline  
Old 09/05/2015, 15:01   #4
 
elite*gold: 0
Join Date: Jan 2009
Posts: 314
Received Thanks: 686
Quote:
Originally Posted by Royalblade* View Post
**** dude. Looks like somebody had tons of free time.
No. The dungeon format has been really easy. If I remember correctly, it might took up to 6 hours total hours for me without reverse engineering, dunno if that is a speed up or not. I wonder why nobody released or tried it earlier.

Quote:
Originally Posted by Royalblade* View Post
Plus did you actually go and decrypt all the mentioned file formats ... ?
Yes, some of them completely. Some of them incompletely. But I'll go thought them again before releasing.
DaxterSoul is offline  
Old 09/05/2015, 15:07   #5
 
elite*gold: 10
Join Date: Jan 2010
Posts: 48
Received Thanks: 252
Quality release! Thank you!
Stratti is offline  
Old 09/05/2015, 20:28   #6
 
elite*gold: 11
Join Date: May 2009
Posts: 617
Received Thanks: 589
Its great to see still there is ppl working with sro-coding
qoaway is offline  
Old 09/11/2015, 20:05   #7
 
gigola123's Avatar
 
elite*gold: 0
Join Date: Jun 2007
Posts: 722
Received Thanks: 390
Really nice ! Great work and thank you
gigola123 is offline  
Reply


Similar Threads Similar Threads
Code 0101 bei Gilden was tun ?
07/09/2010 - Metin2 Private Server - 6 Replies
Hallo E*Pvpers, Wenn ich eine Gilde (mit 8Membern und meine hat auch 8Member) zum Gildenkrieg auffordern will, egal ob Feld Arena oder Flagge, kommt immer Code 0101. Was kann ich tun damit ich die Gilde zum Gildenkrieg auffordern kann und das es zu einem Gildenkrieg kommt ? MfG KingCrazor



All times are GMT +1. The time now is 18:24.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.