SN Bot (Unfinished Project Release) :
Hello everyone, due to a recent Windows system failure and the risk of losing my work, I decided to upload and share the project in its current state.The project is not finished yet, but it is functional and may still be useful for anyone interested in improving or extending it.
This is a C++/CMake project. Currently, it supports Windows x86 and x64 builds only. I may look into Linux support in the future, but it is not available at this time.
Although I consider the project unfinished, the bot system is already capable of handling research, resource management, and building upgrades. You can configure up to 10 different play schedules and run thousands of bots simultaneously. All calculations are performed outside of the game scripts, so they do not block real players like PHP-based solutions often do.
The application can connect to a remote MariaDB/MySQL database over SSL, or you can run and develop it using a local database.
Link : github.com/koraykarakus/SNBot.git
Dependencies :
This project uses two dependency systems:
1 - Git Submodules
The following libraries are included as Git submodules:
bcrypt
tomlplusplus
These are located inside the deps folder.
2 - vcpkg
The following libraries are installed through vcpkg
spdlog
libmariadb
The required packages are defined in vcpkg.json.
Project Structure
SN Bot
├── deps/ Third-party libraries (Git submodules)
├── include/ Header files, class definitions, structures and datasets
├── language/ Language files (currently unfinished)
├── logs/ Log files
├── out/ Output folder (generated executable)
├── src/ Source code│
├── .clang-format Formatting rules
├── .gitignore Git ignored files
├── .gitmodules Git submodule definitions
└── vcpkg.json vcpkg dependency manifest
Getting Started
Prerequisites
Install the following software:
Git
Visual Studio 2022
C++ Desktop Development workload
CMake support (included with the Visual Studio C++ workload)
vcpkg
Step 1 - Install Git
Download and install Git
https://git-scm.com/download/win
Step 2 - Clone the Repository
Open Git Bash and run
--recursive flag is important because the project uses Git submodules.
If you already cloned the repository without submodules,
run:
Step 3 - Install vcpkg
Clone vcpkg:
Bootstrap it:
Integrate it with Visual Studio:
Step 4 - Open the Project
Open Visual Studio 2022 and select:
File -> Open -> Folder
Then select the cloned project folder.
Visual Studio should automatically detect the CMake project and install the dependencies defined in vcpkg.json.
Step 5 - Adjust Database Queries
Open: src/CDatabase.cpp
Update the SQL queries according to your project's table and column names.
For example, if my database uses a column named:
rocket_launcher and your project uses:
missile_launcher
simply rename the column references accordingly.
Avoid introducing new columns unless you also update the corresponding code
is_bot column for planets and users table is required for this to work efficiently, so add that column as follows
Step 6 - Build
Select your target platform:
x64 for 64-bit Windows
Win32/x86 for 32-bit Windows
Make sure SNBot is selected as the startup target and build the project.
The executable will be generated inside the out directory.
Step 7 - Configure
Run SNBot.exe once.
On first startup, it will generate: settings.toml
Open the file and configure your database connection settings.
Step 8 - Tuning
Important settings:
default_bot_reload_time = 300
Bots will be reloaded from the database every 300 seconds.
loop_time = 30
Bot calculations will run every 30 seconds.
Adjust these values according to your server requirements.
Step 9 - Run
Start the application by double clicking SNBot.exe which you already build, it is inside "out" folder.
notes:
This project is shared as-is. There are still unfinished parts, missing features, and areas that can be improved. Feel free to modify, extend, or optimize it for your own needs.
bug reports, and suggestions are welcome.
specialities:
1 - Bots build building by using build queue
2 - Bots build research by using research queue
3 - Bots using shipyard queue to build colony ship
4 - Bots make resource update, therefore they does not generate messages by fleet movements.
commands:
write /help to display commands.
Hello everyone, due to a recent Windows system failure and the risk of losing my work, I decided to upload and share the project in its current state.The project is not finished yet, but it is functional and may still be useful for anyone interested in improving or extending it.
This is a C++/CMake project. Currently, it supports Windows x86 and x64 builds only. I may look into Linux support in the future, but it is not available at this time.
Although I consider the project unfinished, the bot system is already capable of handling research, resource management, and building upgrades. You can configure up to 10 different play schedules and run thousands of bots simultaneously. All calculations are performed outside of the game scripts, so they do not block real players like PHP-based solutions often do.
The application can connect to a remote MariaDB/MySQL database over SSL, or you can run and develop it using a local database.
Link : github.com/koraykarakus/SNBot.git
Dependencies :
This project uses two dependency systems:
1 - Git Submodules
The following libraries are included as Git submodules:
bcrypt
tomlplusplus
These are located inside the deps folder.
2 - vcpkg
The following libraries are installed through vcpkg
spdlog
libmariadb
The required packages are defined in vcpkg.json.
Project Structure
SN Bot
├── deps/ Third-party libraries (Git submodules)
├── include/ Header files, class definitions, structures and datasets
├── language/ Language files (currently unfinished)
├── logs/ Log files
├── out/ Output folder (generated executable)
├── src/ Source code│
├── .clang-format Formatting rules
├── .gitignore Git ignored files
├── .gitmodules Git submodule definitions
└── vcpkg.json vcpkg dependency manifest
Getting Started
Prerequisites
Install the following software:
Git
Visual Studio 2022
C++ Desktop Development workload
CMake support (included with the Visual Studio C++ workload)
vcpkg
Step 1 - Install Git
Download and install Git
https://git-scm.com/download/win
Step 2 - Clone the Repository
Open Git Bash and run
--recursive flag is important because the project uses Git submodules.
If you already cloned the repository without submodules,
run:
Step 3 - Install vcpkg
Clone vcpkg:
Bootstrap it:
Integrate it with Visual Studio:
Step 4 - Open the Project
Open Visual Studio 2022 and select:
File -> Open -> Folder
Then select the cloned project folder.
Visual Studio should automatically detect the CMake project and install the dependencies defined in vcpkg.json.
Step 5 - Adjust Database Queries
Open: src/CDatabase.cpp
Update the SQL queries according to your project's table and column names.
For example, if my database uses a column named:
rocket_launcher and your project uses:
missile_launcher
simply rename the column references accordingly.
Avoid introducing new columns unless you also update the corresponding code
is_bot column for planets and users table is required for this to work efficiently, so add that column as follows
Step 6 - Build
Select your target platform:
x64 for 64-bit Windows
Win32/x86 for 32-bit Windows
Make sure SNBot is selected as the startup target and build the project.
The executable will be generated inside the out directory.
Step 7 - Configure
Run SNBot.exe once.
On first startup, it will generate: settings.toml
Open the file and configure your database connection settings.
Step 8 - Tuning
Important settings:
default_bot_reload_time = 300
Bots will be reloaded from the database every 300 seconds.
loop_time = 30
Bot calculations will run every 30 seconds.
Adjust these values according to your server requirements.
Step 9 - Run
Start the application by double clicking SNBot.exe which you already build, it is inside "out" folder.
notes:
This project is shared as-is. There are still unfinished parts, missing features, and areas that can be improved. Feel free to modify, extend, or optimize it for your own needs.
bug reports, and suggestions are welcome.
specialities:
1 - Bots build building by using build queue
2 - Bots build research by using research queue
3 - Bots using shipyard queue to build colony ship
4 - Bots make resource update, therefore they does not generate messages by fleet movements.
commands:
write /help to display commands.
The post was edited 10 times, last by amamoslavida_: cleanup, add more info on use, sizing ().
thing gone crazy lol. My project builds in x86, x64 for now, and only making resource update + research + buildings.