-
Notifications
You must be signed in to change notification settings - Fork 222
Project Setup (Windows)
- Prerequisites
- Fork the Repository
- IDE Setup (Visual Studio)
- Database Setup
- ODBC Setup
- Server Configuration
- Running the Server
- Connect with Client
This is the guide for the Windows-based project setup. If you're looking for Linux, see Project Setup (Linux).
You'll need the following to work with the project:
- Windows OS (10+)
- Visual Studio 2026 or 2022
- Microsoft SQL Server Express 22
- SQL Server Management Studio
- Git: If you're unfamiliar with Git and want to use a UI you can try TortoiseGit. GitHub Desktop is not recommended for beginners at this time.
Fork the Knight Online repository then clone your fork to your machine. If you're unfamiliar with Git, see our Using Git page for help.
For this project, you'll need to select the following from this screen:
-
Scroll down to the "Desktop & Mobile" section and check Desktop development with C++":

-
Go to the "Individual components" tab
-
Search for and following components and make sure they're all checked (most likely you will only need to add MFC):
- C++ ATL for x64/x86 (Latest MSVC)
- C++ MFC for x64/x86 (Latest MSVC)
- MSVC Build Tools for x64/x86 (Latest)
- Verify that all required components are selected, then click Install:
Visual Studio should now download and install.
Building All.slnx
Now that Visual Studio is installed with all the required components we can build the project.
- Open Visual Studio
- On the Open screen, select "Open a project or solution" from the list on the right.
- In the file picker, navigate to the KnightOnline folder you cloned from git. Select and open "All.slnx".
-
Visual Studio will open to a "What's New?" screen. You can safely close this.

-
You should be able to see the Solution Explorer view on the right side of the IDE. Right click the "Solution 'All'" line, and select "Build Solution".

