Jump to content

Recommended Posts

Hello everyone,

A friend and I found an old SQL-to-TXT converter on the M2Dev forum and adapted it to our server.

I usually edit my proto tables directly in Navicat. Once my changes are finished, I run this script to generate the TXT files that I can upload to my serverfiles.

Files generated:

item_proto.txt

item_names.txt

mob_proto.txt

mob_names.txt

What we changed:

Each item_proto row is rebuilt using a fixed list of 33 fields.

NULL or empty numeric values are replaced with 0, preventing columns from shifting.

Each field is separated by exactly one tab.

Legacy Latin-1 and CP949 encoded names are preserved.

Names are safely truncated without breaking CP949 characters.

Dragon Soul VNUM ranges are generated automatically. For example: 110000~110099.

Requirements:

Python

MySQLdb/mysqlclient

Access to your player database

Before running the script, enter your database connection details:

host_mysql = ''

user_mysql = ''

passwd_mysql = ''

You must also replace srv1_player with the name of your own player database.

Compatibility notice:

This script was adapted to our SQL table structure. If your item_proto or mob_proto has different columns, you may need to adjust the row indexes.

The locale-name corrections for VNUMs 55006 and 55007 are specific to our server. You can remove or modify them if you do not need them.

Please make sure you never share a version containing your real database password.

This tool saves us a lot of time, so I decided to share it in case it can help other developers too. Feel free to improve it or adapt it to your files. If you find a problem, let me know.

Credits:

This project is based on the Python SQL-to-TXT converter shared and adapted for the 40k files by Deucalion on M2Dev in 2014:

https://metin2.dev/topic/996-proto-converter-xml-2-sql-sql-2-txt

This is the hidden content, please

Alternative download links →

This is the hidden content, please

 

The script was then further modified and adapted to our server by Molly69 and Kaelis.

  • Metin2 Dev 1
  • Love 3

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.