RXL-Realms Community

Industria => Development => Servers => Topic started by: Mystera on January 18, 2024, 12:49:35 PM

Title: [VS19] V18 Files (Retail Content & V19 Formats)
Post by: Mystera on January 18, 2024, 12:49:35 PM
Requirements:
Visual Studio 2019 Professional
SQL Server 2012+

What's included?
Source is fully updated to VS19.
Game guard has been removed.
Boost has been removed.
FFLdump has been removed.
Lua was updated to 5.3.4
CW quest & sound are also working.

Tested On:
Visual Studio Professional 2019
Sql Server 2019 Enterprise
Windows 10 Professional

Defines:
Code:
Code: [Select]
__3RD_LEGEND16
__ANGEL_CREATION_FIX
__ARROW_FIX
__AUTO_SKILL_MAX
__BARUNA_PIERCING
__BS_FIX_ARRIVEPOS_ALGO
__COLOSSEUM
__CROSSBOW
__DEBUG_SALT
__FASHION_COMBINE
__FAST_NEUZ
__FIX_RANGER_ROLLER
__FIX_SETFST
__IMPROVE_MAP_SYSTEM
__INSTANCE_AGGRO_SYSTEM
__INVENTORY_168
__INVENTORY_SORTING
__INVISIBLE_FIX
__ITEMLINK
__LECTURE_V17
__LOADING_SCREEN_UPDATE
__LOOKCHANGE
__NEW_EXCHANGE_V19
__NEW_ITEM_VARUNA
__NEW_SKILL_TREE
__NEW_STACKABLE_AMPS
__NEW_WEAPON_GLOW
__NO_AFTER_SKIN
__NO_SUB_LANG
__NOACCT_LOCK
__PMA_FIX_ATKMSG
__POSI_BUG_FIX
__RANDOMOPTION_RETRY
__SECURITY_FIXES
__SLEEPING_FIX
__STAT_SYNC
__SYS_SCR_CANCELLATION
__SYS_SCR_PARTYPOINTFREE
__SYS_SCR_PARTYSPEEDLEVELUP
__SYS_SYS_ARMOREFFECTCHANGE
__SYS_SYS_ITEMMODELRETURN
__TREASUREBOX
__UPGRADE_SUCCESS_SCROLL
__V16_FORMATS
__V19_FORMATS
__V21_GM_COMMANDS
__V21_LEVELUP_SFX
__V21_PREMIUM_BATTERY
__V21_SIEGE_BUFFS
__WND_BUTTONS
__WND_BUTTONS_FIX
__YS_CHATTING_BLOCKING_SYSTEM
__ZONE_AFFICHAGE

Quick Note:
These files have been tested and appear to be working fine out of the box. I am however not responsible for security fixes, added features and etc. If you want those things then you need to add them yourselves. Character deletion is disabled by default and must be re-enabled by you if you wish to use it.

Download: Aik61aXc1L | Password: RageZone

Update: Spec_Item Fix -> [VS19] V18 Files (Retail Content & V19 Formats)
Title: [FULL SETUP GUIDE] Ketchup VS2019 files
Post by: Mystera on January 18, 2024, 12:51:30 PM
This full setup guide is made for the VS2019 files from Ketchup (both K15/K18 will work).

[VS19] V15 - Tested & Fully Working.
[VS19] V18 Files (Retail Content & V19 Formats)

Installing on Windows 10 (will also work on server 2016/2019)

This guide has too many images, please download them HERE - updated 12-2-2020
(they have corresponding names)
Pass: RageZone


Guide:

Code: [Select]
1. Install Visual Studio 2019 Community
Downloads:
Visual Studio 2019 Community
DirectX 9

