Premium msnas 1668 Posted April 1, 2021 Premium Share Posted April 1, 2021 This tutorial is going to teach you how to compile, run and configure a server on Windows. I needed something like this a few days ago and since it doesn't exist, I decided to make it There is no addition or modification in the source or client (except for small bonuses). 0. Beginning At the end of the topic there will be two links where you will need to download: Client + Server + Source MySQL The client is based on the This is the hidden content, please Sign In or Sign Up , I just edited it to have the classic format. Regardless the Server and Client source. 1. The files We will need to download the following files: Visual Studio Community 2019 - In order to compile both the server and the binary, we're going to need this MySQL - Connect and create the database 2. Installing The installation is easy enough for me to consider that I don't need to spend much time on this, however I hope this two pictures will facilitate (more) on what you need to do: Visual Studio Community Note: You actually just need the MSVC v142, C++ CMake, C++ ATL, C++ MFC and C++/CLI for this to work MySQL: Warning: In this tutorial we're going to use Mysql Server 5.7.33 X64 but you can (must) upgrade it to 8.0 2.1 Installing Server / Client / Database Here you need to pay attention because there's a limitation: Warning: You must unzip the file "dev" on C:\ If you don't want, follow the Mali61's topic and you need to create manually the symlinks for each core on the server. This is how it should be. Client: There isn't much to say, in pack/ you already have root and locale_de unpacked but since this is going to be localhost only, you don't need to change nothing on the serverinfo.py Bonus: I translated the client to English, just because Database: 1) Windows Key + R and write services.msc 2) Search for MySQL57 (or the version you installed) and click on Stop Since Im portuguese, yeah 3) Go to directory C:\ProgramData\MySQL 4) In the folder MySQL Server 5.7 (or the version you installed) and in the folder Data, paste the files you previously downloaded and unziped from mysql_dev.rar 5) On services.msc, start the MySQL process Back it again with the portuguese Server: These images are referenced in each core's CONFIG and conf.txt, respectively where the location is on directory C:\dev\2. Server. Warning: Don't forget to change the MySQL's user password! You need to put the same password you had when installing the MySQL. 3. Compile Server / Client Source There is nothing introductory since it is something very simple that you will be able to. Server: It's quite simple, to build the server source, we just need to open the file dev_server.sln which is located in C:\dev\1. Svn\Server\build You can build all at once or separately. Bonus: I linked the files to go to the directory C:\dev\2. Server\share\ so you don't need to c&p multiple times. Client: Same as before, open the dev_solution.sln which is located in C:\dev\1. Svn\Client Since I have a good computer, I enabled the multi-processor compilation option. If your computer is very slow while you are compiling, I suggest you deactivate by going to Properties in all the builds. 4. Starting the Server On the main directory of the server (C:\dev\2. Server) you'll have 2 bat files: start.bat* - As the name says, it will start the server clear.bat - It will clear all the server's logs * I forgot the make it dynamic so if you don't want to have on the C:\dev, you'll need to change the directory. Execute start.bat and it will show up first the db.exe, then auth's game.exe and last channel1's game.exe And there you have it, your server is now online! 5. Debug You can debug by going to Debug -> Start New Instance Bonus: I linked everything so you don't have to worry about anything 5. Credits I like to say that I don't know anything about anything and as such, everything here has its credits. @Mali61 - Client/Server compilable with VS2019 (Server & Client) @Karbust - If it wasn't for him, I couldn't have done this ThatGuyPT - The base was from his Windows Serverfiles 6. FAQ Q: Why didn't you use xampp instead of MySQL? A: At the moment I use MySQL a lot even outside of Metin2, so it makes more sense to me that it be this way. However, it is exactly the same, especially on localhost. Q: Can I migrate the source to FreeBSD? A: Yes, you can! As long as you have cmake configured, you can distribute to FreeBSD and use it there. Q: What is the id and password to enter the game? (I put this question because I know there will be someone asking this) A: You can create an account in the database, but you can use id: admin pw: 123 7. Links This is the hidden content, please Sign In or Sign Up - This is the hidden content, please Sign In or Sign Up This is the hidden content, please Sign In or Sign Up If you have any questions that I can answer, feel free to write a post here. 444 12 30 3 4 4 3 2 2 12 5 4 8 249 5 64 509 Link to comment Share on other sites More sharing options...
Bizzy 102 Posted April 24, 2021 Share Posted April 24, 2021 (edited) mysql_real_connect: Access denied for user 'admin'@'localhost' (using password: YES) AsyncSQL: closing mysql connection. failed, retrying in 5 seconds failed, retrying in 5 secondsSuccess COMMON connecting to MySQL server (hotbackup) CREATING DIRECT_SQL AsyncSQL: locale euckr mysql_real_connect: Access denied for user 'admin'@'localhost' (using password: YES) AsyncSQL: closing mysql connection. i dont know how i can edit this fixed!!!!! but server source compile https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal 11 1 4 1 2 1 10 5 14 Link to comment Share on other sites More sharing options...
Cunoo 214 Posted April 24, 2021 Share Posted April 24, 2021 (edited) 3 hours ago, Bizzy said: mysql_real_connect: Access denied for user 'admin'@'localhost' (using password: YES) AsyncSQL: closing mysql connection. failed, retrying in 5 seconds failed, retrying in 5 secondsSuccess COMMON connecting to MySQL server (hotbackup) CREATING DIRECT_SQL AsyncSQL: locale euckr mysql_real_connect: Access denied for user 'admin'@'localhost' (using password: YES) AsyncSQL: closing mysql connection. i dont know how i can edit this fixed!!!!! but server source compile https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif Bad username and password for mysql Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal 2 2 2 Link to comment Share on other sites More sharing options...
Bizzy 102 Posted April 24, 2021 Share Posted April 24, 2021 (edited) i have this fixed but still problem is server sourccec compiling https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif fixed for people have the same problem compile all folder shared etc Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal 6 7 2 3 Link to comment Share on other sites More sharing options...
mariosthl 0 Posted April 26, 2021 Share Posted April 26, 2021 Hi, for some reason i cannot create character,everytime i try to create a character it says the character cannot be made Link to comment Share on other sites More sharing options...
Rly 0 Posted May 5, 2021 Share Posted May 5, 2021 I can't seem to figure out the mysql part, where do I change the root password? And like, how do I connect my server to the mysql? It keep saying access denied for user admin@localhost (using Password:YES) and something about trying again in 5 seconds. Link to comment Share on other sites More sharing options...
animersonuk2 0 Posted June 21, 2021 Share Posted June 21, 2021 Thanks for sharing! Link to comment Share on other sites More sharing options...
Qlix98 0 Posted July 12, 2021 Share Posted July 12, 2021 Thank you! Link to comment Share on other sites More sharing options...
TheHusyin 2 Posted July 15, 2021 Share Posted July 15, 2021 Thanks for the guide! :3 2 When you see pigs fly it means Windows has become open source Link to comment Share on other sites More sharing options...
GimBim 0 Posted July 29, 2021 Share Posted July 29, 2021 Thanks. Very helpful tutorial beginners Link to comment Share on other sites More sharing options...
Sative 8 Posted August 7, 2021 Share Posted August 7, 2021 (edited) i keep getting this error https://metin2.download/picture/vrg0PIyK136G36W5G6sWsdsO988Z3FfY/.png Edited September 11, 2022 by Metin2 Dev Core X - External 2 Internal 5 3 Link to comment Share on other sites More sharing options...
Active Member ReFresh 2566 Posted August 7, 2021 Active Member Share Posted August 7, 2021 @Sative Some define in locale_string.txt is missing. I'll be always helpful! Link to comment Share on other sites More sharing options...
Sative 8 Posted August 7, 2021 Share Posted August 7, 2021 @ReFreshall defines are complete in locale_string.txt encoding is also good it reads only "You have got %d yang" communicate, if you download all-in-one package you will get the same issue. Link to comment Share on other sites More sharing options...
includee666 1 Posted September 29, 2021 Share Posted September 29, 2021 Thanks man for sharing... Link to comment Share on other sites More sharing options...
Kafa 163 Posted October 3, 2021 Share Posted October 3, 2021 How are we supposed to compile quests ? nvm. starting to understand windows files, never used them before. how cringe xD you have no linkings like on freebsd ? Link to comment Share on other sites More sharing options...
Management ɛʟ Ǥʟɑçѳи 🧊 8051 Posted October 3, 2021 Management Share Posted October 3, 2021 28 minutes ago, Kafa said: How are we supposed to compile quests ? nvm. starting to understand windows files, never used them before. how cringe xD you have no linkings like on freebsd ? Batch file (example: quest.bat) @echo off CD share\locale\france\quest\ && RD /S /Q object && TIMEOUT /NOBREAK /T 1 && CLS for /F %%I IN (locale_list) DO (qc.exe %%I) qc.exe in quest folder I don't respond to any private messages, except for messages regarding ad system issues... For everything else, please join the Discord server and open a ticket... Link to comment Share on other sites More sharing options...
pbugyon 27 Posted October 4, 2021 Share Posted October 4, 2021 Thanks for the guide Link to comment Share on other sites More sharing options...
Brayan 0 Posted October 5, 2021 Share Posted October 5, 2021 Hello and nice job, pretty simple to understand the tutorial thanks! Link to comment Share on other sites More sharing options...
Kingston 4 Posted October 15, 2021 Share Posted October 15, 2021 (edited) The tutorial is perfectly written and understandable! But i have one or kind of more errors they seem not to be fixable.. As soon as i want to compile the Server it throws hella many Errors. that the .h files cant be found. Is there any solution for this? I Installed all necessary sdk's but still encountering this problem #Edit - I fixed it, i didnt unpacked it on C at first. But i deleted all and unpacked rightaway in C #Edit2 - it compiles but doesnt generate any .exe or something. any fix for that? it also throws an error with CMakeList.txt Edited October 15, 2021 by Kingston 2 1 2 Link to comment Share on other sites More sharing options...
fizzlesticks 2 Posted November 6, 2021 Share Posted November 6, 2021 thx you Link to comment Share on other sites More sharing options...
snake4game 1 Posted November 9, 2021 Share Posted November 9, 2021 On 8/7/2021 at 10:42 PM, Sative said: @ReFreshall defines are complete in locale_string.txt encoding is also good it reads only "You have got %d yang" communicate, if you download all-in-one package you will get the same issue. I have same error , i think is something from source that can not read locale_string.txt.... Link to comment Share on other sites More sharing options...
Kafa 163 Posted November 10, 2021 Share Posted November 10, 2021 12 hours ago, snake4game said: I have same error , i think is something from source that can not read locale_string.txt.... I've translated all Strings into this: Just do that, and you will fix 2 problems at once (no multi language required anymore) 3 6 1 2 Link to comment Share on other sites More sharing options...
Firee 0 Posted January 7, 2022 Share Posted January 7, 2022 thank bro Link to comment Share on other sites More sharing options...
RedforeCz 1 Posted February 23, 2022 Share Posted February 23, 2022 thx you Link to comment Share on other sites More sharing options...
pbugyon 27 Posted March 20, 2022 Share Posted March 20, 2022 Thanks so much for the tutorial! it was very useful and after several attempts I succeeded! but now I have two questions. 1. Is it possible to have the server translation in English? 2. Is it possible to use Hamachi to play with friends (not for profit, just for fun) if you just have to change the "localhost" config files to "hamachi ip"? or do I have to do something else? 1 Link to comment Share on other sites More sharing options...
Recommended Posts