I24 Server Setup

From OuroDev
Revision as of 00:03, 2 June 2019 by Asuffield (talk | contribs) (→‎Build City of Heroes from Source)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Required Software

Install SQL Server 2017 Express

You can install SQL Server pretty much on the default settings.
Select Basic under installation type:
Agree to the EULA if you want to use SQL Server.
Tell the server where to install files. I changed this for ease on my system.
It should begin installing and eventually you should see "Install has completed successfully". Click close.

Install SQL Server Management(SSMS)

You can install SQL Server Management on default settings.
Select the location you'd like to install SSMS to. The default is fine.
It will take awhile to install and you'll see a little progress bar letting you know whats going on
Eventually it will ask you to reboot the system. Might as well as do that now.

Install GitHub Desktop and Acquire Source

You need to download and install GitHub Desktop.
Open GitHub Desktop, Select File, and Clone a Repository.
Select the URL tab, enter "https://git.ourodev.com/CoX/Source.git" into the first blank and a path where to store the source locally such as "C:\GitHub\CoX\Source".
Error creating thumbnail: File missing
After the download finishes you can close GitHub Desktop for now.

Build City of Heroes from Source

Start a powershell prompt as administrator
Enter "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine" into the terminal and type "A" to auto accept all.
Open a command prompt that is set up for your version of visual studio:
If you have Visual Studio 2019 installed, then start a developer command prompt for Visual Studio (check the start menu).
If you only have 2010, open cmd and run C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat.
From this command prompt, run: powershell
Error creating thumbnail: File missing
Naviate to "C:\GitHub\CoX\Source\MasterSolution" and run build.ps1
Error creating thumbnail: File missing
Begin building City of Heroes by running ".\build.ps1"
Error creating thumbnail: File missing
Eventually the build will finish(On average takes at least 40 minutes to build)
Error creating thumbnail: File missing
Now build AuthServer(C:\GitHub\CoX\Source\AuthServer\src\AuthServer\AuthServer.sln)

Setup Server Files

Create a directory in C:\GitHub\CoX\Source\bin called data.
Open ServerData.7z and extract all files into Source\bin\data (the newly created directory).
Open CoHDev_Source_Files_Current(Updated).zip.
Extract "i24 Server and Client Piggs (extracted with CoHTools)" into Source\bin\data.
Copy maps.db from "map.db (modified, working on current VS2010 build)" and place it in Source\bin\data\server\db, overwriting the old maps.db
Copy the piggs folder from your i24 client directory and place them in Source\bin\. You should end up with Source\bin\piggs\ populated.
Create a directory in your C: drive called "CoH_Data" and another directory inside that, called "attributes" (C:\CoH_Data\attributes).
Run this in a command prompt:
cd Source\bin
.\mapserver.exe -productionmode -templates
Copy all files from C:\CoH_Data\attributes and place them into Source\bin\data\server\db\templates.
Open Source\DBSchemas and execute all the .sql files in the directory. You may need to change the file path -- anywhere works. Drop old database references before if there are any.

Server Configuration

Follow I25_Server_Setup#i25_Configuration_Files until we come up with an i24-optimized guide.
Adjust the configuration files in Source\bin\data\server\db to utilize the correct database connections.

Launch Client and Server

Navigate to "C:\GitHub\CoX\Source\bin" and inside you should see "CityofHeroes.exe".
Right click on it and towards you bottom you'll see "Create Shortcut".
A new shortcut should have appeared. Right click on it and go to properties.
Error creating thumbnail: File missing
Add the follow parameter to your shortcut's target.
 -db 127.0.0.1 -console -project "Ouroboros"
Error creating thumbnail: File missing
Start DBServer.exe and then Launcher.exe. This can be done simply by double clicking on them.
Once these are both fully booted use your new shortcut to connect to the local server.
You could also use a .bat file to start everything up and in the correct order.
The below is an example bat file to launch the DBServer, Launcher, and finally the Client.
 
@echo off
echo Starting DB Server
START C:\GitHub\CoX\Source\bin\dbserver.exe
TIMEOUT 2
echo Starting Launcher Server
START C:\GitHub\CoX\Source\bin\launcher.exe
TIMEOUT 2
echo Starting Chat Server
START C:\GitHub\CoX\Source\bin\ChatServer.exe -noreserved
TIMEOUT 2
echo Waiting for user input to start City of Heroes. Hit SPACE to continue.
pause
echo Starting City of Heroes Client
START C:\GitHub\CoX\Source\bin\CityOfHeroes.exe -db 127.0.0.1 -console -project "Ouroboros"
echo Everything should be launched! Go enjoy COH.
After the client starts up you'll be presented with a Login and Password screen. As auth is currently turned off you can enter anything you want in both.
There should only be one server listed. Go ahead and pick it then make a new character to test with!