I25 Server Setup

From OuroDev
Revision as of 15:41, 30 April 2019 by Methril (talk | contribs) (→‎i25 Configuration Files)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Server Setup From Scratch

i25 Configuration Files

Setup Local Server

1. Install SQL Server 2017 Express Edition
2. Choose Basic when installing and when given the option choose to install SSMS(SQL Server Manager Suite).
3. Move your i25 Binaries to C:\CoH
4. Navigate to C:\CoH\data\server\db
5. Open up auction_server.cfg(I25_auction_server.cfg), account_server.cfg(I25_account_server.cfg), chat_server.cfg(I25_chat_server.cfg), and servers.cfg(I25_Server.cfg).
You can change the password to whatever you would like. For this example I will be just using "YOURL33TPASS!".
You will see something like this.
 SqlLogin "DRIVER={SQL Server Native Client 11.0};Server=NS319069\SCORE;Uid=sa;Pwd=FinallyFree!;"
Change this to
 SqlLogin "DRIVER={SQL Server Native Client 11.0};Server=localhost\SQLEXPRESS;Uid=sa;Pwd=YOURL33TPASS!;"
While you have servers.cfg and auction_server.cfg open. Change all the ips to 127.0.0.1.
6. Extract the dbschema.rar found in C:\CoH\dbschema.rar.
7. Open up SQL Server Management Studio (SSMS which you installed in the first step). Hit Connect on the screen that pops up to and connect with windows authentication.
8. We need to enable the sa login so that server can login to the database.
If you look to the left panel you will see the object explorer and your connection. Right click it and select properties.
When this window comes up hit Security to the left and enable "sql server and windows authentication". Then click ok.
In the same panel you used before navigate to Security -> Logins then right click and enter properties the sa user.
In this window set the password to the same password you set back at step 4
Choose Status from the left panel in this same window and set login to enabled and hit ok.
Right click the connection in the object explorer again and click Restart.
9. Click File, Select Open, navigate back to C:\CoH, open the dbschema folder, and select cohauc.sql in SQL Server Management Studio.
You will see these 2 lines at the top of the file opened
  •  ( NAME = N'cohauc', FILENAME = N'C:\mssql\MSSQL11.SCORE\MSSQL\DATA\cohauc.mdf' , SIZE = 157440KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
    
  •  ( NAME = N'cohauc_log', FILENAME = N'C:\mssql\MSSQL11.SCORE\MSSQL\DATA\cohauc_log.ldf' , SIZE = 353216KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
    
10. What you want to do is set the first part of these directory listings to where your SQL Server is located for example, I set my to D:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL because that is where my SQL Server is. So my would become:
  •  ( NAME = N'cohauc', FILENAME = N'D:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\DATA\cohauc.mdf' , SIZE = 157440KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
    
  •  ( NAME = N'cohauc_log', FILENAME = N'D:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\DATA\cohauc_log.ldf' , SIZE = 353216KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
    
11. Once done click the Execute button. And do this again for both the cohauth and cohchat.
12. Open up ODBC Data Sources (32-bit).
  • Type 'ODBC' in Windows search, or run directly from C:\Windows\SysWOW64\odbcad32.exe
  • Do NOT use 64-bit!
  • Click File DSN then click add to the right.
  • Choose ODBC Driver 17 for SQL Server. Click Next.
  • Enter AuthDB into the box and hit next then finish.
  • It will then say something like ‘Which SQL Server would you like to connect to?’
    • Type localhost\SQLEXPRESS and hit next.
  • Choose with SQL Auth enter sa into username and the password you use previously.
  • Tick choose change default database to and select cohauth and hit next.
  • After this hit finish then ‘Test Data source’ this will test the auth database connection to your main database if it successful congrats :D
13. Once you have done that you can now start up your server. Navigate back to C:\CoH and create a bat file to start your server.
 
@echo off
echo Starting Auth Server
START C:\coh\bin\authserver.exe
TIMEOUT 2
echo Starting DB Server
START C:\coh\bin\dbserver.exe -zonelaunchers 1
TIMEOUT 2
echo Starting Chat Server
START C:\COH\bin\chatserver.exe
TIMEOUT 2
echo Starting Launcher Server
START C:\coh\bin\launcher64.exe -noversioncheck
TIMEOUT 2
echo Starting Mission Server x64
START C:\coh\bin\missionserver64.exe
TIMEOUT 2
echo Starting Auction Server
START C:\coh\bin\auctionserver.exe
TIMEOUT 2
echo Starting Server Monitor x64
START C:\coh\bin\servermonitor64.exe
echo Everything should be launched! Go enjoy COH.
TIMEOUT 10
14. Go to your City of Heroes folder and make a shortcut of score.exe.
  • Add the string below to the shortcut if playing locally on the hosting machine.
     score.exe -patchdir score -patchversion 2019.04.19 -auth 127.0.0.1 -noversioncheck -console
    
  • Add the string below to the shortcut if playing over the network. Note you'll need the hosting machines IP for this. (CMD -> IPConfig)
     score.exe -patchdir score -patchversion 2019.04.19 -auth <HOSTIPADDRESS> -noversioncheck -console
    
15. Login and Enjoy!

Port Forwards

TCP Ports
Port 11228
UDP Ports
Ports 18717 through 18917

Setup Internet Facing Server

dbserver.exe needs to be patched to read its external IP from a config file, a patched version can be downloaded from here or from the following magnet link
dbserver nat fix.zip
dbserver.exe [MD5] c66842d15bc94f6b6b2a282331c01e3f   |   dbserver.exe [SHA1] 9ba7c9774de2f75cd72efb604c44c3a86cbd24eb
From SQL Sever Manager Studio(SSMS) run the query below.
 INSERT INTO cohauth.dbo.server (id, name, ip, inner_ip, ageLimit, pk_flag, server_group_id) VALUES (1, 'ShardName', 'Public IP', '127.0.0.1', 0, 0, 1);
Replace the existing dbserver.exe with the patched one and add the RouteIp line to servers.cfg with your server's public IP.
 RouteIp YOURPUBLICIPADDRESS