-
This will kick off the build process for everything in the repo. It will be slowest on the first build as it fetches all the required dependencies and builds them; these dependencies will only be rebuilt when there is a change to them, so subsequent builds should be much faster. (Note: while this shouldn't happen, if you do happen to get an error on your first build, try running it again. It may have been a one-time setup error).

This should have built all of the application managed under the KnightOnline repository.
You can find the built applications under bin/Debug-x64/:
For this project, you'll need to select the following from this screen:
- Scroll down to the "Desktop & Mobile" section and check Desktop development with C++":
- Go to the "Individual components" tab
- Search for and check the boxes for the following components:
- C++ ATL for latest v143 build tools (x86 & x64)
- C++ MFC for latest v143 build tools (x86 & x64)
- MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest)
- Verify that all required components are selected, then click Install:
Visual Studio should now download and install.
Building All.slnx
Now that Visual Studio is installed with all the required components we can build the project.
- Open Visual Studio
- On the Open screen, select "Open a project or solution" from the Get Started list on the right.
- In the file picker, navigate to the KnightOnline folder you cloned from git. Select and open "All.slnx".
- Visual Studio will open to a screen full of advertisements for their AI products. You can safely close all of these.
- With the advertisements closed you should now be able to see the Solution Explorer view on the right side of the IDE. Right click the "Solution 'All'" line, and select "Build Solution".
- This will kick off the build process for everything in the repo. It will be slowest on the first build as it fetches all the required dependencies and builds them; These dependencies will only be rebuilt when there is a change to them, so subsequent builds should be much faster. (Note: while this shouldn't happen, if you do happen to get an error on your first build, try running it again. It may have been a one-time setup error).

This should have built all of the application managed under the KnightOnline repository.
You can find the built applications under bin/Debug-x64/:
It is recommended to do a manual setup when using Windows. See SQL Server Manual Setup.
Docker Desktop can be difficult to work with, and optimal configuration can vary machine-to-machine. If you're comfortable setting Docker up, however, our local development database containers and helper scripts will keep your development database in sync with the data in our OpenKO-db repository. See the Docker README.MD if interested.
Note that this assumes you've either:
- Manually restored the database as "KN_online". If you restored it as something else, use its new name instead. OR
- Successfully started the Docker database container
-
Press "Start" and type in "ODBC":
You should see "ODBC Data Sources (32-bit)" and "ODBC Data Sources (64-bit)" in the search list.
The projects all currently default to building for 64-bit, so for that, you should use the 64-bit version ("ODBC Data Sources (64-bit)"). -
Under "User DSN", press "Add...":

-
Scroll down to find the newest SQL Server driver (if you scroll to the right, there's a date column). So long as it's for SQL server, any SQL server specific driver should be fine:
Select it and press "Finish". -
Now we configure the datasource name and SQL server instance:
Name: KN_online
This is the datasource name, not the database name. The servers will connect to this. If you change this, you must change each of the servers' config files.
This is the default, so it's easiest to leave it as-is.
Description: (you can leave this blank)
Server: If you installed SQL Server Express from this guide, then by default, use ".\SQLEXPRESS".
If you installed another version like SQL Server Developer, then use the default ".".
Press "Next >". -
ODBC will need to connect to your database server for setup. It will ask for login details; these don't matter for anything besides setup here:
If you followed the SQL server setup guide, then you will have mixed mode installed, so you can just leave "With Windows NT authentication" checked" so it just uses your Windows login details.
DOCKER ONLY: you must follow these additional steps to support a connection to the Docker container:
-
Click the "Client Configuration..." button.

-
Uncheck "Dynamically assign port", and type in the port your SQL server runs on (default: 1433). Click OK.

-
You must use SQL Server authentication using a login ID and password for Docker. The default username is
knightand the default password isknight.Hit "Next >".
-
If everything is correct, it should take you to the next screen immediately.
If an error occurred, it will let you know that either it's connecting to the wrong place or your login details don't work, so you should go back (via the "< Back" button) and fix those appropriately.
Tick "Change the default database to:" and select your database from the dropdown (which should be "KN_online" by default):
Press "Next >". -
On the final setup page, be sure to untick "Perform translation for character data":
KO uses character data when it means to use binary data for items, quests etc, so untick this or they will break.
Hit "Finish". -
It will show you all of the config you chose.
Press "Test Data Source..." verify that everything connects and behaves correctly:
Finish up by pressing "OK" on the test UI.
NOTE:
Verification may fail due to "Perform translation with character data" being unchecked.
So long as it connects to the server successfully, you can ignore this.
This setting MUST be off (i.e. unchecked) to ensure things behave correctly.
Press "OK" again on the confirmation UI:
And finally press "OK" again on the main UI to close it:
ODBC is now setup.
The server applications will generate their default configuration the first time they are run. If new configuration is added, the server will add the default value to the file on the next run.
If you feel compelled to change the default configuration, you can edit the .ini file for the application.
Under bin/Debug-x64/:
| Application | Configuration File |
|---|---|
| AIServer | server.ini |
| Ebenezer | gameserver.ini |
| Aujard | Aujard.ini |
| VersionManager | Version.ini |
| ItemManager | ItemManager.ini |
If you're using CMake instead of VS's build, these files would be located in cmake-build-debug/bin/Debug/.
TBD (Open Server.slnx, run projects in the order: "AIServer", "Ebenezer", "Aujard", and then "VersionManager")
TBD (Open Client.slnx, run the WarFare project. It should work as-is. If you're not running the client on the same machine as the server, configure the client's Server.ini under assets/Client - if you've run the project once, Server.ini will exist. Otherwise, copy & rename Server.ini.default to Server.ini and modify that)
If using our development database, you can log in to a fresh account using one of the following accounts.
| Username | Password |
|---|---|
| testing | testing |
| testing1 | testing1 |
| testing2 | testing2 |
| testing3 | testing3 |
| testing4 | testing4 |
| testing5 | testing5 |
| testing6 | testing6 |
| testing7 | testing7 |
| testing8 | testing8 |
| testing9 | testing9 |
| testing10 | testing10 |