Welcome to tutorial on how to begin with coding for JoF EJK client. JoF EJK is fork of OJK. You can clone this repo https://github.com/Milamber0/JoF_EJK/tree/master to do your changes. You will need already installed JKA for this tutorial.
After you clone the repository, you will see several .bat files in JoF_EJK folder – we will use on of them to create visual studio project. To run one of these .bat files (depending on what version of Visual Studio you have), you will need to have Cmake installed on your PC.
You can download it here and before installation choose “Add CMake to the PATH environment variable”.
If you are not sure, whether you have CMake installed, open command line and write cmake –version. If you have cmake installed, it will show the installed version, if not, it won’t get recognized as command.
After this finishes, you will get folder “Build” in the same folder as the .bat file is. Open JoF_EJK.sln and you can begin doing your changes.
Try to build it, press Build -> Build Solution. If you get warnings or errors, ignore them and after it finishes, Debug folder will appear in the Build folder. In it you will see eternaljk.x86.exe – but if you try to run it, it won’t work – this is where you need your already installed JKA and copy few dlls as well as assets.
Copy OpenAL32.dll and SDL2.dll to Build/Debug. Then create Base folder in Build/Debug and copy assets0.pk3, assets1.pk3, assets2.pk3 and assets3.pk3 from your base to this folder. Now you can begin playing from your own build.
One of the basic things you will need is how to debug. We first have to set our environment so we can do it. Open JoF_EJK.sln and right click on MP client
Then Set as Startup Project
Then put breakpoint wherever in your code, hit Local Windows Debugger. I recommend setting JKA not to fullscreen, but to window (ingame go to setup -> video -> fullscreen -> off) – it just freezes for me if I debug in fullscreen.
Next time we will try to change some of code and check debug.