1.1 Download the VS2019 Community and DirectX 9 files
1.2 Install DirectX 9
1.2.1 Right click the "dxwebsetup.exe" file and "Run as administrator"
1.2.2 Click "I accept the agreement" and click "Next"
1.2.3 Uncheck "Install the Bing bar" and click "Next"
1.2.4 Click "Next"
1.2.5 Wait untill download & install is finished
1.2.6 click "Finish"
1.3 Install Visual Studio 2019 Community
1.3.1 Right click the "vs_community_*.exe" file and "Run as administrator"
1.3.2 Click "Continue"
1.3.3 Wait untill download & install is finished
1.3.4 Select ".NET desktop development" & "Desktop development with C++" and
CHECK "C++ MFC for latest v142 build tools (x86 & x64)"
UNCHECK "Test Adapter for Boost.Text", "Test Adapter for Google Test", "Live Share"
Check the image below to check if you selected everything!!!
Click "Install"
1.3.5 Uncheck "Start after installation" and wait untill download & install is finished
1.3.6 When you see the "Installation succeeded!" window, you can close it (Don't start Visual Studio!)

2. Install/Configure SQL Server 2019 & Management
Downloads:
SQL Server 2019 Express
SQL Server Management Studio
SQL Native Client 11

2.1 Download the Server 2019 Express, Management Studio & Native Client 11 files
2.1.1 Select the "ENU\x64\msodbcsql.msi" file (Native Client 11)

2.2 Install SQL Native Client 11
2.2.1 Right click the "msodbcsql.msi" file and "Install"
2.2.2 Click "Next"
2.2.3 Click "I accept the terms in the license agreement" and click "Next"
2.2.4 At "ODBC Driver for SQL Server SDK" click the dropdown icon and select "Will be installed on local hard drive" and click "Next"
2.2.5 Click "Install"
2.2.6 Click "Finish"
2.2.7 Restart your computer

2.3 Install Server 2019 Express
2.3.1 Right click the "SQL2019-SSEI-Expr.exe" file and "Run as administrator"
2.3.2 Select the "Custom" installation
2.3.3 Click "Install"
2.3.4 Wait untill download & install is finished
2.3.5 Click "New SQL Server stand-alone installation or add features to an existing installation"
2.3.6 Check "I accept the license terms and Privacy Statement" and click "Next"
2.3.7 Click "Next"
2.3.8 Wait untill all tasks are completed
2.3.9 Ignore the "Windows Firewall" warning for now and click "Next" (disabling your Firewall is NOT RECOMMENDED!)
2.3.10 Leave the default "Instance Features" and click "Next"
2.3.11 Leave the default "Named instance" as "SQLExpress" and click "Next"
2.3.12 Click "Next"
2.3.13 Click "Next"
2.3.14 Select "Mixed Mode" and type a secure password (write this password down) + confirm and click "Next" (don't delete the "Specify SQL Server Administrators", I have mine removed from the screenshot only!)
2.3.15 Click "Accept" and click "Next"
2.3.16 Click "Accept" and click "Next"
2.3.17 Wait untill the installation is finished
2.3.18 Click "Close" after checking every status is "Succeeded" (details showing: Install successful)
2.4 Install Server Management Studio
2.4.1 Right click the "SSMS-Setup-ENU.exe" file and "Run as administrator"
2.4.2 Click "Install"
2.4.3 Wait untill download & install is finished
2.4.4 When finished, click "Close"

2.5 Configure SQL server
2.5.1 Open "Microsoft SQL Server Management Studio 18"
2.5.2 Select Authentication: "SQL Server Authentication", Login: "sa", Password: "The secure password you wrote down", check "Remember password" and click "Connect"
2.5.3 Top left, click "File", click "Open", click "File.." (CTRL+O)
2.5.4 Go to the Ketchup database folder (K18\Database) and select "- Edit Me Before Executing.sql" click "Open"
2.5.5 Change "DESKTOP-SH6G9M7" to your own computer name (Right click Windows button, System, Device name)
2.5.6 Click "Execute"
2.5.7 Top left, click "File", click "Open", click "File.." (CTRL+O)
2.5.8 Go to the Ketchup database folder (K18\Database) and select "1. Database.sql" click "Open"
2.5.9 Click "Execute"
2.5.10 Top left, click "File", click "Open", click "File.." (CTRL+O)
2.5.11 Go to the Ketchup database folder (K18\Database) and select "2. Deadlock.sql", click "Open"
2.5.12 Click "Execute"
2.5.13 Top left, click "File", click "Open", click "File.." (CTRL+O)
2.5.14 Go to the Ketchup database folder (K18\Database) and select "3. Account.sql", click "Open"
2.5.15 Click "Execute"
2.5.16 Top left, click "File", click "Open", click "File.." (CTRL+O)
2.5.17 Go to the Ketchup database folder (K18\Database) and select "4. Ranking.sql", click "Open"
2.5.18 Click "Execute"
2.5.19 Close "Microsoft SQL Server Management Studio 18" (Click NO, for not saving the .sql files)
2.5.20 Open "ODBC Data Sources (32-bit)" as Administrator
2.5.21 Click "Add"
2.5.22 Scroll all the way down, select "SQL Server Native Client 11.0" and click "Finish"
2.5.23 Name: character01 / Server: YOURCOMPUTERNAME\SQLEXPRESS click "Next"
2.5.24 Select "With Integrated Windows authentication" and click "Next"
2.5.25 Check "Change the default database to:" select "CHARACTER_01_DBF" and click "Next"
2.5.26 Click "Finish"
2.5.27 Click "Test Data Source"
2.5.28 It has to say "TESTS COMPLETED SUCCESSFULLY!" and click "OK"
2.5.29 Click "OK"
2.5.30 Click "Add"
2.5.31 Scroll all the way down, select "SQL Server Native Client 11.0" and click "Finish"
2.5.32 Name: log01 / Server: YOURCOMPUTERNAME\SQLEXPRESS click "Next"
2.5.33 Select "With Integrated Windows authentication" and click "Next"
2.5.34 Check "Change the default database to:" select "LOGGING_01_DBF" and click "Next"
2.5.35 Click "Finish"
2.5.36 Click "Test Data Source"
2.5.37 It has to say "TESTS COMPLETED SUCCESSFULLY!" and click "OK"
2.5.38 Click "OK"
2.5.39 Click "Add"
2.5.40 Scroll all the way down, select "SQL Server Native Client 11.0" and click "Finish"
2.5.41 Name: login / Server: YOURCOMPUTERNAME\SQLEXPRESS click "Next"
2.5.42 Select "With Integrated Windows authentication" and click "Next"
2.5.43 Check "Change the default database to:" select "ACCOUNT_DBF" and click "Next"
2.5.44 Click "Finish"
2.5.45 Click "Test Data Source"
2.5.46 It has to say "TESTS COMPLETED SUCCESSFULLY!" and click "OK"
2.5.47 Click "OK"
2.5.48 Click "Add"
2.5.49 Scroll all the way down, select "SQL Server Native Client 11.0" and click "Finish"
2.5.50 Name: ranking / Server: YOURCOMPUTERNAME\SQLEXPRESS click "Next"
2.5.51 Select "With Integrated Windows authentication" and click "Next"
2.5.52 Check "Change the default database to:" select "RANKING_DBF" and click "Next"
2.5.53 Click "Finish"
2.5.54 Click "Test Data Source"
2.5.55 It has to say "TESTS COMPLETED SUCCESSFULLY!" and click "OK"
2.5.56 Click "OK"
2.5.57 Close the ODBC window (click "OK")

3. How to open source files
3.1 Opening .sln file for the first time
3.1.1 Go to the Ketchup Source "All" folder (K18\Source\Source\All) and open "all.sln"
3.1.2 In the "How do you want to open this file?" select "Visual Studio 2019", check "Always use this app to open .sln files" and click "OK"
3.1.3 Make sure to Create an Account and sign in to Visual Studio
3.1.4 Select your "color theme" (I always set it to "Dark" mode) and click "Start Visual Studio"
3.1.5 Wait until Visual Studio is done preparing for first use
3.1.6 When Visual Studio is done preparing it should open the source (check right side, AccountServer, CacheServer, etc)

4. How to compile source
4.1 Compile source all at once
4.1.1 Follow the 3.1 steps and open your source in Visual Studio
4.1.2 Right click "Solution 'all' (8 of 8 projects)" and select "Batch Build.."
4.1.3 Click "Rebuild" and wait until the build is done
4.1.4 Check if "Rebuild All: 8 succeeded" (NOTE: The clean source will always compile "8 succeeded")
4.1.5 Don't forget to run the "-Move Compiles.bat" file (in the K18 root folder)

4.2 Compile source separate
4.2.1 Follow the 3.1 steps and open your source in Visual Studio
4.2.2 Right click a specific server (or Neuz) and click "Rebuild"
4.2.3 Wait until the rebuild is done (shouldn't take long because it's only building 1 .exe file)
4.2.4 Check if "Rebuild All: 1 succeeded"
4.2.5 Don't forget to run the "-Move Compiles.bat" file (in the K18 root folder)

5. How to setup your server (Resource + Source)
5.1 Configure resource .ini files
5.1.1 Open your Program folder (K18\Server\Program)
5.1.2 Open the "AccountServer.ini" file
5.1.3 Change "PASS" to your own SQL password (DB_PWD_LOGIN/DB_PWD_LOG)
5.1.4 Save the file
5.1.5 Open the "Certifier.ini" file
5.1.6 Change "PASS" to your own SQL password
5.1.7 Save the file
5.1.8 Open your Script folder (K18\Server\Script)
5.1.9 Open the "DatabaseServer.ini" file
5.1.10 Change "PASS" to your own SQL password (DB_PWD_LOGIN/DB_PWD_LOG)
5.1.11 Save the file
5.2 Use merger program
5.2.1 Open your Resource folder (K18\Server\Resource)
5.2.2 Run the "- Merge.exe" program
5.2.3 Open your ResClient folder (K18\Server\ResClient)
5.2.4 Copy all files (data.res, dataSub1.res, dataSub2.res, Flyff.a)
5.2.5 Open your Client folder (K18\Client)
5.2.6 Paste the files (3x .res file + Flyff.a) into the client folder (Replace the files in the destination)

This merge has to be done every time you change something in the RESOURCE folder!
5.3 Starting your server
5.3.1 Open your Program folder (K18\Server\Program)
5.3.2 Right click "1. Account.exe" and click "Run as Administrator"
5.3.3 Check also "Private Networks, such as my home.." and click "Allow access"
5.3.4 The Account server is now running
5.3.5 Right click "2. Certifier.exe" and click "Run as Administrator"
5.3.6 Check also "Private Networks, such as my home.." and click "Allow access"
5.3.7 The Certifier server is now running
5.3.8 Open your Resource folder (K18\Server\Resource)
5.3.9 Right click "3. Database.exe" and click "Run as Administrator"
5.3.10 Check also "Private Networks, such as my home.." and click "Allow access"
5.3.11 The Database server is now running
5.3.12 Open your Program folder (K18\Server\Program)
5.3.13 Right click "4. Core.exe" and click "Run as Administrator"
5.3.14 Check also "Private Networks, such as my home.." and click "Allow access"
5.3.15 The Core server is now running
5.3.16 Right click "5. Login.exe" and click "Run as Administrator"
5.3.17 Check also "Private Networks, such as my home.." and click "Allow access"
5.3.18 The Login server is now running
5.3.19 Right click "6. Cache.exe" and click "Run as Administrator"
5.3.20 Check also "Private Networks, such as my home.." and click "Allow access"
5.3.21 The Cache server is now running
5.3.22 Open your Resource folder (K18\Server\Resource)
5.3.23 Right click "7. World.exe" and click "Run as Administrator"
5.3.24 Check also "Private Networks, such as my home.." and click "Allow access"
5.3.25 Leave the World Server on "Not responding"
5.3.26 After about 30 seconds (depending on your computer) the World server is running
5.3.27 Open your Client folder (K18\Client) and run "- Start Game.bat"
5.3.28 Your Neuz will now load - login with Account: test / Password: test
5.3.29 Make a new character
5.3.30 Login, have fun playing!

6. Change Visual Studio settings for debugging Neuz
6.1 Open Visual Studio 2019 and select the "all.sln" file
6.2 Right click your "Neuz" solution and click "Properties"
6.3 On the left side, go to the "Debugging" tab
6.4 Change "Command Arguments" to "sunkist" / "Working Directory" to your "K18\Client" folder / "Debugger Type" to "Native Only" and click "Apply"


7. How to debug server files (new instance or attach debug)
7.1 Running a new instance (start a new debug from Visual Studio)
7.1.1 Run all your server .exe files except for the Worldserver (don't start the Worldserver)
7.1.2 Open your Server folder (K18\Server)
7.1.3 Copy your "Script" folder
7.1.4 Open your Source folder (K18\Source\Source)
7.1.5 Paste your "Script folder" into the Source folder (Source\Source)
7.1.6 Open the Script folder (K18\Source\Source\Script)
7.1.7 Open the "WorldServer.ini" file
7.1.8 Change the "ResourceFolder" to your Resource path (C:\Users\*\Desktop\K18\Server\Resource)
7.1.9 Open Visual Studio 2019 and select the "all.sln" file
7.1.10 Right click "WorldServer" solution and select "Debug", "Start New Instance"
7.1.11 Your WorldServer will now start in debug mode. If it crashes, you will get a debug log
7.2 Running an attached debug (debug an already running proces)
7.2.1 Run all your server files (also WorldServer)
7.2.2 Open Visual Studio 2019 and select the "all.sln" file
7.2.3 At the top, go to "Debug" and select "Attach to Process.."
7.2.4 Select the "7. World.exe" process and click "Attach"
7.2.5 Select "Restart under different credentials" (Visual Studio will restart)
7.2.6 At the top, go to "Debug" and select "Attach to Process.."
7.2.7 Select the "7. World.exe" process and click "Attach"
7.2.8 Visual Studio is now debugging the running WorldServer process

8. How to make your server public (and change default ports)
8.1 General
8.1.1 Find out what your WAN-IP is
8.1.2 Write down your WAN-IP (ipv4)

8.2 Resource
8.2.1 Open your Resource folder (K18\Server\Program)
8.2.2 Open the "AccountServer.ini" file
8.2.3 Change BOTH "127.0.0.1" to your "WAN-IP" and save the file
8.2.4 Open the "CacheServer.ini" file
8.2.5 Change the default Cache port "5400" to something else (between 1024 to 49151) - DON'T CHANGE THE 127.0.0.1
8.2.6 Write down the new Cache port and save the file
8.2.7 Open the "Loginserver.ini" file
8.2.8 Change the "AddCache(127.0.0.1);" to your "WAN-IP" and save the file - DON'T CHANGE THE OTHER 127.0.0.1

8.3 Source
8.3.1 Go to the Ketchup Source "All" folder (K18\Source\Source\All) and open "all.sln"
8.3.2 Open the file "kCommon.h" in the Solution Items tab
8.3.3 Scroll down and change NEUZ_IPSET "127.0.0.1" to your "WAN-IP" (you could also change it to your domain name)
8.3.4 Also change the NEUZ_CPORT "5400" to the port you have set in step 8.2.5
8.3.5 Press CTRL + SHIFT + F and search for "23000" (Find All)
8.3.6 There is only one search result, double click that one
8.3.7 Change the "PN_CERTIFIER 23000" to something else (between 1024 to 49151) - NOT THE SAME AS THE CACHE PORT AND TRY TO NOT HAVE THE SAME IN THE PORT LIST (msghdr.h)
8.3.8 Write down the port you just changed (This is the Certifier server port)
8.3.9 On line 1456 (in the same area) you will find "PN_LOGINSRVR 28000"
8.3.10 Change this port (28000) to something else (between 1024 to 49151) - NOT THE SAME AS THE CACHE PORT AND TRY TO NOT HAVE THE SAME IN THE PORT LIST (msghdr.h)
8.3.11 Write down the port you just changed (This is the Login server port)
8.3.12 Save the "msghdr.h" and "kCommon.h" file
8.3.13 Use step 4 to compile the source and copy the .exe files to the right folders

8.4 Firewall
8.4.1 Open "Windows Defender Firewall with Advanced Security"
8.4.2 Go to "Inbound Rules" and click "New Rule.." on the right side
8.4.3 Select "Port" and click "Next"
8.4.4 In "Specific local ports:" add the three ports you wrote down (Cache, Cert, Login) and click "Next"
8.4.5 Click "Next" again
8.4.6 Click "Next" again
8.4.7 Give it a name and click "Finish"

8.5 Portforward
NOTE: If you are using a VPS, this step is not needed (you only have to open the ports in the VPS firewall)
8.5.1 Open the Windows 10 "Command Prompt" window
8.5.2 Type: ipconfig
8.5.3 Write down the "Default Gateway" IP-address
8.5.4 Open your browser and go this Default Gateway IP-address (your Router)
8.5.5 Log into your router (most of the time it's: admin/admin, but check your router, and change the admin/admin login... security risk..)
8.5.6 Go to the Forwarding menu in your router (mine is a TP-Link, yours might be a different one)
8.5.7 Click on "Add New..."
8.5.8 Add your CHANGED ports to the new entry (the service/internal ports have to be the same) - YOU NEED TO MAKE A NEW ENTRY FOR EVERY PORT!
8.5.9 IP-address = the computer your hosting it on (check Command Prompt: ipconfig)
8.5.10 Protocol = TCP
8.5.11 Click save (Don't forget to add all the ports) - CACHE/CERT/LOGIN

8.6 Run the server
8.6.1 Run your .exe files as shown in step 5.3
8.6.2 Upload your CLIENT folder and give it to friends