duwen123 49 Posted February 16, 2022 Share Posted February 16, 2022 Hello, there! Is it possible to edit the server source using Visual Studio? I want to emphasize that I just want to edit the files from the server source, not compile them. I would like to use Visual Studio for this because, being a beginner in learning the source of this game, it would help me to see what kind of arguments a function should receive, to point out my code mistakes and so on. I guess I need to create an .sln file with which I can open the solution. I hope my question was clear enough. I am waiting for your suggestions and thank you for your time! Link to comment Share on other sites More sharing options...
duwen123 49 Posted February 17, 2022 Author Share Posted February 17, 2022 UP! Link to comment Share on other sites More sharing options...
Contributor Amun 1917 Posted February 24, 2022 Contributor Share Posted February 24, 2022 (edited) On 2/17/2022 at 1:31 PM, duwen123 said: UP! I may be too late here, but yes. All sources have an .sln which can be opened with Visual Studio. Here's a pic: After you open the solution for the first time, visual studio will ask if you want to upgrade the projects. You can choose whatever you want, but I recommend you upgrade them. If you choose to upgrade, a `Backup` folder will be created with your old files, which you can remove, if you want. I know you said you don't want to compile them with VS, but here's a topic I made on 22nd, this month(Feb) if you do decide to compile them on windows. Cheers! Edit: If you don't have a .sln file, you can just create a new solution, then create the projects for each folder and just drag and drop the files in visual studio(in each project's source). If you already have a .vcproj or .vcxproj file but don't have the .sln, you can just create a new solution(project) and then load them by clicking right click on the solution and `add existing project`. A third option would be to use cmake, but that's more complicated, so I won't get into it. Spoiler Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
duwen123 49 Posted March 2, 2022 Author Share Posted March 2, 2022 (edited) On 2/24/2022 at 2:56 AM, Amun said: If you already have a .vcproj or .vcxproj file but don't have the .sln, you can just create a new solution(project) and then load them by clicking right click on the solution and `add existing project`. Hello! Sorry for my late response! I encounter a problem, sadly. These are the steps that I followed: -> I created a new solution after which I added an existing project (as you can see in the picture below): Spoiler -> After uploading, solution explorer looks like this: Spoiler -> And when I open a file, for example affect.cpp, I get errors that say that certain files cannot be opened and certain macros, classes and functions are not recognized. (images below) Spoiler Spoiler So far I have only tried the game source. As far as I can tell, I think some libs should be included. Something like the binary source. Edited August 16, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Contributor Amun 1917 Posted March 2, 2022 Contributor Share Posted March 2, 2022 (edited) 9 hours ago, duwen123 said: Hello! Sorry for my late response! I encounter a problem, sadly. These are the steps that I followed: -> I created a new solution after which I added an existing project (as you can see in the picture below): Hide contents -> After uploading, solution explorer looks like this: Reveal hidden contents -> And when I open a file, for example affect.cpp, I get errors that say that certain files cannot be opened and certain macros, classes and functions are not recognized. (images below) Hide contents Reveal hidden contents So far I have only tried the game source. As far as I can tell, I think some libs should be included. Something like the binary source. That's not the only thing you have to do, mate. I assumed you have at least a basic understanding of VS. It'll take me a few hours to write it step by step and I will not do that. However, here's the basics of what you should do, just to get you started: Create projects for each lib as well(libgame, liblua, libpoly, libsql, libthecore) and link them to the extern. You should probably create a folder for Common as well(a folder, not a project!). Add the links for the extern to game as well(in case you didn't), then right click on the project->settings->linker->input and add all the libs to "Additional dependencies" Here's mine for the debug setup, to save you some time: mysqlclient.lib;ws2_32.lib;DevIL-1.7.8d.lib;DevILU-1.7.8d.lib;DevILUT-1.7.8d.lib;cryptlib.lib;libpoly_d.lib;libgame_d.lib;libthecore_d.lib;liblua_d.lib;%(AdditionalDependencies) Don't forget to add the links to where these libraries are in VS++ Directories-> External Include Directories and Library directories OR in Linker->General->Additional Library Directories !!!! These are just the things I remembered you have to do, but there's probably way more. I would've started with DB if I were you,. Game takes a while to compile and you'll rip you hair out if it fails 100 times. One other alternative would be to download some server files that are already set up and replace the files with yours. You can take a look at what I posted a few days ago if you want: Maybe I'll create a full tutorial on the forum at some point, but I'm too busy this week, so that's not going to happen very soon. Edited August 16, 2022 by Metin2 Dev Core X - External 2 Internal 1 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now