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:
[Hidden Content]
Download
Alternative download links → Mega.nz
The script was then further modified and adapted to our server by Molly69 and Kaelis.