Jump to content

Recommended Posts

  • Active+ Member

Hello guys!

I needed to export the battle royale map and everything related to it for my shooting system, so i made a program that could automate that and i decided to release it.

How it works:

  1.  It creates a folder EXPORTED_mapname and copy the map inside it
  2. It goes through the Setting.txt file of the map and export textureset and environment
  3. It goes through all the AreaData.txt files and export every object in the map

Features:

  • Every element in the map is automatically renamed to lowercase (AreaData.txt, AreaAmbienceData.txt, Setting.txt etc.)
  • AreaData and AreaAmbienceData supports .prb, .prt, .pre, .prd and .pra files (i believe i didn't forget any file type)
  • When exporting a .prb or a .prd file, it also exports the related .gr2 model
  • All .GR2 files are automatically renamed to .gr2
  • Every texture related to a .gr2 model is exported with it, the collision .mdatr file is also exported if available
  • When exporting a .prt file, it also exports the related .spt model and every texture related to it
  • When exporting a .pre file, it also exports the related .mse effect
  • When exporting a .mse effect, it also exports every mesh (.mde) and every texture related to it
  • When exporting a .pra file, it also exports the related sound effect
  • If for any reason it can't find or export a file, it will list it in a not_found.txt, which also specifies what file it was related to
  • If it finds two properties with the same identification number, it will list them in a duplicate_properties.txt

The MapExporter can be used from any directory, it doesn't necessarily have to be in the D:/ymir work/ folder, but make sure the provided granny2.dll and SpeedTreeRT.dll are in the same folder as the MapExporter.exe

 

 

Download Center

This is the hidden content, please

This is the hidden content, please


Changelogs:

Spoiler

- 1.4: .spt textures get now exported and are listed in the not_found.txt file if they don't exist

- 1.3: .mde textures get correctly exported. Duplicate properties get listed in a duplicate_properties.txt

- 1.2: Added support for AreaAmbienceData.txt, .prd and .pra files

- 1.1: Statically linked MinGW libraries

- 1.0: First Release

 

Edited by Froslass
Updated to version 1.4
  • Metin2 Dev 49
  • Good 7
  • Love 19
Link to comment
https://metin2.dev/topic/34078-map-exporter/
Share on other sites

  • Active+ Member
1 hour ago, Ace said:

there is also ".prd" (Dungeons) and ".pra" Ambience.

 

 

PS: there is some libs missing.

Can you tell me a map that uses .prd and .pra? I'll add them when i'm free

I’ve also statically linked the MinGW libraries, so you can now run the program even if you don’t have MinGW installed on your computer, thanks for your feedback!

Please redownload it and let me know if you still have libs problems!

Link to comment
https://metin2.dev/topic/34078-map-exporter/#findComment-172878
Share on other sites

1 hour ago, Froslass said:

Can you tell me a map that uses .prd and .pra? I'll add them when i'm free

I’ve also statically linked the MinGW libraries, so you can now run the program even if you don’t have MinGW installed on your computer, thanks for your feedback!

Please redownload it and let me know if you still have libs problems!

I can’t test it right now since I’m about to leave, but I’ll be back in a few days and will test it then. A map that uses PRD as far as I know, all the dungeons use PRD. Just take the Monkey Dungeon, for example.

As for ambience, I don’t think any map actually has a *.pra file, except maybe “Map2” from one of the three kingdoms (Red, Yellow, or Blue) for instance, the one with the waterfall sounds.

Thanks!     🙂

Link to comment
https://metin2.dev/topic/34078-map-exporter/#findComment-172880
Share on other sites

  • Active+ Member
2 hours ago, Ace said:

I can’t test it right now since I’m about to leave, but I’ll be back in a few days and will test it then. A map that uses PRD as far as I know, all the dungeons use PRD. Just take the Monkey Dungeon, for example.

As for ambience, I don’t think any map actually has a *.pra file, except maybe “Map2” from one of the three kingdoms (Red, Yellow, or Blue) for instance, the one with the waterfall sounds.

Thanks!     🙂

Alright, i have updated the tool to also support .prd and .pra files, thanks for pointing them out

  • Good 1
Link to comment
https://metin2.dev/topic/34078-map-exporter/#findComment-172883
Share on other sites

I’ve tested it again now. First of all, thank you very much for your time and your contribution to the community.

I’m not sure if everything will really work once the tool has finished exporting everything, but we’ll see. I’ll let you know once I’ve checked.

What I noticed is that the “.MDE” files are being exported, but the textures are not.

It’s important that for file types like GR2, MDE, SPT, etc., all objects that have textures should include the following:
The tool shouldn’t only search for textures with extensions like .tga, .dds, or .png. For example:

If my object is called “test.gr” (or “test.spt”, etc.) and the assigned texture “test.tga” isn’t found, the tool should automatically look for other file extensions with the same base name.
So if my texture is “test.tga,” it should also search for “test.dds.”
As far as I know, SPT files usually reference “.tga” files, but later they actually use “.dds” instead.

Also, for “Ambience” (the “.pra” files), the sound file isn’t being found even though it exists. I’m not too lazy to find it manually later; I just wanted to let you know.

  • Good 1
Link to comment
https://metin2.dev/topic/34078-map-exporter/#findComment-172978
Share on other sites

  • Active+ Member
2 hours ago, Ace said:

I’ve tested it again now. First of all, thank you very much for your time and your contribution to the community.

I’m not sure if everything will really work once the tool has finished exporting everything, but we’ll see. I’ll let you know once I’ve checked.

What I noticed is that the “.MDE” files are being exported, but the textures are not.

It’s important that for file types like GR2, MDE, SPT, etc., all objects that have textures should include the following:
The tool shouldn’t only search for textures with extensions like .tga, .dds, or .png. For example:

If my object is called “test.gr” (or “test.spt”, etc.) and the assigned texture “test.tga” isn’t found, the tool should automatically look for other file extensions with the same base name.
So if my texture is “test.tga,” it should also search for “test.dds.”
As far as I know, SPT files usually reference “.tga” files, but later they actually use “.dds” instead.

Also, for “Ambience” (the “.pra” files), the sound file isn’t being found even though it exists. I’m not too lazy to find it manually later; I just wanted to let you know.

I can correctly export .pra files (including sound). Are you sure you have the files in the correct directory? (E.g. if you open a metin client, in the pack folder there will be "pack/sound/sound/yoursound". But the .pra file will contain a sound path like "D:/ymir work/sound/yoursound", so the map exporter will search inside D:/ymir work/sound not D:/ymir work/sound/sound).

As of .MDE you are right, i forgot to handle textures for .MDE files, unfortunately it's not as easy as you may think, you can't just search for filename.different_extensions to implement them. As an example inside ymir work/effect/etc/follow there is flag_1.mde with texture flag.tga (so searching for flag_1.extension wouldn't return any texture), the folder also includes a flag.dss which is unused and would be useless to export. I must update the program so it can handle .mde files and get the texture from it, not just randomly search and copy any file with the same name as the .mde. I'll do it as soon as i have free time (i got surgery a few days ago and i still didn't recover so it will take some time), thanks for the feedback again.

.spt file, like i said i don't care about them since i only use trees that are already included in the client for my maps and i cba to learn speedtrees apis for something i don't need, if ever i'll have THAT much free time, i'll also include those for you guys (again, i won't randomly search and copy everything that has the same name in the folder)

Lastly for .gr2, no it's not important to check for extensions like .tga, .png etc., i use granny apis to handle the .gr2 and get the texture from it, so there is no need to blindy search for textures with the same name like you suggested, the program knows the path, the name and the extension of the texture related to .gr2 files

 

Edited by Froslass
  • Love 3
Link to comment
https://metin2.dev/topic/34078-map-exporter/#findComment-172979
Share on other sites

  • Active+ Member

Released version 1.3:

  • The program now correctly export textures found in .mde files
  • If it finds two properties with the same identification number, it will list them in a duplicate_properties.txt

Since all properties are fetched before checking whether they are present in the map, duplicate_properties.txt will list all duplicated properties, not just those found in the map.

They will be listed with the following format:

D:\Ymir Work\property\devils_dragon_island\copy_mtthund_thorn01.prb has same property number as D:\Ymir Work\property\devils_dragon_island\mtthunder_thorn01.prb: 1740984444

  • Metin2 Dev 1
  • Love 3
Link to comment
https://metin2.dev/topic/34078-map-exporter/#findComment-173041
Share on other sites

  • 2 weeks later...
  • Active+ Member

Released version 1.4:

  • The program now correctly exports textures for .spt files
  • If it can't find a texture related to a .spt file, it now gets listed in the not_found.txt like other missing files

 

For those wondering:

  • Textures files for speedtrees models should be in .dds, the metin client specifically search for this format even if the texture is listed as .tga in the speedtree model itself: 
    LoadTexture((CFileNameHelper::GetPath(string(pszSptFile)) + CFileNameHelper::NoExtension(string(m_pTextureInfo->m_pBranchTextureFilename)) + ".dds").c_str(), m_BranchImageInstance);
  • I was right to think that you couldn't just randomly search for a texture based on the .spt file name because speedtrees usually have 3 different textures and none of them are usually the same name as the .spt file, as an example:

.png

b1_montereycypress_rt2.spt, has:

  • 2x .tga textures: MontereyCypressBark.tga and CompositeShadowMapB1.tga
  • 1x texture that doesn't even have a format: CompositeMapB1

The metin client change the .tga to .dds and add .dds to CompositeMapB1. None of which shared the same name with .spt file b1_montereycypress_rt2.

Anyway the program should now be completed and shouldn't miss any file type, if you find any, as always, feel free to comment here 😁

  • Metin2 Dev 2
Link to comment
https://metin2.dev/topic/34078-map-exporter/#findComment-173192
Share on other sites

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.