Skip to main content
This guide covers building the Shaiya Episode 6 libraries and integrating them with your server.

Building the Project

1

Open the solution

Open the solution file in Visual Studio 2019. The project is configured to use C++20 and target x86 (32-bit) architecture.
2

Select build configuration

Choose your desired build configuration (Debug or Release) and ensure the platform is set to x86.
3

Build the solution

Build the solution using Visual Studio. The following libraries will be compiled:
  • sdev.dll - Game service library
  • sdev-client.dll - Client modifications library
  • sdev-db.dll - Database agent library
  • sdev-login.dll - Login service library
Ensure you have the Microsoft Visual C++ Redistributable installed before running the compiled binaries.

Library Injection Methods

There are two primary methods for injecting the libraries into the game executables:

Method 1: Cheat Engine Injection

Cheat Engine provides a straightforward way to inject DLLs into running processes.
1

Install Cheat Engine 7.3

Download and install Cheat Engine 7.3 (recommended version for compatibility)
2

Launch the game process

Start the game service, client, or other executable you want to inject the library into
3

Attach Cheat Engine

Open Cheat Engine and attach it to the target process
4

Inject the DLL

Use Cheat Engine’s DLL injection feature to inject the appropriate library
Cheat Engine injection is not guaranteed to work for everyone. Users have reported issues with versions newer than 7.3.

Method 2: Import Table Modification

This method modifies the executable’s import table to load the library automatically.
1

Install PE Bear

Download and install PE Bear for import table editing
2

Open the executable

Open the target executable (ps_game.exe, game.exe, etc.) in PE Bear
3

Add new import

Navigate to the Imports section and add a new import entry for the library. The libraries have exports defined in their main headers specifically for this purpose.
4

Save the modified executable

Save the modified executable. The library will now load automatically when the process starts.
The import table method is more reliable than Cheat Engine injection and is the recommended approach for production environments.

Configuration Files

Game Service Configuration

The game service library (sdev) requires configuration files in specific locations.
PSM_Client/Bin/Data/
├── BattleFieldMoveInfo.ini
├── OnlineTimePrize.ini
├── ChaoticSquare.ini
├── SetItem.ini
└── Map.ini
Configuration files are available in the repository at:
File Operations: If you inject libraries using the imports method, ensure the current working directory is set correctly. The library uses GetModuleFileNameW to resolve paths, which may cause issues if the working directory is not properly initialized.

Client Configuration

The client library (sdev-client) requires additional data files:
1

Add BattleFieldMoveInfo_Client

Add BattleFieldMoveInfo_Client to the game data root directory
2

Add interface graphics

Add the following files to the interface directory:
  • main_stats_pvp.tga
  • main_stats_pvp_button.tga
Configuration files are available at:
The client library is specifically designed for Shaiya PT client patch 182. Other client versions may not be compatible.

Database Setup

Installing Stored Procedures

The database library requires specific stored procedures to be installed.
1

Locate SQL scripts

Navigate to the sdev-db/bin/sql directory
2

Execute Item Mall procedures

Install the following stored procedures for Item Mall functionality:
[dbo].[usp_Read_User_CashPoint_UsersMaster]
[dbo].[usp_Save_User_BuyPointItems2]
[dbo].[usp_Save_User_GiftPointItems2]
[dbo].[usp_Update_UserPoint]
3

Handle existing procedures

If you receive an error about procedures already existing, change ALTER to CREATE in the SQL scripts and try again.
The database binary (ps_dbAgent.exe) has been patched to fix an item mall purchase duplication bug. Ensure you use the patched version from the repository.

Common Issues

Data Execution Prevention (DEP)

Intermittent access violations have been reported on Windows Server 2022 related to Data Execution Prevention.
1

Check DEP policy

Run the following command to check your DEP support policy:
wmic OS Get DataExecutionPrevention_SupportPolicy
2

Configure DEP if needed

If you encounter access violations, you may need to configure DEP settings for the game executables. See Microsoft’s DEP documentation for details.

File Operations

Important: Some users have reported file operation issues when importing libraries instead of injecting them. This is caused by std::filesystem::current_path being called before the current working directory is resolved, resulting in paths pointing to C:\\WINDOWS\\system32 instead of the game directory.The library uses GetModuleFileNameW with INT16_MAX (32767) as the buffer size to work around the MAX_PATH limitation and resolve paths correctly.

False Positives

Antivirus software may flag the compiled libraries as malicious.
The files in this repository are submitted to antivirus companies for analysis when false positives are detected. If your antivirus flags the files, you can submit them directly to antivirus vendors using VirusTotal’s false positive contacts.

Verification

After installation, verify that the libraries are working correctly:
1

Check library loading

Start the game service/client and check that the library loads without errors
2

Test basic functionality

Test basic features like Item Mall, battlefield moves, or other implemented features
3

Review logs

Check log files for any errors or warnings related to library initialization

Next Steps

Once installation is complete, explore the available features:
  • Item Mall functionality
  • Battlefield move system
  • Reward item system
  • Chaotic Squares crafting
  • Synergy (set items)
  • And more…
Refer to the Features documentation for detailed information about each feature and its configuration.

Build docs developers (and LLMs) love