https://wiki.ourodev.com/api.php?action=feedcontributions&user=Darwinasm86&feedformat=atomOuroDev - User contributions [en]2024-03-28T19:23:50ZUser contributionsMediaWiki 1.41.0https://wiki.ourodev.com/index.php?title=Server_Setup_for_Making_Bins&diff=1924Server Setup for Making Bins2019-12-05T20:10:59Z<p>Darwinasm86: </p>
<hr />
<div>This is a work in progress<br />
<br />
Dependencies:<br />
<br />
NOTE: This assumes building an i24 Ouroboros Server from "Source"<br />
<br />
* Setup an i24 Ouro Server as per https://ourowiki.ouro-comdev.com/index.php?title=Volume_2_Server_Setup<br />
<br />
NOTE: For binning to work, you must compile from source (x86, Debug), this will generate the proper "Mapserver.exe" and "Ouroboros_Debug.exe" files. For traceability it is recommended to rename the "Mapserver.exe" to "Mapserver_Debug.exe"<br />
<br />
* You should end up with a directory structure similar to this IF you compile from source, and complete the server setup instructions:<br />
<br />
<pre><br />
F:\CoX <br />
F:\CoX\Source <br />
F:\CoX\Source\bin [We shall call this EXE-DIR]<br />
F:\CoX\Source\bin\piggs [We shall call this PIGG-DIR]<br />
F:\CoX\Source\bin\data [We shall call this DATA-DIR]<br />
F:\CoX\Source\bin\data\bin [We shall call this CLIENT-BIN-DIR]<br />
F:\CoX\Source\bin\data\server\bin [We shall call this SERVER-BIN-DIR]<br />
</pre><br />
<br />
* In EXE-DIR, create folders called localdata, serverdata and tools. Tools will be empty but it triggers search behaviour we want in the server.<br />
* Copy "mapserver_debug.exe", and "ouroboros_debug.exe" from the \bin folder, to the "DATA-DIR".<br />
* Copy all "*.dll" files from the \bin folder, to the "DATA-DIR".<br />
<br />
<pre><br />
F:\CoX\Source\bin\serverdata [We shall call this SERVER-DATA-DIR]<br />
F:\CoX\Source\bin\localdata [We shall call this LOCAL-DATA-DIR]<br />
F:\CoX\Source\bin\tools [We shall call this TOOL-DIR]<br />
</pre><br />
<br />
* Download Piglet https://build.ourodev.com/<br />
* Extract the ".pigg" files from the PIGG-DIR using Piglet, into the DATA-DIR, then delete the piggs folder.<br />
* To do this, Run Piglet, File Open Folder, select the "PIGG-DIR", Select Folder, Click on the top level folder in the upper left of the Piglet window, right click and export to the "Data-Dir"<br />
<br />
* Download the full data set, and extract to SERVER-DATA-DIR. At present this means downloading the following from the [https://ourowiki.ouro-comdev.com/index.php?title=Magnet_Links magnet links] page:<br />
** Paragon Data Directory Dump (Faptastic)<br />
** Paragon Data Directory Dump - missing data (Voldemort)<br />
<br />
* Download 5-17 from the same page, and extract dbidmaps.7z to SERVER-DATA-DIR/Defs/dbidmaps/. <br />
NOTE: Do not extract tricks.7z, it is no longer required.<br />
<br />
You should now have something like this:<br />
<pre><br />
F:\CoX\Source\Bin\serverdata\AccountServer<br />
F:\CoX\Source\Bin\serverdata\AIScript<br />
...<br />
...<br />
F:\CoX\Source\Bin\serverdata\texture_library<br />
F:\CoX\Source\Bin\serverdata\tricks<br />
</pre><br />
<br />
* Back up the "CLIENT-BIN-DIR" and the "SERVER_BIN_DIR" before the next step.<br />
* Delete the bin files from CLIENT-BIN-DIR and SERVER-BIN-DIR<br />
* Delete these from the SERVER-DATA folder:<br />
<pre><br />
object_library/Omni/EncounterSpawns/V_Atmospheric/*<br />
texture_library/MAPS/city/Map_City_05_03.texture<br />
</pre><br />
<br />
* Cut the object_library folder from SERVER-DATA-DIR and paste to DATA-DIR to prevent the mapserver crashing when making geobins. Overwrite any files already there from the piggs.<br />
<br />
* Create a blank text file at SERVER-DATA-DIR/maps/City_Zones/City_01_05/City_01_05.txt<br />
* Remove the following section from DATA-DIR/server/db/maps.db:<br />
<pre><br />
Container 120<br />
MapName "maps/rp/fire/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 121<br />
MapName "maps/rp/luau/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 122<br />
MapName "maps/rp/harvest/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 123<br />
MapName "maps/rp/halloween/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 124<br />
MapName "maps/rp/winter/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
</pre><br />
<br />
<br />
{| class="wikitable" style="width:50%;"<br />
! IMPORTANT<br />
|-<br />
|''If you are running the mapserver to make bins and there are other mapservers running on the same machine, you must add '''-nosharedmemory''' to the command line to ensure it loads the files from disk, not from the mapserver shared memory pool. This is not required when using -createbins as that turns off shared memory implicitly.''<br />
|}<br />
<br />
From the command line navigate to EXE-DIR and run <pre>mapserver_debug.exe -createbins -verbose 2</pre><br />
It will take a while but should populate SERVER-BIN-DIR.<br />
<br />
Next, run <pre>ouroboros_debug.exe -console -createbins -verbose 2 -project cov</pre><br />
This will again take a while and populate CLIENT-BIN-DIR. The client will close automatically when finished. I recommend using project cov, or some other throwaway project, for all non-production client use to avoid it accidentally messing up your main install settings. ''You MUST use ouroboros_debug not ouroboros, as the production client won't look for the server data folders.''<br />
<br />
'''Note: Both mapserver and ouroboros_debug will spew out errors, we will eventually track down and fix all these'''<br />
<br />
To make changes, copy the file you want to edit from SERVER-DATA-DIR to the same place in LOCAL-DATA-DIR and edit it, then rebuild bins by running mapserver and/or ouroboros-test as needed, without the -createbins argument.<br />
Note that some files created in SERVER-BIN-DIR need to be copied to CLIENT-BIN-DIR as they are shared between server and client. These bins are the ones that are in your original bins.pigg.<br />
<br />
You should be able to run the server and client as normal from this setup, but I don't recommend it for a production server: test things then copy your new bins to a normal setup that uses piggs.<br />
<br />
<br />
[[Category:Bubble's Notes]]</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Server_Setup_for_Making_Bins&diff=1923Server Setup for Making Bins2019-12-05T18:54:34Z<p>Darwinasm86: </p>
<hr />
<div>This is a work in progress<br />
<br />
Dependencies:<br />
<br />
NOTE: This assumes building an i24 Ouroboros Server from "Source"<br />
<br />
* Setup an i24 Ouro Server as per https://ourowiki.ouro-comdev.com/index.php?title=Volume_2_Server_Setup<br />
<br />
NOTE: For binning to work, you must compile from source (x86, Debug), this will generate the proper "Mapserver.exe" and "Ouroboros_Debug.exe" files. For traceability it is recommended to rename the "Mapserver.exe" to "Mapserver_Debug.exe"<br />
<br />
* You should end up with a directory structure similar to this IF you compile from source, and complete the server setup instructions:<br />
<br />
<pre><br />
F:\CoX <br />
F:\CoX\Source <br />
F:\CoX\Source\bin [We shall call this EXE-DIR]<br />
F:\CoX\Source\bin\piggs [We shall call this PIGG-DIR]<br />
F:\CoX\Source\bin\data [We shall call this DATA-DIR]<br />
F:\CoX\Source\bin\data\bin [We shall call this CLIENT-BIN-DIR]<br />
F:\CoX\Source\bin\data\server\bin [We shall call this SERVER-BIN-DIR]<br />
</pre><br />
<br />
* In EXE-DIR, create folders called localdata, serverdata and tools. Tools will be empty but it triggers search behaviour we want in the server.<br />
* Copy "mapserver_debug.exe", and "ouroboros_debug.exe" from the \bin folder, to the "DATA-DIR".<br />
* Copy all "*.dll" files from the \bin folder, to the "DATA-DIR".<br />
<br />
<pre><br />
F:\CoX\Source\bin\serverdata [We shall call this SERVER-DATA-DIR]<br />
F:\CoX\Source\bin\localdata [We shall call this LOCAL-DATA-DIR]<br />
F:\CoX\Source\bin\tools [We shall call this TOOL-DIR]<br />
</pre><br />
<br />
* Download Piglet https://build.ourodev.com/<br />
* Extract the ".pigg" files from the PIGG-DIR using Piglet, into the DATA-DIR, then delete the piggs folder.<br />
* To do this, Run Piglet, File Open Folder, select the "PIGG-DIR", Select Folder, Click on the top level folder in the upper left of the Piglet window, right click and export to the "Data-Dir"<br />
<br />
* Download the full data set, and extract to SERVER-DATA-DIR. At present this means downloading the following from the [https://ourowiki.ouro-comdev.com/index.php?title=Magnet_Links magnet links] page:<br />
** Paragon Data Directory Dump (Faptastic)<br />
** Paragon Data Directory Dump - missing data (Voldemort)<br />
<br />
* Download 5-17 from the same page, and extract dbidmaps.7z to SERVER-DATA-DIR/Defs/dbidmaps/. <br />
NOTE: Do not extract tricks.7z, it is no longer required.<br />
<br />
You should now have something like this:<br />
<pre><br />
F:\CoX\Source\Bin\serverdata\AccountServer<br />
F:\CoX\Source\Bin\serverdata\AIScript<br />
...<br />
...<br />
F:\CoX\Source\Bin\serverdata\texture_library<br />
F:\CoX\Source\Bin\serverdata\tricks<br />
</pre><br />
<br />
* Back up the "CLIENT-BIN-DIR" and the "SERVER_BIN_DIR" before the next step.<br />
* Delete the bin files from CLIENT-BIN-DIR and SERVER-BIN-DIR<br />
* Delete these from the SERVER-DATA folder:<br />
<pre><br />
object_library/Omni/EncounterSpawns/V_Atmospheric/*<br />
texture_library/MAPS/city/Map_City_05_03.texture<br />
</pre><br />
<br />
* Cut the object_library folder from SERVER-DATA-DIR and paste to DATA-DIR to prevent the mapserver crashing when making geobins. Overwrite any files already there from the piggs.<br />
<br />
* Create a blank text file at SERVER-DATA-DIR/maps/City_Zones/City_01_05/City_01_05.txt<br />
<br />
<br />
{| class="wikitable" style="width:50%;"<br />
! IMPORTANT<br />
|-<br />
|''If you are running the mapserver to make bins and there are other mapservers running on the same machine, you must add '''-nosharedmemory''' to the command line to ensure it loads the files from disk, not from the mapserver shared memory pool. This is not required when using -createbins as that turns off shared memory implicitly.''<br />
|}<br />
<br />
From the command line navigate to EXE-DIR and run <pre>mapserver_debug.exe -createbins -verbose 2</pre><br />
It will take a while but should populate SERVER-BIN-DIR.<br />
<br />
Next, run <pre>ouroboros_debug.exe -console -createbins -verbose 2 -project cov</pre><br />
This will again take a while and populate CLIENT-BIN-DIR. The client will close automatically when finished. I recommend using project cov, or some other throwaway project, for all non-production client use to avoid it accidentally messing up your main install settings. ''You MUST use ouroboros_debug not ouroboros, as the production client won't look for the server data folders.''<br />
<br />
'''Note: Both mapserver and ouroboros_debug will spew out errors, we will eventually track down and fix all these'''<br />
<br />
To make changes, copy the file you want to edit from SERVER-DATA-DIR to the same place in LOCAL-DATA-DIR and edit it, then rebuild bins by running mapserver and/or ouroboros-test as needed, without the -createbins argument.<br />
Note that some files created in SERVER-BIN-DIR need to be copied to CLIENT-BIN-DIR as they are shared between server and client. These bins are the ones that are in your original bins.pigg.<br />
<br />
You should be able to run the server and client as normal from this setup, but I don't recommend it for a production server: test things then copy your new bins to a normal setup that uses piggs.<br />
<br />
<br />
[[Category:Bubble's Notes]]</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Server_Setup_for_Making_Bins&diff=1922Server Setup for Making Bins2019-12-05T17:55:49Z<p>Darwinasm86: </p>
<hr />
<div>This is a work in progress<br />
<br />
Dependencies:<br />
<br />
NOTE: This assumes building an i24 Ouroboros Server from "Source"<br />
<br />
* Setup an i24 Ouro Server as per https://ourowiki.ouro-comdev.com/index.php?title=Volume_2_Server_Setup<br />
<br />
NOTE: For binning to work, you must compile from source (x86, Debug), this will generate the proper "Mapserver.exe" and "Ouroboros_Debug.exe" files. For traceability it is recommended to rename the "Mapserver.exe" to "Mapserver_Debug.exe"<br />
<br />
* You should end up with a directory structure similar to this IF you compile from source, and complete the server setup instructions:<br />
<br />
<pre><br />
F:\CoX <br />
F:\CoX\Source <br />
F:\CoX\Source\bin [We shall call this EXE-DIR]<br />
F:\CoX\Source\bin\piggs [We shall call this PIGG-DIR]<br />
F:\CoX\Source\bin\data [We shall call this DATA-DIR]<br />
F:\CoX\Source\bin\data\bin [We shall call this CLIENT-BIN-DIR]<br />
F:\CoX\Source\bin\data\server\bin [We shall call this SERVER-BIN-DIR]<br />
</pre><br />
<br />
* In EXE-DIR, create folders called localdata, serverdata and tools. Tools will be empty but it triggers search behaviour we want in the server.<br />
<br />
<pre><br />
F:\CoX\Source\bin\serverdata [We shall call this SERVER-DATA-DIR]<br />
F:\CoX\Source\bin\localdata [We shall call this LOCAL-DATA-DIR]<br />
F:\CoX\Source\bin\tools [We shall call this TOOL-DIR]<br />
</pre><br />
<br />
* Download Piglet https://build.ourodev.com/<br />
* Extract the ".pigg" files from the PIGG-DIR using Piglet, into the DATA-DIR, then delete the piggs folder.<br />
* To do this, Run Piglet, File Open Folder, select the "PIGG-DIR", Select Folder, Click on the top level folder in the upper left of the Piglet window, right click and export to the "Data-Dir"<br />
<br />
* Download the full data set, and extract to SERVER-DATA-DIR. At present this means downloading the following from the [https://ourowiki.ouro-comdev.com/index.php?title=Magnet_Links magnet links] page:<br />
** Paragon Data Directory Dump (Faptastic)<br />
** Paragon Data Directory Dump - missing data (Voldemort)<br />
<br />
* Download 5-17 from the same page, and extract dbidmaps.7z to SERVER-DATA-DIR/Defs/dbidmaps/. <br />
NOTE: Do not extract tricks.7z, it is no longer required.<br />
<br />
You should now have something like this:<br />
<pre><br />
F:\CoX\Source\Bin\serverdata\AccountServer<br />
F:\CoX\Source\Bin\serverdata\AIScript<br />
...<br />
...<br />
F:\CoX\Source\Bin\serverdata\texture_library<br />
F:\CoX\Source\Bin\serverdata\tricks<br />
</pre><br />
<br />
* Back up the "CLIENT-BIN-DIR" and the "SERVER_BIN_DIR" before the next step.<br />
* Delete the bin files from CLIENT-BIN-DIR and SERVER-BIN-DIR<br />
* Delete these from the SERVER-DATA folder:<br />
<pre><br />
object_library/Omni/EncounterSpawns/V_Atmospheric/*<br />
texture_library/MAPS/city/Map_City_05_03.texture<br />
</pre><br />
<br />
* Cut the object_library folder from SERVER-DATA-DIR and paste to DATA-DIR to prevent the mapserver crashing when making geobins. Overwrite any files already there from the piggs.<br />
<br />
* Create a blank text file at SERVER-DATA-DIR/maps/City_Zones/City_01_05/City_01_05.txt<br />
<br />
<br />
{| class="wikitable" style="width:50%;"<br />
! IMPORTANT<br />
|-<br />
|''If you are running the mapserver to make bins and there are other mapservers running on the same machine, you must add '''-nosharedmemory''' to the command line to ensure it loads the files from disk, not from the mapserver shared memory pool. This is not required when using -createbins as that turns off shared memory implicitly.''<br />
|}<br />
<br />
From the command line navigate to EXE-DIR and run <pre>mapserver_debug.exe -createbins -verbose 2</pre><br />
It will take a while but should populate SERVER-BIN-DIR.<br />
<br />
Next, run <pre>ouroboros_debug.exe -console -createbins -verbose 2 -project cov</pre><br />
This will again take a while and populate CLIENT-BIN-DIR. The client will close automatically when finished. I recommend using project cov, or some other throwaway project, for all non-production client use to avoid it accidentally messing up your main install settings. ''You MUST use ouroboros_debug not ouroboros, as the production client won't look for the server data folders.''<br />
<br />
'''Note: Both mapserver and ouroboros_debug will spew out errors, we will eventually track down and fix all these'''<br />
<br />
To make changes, copy the file you want to edit from SERVER-DATA-DIR to the same place in LOCAL-DATA-DIR and edit it, then rebuild bins by running mapserver and/or ouroboros-test as needed, without the -createbins argument.<br />
Note that some files created in SERVER-BIN-DIR need to be copied to CLIENT-BIN-DIR as they are shared between server and client. These bins are the ones that are in your original bins.pigg.<br />
<br />
You should be able to run the server and client as normal from this setup, but I don't recommend it for a production server: test things then copy your new bins to a normal setup that uses piggs.<br />
<br />
<br />
[[Category:Bubble's Notes]]</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Server_Setup_for_Making_Bins&diff=1921Server Setup for Making Bins2019-12-04T17:51:30Z<p>Darwinasm86: </p>
<hr />
<div>This is a work in progress<br />
<br />
Dependencies:<br />
<br />
NOTE: This assumes building an i24 Ouroboros Server from "Source"<br />
<br />
* Setup an i24 Ouro Server as per https://ourowiki.ouro-comdev.com/index.php?title=Volume_2_Server_Setup<br />
<br />
NOTE: For binning to work, you must compile from source (x86, Debug), this will generate the proper "Mapserver.exe" and "Ouroboros_Debug.exe" files. For traceability it is recommended to rename the "Mapserver.exe" to "Mapserver_Debug.exe"<br />
<br />
* You should end up with a directory structure similar to this IF you compile from source, and complete the server setup instructions:<br />
<br />
<pre><br />
F:\CoX <br />
F:\CoX\Source <br />
F:\CoX\Source\bin [We shall call this EXE-DIR]<br />
F:\CoX\Source\bin\piggs [We shall call this PIGG-DIR]<br />
F:\CoX\Source\bin\data [We shall call this DATA-DIR]<br />
F:\CoX\Source\bin\data\bin [We shall call this CLIENT-BIN-DIR]<br />
F:\CoX\Source\bin\data\server\bin [We shall call this SERVER-BIN-DIR]<br />
</pre><br />
<br />
<br />
* In EXE-DIR, create folders called localdata, serverdata and tools. Tools will be empty but it triggers search behaviour we want in the server.<br />
<br />
<pre><br />
F:\CoX\Source\bin\serverdata [We shall call this SERVER-DATA-DIR]<br />
F:\CoX\Source\bin\localdata [We shall call this LOCAL-DATA-DIR]<br />
F:\CoX\Source\bin\tools [We shall call this TOOL-DIR]<br />
</pre><br />
<br />
* Download Piglet https://build.ourodev.com/<br />
* Extract the ".pigg" files from the PIGG-DIR using Piglet, into the DATA-DIR, then delete the piggs folder.<br />
* To do this, Run Piglet, File Open Folder, select the "PIGG-DIR", Select Folder, Click on the top level folder in the upper left of the Piglet window, right click and export to the "Data-Dir"<br />
<br />
* Download the full data set, and extract to SERVER-DATA-DIR. At present this means downloading the following from the [https://ourowiki.ouro-comdev.com/index.php?title=Magnet_Links magnet links] page:<br />
** Paragon Data Directory Dump (Faptastic)<br />
** Paragon Data Directory Dump - missing data (Voldemort)<br />
<br />
* Download 5-17 from the same page, and extract dbidmaps.7z to SERVER-DATA-DIR/Defs/dbidmaps/. <br />
NOTE: Do not extract tricks.7z, it is no longer required.<br />
<br />
You should now have something like this:<br />
<pre><br />
F:\CoX\Source\Bin\serverdata\AccountServer<br />
F:\CoX\Source\Bin\serverdata\AIScript<br />
...<br />
...<br />
F:\CoX\Source\Bin\serverdata\texture_library<br />
F:\CoX\Source\Bin\serverdata\tricks<br />
</pre><br />
<br />
* Delete the bin files from CLIENT-BIN-DIR and SERVER-BIN-DIR<br />
* Delete these from the SERVER-DATA folder:<br />
<pre><br />
object_library/Omni/EncounterSpawns/V_Atmospheric/*<br />
texture_library/MAPS/city/Map_City_05_03.texture<br />
</pre><br />
<br />
* Cut the object_library folder from SERVER-DATA-DIR and paste to DATA-DIR to prevent the mapserver crashing when making geobins. Overwrite any files already there from the piggs.<br />
<br />
* Create a blank text file at SERVER-DATA-DIR/maps/City_Zones/City_01_05/City_01_05.txt<br />
<br />
<br />
{| class="wikitable" style="width:50%;"<br />
! IMPORTANT<br />
|-<br />
|''If you are running the mapserver to make bins and there are other mapservers running on the same machine, you must add '''-nosharedmemory''' to the command line to ensure it loads the files from disk, not from the mapserver shared memory pool. This is not required when using -createbins as that turns off shared memory implicitly.''<br />
|}<br />
<br />
From the command line navigate to EXE-DIR and run <pre>mapserver_debug.exe -createbins -verbose 2</pre><br />
It will take a while but should populate SERVER-BIN-DIR.<br />
<br />
Next, run <pre>ouroboros_debug.exe -console -createbins -verbose 2 -project cov</pre><br />
This will again take a while and populate CLIENT-BIN-DIR. The client will close automatically when finished. I recommend using project cov, or some other throwaway project, for all non-production client use to avoid it accidentally messing up your main install settings. ''You MUST use ouroboros_debug not ouroboros, as the production client won't look for the server data folders.''<br />
<br />
'''Note: Both mapserver and ouroboros_debug will spew out errors, we will eventually track down and fix all these'''<br />
<br />
To make changes, copy the file you want to edit from SERVER-DATA-DIR to the same place in LOCAL-DATA-DIR and edit it, then rebuild bins by running mapserver and/or ouroboros-test as needed, without the -createbins argument.<br />
Note that some files created in SERVER-BIN-DIR need to be copied to CLIENT-BIN-DIR as they are shared between server and client. These bins are the ones that are in your original bins.pigg.<br />
<br />
You should be able to run the server and client as normal from this setup, but I don't recommend it for a production server: test things then copy your new bins to a normal setup that uses piggs.<br />
<br />
<br />
[[Category:Bubble's Notes]]</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Server_Setup_for_Making_Bins&diff=1920Server Setup for Making Bins2019-12-04T17:48:22Z<p>Darwinasm86: </p>
<hr />
<div>This is a work in progress<br />
<br />
Dependencies:<br />
<br />
NOTE: This assumes building an i24 Ouroboros Server<br />
<br />
* Setup an i24 Ouro Server as per https://ourowiki.ouro-comdev.com/index.php?title=Volume_2_Server_Setup<br />
<br />
NOTE: For binning to work, you must compile from source (x86, Debug), this will generate the proper "Mapserver.exe" and "Ouroboros_Debug.exe" files. For traceability it is recommended to rename the "Mapserver.exe" to "Mapserver_Debug.exe"<br />
<br />
* You should end up with a directory structure similar to this IF you compile from source, and complete the server setup instructions:<br />
<br />
<pre><br />
F:\CoX <br />
F:\CoX\Source <br />
F:\CoX\Source\bin [We shall call this EXE-DIR]<br />
F:\CoX\Source\bin\piggs [We shall call this PIGG-DIR]<br />
F:\CoX\Source\bin\data [We shall call this DATA-DIR]<br />
F:\CoX\Source\bin\data\bin [We shall call this CLIENT-BIN-DIR]<br />
F:\CoX\Source\bin\data\server\bin [We shall call this SERVER-BIN-DIR]<br />
</pre><br />
<br />
<br />
* In EXE-DIR, create folders called localdata, serverdata and tools. Tools will be empty but it triggers search behaviour we want in the server.<br />
<br />
<pre><br />
F:\CoX\Source\bin\serverdata [We shall call this SERVER-DATA-DIR]<br />
F:\CoX\Source\bin\localdata [We shall call this LOCAL-DATA-DIR]<br />
F:\CoX\Source\bin\tools [We shall call this TOOL-DIR]<br />
</pre><br />
<br />
* Download Piglet https://build.ourodev.com/<br />
* Extract the ".pigg" files from the PIGG-DIR using Piglet, into the DATA-DIR, then delete the piggs folder.<br />
* To do this, Run Piglet, File Open Folder, select the "PIGG-DIR", Select Folder, Click on the top level folder in the upper left of the Piglet window, right click and export to the "Data-Dir"<br />
<br />
* Download the full data set, and extract to SERVER-DATA-DIR. At present this means downloading the following from the [https://ourowiki.ouro-comdev.com/index.php?title=Magnet_Links magnet links] page:<br />
** Paragon Data Directory Dump (Faptastic)<br />
** Paragon Data Directory Dump - missing data (Voldemort)<br />
<br />
* Download 5-17 from the same page, and extract dbidmaps.7z to SERVER-DATA-DIR/Defs/dbidmaps/. <br />
NOTE: Do not extract tricks.7z, it is no longer required.<br />
<br />
You should now have something like this:<br />
<pre><br />
F:\CoX\Source\Bin\serverdata\AccountServer<br />
F:\CoX\Source\Bin\serverdata\AIScript<br />
...<br />
...<br />
F:\CoX\Source\Bin\serverdata\texture_library<br />
F:\CoX\Source\Bin\serverdata\tricks<br />
</pre><br />
<br />
* Delete the bin files from CLIENT-BIN-DIR and SERVER-BIN-DIR<br />
* Delete these from the SERVER-DATA folder:<br />
<pre><br />
object_library/Omni/EncounterSpawns/V_Atmospheric/*<br />
texture_library/MAPS/city/Map_City_05_03.texture<br />
</pre><br />
<br />
* Cut the object_library folder from SERVER-DATA-DIR and paste to DATA-DIR to prevent the mapserver crashing when making geobins. Overwrite any files already there from the piggs.<br />
<br />
* Create a blank text file at SERVER-DATA-DIR/maps/City_Zones/City_01_05/City_01_05.txt<br />
<br />
<br />
{| class="wikitable" style="width:50%;"<br />
! IMPORTANT<br />
|-<br />
|''If you are running the mapserver to make bins and there are other mapservers running on the same machine, you must add '''-nosharedmemory''' to the command line to ensure it loads the files from disk, not from the mapserver shared memory pool. This is not required when using -createbins as that turns off shared memory implicitly.''<br />
|}<br />
<br />
From the command line navigate to EXE-DIR and run <pre>mapserver_debug.exe -createbins -verbose 2</pre><br />
It will take a while but should populate SERVER-BIN-DIR.<br />
<br />
Next, run <pre>ouroboros_debug.exe -console -createbins -verbose 2 -project cov</pre><br />
This will again take a while and populate CLIENT-BIN-DIR. The client will close automatically when finished. I recommend using project cov, or some other throwaway project, for all non-production client use to avoid it accidentally messing up your main install settings. ''You MUST use ouroboros_debug not ouroboros, as the production client won't look for the server data folders.''<br />
<br />
'''Note: Both mapserver and ouroboros_debug will spew out errors, we will eventually track down and fix all these'''<br />
<br />
To make changes, copy the file you want to edit from SERVER-DATA-DIR to the same place in LOCAL-DATA-DIR and edit it, then rebuild bins by running mapserver and/or ouroboros-test as needed, without the -createbins argument.<br />
Note that some files created in SERVER-BIN-DIR need to be copied to CLIENT-BIN-DIR as they are shared between server and client. These bins are the ones that are in your original bins.pigg.<br />
<br />
You should be able to run the server and client as normal from this setup, but I don't recommend it for a production server: test things then copy your new bins to a normal setup that uses piggs.<br />
<br />
<br />
[[Category:Bubble's Notes]]</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Server_Setup_for_Making_Bins&diff=1919Server Setup for Making Bins2019-12-04T17:26:27Z<p>Darwinasm86: </p>
<hr />
<div>This is a work in progress<br />
<br />
Dependencies:<br />
<br />
NOTE: This assumes building an i24 Ouroboros Server<br />
<br />
* Setup an i24 Ouro Server as per https://ourowiki.ouro-comdev.com/index.php?title=Volume_2_Server_Setup<br />
<br />
NOTE: For binning to work, you must compile from source (x86, Debug), this will generate the proper "Mapserver.exe" and "Ouroboros_Debug.exe" files. For traceability it is recommended to rename the "Mapserver.exe" to "Mapserver_Debug.exe"<br />
<br />
* You should end up with a directory structure similar to this IF you compile from source, and complete the server setup instructions:<br />
<br />
<pre><br />
F:\CoX <br />
F:\CoX\Source <br />
F:\CoX\Source\bin [We shall call this EXE-DIR]<br />
F:\CoX\Source\bin\piggs [We shall call this PIGG-DIR]<br />
F:\CoX\Source\bin\data [We shall call this DATA-DIR]<br />
F:\CoX\Source\bin\data\bin [We shall call this CLIENT-BIN-DIR]<br />
F:\CoX\Source\bin\data\server\bin [We shall call this SERVER-BIN-DIR]<br />
</pre><br />
<br />
<br />
* In EXE-DIR, create folders called localdata, serverdata and tools. Tools will be empty but it triggers search behaviour we want in the server.<br />
<br />
<pre><br />
F:\CoX\Source\bin\serverdata [We shall call this SERVER-DATA-DIR]<br />
F:\CoX\Source\bin\localdata [We shall call this LOCAL-DATA-DIR]<br />
F:\CoX\Source\bin\tools [We shall call this TOOL-DIR]<br />
</pre><br />
<br />
* Download Piglet https://build.ourodev.com/<br />
* Extract the ".pigg" files from the PIGG-DIR using Piglet, into the DATA-DIR, then delete the piggs folder.<br />
* To do this, Run Piglet, File Open Folder, select the "PIGG-DIR", Select Folder, Click on the top level folder in the upper left of the Piglet window, right click and export to the "Data-Dir"<br />
<br />
* Download the full data set, and extract to SERVER-DATA-DIR. At present this means downloading the following from the [https://ourowiki.ouro-comdev.com/index.php?title=Magnet_Links magnet links] page:<br />
** Paragon Data Directory Dump (Faptastic)<br />
** Paragon Data Directory Dump - missing data (Voldemort)<br />
<br />
* Download 5-17 from the same page, and extract dbidmaps.7z to SERVER-DATA-DIR/Defs/dbidmaps/. <br />
NOTE: Do not extract tricks.7z, it is no longer required.<br />
<br />
You should now have something like this:<br />
<pre><br />
F:\CoX\Source\Bin\serverdata\AccountServer<br />
F:\CoX\Source\Bin\serverdata\AIScript<br />
...<br />
...<br />
F:\CoX\Source\Bin\serverdata\texture_library<br />
F:\CoX\Source\Bin\serverdata\tricks<br />
</pre><br />
<br />
* Delete the bin files from CLIENT-BIN-DIR and SERVER-BIN-DIR<br />
* Delete these from the SERVER-DATA folder:<br />
<pre><br />
object_library/Omni/EncounterSpawns/V_Atmospheric/*<br />
texture_library/MAPS/city/Map_City_05_03.texture<br />
</pre><br />
<br />
* Cut the object_library folder from SERVER-DATA-DIR and paste to DATA-DIR to prevent the mapserver crashing when making geobins. Overwrite any files already there from the piggs.<br />
<br />
* Create a blank text file at SERVER-DATA-DIR/maps/City_Zones/City_01_05/City_01_05.txt<br />
<br />
<br />
{| class="wikitable" style="width:50%;"<br />
! IMPORTANT<br />
|-<br />
|''If you are running the mapserver to make bins and there are other mapservers running on the same machine, you must add '''-nosharedmemory''' to the command line to ensure it loads the files from disk, not from the mapserver shared memory pool. This is not required when using -createbins as that turns off shared memory implicitly.''<br />
|}<br />
<br />
From the command line navigate to EXE-DIR and run <pre>mapserver.exe -createbins -verbose 2</pre><br />
It will take a while but should populate SERVER-BIN-DIR.<br />
<br />
Next, run <pre>ouroboros_debug.exe -console -createbins -verbose 2 -project cov</pre><br />
This will again take a while and populate CLIENT-BIN-DIR. The client will close automatically when finished. I recommend using project cov, or some other throwaway project, for all non-production client use to avoid it accidentally messing up your main install settings. ''You MUST use ouroboros_debug not ouroboros, as the production client won't look for the server data folders.''<br />
<br />
'''Note: Both mapserver and ouroboros_debug will spew out errors, we will eventually track down and fix all these'''<br />
<br />
To make changes, copy the file you want to edit from SERVER-DATA-DIR to the same place in LOCAL-DATA-DIR and edit it, then rebuild bins by running mapserver and/or ouroboros-test as needed, without the -createbins argument.<br />
Note that some files created in SERVER-BIN-DIR need to be copied to CLIENT-BIN-DIR as they are shared between server and client. These bins are the ones that are in your original bins.pigg.<br />
<br />
You should be able to run the server and client as normal from this setup, but I don't recommend it for a production server: test things then copy your new bins to a normal setup that uses piggs.<br />
<br />
<br />
[[Category:Bubble's Notes]]</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Server_Setup_for_Making_Bins&diff=1918Server Setup for Making Bins2019-12-04T17:25:49Z<p>Darwinasm86: </p>
<hr />
<div>This is a work in progress<br />
<br />
Dependencies:<br />
<br />
NOTE: This assumes building an i24 Ouroboros Server<br />
<br />
* Setup an i24 Ouro Server as per https://ourowiki.ouro-comdev.com/index.php?title=Volume_2_Server_Setup<br />
<br />
NOTE: For binning to work, you must compile from source (x86, Debug), this will generate the proper "Mapserver.exe" and "Ouroboros_Debug.exe" files. For traceability it is recommended to rename the "Mapserver.exe" to "Mapserver_Debug.exe"<br />
<br />
* You should end up with a directory structure similar to this IF you compile from source, and complete the server setup instructions:<br />
<br />
<pre><br />
F:\CoX <br />
F:\CoX\Source <br />
F:\CoX\Source\bin [We shall call this EXE-DIR]<br />
F:\CoX\Source\bin\piggs [We shall call this PIGG-DIR]<br />
F:\CoX\Source\bin\data [We shall call this DATA-DIR]<br />
F:\CoX\Source\bin\data\bin [We shall call this CLIENT-BIN-DIR]<br />
F:\CoX\Source\bin\data\server\bin [We shall call this SERVER-BIN-DIR]<br />
</pre><br />
<br />
<br />
* In EXE-DIR, create folders called localdata, serverdata and tools. Tools will be empty but it triggers search behaviour we want in the server.<br />
<br />
<pre><br />
F:\CoX\Source\bin\serverdata [We shall call this SERVER-DATA-DIR]<br />
F:\CoX\Source\bin\localdata [We shall call this LOCAL-DATA-DIR]<br />
F:\CoX\Source\bin\tools [We shall call this TOOL-DIR]<br />
</pre><br />
<br />
* Download Piglet https://build.ourodev.com/<br />
* Extract the ".pigg" files from the PIGG-DIR using Piglet, into the DATA-DIR, then delete the piggs folder.<br />
* To do this, Run Piglet, File Open Folder, select the "PIGG-DIR", Select Folder, Click on the top level folder in the upper left of the Piglet window, right click and export to the "Data-Dir"<br />
<br />
* Download the full data set, and extract to SERVER-DATA-DIR. At present this means downloading the following from the [https://ourowiki.ouro-comdev.com/index.php?title=Magnet_Links magnet links] page:<br />
** Paragon Data Directory Dump (Faptastic)<br />
** Paragon Data Directory Dump - missing data (Voldemort)<br />
<br />
* Download 5-17 from the same page, and extract dbidmaps.7z to SERVER-DATA-DIR/Defs/dbidmaps/. <br />
NOTE: Do not extract tricks.7z, it is no longer required.<br />
<br />
You should now have something like this:<br />
<pre><br />
F:\CoX\Source\Bin\serverdata\AccountServer<br />
F:\CoX\Source\Bin\serverdata\AIScript<br />
...<br />
...<br />
F:\CoX\Source\Bin\serverdata\texture_library<br />
F:\CoX\Source\Bin\serverdata\tricks<br />
</pre><br />
<br />
Delete the bin files from CLIENT-BIN-DIR and SERVER-BIN-DIR<br />
<br />
Delete these from the SERVER-DATA folder:<br />
<pre><br />
object_library/Omni/EncounterSpawns/V_Atmospheric/*<br />
texture_library/MAPS/city/Map_City_05_03.texture<br />
</pre><br />
<br />
* Cut the object_library folder from SERVER-DATA-DIR and paste to DATA-DIR to prevent the mapserver crashing when making geobins. Overwrite any files already there from the piggs.<br />
<br />
* Create a blank text file at SERVER-DATA-DIR/maps/City_Zones/City_01_05/City_01_05.txt<br />
<br />
<br />
{| class="wikitable" style="width:50%;"<br />
! IMPORTANT<br />
|-<br />
|''If you are running the mapserver to make bins and there are other mapservers running on the same machine, you must add '''-nosharedmemory''' to the command line to ensure it loads the files from disk, not from the mapserver shared memory pool. This is not required when using -createbins as that turns off shared memory implicitly.''<br />
|}<br />
<br />
From the command line navigate to EXE-DIR and run <pre>mapserver.exe -createbins -verbose 2</pre><br />
It will take a while but should populate SERVER-BIN-DIR.<br />
<br />
Next, run <pre>ouroboros_debug.exe -console -createbins -verbose 2 -project cov</pre><br />
This will again take a while and populate CLIENT-BIN-DIR. The client will close automatically when finished. I recommend using project cov, or some other throwaway project, for all non-production client use to avoid it accidentally messing up your main install settings. ''You MUST use ouroboros_debug not ouroboros, as the production client won't look for the server data folders.''<br />
<br />
'''Note: Both mapserver and ouroboros_debug will spew out errors, we will eventually track down and fix all these'''<br />
<br />
To make changes, copy the file you want to edit from SERVER-DATA-DIR to the same place in LOCAL-DATA-DIR and edit it, then rebuild bins by running mapserver and/or ouroboros-test as needed, without the -createbins argument.<br />
Note that some files created in SERVER-BIN-DIR need to be copied to CLIENT-BIN-DIR as they are shared between server and client. These bins are the ones that are in your original bins.pigg.<br />
<br />
You should be able to run the server and client as normal from this setup, but I don't recommend it for a production server: test things then copy your new bins to a normal setup that uses piggs.<br />
<br />
<br />
[[Category:Bubble's Notes]]</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Server_Setup_for_Making_Bins&diff=1917Server Setup for Making Bins2019-12-04T17:14:30Z<p>Darwinasm86: </p>
<hr />
<div>This is a work in progress<br />
<br />
Dependencies:<br />
<br />
NOTE: This assumes building an i24 Ouroboros Server<br />
<br />
* Setup an i24 Ouro Server as per https://ourowiki.ouro-comdev.com/index.php?title=Volume_2_Server_Setup<br />
<br />
NOTE: For binning to work, you must compile from source (x86, Debug), this will generate the proper "Mapserver.exe" and "Ouroboros_Debug.exe" files. For traceability it is recommended to rename the "Mapserver.exe" to "Mapserver_Debug.exe"<br />
<br />
* You should end up with a directory structure similar to this IF you compile from source, and complete the server setup instructions:<br />
<br />
<pre><br />
F:\CoX <br />
F:\CoX\Source <br />
F:\CoX\Source\bin [We shall call this EXE-DIR]<br />
F:\CoX\Source\bin\piggs [We shall call this PIGG-DIR]<br />
F:\CoX\Source\bin\data [We shall call this DATA-DIR]<br />
F:\CoX\Source\bin\data\bin [We shall call this CLIENT-BIN-DIR]<br />
F:\CoX\Source\bin\data\server\bin [We shall call this SERVER-BIN-DIR]<br />
</pre><br />
<br />
<br />
* In EXE-DIR, create folders called localdata, serverdata and tools. Tools will be empty but it triggers search behaviour we want in the server.<br />
<br />
<pre><br />
F:\CoX\Source\bin\serverdata [We shall call this SERVER-DATA-DIR]<br />
F:\CoX\Source\bin\localdata [We shall call this LOCAL-DATA-DIR]<br />
F:\CoX\Source\bin\tools [We shall call this TOOL-DIR]<br />
</pre><br />
<br />
* Download Piglet https://build.ourodev.com/<br />
* Extract the ".pigg" files from the PIGG-DIR using Piglet, into the DATA-DIR, then delete the piggs folder.<br />
* To do this, Run Piglet, File Open Folder, select the "PIGG-DIR", Select Folder, Click on the top level folder in the upper left of the Piglet window, right click and export to the "Data-Dir"<br />
<br />
* Download the full data set, and extract to SERVER-DATA-DIR. At present this means downloading the following from the [https://ourowiki.ouro-comdev.com/index.php?title=Magnet_Links magnet links] page:<br />
** Paragon Data Directory Dump (Faptastic)<br />
** Paragon Data Directory Dump - missing data (Voldemort)<br />
<br />
* Download 5-17 from the same page, and extract dbidmaps.7z to SERVER-DATA-DIR/Defs/dbidmaps/. <br />
NOTE: Do not extract tricks.7z, it is no longer required.<br />
<br />
You should now have something like this:<br />
<pre><br />
F:\CoX\Source\Bin\serverdata\AccountServer<br />
F:\CoX\Source\Bin\serverdata\AIScript<br />
...<br />
...<br />
F:\CoX\Source\Bin\serverdata\texture_library<br />
F:\CoX\Source\Bin\serverdata\tricks<br />
</pre><br />
<br />
Delete the bin files from CLIENT-BIN-DIR and SERVER-BIN-DIR<br />
<br />
Delete these from the SERVER-DATA folder:<br />
<pre><br />
object_library/Omni/EncounterSpawns/V_Atmospheric/*<br />
texture_library/MAPS/city/Map_City_05_03.texture<br />
</pre><br />
<br />
Move the entire object_library folder from SERVER-DATA-DIR to DATA-DIR to prevent the mapserver crashing when making geobins. Overwrite any files already there from the piggs.<br />
<br />
<br />
<br />
NOTE: At the time of this update, bullets 1 & 3 seem irrelevant now, however it doesn't hurt to execute the second bullet which will also require you to create a folder "City_01_05" under the "City_Zones" directory.<br />
''Todo: find a better solution for this:''<br />
* City_01_05 (Echo of Atlas Park) and some RP maps seem to be missing.<br />
* Create a blank text file at SERVER-DATA-DIR/maps/City_Zones/City_01_05/City_01_05.txt<br />
* Remove the following section from DATA-DIR/server/db/maps.db:<br />
<pre><br />
Container 120<br />
MapName "maps/rp/fire/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 121<br />
MapName "maps/rp/luau/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 122<br />
MapName "maps/rp/harvest/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 123<br />
MapName "maps/rp/halloween/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 124<br />
MapName "maps/rp/winter/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
</pre><br />
<br />
<br />
{| class="wikitable" style="width:50%;"<br />
! IMPORTANT<br />
|-<br />
|''If you are running the mapserver to make bins and there are other mapservers running on the same machine, you must add '''-nosharedmemory''' to the command line to ensure it loads the files from disk, not from the mapserver shared memory pool. This is not required when using -createbins as that turns off shared memory implicitly.''<br />
|}<br />
<br />
From the command line navigate to EXE-DIR and run <pre>mapserver.exe -createbins -verbose 2</pre><br />
It will take a while but should populate SERVER-BIN-DIR.<br />
<br />
Next, run <pre>ouroboros_debug.exe -console -createbins -verbose 2 -project cov</pre><br />
This will again take a while and populate CLIENT-BIN-DIR. The client will close automatically when finished. I recommend using project cov, or some other throwaway project, for all non-production client use to avoid it accidentally messing up your main install settings. ''You MUST use ouroboros_debug not ouroboros, as the production client won't look for the server data folders.''<br />
<br />
'''Note: Both mapserver and ouroboros_debug will spew out errors, we will eventually track down and fix all these'''<br />
<br />
To make changes, copy the file you want to edit from SERVER-DATA-DIR to the same place in LOCAL-DATA-DIR and edit it, then rebuild bins by running mapserver and/or ouroboros-test as needed, without the -createbins argument.<br />
Note that some files created in SERVER-BIN-DIR need to be copied to CLIENT-BIN-DIR as they are shared between server and client. These bins are the ones that are in your original bins.pigg.<br />
<br />
You should be able to run the server and client as normal from this setup, but I don't recommend it for a production server: test things then copy your new bins to a normal setup that uses piggs.<br />
<br />
<br />
[[Category:Bubble's Notes]]</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Server_Setup_for_Making_Bins&diff=1916Server Setup for Making Bins2019-12-04T17:13:36Z<p>Darwinasm86: </p>
<hr />
<div>This is a work in progress<br />
<br />
Dependencies:<br />
<br />
NOTE: This assumes building an i24 Ouroboros Server<br />
<br />
* Setup an i24 Ouro Server as per https://ourowiki.ouro-comdev.com/index.php?title=Volume_2_Server_Setup<br />
<br />
NOTE: For binning to work, you must compile from source (x86, Debug), this will generate the proper "Mapserver.exe" and "Ouroboros_Debug.exe" files. For traceability it is recommended to rename the "Mapserver.exe" to "Mapserver_Debug.exe"<br />
<br />
* You should end up with a directory structure similar to this IF you compile from source, and complete the server setup instructions:<br />
<br />
<pre><br />
F:\CoX <br />
F:\CoX\Source <br />
F:\CoX\Source\bin [We shall call this EXE-DIR]<br />
F:\CoX\Source\bin\piggs [We shall call this PIGG-DIR]<br />
F:\CoX\Source\bin\data [We shall call this DATA-DIR]<br />
F:\CoX\Source\bin\data\bin [We shall call this CLIENT-BIN-DIR]<br />
F:\CoX\Source\bin\data\server\bin [We shall call this SERVER-BIN-DIR]<br />
</pre><br />
<br />
<br />
* In EXE-DIR, create folders called localdata, serverdata and tools. Tools will be empty but it triggers search behaviour we want in the server.<br />
<br />
<pre><br />
F:\CoX\Source\bin\serverdata [We shall call this SERVER-DATA-DIR]<br />
F:\CoX\Source\bin\localdata [We shall call this LOCAL-DATA-DIR]<br />
F:\CoX\Source\bin\tools [We shall call this TOOL-DIR]<br />
</pre><br />
<br />
* Download Piglet https://build.ourodev.com/<br />
* Extract the ".pigg" files from the PIGG-DIR using Piglet, into the DATA-DIR, then delete the piggs folder.<br />
* To do this, Run Piglet, File Open Folder, select the "PIGG-DIR", Select Folder, Click on the top level folder in the upper left of the Piglet window, right click and export to the "Data-Dir"<br />
<br />
* Download the full data set, and extract to SERVER-DATA-DIR. At present this means downloading the following from the [https://ourowiki.ouro-comdev.com/index.php?title=Magnet_Links magnet links] page:<br />
#* Paragon Data Directory Dump (Faptastic)<br />
#* Paragon Data Directory Dump - missing data (Voldemort)<br />
<br />
* Download 5-17 from the same page, and extract dbidmaps.7z to SERVER-DATA-DIR/Defs/dbidmaps/. <br />
NOTE: Do not extract tricks.7z, it is no longer required.<br />
<br />
You should now have something like this:<br />
<pre><br />
F:\CoX\Source\Bin\serverdata\AccountServer<br />
F:\CoX\Source\Bin\serverdata\AIScript<br />
...<br />
...<br />
F:\CoX\Source\Bin\serverdata\texture_library<br />
F:\CoX\Source\Bin\serverdata\tricks<br />
</pre><br />
<br />
Delete the bin files from CLIENT-BIN-DIR and SERVER-BIN-DIR<br />
<br />
Delete these from the SERVER-DATA folder:<br />
<pre><br />
object_library/Omni/EncounterSpawns/V_Atmospheric/*<br />
texture_library/MAPS/city/Map_City_05_03.texture<br />
</pre><br />
<br />
Move the entire object_library folder from SERVER-DATA-DIR to DATA-DIR to prevent the mapserver crashing when making geobins. Overwrite any files already there from the piggs.<br />
<br />
<br />
<br />
NOTE: At the time of this update, bullets 1 & 3 seem irrelevant now, however it doesn't hurt to execute the second bullet which will also require you to create a folder "City_01_05" under the "City_Zones" directory.<br />
''Todo: find a better solution for this:''<br />
* City_01_05 (Echo of Atlas Park) and some RP maps seem to be missing.<br />
* Create a blank text file at SERVER-DATA-DIR/maps/City_Zones/City_01_05/City_01_05.txt<br />
* Remove the following section from DATA-DIR/server/db/maps.db:<br />
<pre><br />
Container 120<br />
MapName "maps/rp/fire/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 121<br />
MapName "maps/rp/luau/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 122<br />
MapName "maps/rp/harvest/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 123<br />
MapName "maps/rp/halloween/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 124<br />
MapName "maps/rp/winter/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
</pre><br />
<br />
<br />
{| class="wikitable" style="width:50%;"<br />
! IMPORTANT<br />
|-<br />
|''If you are running the mapserver to make bins and there are other mapservers running on the same machine, you must add '''-nosharedmemory''' to the command line to ensure it loads the files from disk, not from the mapserver shared memory pool. This is not required when using -createbins as that turns off shared memory implicitly.''<br />
|}<br />
<br />
From the command line navigate to EXE-DIR and run <pre>mapserver.exe -createbins -verbose 2</pre><br />
It will take a while but should populate SERVER-BIN-DIR.<br />
<br />
Next, run <pre>ouroboros_debug.exe -console -createbins -verbose 2 -project cov</pre><br />
This will again take a while and populate CLIENT-BIN-DIR. The client will close automatically when finished. I recommend using project cov, or some other throwaway project, for all non-production client use to avoid it accidentally messing up your main install settings. ''You MUST use ouroboros_debug not ouroboros, as the production client won't look for the server data folders.''<br />
<br />
'''Note: Both mapserver and ouroboros_debug will spew out errors, we will eventually track down and fix all these'''<br />
<br />
To make changes, copy the file you want to edit from SERVER-DATA-DIR to the same place in LOCAL-DATA-DIR and edit it, then rebuild bins by running mapserver and/or ouroboros-test as needed, without the -createbins argument.<br />
Note that some files created in SERVER-BIN-DIR need to be copied to CLIENT-BIN-DIR as they are shared between server and client. These bins are the ones that are in your original bins.pigg.<br />
<br />
You should be able to run the server and client as normal from this setup, but I don't recommend it for a production server: test things then copy your new bins to a normal setup that uses piggs.<br />
<br />
<br />
[[Category:Bubble's Notes]]</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Server_Setup_for_Making_Bins&diff=1915Server Setup for Making Bins2019-12-04T17:11:27Z<p>Darwinasm86: </p>
<hr />
<div>This is a work in progress<br />
<br />
Dependencies:<br />
<br />
NOTE: This assumes building an i24 Ouroboros Server<br />
<br />
* Setup an i24 Ouro Server as per https://ourowiki.ouro-comdev.com/index.php?title=Volume_2_Server_Setup<br />
<br />
NOTE: For binning to work, you must compile from source (x86, Debug), this will generate the proper "Mapserver.exe" and "Ouroboros_Debug.exe" files. For traceability it is recommended to rename the "Mapserver.exe" to "Mapserver_Debug.exe"<br />
<br />
* You should end up with a directory structure similar to this IF you compile from source, and complete the server setup instructions:<br />
<br />
<pre><br />
F:\CoX <br />
F:\CoX\Source <br />
F:\CoX\Source\bin [We shall call this EXE-DIR]<br />
F:\CoX\Source\bin\piggs [We shall call this PIGG-DIR]<br />
F:\CoX\Source\bin\data [We shall call this DATA-DIR]<br />
F:\CoX\Source\bin\data\bin [We shall call this CLIENT-BIN-DIR]<br />
F:\CoX\Source\bin\data\server\bin [We shall call this SERVER-BIN-DIR]<br />
</pre><br />
<br />
<br />
* In EXE-DIR, create folders called localdata, serverdata and tools. Tools will be empty but it triggers search behaviour we want in the server.<br />
<br />
<pre><br />
F:\CoX\Source\bin\serverdata [We shall call this SERVER-DATA-DIR]<br />
F:\CoX\Source\bin\localdata [We shall call this LOCAL-DATA-DIR]<br />
F:\CoX\Source\bin\tools [We shall call this TOOL-DIR]<br />
</pre><br />
<br />
* Download Piglet https://build.ourodev.com/<br />
* Extract the ".pigg" files from the PIGG-DIR using Piglet, into the DATA-DIR, then delete the piggs folder.<br />
* To do this, Run Piglet, File Open Folder, select the "PIGG-DIR", Select Folder, Click on the top level folder in the upper left of the Piglet window, right click and export to the "Data-Dir"<br />
<br />
* Download the full data set, and extract to SERVER-DATA-DIR. At present this means downloading the following from the [https://ourowiki.ouro-comdev.com/index.php?title=Magnet_Links magnet links] page:<br />
<br />
#* Paragon Data Directory Dump (Faptastic)<br />
#* Paragon Data Directory Dump - missing data (Voldemort)<br />
<br />
* Download 5-17 from the same page, and extract dbidmaps.7z to SERVER-DATA-DIR/Defs/dbidmaps/. <br />
NOTE: Do not extract tricks.7z, it is no longer required.<br />
<br />
You should now have something like this:<br />
<pre><br />
F:\CoX\Source\Bin\serverdata\AccountServer<br />
F:\CoX\Source\Bin\serverdata\AIScript<br />
...<br />
...<br />
F:\CoX\Source\Bin\serverdata\texture_library<br />
F:\CoX\Source\Bin\serverdata\tricks<br />
</pre><br />
<br />
Delete the bin files from CLIENT-BIN-DIR and SERVER-BIN-DIR<br />
<br />
Delete these from the SERVER-DATA folder:<br />
<pre><br />
object_library/Omni/EncounterSpawns/V_Atmospheric/*<br />
texture_library/MAPS/city/Map_City_05_03.texture<br />
</pre><br />
<br />
Move the entire object_library folder from SERVER-DATA-DIR to DATA-DIR to prevent the mapserver crashing when making geobins. Overwrite any files already there from the piggs.<br />
<br />
<br />
<br />
NOTE: At the time of this update, bullets 1 & 3 seem irrelevant now, however it doesn't hurt to execute the second bullet which will also require you to create a folder "City_01_05" under the "City_Zones" directory.<br />
''Todo: find a better solution for this:''<br />
* City_01_05 (Echo of Atlas Park) and some RP maps seem to be missing.<br />
* Create a blank text file at SERVER-DATA-DIR/maps/City_Zones/City_01_05/City_01_05.txt<br />
* Remove the following section from DATA-DIR/server/db/maps.db:<br />
<pre><br />
Container 120<br />
MapName "maps/rp/fire/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 121<br />
MapName "maps/rp/luau/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 122<br />
MapName "maps/rp/harvest/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 123<br />
MapName "maps/rp/halloween/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 124<br />
MapName "maps/rp/winter/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
</pre><br />
<br />
<br />
{| class="wikitable" style="width:50%;"<br />
! IMPORTANT<br />
|-<br />
|''If you are running the mapserver to make bins and there are other mapservers running on the same machine, you must add '''-nosharedmemory''' to the command line to ensure it loads the files from disk, not from the mapserver shared memory pool. This is not required when using -createbins as that turns off shared memory implicitly.''<br />
|}<br />
<br />
From the command line navigate to EXE-DIR and run <pre>mapserver.exe -createbins -verbose 2</pre><br />
It will take a while but should populate SERVER-BIN-DIR.<br />
<br />
Next, run <pre>ouroboros_debug.exe -console -createbins -verbose 2 -project cov</pre><br />
This will again take a while and populate CLIENT-BIN-DIR. The client will close automatically when finished. I recommend using project cov, or some other throwaway project, for all non-production client use to avoid it accidentally messing up your main install settings. ''You MUST use ouroboros_debug not ouroboros, as the production client won't look for the server data folders.''<br />
<br />
'''Note: Both mapserver and ouroboros_debug will spew out errors, we will eventually track down and fix all these'''<br />
<br />
To make changes, copy the file you want to edit from SERVER-DATA-DIR to the same place in LOCAL-DATA-DIR and edit it, then rebuild bins by running mapserver and/or ouroboros-test as needed, without the -createbins argument.<br />
Note that some files created in SERVER-BIN-DIR need to be copied to CLIENT-BIN-DIR as they are shared between server and client. These bins are the ones that are in your original bins.pigg.<br />
<br />
You should be able to run the server and client as normal from this setup, but I don't recommend it for a production server: test things then copy your new bins to a normal setup that uses piggs.<br />
<br />
<br />
[[Category:Bubble's Notes]]</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Server_Setup_for_Making_Bins&diff=1914Server Setup for Making Bins2019-12-04T17:10:33Z<p>Darwinasm86: </p>
<hr />
<div>This is a work in progress<br />
<br />
Dependencies:<br />
<br />
NOTE: This assumes building an i24 Ouroboros Server<br />
<br />
* Setup an i24 Ouro Server as per https://ourowiki.ouro-comdev.com/index.php?title=Volume_2_Server_Setup<br />
<br />
NOTE: For binning to work, you must compile from source (x86, Debug), this will generate the proper "Mapserver.exe" and "Ouroboros_Debug.exe" files. For traceability it is recommended to rename the "Mapserver.exe" to "Mapserver_Debug.exe"<br />
<br />
* You should end up with a directory structure similar to this IF you compile from source, and complete the server setup instructions:<br />
<br />
<pre><br />
F:\CoX <br />
F:\CoX\Source <br />
F:\CoX\Source\bin [We shall call this EXE-DIR]<br />
F:\CoX\Source\bin\piggs [We shall call this PIGG-DIR]<br />
F:\CoX\Source\bin\data [We shall call this DATA-DIR]<br />
F:\CoX\Source\bin\data\bin [We shall call this CLIENT-BIN-DIR]<br />
F:\CoX\Source\bin\data\server\bin [We shall call this SERVER-BIN-DIR]<br />
</pre><br />
<br />
<br />
* In EXE-DIR, create folders called localdata, serverdata and tools. Tools will be empty but it triggers search behaviour we want in the server.<br />
<br />
<pre><br />
F:\CoX\Source\bin\serverdata [We shall call this SERVER-DATA-DIR]<br />
F:\CoX\Source\bin\localdata [We shall call this LOCAL-DATA-DIR]<br />
F:\CoX\Source\bin\tools [We shall call this TOOL-DIR]<br />
</pre><br />
<br />
* Download Piglet https://build.ourodev.com/<br />
* Extract the ".pigg" files from the PIGG-DIR using Piglet, into the DATA-DIR, then delete the piggs folder.<br />
* To do this, Run Piglet, File Open Folder, select the "PIGG-DIR", Select Folder, Click on the top level folder in the upper left of the Piglet window, right click and export to the "Data-Dir"<br />
<br />
<br />
* Download the full data set, and extract to SERVER-DATA-DIR. At present this means downloading the following from the [https://ourowiki.ouro-comdev.com/index.php?title=Magnet_Links magnet links] page:<br />
<br />
* Paragon Data Directory Dump (Faptastic)<br />
* Paragon Data Directory Dump - missing data (Voldemort)<br />
<br />
* Download 5-17 from the same page, and extract dbidmaps.7z to SERVER-DATA-DIR/Defs/dbidmaps/. <br />
NOTE: Do not extract tricks.7z, it is no longer required.<br />
<br />
You should now have something like this:<br />
<pre><br />
F:\CoX\Source\Bin\serverdata\AccountServer<br />
F:\CoX\Source\Bin\serverdata\AIScript<br />
...<br />
...<br />
F:\CoX\Source\Bin\serverdata\texture_library<br />
F:\CoX\Source\Bin\serverdata\tricks<br />
</pre><br />
<br />
Delete the bin files from CLIENT-BIN-DIR and SERVER-BIN-DIR<br />
<br />
Delete these from the SERVER-DATA folder:<br />
<pre><br />
object_library/Omni/EncounterSpawns/V_Atmospheric/*<br />
texture_library/MAPS/city/Map_City_05_03.texture<br />
</pre><br />
<br />
Move the entire object_library folder from SERVER-DATA-DIR to DATA-DIR to prevent the mapserver crashing when making geobins. Overwrite any files already there from the piggs.<br />
<br />
<br />
<br />
NOTE: At the time of this update, bullets 1 & 3 seem irrelevant now, however it doesn't hurt to execute the second bullet which will also require you to create a folder "City_01_05" under the "City_Zones" directory.<br />
''Todo: find a better solution for this:''<br />
* City_01_05 (Echo of Atlas Park) and some RP maps seem to be missing.<br />
* Create a blank text file at SERVER-DATA-DIR/maps/City_Zones/City_01_05/City_01_05.txt<br />
* Remove the following section from DATA-DIR/server/db/maps.db:<br />
<pre><br />
Container 120<br />
MapName "maps/rp/fire/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 121<br />
MapName "maps/rp/luau/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 122<br />
MapName "maps/rp/harvest/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 123<br />
MapName "maps/rp/halloween/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 124<br />
MapName "maps/rp/winter/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
</pre><br />
<br />
<br />
{| class="wikitable" style="width:50%;"<br />
! IMPORTANT<br />
|-<br />
|''If you are running the mapserver to make bins and there are other mapservers running on the same machine, you must add '''-nosharedmemory''' to the command line to ensure it loads the files from disk, not from the mapserver shared memory pool. This is not required when using -createbins as that turns off shared memory implicitly.''<br />
|}<br />
<br />
From the command line navigate to EXE-DIR and run <pre>mapserver.exe -createbins -verbose 2</pre><br />
It will take a while but should populate SERVER-BIN-DIR.<br />
<br />
Next, run <pre>ouroboros_debug.exe -console -createbins -verbose 2 -project cov</pre><br />
This will again take a while and populate CLIENT-BIN-DIR. The client will close automatically when finished. I recommend using project cov, or some other throwaway project, for all non-production client use to avoid it accidentally messing up your main install settings. ''You MUST use ouroboros_debug not ouroboros, as the production client won't look for the server data folders.''<br />
<br />
'''Note: Both mapserver and ouroboros_debug will spew out errors, we will eventually track down and fix all these'''<br />
<br />
To make changes, copy the file you want to edit from SERVER-DATA-DIR to the same place in LOCAL-DATA-DIR and edit it, then rebuild bins by running mapserver and/or ouroboros-test as needed, without the -createbins argument.<br />
Note that some files created in SERVER-BIN-DIR need to be copied to CLIENT-BIN-DIR as they are shared between server and client. These bins are the ones that are in your original bins.pigg.<br />
<br />
You should be able to run the server and client as normal from this setup, but I don't recommend it for a production server: test things then copy your new bins to a normal setup that uses piggs.<br />
<br />
<br />
[[Category:Bubble's Notes]]</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Server_Setup_for_Making_Bins&diff=1913Server Setup for Making Bins2019-12-04T17:02:03Z<p>Darwinasm86: </p>
<hr />
<div>This is a work in progress<br />
<br />
Dependencies:<br />
<br />
NOTE: This assumes building an i24 Ouroboros Server<br />
<br />
* Setup an i24 Ouro Server as per https://ourowiki.ouro-comdev.com/index.php?title=Volume_2_Server_Setup<br />
<br />
NOTE: For binning to work, you must compile from source (x86, Debug), this will generate the proper "Mapserver.exe" and "Ouroboros_Debug.exe" files. For traceability it is recommended to rename the "Mapserver.exe" to "Mapserver_Debug.exe"<br />
<br />
* You should end up with a directory structure similar to this IF you compile from source, and complete the server setup instructions:<br />
<br />
<pre><br />
F:\CoX <br />
F:\CoX\Source <br />
F:\CoX\Source\bin [We shall call this EXE-DIR]<br />
F:\CoX\Source\bin\piggs [We shall call this PIGG-DIR]<br />
F:\CoX\Source\bin\data [We shall call this DATA-DIR]<br />
F:\CoX\Source\bin\data\bin [We shall call this CLIENT-BIN-DIR]<br />
F:\CoX\Source\bin\data\server\bin [We shall call this SERVER-BIN-DIR]<br />
</pre><br />
<br />
<br />
* In EXE-DIR, create folders called localdata, serverdata and tools. Tools will be empty but it triggers search behaviour we want in the server.<br />
<br />
<pre><br />
F:\CoX\Source\bin\serverdata [We shall call this SERVER-DATA-DIR]<br />
F:\CoX\Source\bin\localdata [We shall call this LOCAL-DATA-DIR]<br />
F:\CoX\Source\bin\tools [We shall call this TOOL-DIR]<br />
</pre><br />
<br />
* Download Piglet https://build.ourodev.com/archives/<br />
* Extract the ".pigg" files from the PIGG-DIR using Piglet, into the DATA-DIR, then delete the piggs folder.<br />
* To do this, Run Piglet, File Open Folder, select the "PIGG-DIR", Select Folder, Click on the top level folder in the upper left of the Piglet window, right click and export to the "Data-Dir"<br />
<br />
<br />
Download the full data set, and put it into SERVER-DATA-DIR. At present this means downloading the following from the [https://ourowiki.ouro-comdev.com/index.php?title=Magnet_Links magnet links] page:<br />
<br />
* Paragon Data Directory Dump (Faptastic)<br />
* Paragon Data Directory Dump - missing data (Voldemort)<br />
<s><br />
* [https://www.dropbox.com/s/doma9x1i25ce7md/TRICKS-Full.7z?dl=0 TRICKS-Full.7z]<br />
* [https://www.dropbox.com/s/g92rnu9biy0ezaz/FX-part.7z?dl=0 FX-part.7z]<br />
</s><br />
<br />
Download 5-17 from the same page, and extract dbidmaps.7z to SERVER-DATA-DIR/Defs/dbidmaps/. Do not extract tricks.7z, it is no longer required.<br />
<br />
<s>'''Important: put tricks-full in place FIRST, then tricks on top, overwriting anything it asks you to - tricks-full does not contain tricks in some files for some reason'''</s><br />
<br />
You should now have something like this:<br />
<pre><br />
F:\CoX\Source\Bin\serverdata\AccountServer<br />
F:\CoX\Source\Bin\serverdata\AIScript<br />
...<br />
...<br />
F:\CoX\Source\Bin\serverdata\texture_library<br />
F:\CoX\Source\Bin\serverdata\tricks<br />
</pre><br />
<br />
Delete the bin files from CLIENT-BIN-DIR and SERVER-BIN-DIR<br />
<br />
Delete these from the SERVER-DATA folder:<br />
<pre><br />
object_library/Omni/EncounterSpawns/V_Atmospheric/*<br />
texture_library/MAPS/city/Map_City_05_03.texture<br />
</pre><br />
<br />
Move the entire object_library folder from SERVER-DATA-DIR to DATA-DIR to prevent the mapserver crashing when making geobins. Overwrite any files already there from the piggs.<br />
<br />
<br />
<br />
NOTE: At the time of this update, bullets 1 & 3 seem irrelevant now, however it doesn't hurt to execute the second bullet which will also require you to create a folder "City_01_05" under the "City_Zones" directory.<br />
''Todo: find a better solution for this:''<br />
* City_01_05 (Echo of Atlas Park) and some RP maps seem to be missing.<br />
* Create a blank text file at SERVER-DATA-DIR/maps/City_Zones/City_01_05/City_01_05.txt<br />
* Remove the following section from DATA-DIR/server/db/maps.db:<br />
<pre><br />
Container 120<br />
MapName "maps/rp/fire/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 121<br />
MapName "maps/rp/luau/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 122<br />
MapName "maps/rp/harvest/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 123<br />
MapName "maps/rp/halloween/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 124<br />
MapName "maps/rp/winter/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
</pre><br />
<br />
<br />
{| class="wikitable" style="width:50%;"<br />
! IMPORTANT<br />
|-<br />
|''If you are running the mapserver to make bins and there are other mapservers running on the same machine, you must add '''-nosharedmemory''' to the command line to ensure it loads the files from disk, not from the mapserver shared memory pool. This is not required when using -createbins as that turns off shared memory implicitly.''<br />
|}<br />
<br />
From the command line navigate to EXE-DIR and run <pre>mapserver.exe -createbins -verbose 2</pre><br />
It will take a while but should populate SERVER-BIN-DIR.<br />
<br />
Next, run <pre>ouroboros_debug.exe -console -createbins -verbose 2 -project cov</pre><br />
This will again take a while and populate CLIENT-BIN-DIR. The client will close automatically when finished. I recommend using project cov, or some other throwaway project, for all non-production client use to avoid it accidentally messing up your main install settings. ''You MUST use ouroboros_debug not ouroboros, as the production client won't look for the server data folders.''<br />
<br />
'''Note: Both mapserver and ouroboros_debug will spew out errors, we will eventually track down and fix all these'''<br />
<br />
To make changes, copy the file you want to edit from SERVER-DATA-DIR to the same place in LOCAL-DATA-DIR and edit it, then rebuild bins by running mapserver and/or ouroboros-test as needed, without the -createbins argument.<br />
Note that some files created in SERVER-BIN-DIR need to be copied to CLIENT-BIN-DIR as they are shared between server and client. These bins are the ones that are in your original bins.pigg.<br />
<br />
You should be able to run the server and client as normal from this setup, but I don't recommend it for a production server: test things then copy your new bins to a normal setup that uses piggs.<br />
<br />
<br />
[[Category:Bubble's Notes]]</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Server_Setup_for_Making_Bins&diff=1912Server Setup for Making Bins2019-12-04T16:57:47Z<p>Darwinasm86: </p>
<hr />
<div>This is a work in progress<br />
<br />
Dependencies:<br />
<br />
NOTE: This assumes building an i24 Ouroboros Server<br />
<br />
# Setup an i24 Ouro Server as per https://ourowiki.ouro-comdev.com/index.php?title=Volume_2_Server_Setup<br />
<br />
NOTE: For binning to work, you must compile from source (x86, Debug), this will generate the proper "Mapserver.exe" and "Ouroboros_Debug.exe" files. For traceability it is recommended to rename the "Mapserver.exe" to "Mapserver_Debug.exe"<br />
<br />
# You should end up with a directory structure similar to this IF you compile from source, and complete the server setup instructions:<br />
<br />
<pre><br />
F:\CoX <br />
F:\CoX\Source <br />
F:\CoX\Source\bin [We shall call this EXE-DIR]<br />
F:\CoX\Source\bin\piggs [We shall call this PIGG-DIR]<br />
F:\CoX\Source\bin\data [We shall call this DATA-DIR]<br />
F:\CoX\Source\bin\data\bin [We shall call this CLIENT-BIN-DIR]<br />
F:\CoX\Source\bin\data\server\bin [We shall call this SERVER-BIN-DIR]<br />
</pre><br />
<br />
<br />
# In EXE-DIR, create folders called localdata, serverdata and tools. Tools will be empty but it triggers search behaviour we want in the server.<br />
<br />
<pre><br />
F:\CoX\Source\bin\serverdata [We shall call this SERVER-DATA-DIR]<br />
F:\CoX\Source\bin\localdata [We shall call this LOCAL-DATA-DIR]<br />
F:\CoX\Source\bin\tools [We shall call this TOOL-DIR]<br />
</pre><br />
<br />
# Download Piglet https://build.ourodev.com/archives/<br />
# Extract the ".pigg" files from the PIGG-DIR using Piglet, into the DATA-DIR, then delete the piggs folder.<br />
# To do this, Run Piglet, File Open Folder, select the "PIGG-DIR", Select Folder, Click on the top level folder in the upper left of the Piglet window, right click and export to the "Data-Dir"<br />
<br />
<br />
Download the full data set, and put it into SERVER-DATA-DIR. At present this means downloading the following from the [https://ourowiki.ouro-comdev.com/index.php?title=Magnet_Links magnet links] page:<br />
<br />
# Paragon Data Directory Dump (Faptastic)<br />
# Paragon Data Directory Dump - missing data (Voldemort)<br />
<s><br />
* [https://www.dropbox.com/s/doma9x1i25ce7md/TRICKS-Full.7z?dl=0 TRICKS-Full.7z]<br />
* [https://www.dropbox.com/s/g92rnu9biy0ezaz/FX-part.7z?dl=0 FX-part.7z]<br />
</s><br />
<br />
Download 5-17 from the same page, and extract dbidmaps.7z to SERVER-DATA-DIR/Defs/dbidmaps/. Do not extract tricks.7z, it is no longer required.<br />
<br />
<s>'''Important: put tricks-full in place FIRST, then tricks on top, overwriting anything it asks you to - tricks-full does not contain tricks in some files for some reason'''</s><br />
<br />
You should now have something like this:<br />
<pre><br />
F:\CoX\Source\Bin\serverdata\AccountServer<br />
F:\CoX\Source\Bin\serverdata\AIScript<br />
...<br />
...<br />
F:\CoX\Source\Bin\serverdata\texture_library<br />
F:\CoX\Source\Bin\serverdata\tricks<br />
</pre><br />
<br />
Delete the bin files from CLIENT-BIN-DIR and SERVER-BIN-DIR<br />
<br />
Delete these from the SERVER-DATA folder:<br />
<pre><br />
object_library/Omni/EncounterSpawns/V_Atmospheric/*<br />
texture_library/MAPS/city/Map_City_05_03.texture<br />
</pre><br />
<br />
Move the entire object_library folder from SERVER-DATA-DIR to DATA-DIR to prevent the mapserver crashing when making geobins. Overwrite any files already there from the piggs.<br />
<br />
''Todo: find a better solution for this:''<br />
* City_01_05 (Echo of Atlas Park) and some RP maps seem to be missing.<br />
* Create a blank text file at SERVER-DATA-DIR/maps/City_Zones/City_01_05/City_01_05.txt<br />
* Remove the following section from DATA-DIR/server/db/maps.db:<br />
<pre><br />
Container 120<br />
MapName "maps/rp/fire/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 121<br />
MapName "maps/rp/luau/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 122<br />
MapName "maps/rp/harvest/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 123<br />
MapName "maps/rp/halloween/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 124<br />
MapName "maps/rp/winter/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
</pre><br />
<br />
<br />
{| class="wikitable" style="width:50%;"<br />
! IMPORTANT<br />
|-<br />
|''If you are running the mapserver to make bins and there are other mapservers running on the same machine, you must add '''-nosharedmemory''' to the command line to ensure it loads the files from disk, not from the mapserver shared memory pool. This is not required when using -createbins as that turns off shared memory implicitly.''<br />
|}<br />
<br />
From the command line navigate to EXE-DIR and run <pre>mapserver.exe -createbins -verbose 2</pre><br />
It will take a while but should populate SERVER-BIN-DIR.<br />
<br />
Next, run <pre>ouroboros_debug.exe -console -createbins -verbose 2 -project cov</pre><br />
This will again take a while and populate CLIENT-BIN-DIR. The client will close automatically when finished. I recommend using project cov, or some other throwaway project, for all non-production client use to avoid it accidentally messing up your main install settings. ''You MUST use ouroboros_debug not ouroboros, as the production client won't look for the server data folders.''<br />
<br />
'''Note: Both mapserver and ouroboros_debug will spew out errors, we will eventually track down and fix all these'''<br />
<br />
To make changes, copy the file you want to edit from SERVER-DATA-DIR to the same place in LOCAL-DATA-DIR and edit it, then rebuild bins by running mapserver and/or ouroboros-test as needed, without the -createbins argument.<br />
Note that some files created in SERVER-BIN-DIR need to be copied to CLIENT-BIN-DIR as they are shared between server and client. These bins are the ones that are in your original bins.pigg.<br />
<br />
You should be able to run the server and client as normal from this setup, but I don't recommend it for a production server: test things then copy your new bins to a normal setup that uses piggs.<br />
<br />
<br />
[[Category:Bubble's Notes]]</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Server_Setup_for_Making_Bins&diff=1911Server Setup for Making Bins2019-12-04T16:56:41Z<p>Darwinasm86: </p>
<hr />
<div>#### This is a work in progress ####<br />
<br />
Dependencies:<br />
<br />
NOTE: This assumes building an i24 Ouroboros Server<br />
<br />
* Setup an i24 Ouro Server as per https://ourowiki.ouro-comdev.com/index.php?title=Volume_2_Server_Setup<br />
<br />
NOTE: For binning to work, you must compile from source (x86, Debug), this will generate the proper "Mapserver.exe" and "Ouroboros_Debug.exe" files. For traceability it is recommended to rename the "Mapserver.exe" to "Mapserver_Debug.exe"<br />
<br />
* You should end up with a directory structure similar to this IF you compile from source, and complete the server setup instructions:<br />
<br />
<pre><br />
F:\CoX <br />
F:\CoX\Source <br />
F:\CoX\Source\bin [We shall call this EXE-DIR]<br />
F:\CoX\Source\bin\piggs [We shall call this PIGG-DIR]<br />
F:\CoX\Source\bin\data [We shall call this DATA-DIR]<br />
F:\CoX\Source\bin\data\bin [We shall call this CLIENT-BIN-DIR]<br />
F:\CoX\Source\bin\data\server\bin [We shall call this SERVER-BIN-DIR]<br />
</pre><br />
<br />
<br />
In EXE-DIR, create folders called localdata, serverdata and tools. Tools will be empty but it triggers search behaviour we want in the server.<br />
<br />
<pre><br />
F:\CoX\Source\bin\serverdata [We shall call this SERVER-DATA-DIR]<br />
F:\CoX\Source\bin\localdata [We shall call this LOCAL-DATA-DIR]<br />
F:\CoX\Source\bin\tools [We shall call this TOOL-DIR]<br />
</pre><br />
<br />
* Download Piglet https://build.ourodev.com/archives/<br />
* Extract the ".pigg" files from the PIGG-DIR using Piglet, into the DATA-DIR, then delete the piggs folder.<br />
* To do this, Run Piglet, File Open Folder, select the "PIGG-DIR", Select Folder, Click on the top level folder in the upper left of the Piglet window, right click and export to the "Data-Dir"<br />
<br />
<br />
Download the full data set, and put it into SERVER-DATA-DIR. At present this means downloading the following from the [https://ourowiki.ouro-comdev.com/index.php?title=Magnet_Links magnet links] page:<br />
<br />
* Paragon Data Directory Dump (Faptastic)<br />
* Paragon Data Directory Dump - missing data (Voldemort)<br />
<s><br />
* [https://www.dropbox.com/s/doma9x1i25ce7md/TRICKS-Full.7z?dl=0 TRICKS-Full.7z]<br />
* [https://www.dropbox.com/s/g92rnu9biy0ezaz/FX-part.7z?dl=0 FX-part.7z]<br />
</s><br />
<br />
Download 5-17 from the same page, and extract dbidmaps.7z to SERVER-DATA-DIR/Defs/dbidmaps/. Do not extract tricks.7z, it is no longer required.<br />
<br />
<s>'''Important: put tricks-full in place FIRST, then tricks on top, overwriting anything it asks you to - tricks-full does not contain tricks in some files for some reason'''</s><br />
<br />
You should now have something like this:<br />
<pre><br />
F:\CoX\Source\Bin\serverdata\AccountServer<br />
F:\CoX\Source\Bin\serverdata\AIScript<br />
...<br />
...<br />
F:\CoX\Source\Bin\serverdata\texture_library<br />
F:\CoX\Source\Bin\serverdata\tricks<br />
</pre><br />
<br />
Delete the bin files from CLIENT-BIN-DIR and SERVER-BIN-DIR<br />
<br />
Delete these from the SERVER-DATA folder:<br />
<pre><br />
object_library/Omni/EncounterSpawns/V_Atmospheric/*<br />
texture_library/MAPS/city/Map_City_05_03.texture<br />
</pre><br />
<br />
Move the entire object_library folder from SERVER-DATA-DIR to DATA-DIR to prevent the mapserver crashing when making geobins. Overwrite any files already there from the piggs.<br />
<br />
''Todo: find a better solution for this:''<br />
* City_01_05 (Echo of Atlas Park) and some RP maps seem to be missing.<br />
* Create a blank text file at SERVER-DATA-DIR/maps/City_Zones/City_01_05/City_01_05.txt<br />
* Remove the following section from DATA-DIR/server/db/maps.db:<br />
<pre><br />
Container 120<br />
MapName "maps/rp/fire/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 121<br />
MapName "maps/rp/luau/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 122<br />
MapName "maps/rp/harvest/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 123<br />
MapName "maps/rp/halloween/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 124<br />
MapName "maps/rp/winter/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
</pre><br />
<br />
<br />
{| class="wikitable" style="width:50%;"<br />
! IMPORTANT<br />
|-<br />
|''If you are running the mapserver to make bins and there are other mapservers running on the same machine, you must add '''-nosharedmemory''' to the command line to ensure it loads the files from disk, not from the mapserver shared memory pool. This is not required when using -createbins as that turns off shared memory implicitly.''<br />
|}<br />
<br />
From the command line navigate to EXE-DIR and run <pre>mapserver.exe -createbins -verbose 2</pre><br />
It will take a while but should populate SERVER-BIN-DIR.<br />
<br />
Next, run <pre>ouroboros_debug.exe -console -createbins -verbose 2 -project cov</pre><br />
This will again take a while and populate CLIENT-BIN-DIR. The client will close automatically when finished. I recommend using project cov, or some other throwaway project, for all non-production client use to avoid it accidentally messing up your main install settings. ''You MUST use ouroboros_debug not ouroboros, as the production client won't look for the server data folders.''<br />
<br />
'''Note: Both mapserver and ouroboros_debug will spew out errors, we will eventually track down and fix all these'''<br />
<br />
To make changes, copy the file you want to edit from SERVER-DATA-DIR to the same place in LOCAL-DATA-DIR and edit it, then rebuild bins by running mapserver and/or ouroboros-test as needed, without the -createbins argument.<br />
Note that some files created in SERVER-BIN-DIR need to be copied to CLIENT-BIN-DIR as they are shared between server and client. These bins are the ones that are in your original bins.pigg.<br />
<br />
You should be able to run the server and client as normal from this setup, but I don't recommend it for a production server: test things then copy your new bins to a normal setup that uses piggs.<br />
<br />
<br />
[[Category:Bubble's Notes]]</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Server_Setup_for_Making_Bins&diff=1910Server Setup for Making Bins2019-12-04T16:50:49Z<p>Darwinasm86: </p>
<hr />
<div><br />
Dependencies:<br />
<br />
NOTE: This assumes building an i24 Ouroboros Server<br />
<br />
* Setup an i24 Ouro Server as per https://ourowiki.ouro-comdev.com/index.php?title=Volume_2_Server_Setup<br />
<br />
NOTE: For binning to work, you must compile from source (x86, Debug), this will generate the proper "Mapserver.exe" and "Ouroboros_Debug.exe" files. For traceability it is recommended to rename the "Mapserver.exe" to "Mapserver_Debug.exe"<br />
<br />
* You should end up with a directory structure similar to this IF you compile from source, and complete the server setup instructions:<br />
<br />
<pre><br />
F:\CoX <br />
F:\CoX\Source <br />
F:\CoX\Source\bin [We shall call this EXE-DIR]<br />
F:\CoX\Source\bin\piggs [We shall call this PIGG-DIR]<br />
F:\CoX\Source\bin\data [We shall call this DATA-DIR]<br />
F:\CoX\Source\bin\data\bin [We shall call this CLIENT-BIN-DIR]<br />
F:\CoX\Source\bin\data\server\bin [We shall call this SERVER-BIN-DIR]<br />
</pre><br />
<br />
<br />
In EXE-DIR, create folders called localdata, serverdata and tools. Tools will be empty but it triggers search behaviour we want in the server.<br />
<br />
<pre><br />
F:\CoX\Source\bin\serverdata [We shall call this SERVER-DATA-DIR]<br />
F:\CoX\Source\bin\localdata [We shall call this LOCAL-DATA-DIR]<br />
F:\CoX\Source\bin\tools [We shall call this TOOL-DIR]<br />
</pre><br />
<br />
* Download Piglet https://build.ourodev.com/archives/<br />
* Extract the ".pigg" files from the PIGG-DIR using Piglet, into the DATA-DIR, then delete the piggs folder.<br />
* To do this, Run Piglet, File Open Folder, select the "PIGG-DIR", Select Folder, Click on the top level folder in the upper left of the Piglet window, right click and export to the "Data-Dir"<br />
<br />
<br />
Download the full data set, and put it into SERVER-DATA-DIR. At present this means downloading the following from the [https://ourowiki.ouro-comdev.com/index.php?title=Magnet_Links magnet links] page:<br />
* Paragon Data Directory Dump<br />
* Paragon Data Directory Dump - missing data<br />
<s><br />
* [https://www.dropbox.com/s/doma9x1i25ce7md/TRICKS-Full.7z?dl=0 TRICKS-Full.7z]<br />
* [https://www.dropbox.com/s/g92rnu9biy0ezaz/FX-part.7z?dl=0 FX-part.7z]<br />
</s><br />
<br />
Download 5-17 from the same page, and extract dbidmaps.7z to SERVER-DATA-DIR/Defs/dbidmaps/. Do not extract tricks.7z, it is no longer required.<br />
<br />
<s>'''Important: put tricks-full in place FIRST, then tricks on top, overwriting anything it asks you to - tricks-full does not contain tricks in some files for some reason'''</s><br />
<br />
You should now have something like this:<br />
<pre><br />
F:\CoX\Source\Bin\serverdata\AccountServer<br />
F:\CoX\Source\Bin\serverdata\AIScript<br />
...<br />
...<br />
F:\CoX\Source\Bin\serverdata\texture_library<br />
F:\CoX\Source\Bin\serverdata\tricks<br />
</pre><br />
<br />
Delete the bin files from CLIENT-BIN-DIR and SERVER-BIN-DIR<br />
<br />
Delete these from the SERVER-DATA folder:<br />
<pre><br />
object_library/Omni/EncounterSpawns/V_Atmospheric/*<br />
texture_library/MAPS/city/Map_City_05_03.texture<br />
</pre><br />
<br />
Move the entire object_library folder from SERVER-DATA-DIR to DATA-DIR to prevent the mapserver crashing when making geobins. Overwrite any files already there from the piggs.<br />
<br />
''Todo: find a better solution for this:''<br />
* City_01_05 (Echo of Atlas Park) and some RP maps seem to be missing.<br />
* Create a blank text file at SERVER-DATA-DIR/maps/City_Zones/City_01_05/City_01_05.txt<br />
* Remove the following section from DATA-DIR/server/db/maps.db:<br />
<pre><br />
Container 120<br />
MapName "maps/rp/fire/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 121<br />
MapName "maps/rp/luau/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 122<br />
MapName "maps/rp/harvest/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 123<br />
MapName "maps/rp/halloween/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 124<br />
MapName "maps/rp/winter/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
</pre><br />
<br />
<br />
{| class="wikitable" style="width:50%;"<br />
! IMPORTANT<br />
|-<br />
|''If you are running the mapserver to make bins and there are other mapservers running on the same machine, you must add '''-nosharedmemory''' to the command line to ensure it loads the files from disk, not from the mapserver shared memory pool. This is not required when using -createbins as that turns off shared memory implicitly.''<br />
|}<br />
<br />
From the command line navigate to EXE-DIR and run <pre>mapserver.exe -createbins -verbose 2</pre><br />
It will take a while but should populate SERVER-BIN-DIR.<br />
<br />
Next, run <pre>ouroboros_debug.exe -console -createbins -verbose 2 -project cov</pre><br />
This will again take a while and populate CLIENT-BIN-DIR. The client will close automatically when finished. I recommend using project cov, or some other throwaway project, for all non-production client use to avoid it accidentally messing up your main install settings. ''You MUST use ouroboros_debug not ouroboros, as the production client won't look for the server data folders.''<br />
<br />
'''Note: Both mapserver and ouroboros_debug will spew out errors, we will eventually track down and fix all these'''<br />
<br />
To make changes, copy the file you want to edit from SERVER-DATA-DIR to the same place in LOCAL-DATA-DIR and edit it, then rebuild bins by running mapserver and/or ouroboros-test as needed, without the -createbins argument.<br />
Note that some files created in SERVER-BIN-DIR need to be copied to CLIENT-BIN-DIR as they are shared between server and client. These bins are the ones that are in your original bins.pigg.<br />
<br />
You should be able to run the server and client as normal from this setup, but I don't recommend it for a production server: test things then copy your new bins to a normal setup that uses piggs.<br />
<br />
<br />
[[Category:Bubble's Notes]]</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Server_Setup_for_Making_Bins&diff=1909Server Setup for Making Bins2019-12-04T16:50:34Z<p>Darwinasm86: </p>
<hr />
<div><br />
Dependencies:<br />
<br />
NOTE: This assumes building an i24 Ouroboros Server<br />
<br />
* Setup an i24 Ouro Server as per https://ourowiki.ouro-comdev.com/index.php?title=Volume_2_Server_Setup<br />
<br />
NOTE: For binning to work, you must compile from source (x86, Debug), this will generate the proper "Mapserver.exe" and "Ouroboros_Debug.exe" files. For traceability it is recommended to rename the "Mapserver.exe" to "Mapserver_Debug.exe"<br />
<br />
* You should end up with a directory structure similar to this IF you compile from source, and complete the server setup instructions:<br />
<br />
<pre><br />
F:\CoX <br />
F:\CoX\Source <br />
F:\CoX\Source\bin [We shall call this EXE-DIR]<br />
F:\CoX\Source\bin\piggs [We shall call this PIGG-DIR]<br />
F:\CoX\Source\bin\data [We shall call this DATA-DIR]<br />
F:\CoX\Source\bin\data\bin [We shall call this CLIENT-BIN-DIR]<br />
F:\CoX\Source\bin\data\server\bin [We shall call this SERVER-BIN-DIR]<br />
</pre><br />
<br />
<br />
In EXE-DIR, create folders called localdata, serverdata and tools. Tools will be empty but it triggers search behaviour we want in the server.<br />
<br />
<pre><br />
F:\CoX\Source\bin\serverdata [We shall call this SERVER-DATA-DIR]<br />
F:\CoX\Source\bin\localdata [We shall call this LOCAL-DATA-DIR]<br />
F:\CoX\Source\bin\tools [We shall call this TOOL-DIR]<br />
</pre><br />
<br />
* Download Piglet https://build.ourodev.com/archives/<br />
* Extract the ".pigg" files from the PIGG-DIR using Piglet, into the DATA-DIR, then delete the piggs folder.<br />
*/To do this, Run Piglet, File Open Folder, select the "PIGG-DIR", Select Folder, Click on the top level folder in the upper left of the Piglet window, right click and export to the "Data-Dir"<br />
<br />
<br />
Download the full data set, and put it into SERVER-DATA-DIR. At present this means downloading the following from the [https://ourowiki.ouro-comdev.com/index.php?title=Magnet_Links magnet links] page:<br />
* Paragon Data Directory Dump<br />
* Paragon Data Directory Dump - missing data<br />
<s><br />
* [https://www.dropbox.com/s/doma9x1i25ce7md/TRICKS-Full.7z?dl=0 TRICKS-Full.7z]<br />
* [https://www.dropbox.com/s/g92rnu9biy0ezaz/FX-part.7z?dl=0 FX-part.7z]<br />
</s><br />
<br />
Download 5-17 from the same page, and extract dbidmaps.7z to SERVER-DATA-DIR/Defs/dbidmaps/. Do not extract tricks.7z, it is no longer required.<br />
<br />
<s>'''Important: put tricks-full in place FIRST, then tricks on top, overwriting anything it asks you to - tricks-full does not contain tricks in some files for some reason'''</s><br />
<br />
You should now have something like this:<br />
<pre><br />
F:\CoX\Source\Bin\serverdata\AccountServer<br />
F:\CoX\Source\Bin\serverdata\AIScript<br />
...<br />
...<br />
F:\CoX\Source\Bin\serverdata\texture_library<br />
F:\CoX\Source\Bin\serverdata\tricks<br />
</pre><br />
<br />
Delete the bin files from CLIENT-BIN-DIR and SERVER-BIN-DIR<br />
<br />
Delete these from the SERVER-DATA folder:<br />
<pre><br />
object_library/Omni/EncounterSpawns/V_Atmospheric/*<br />
texture_library/MAPS/city/Map_City_05_03.texture<br />
</pre><br />
<br />
Move the entire object_library folder from SERVER-DATA-DIR to DATA-DIR to prevent the mapserver crashing when making geobins. Overwrite any files already there from the piggs.<br />
<br />
''Todo: find a better solution for this:''<br />
* City_01_05 (Echo of Atlas Park) and some RP maps seem to be missing.<br />
* Create a blank text file at SERVER-DATA-DIR/maps/City_Zones/City_01_05/City_01_05.txt<br />
* Remove the following section from DATA-DIR/server/db/maps.db:<br />
<pre><br />
Container 120<br />
MapName "maps/rp/fire/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 121<br />
MapName "maps/rp/luau/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 122<br />
MapName "maps/rp/harvest/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 123<br />
MapName "maps/rp/halloween/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 124<br />
MapName "maps/rp/winter/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
</pre><br />
<br />
<br />
{| class="wikitable" style="width:50%;"<br />
! IMPORTANT<br />
|-<br />
|''If you are running the mapserver to make bins and there are other mapservers running on the same machine, you must add '''-nosharedmemory''' to the command line to ensure it loads the files from disk, not from the mapserver shared memory pool. This is not required when using -createbins as that turns off shared memory implicitly.''<br />
|}<br />
<br />
From the command line navigate to EXE-DIR and run <pre>mapserver.exe -createbins -verbose 2</pre><br />
It will take a while but should populate SERVER-BIN-DIR.<br />
<br />
Next, run <pre>ouroboros_debug.exe -console -createbins -verbose 2 -project cov</pre><br />
This will again take a while and populate CLIENT-BIN-DIR. The client will close automatically when finished. I recommend using project cov, or some other throwaway project, for all non-production client use to avoid it accidentally messing up your main install settings. ''You MUST use ouroboros_debug not ouroboros, as the production client won't look for the server data folders.''<br />
<br />
'''Note: Both mapserver and ouroboros_debug will spew out errors, we will eventually track down and fix all these'''<br />
<br />
To make changes, copy the file you want to edit from SERVER-DATA-DIR to the same place in LOCAL-DATA-DIR and edit it, then rebuild bins by running mapserver and/or ouroboros-test as needed, without the -createbins argument.<br />
Note that some files created in SERVER-BIN-DIR need to be copied to CLIENT-BIN-DIR as they are shared between server and client. These bins are the ones that are in your original bins.pigg.<br />
<br />
You should be able to run the server and client as normal from this setup, but I don't recommend it for a production server: test things then copy your new bins to a normal setup that uses piggs.<br />
<br />
<br />
[[Category:Bubble's Notes]]</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Server_Setup_for_Making_Bins&diff=1908Server Setup for Making Bins2019-12-04T16:45:27Z<p>Darwinasm86: </p>
<hr />
<div><br />
Dependencies:<br />
<br />
NOTE: This assumes building an i24 Ouroboros Server<br />
<br />
* Setup an i24 Ouro Server as per https://ourowiki.ouro-comdev.com/index.php?title=Volume_2_Server_Setup<br />
<br />
NOTE: For binning to work, you must compile from source (x86, Debug), this will generate the proper "Mapserver.exe" and "Ouroboros_Debug.exe" files. For traceability it is recommended to rename the "Mapserver.exe" to "Mapserver_Debug.exe"<br />
<br />
* You should end up with a directory structure similar to this IF you compile from source, and complete the server setup instructions:<br />
<br />
<pre><br />
F:\CoX <br />
F:\CoX\Source <br />
F:\CoX\Source\bin [We shall call this EXE-DIR]<br />
F:\CoX\Source\bin\piggs [We shall call this PIGG-DIR]<br />
F:\CoX\Source\bin\data [We shall call this DATA-DIR]<br />
F:\CoX\Source\bin\data\bin [We shall call this CLIENT-BIN-DIR]<br />
F:\CoX\Source\bin\data\server\bin [We shall call this SERVER-BIN-DIR]<br />
</pre><br />
<br />
In EXE-DIR, create folders called localdata, serverdata and tools. Tools will be empty but it triggers search behaviour we want in the server.<br />
<br />
<pre><br />
F:\CoX\Source\bin\serverdata [We shall call this SERVER-DATA-DIR]<br />
F:\CoX\Source\bin\localdata [We shall call this LOCAL-DATA-DIR]<br />
F:\CoX\Source\bin\tools [We shall call this TOOL-DIR]<br />
</pre><br />
<br />
* Download Piglet <Link><br />
* Extract the ".pigg" files from the PIGG-DIR using Piglet, into the DATA-DIR, then delete the piggs folder. <br />
<br />
Download the full data set, and put it into SERVER-DATA-DIR. At present this means downloading the following from the [https://ourowiki.ouro-comdev.com/index.php?title=Magnet_Links magnet links] page:<br />
* Paragon Data Directory Dump<br />
* Paragon Data Directory Dump - missing data<br />
<s><br />
* [https://www.dropbox.com/s/doma9x1i25ce7md/TRICKS-Full.7z?dl=0 TRICKS-Full.7z]<br />
* [https://www.dropbox.com/s/g92rnu9biy0ezaz/FX-part.7z?dl=0 FX-part.7z]<br />
</s><br />
<br />
Download 5-17 from the same page, and extract dbidmaps.7z to SERVER-DATA-DIR/Defs/dbidmaps/. Do not extract tricks.7z, it is no longer required.<br />
<br />
<s>'''Important: put tricks-full in place FIRST, then tricks on top, overwriting anything it asks you to - tricks-full does not contain tricks in some files for some reason'''</s><br />
<br />
You should now have something like this:<br />
<pre><br />
F:\CoX\Source\Bin\serverdata\AccountServer<br />
F:\CoX\Source\Bin\serverdata\AIScript<br />
...<br />
...<br />
F:\CoX\Source\Bin\serverdata\texture_library<br />
F:\CoX\Source\Bin\serverdata\tricks<br />
</pre><br />
<br />
Delete the bin files from CLIENT-BIN-DIR and SERVER-BIN-DIR<br />
<br />
Delete these from the SERVER-DATA folder:<br />
<pre><br />
object_library/Omni/EncounterSpawns/V_Atmospheric/*<br />
texture_library/MAPS/city/Map_City_05_03.texture<br />
</pre><br />
<br />
Move the entire object_library folder from SERVER-DATA-DIR to DATA-DIR to prevent the mapserver crashing when making geobins. Overwrite any files already there from the piggs.<br />
<br />
''Todo: find a better solution for this:''<br />
* City_01_05 (Echo of Atlas Park) and some RP maps seem to be missing.<br />
* Create a blank text file at SERVER-DATA-DIR/maps/City_Zones/City_01_05/City_01_05.txt<br />
* Remove the following section from DATA-DIR/server/db/maps.db:<br />
<pre><br />
Container 120<br />
MapName "maps/rp/fire/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 121<br />
MapName "maps/rp/luau/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 122<br />
MapName "maps/rp/harvest/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 123<br />
MapName "maps/rp/halloween/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 124<br />
MapName "maps/rp/winter/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
</pre><br />
<br />
<br />
{| class="wikitable" style="width:50%;"<br />
! IMPORTANT<br />
|-<br />
|''If you are running the mapserver to make bins and there are other mapservers running on the same machine, you must add '''-nosharedmemory''' to the command line to ensure it loads the files from disk, not from the mapserver shared memory pool. This is not required when using -createbins as that turns off shared memory implicitly.''<br />
|}<br />
<br />
From the command line navigate to EXE-DIR and run <pre>mapserver.exe -createbins -verbose 2</pre><br />
It will take a while but should populate SERVER-BIN-DIR.<br />
<br />
Next, run <pre>ouroboros_debug.exe -console -createbins -verbose 2 -project cov</pre><br />
This will again take a while and populate CLIENT-BIN-DIR. The client will close automatically when finished. I recommend using project cov, or some other throwaway project, for all non-production client use to avoid it accidentally messing up your main install settings. ''You MUST use ouroboros_debug not ouroboros, as the production client won't look for the server data folders.''<br />
<br />
'''Note: Both mapserver and ouroboros_debug will spew out errors, we will eventually track down and fix all these'''<br />
<br />
To make changes, copy the file you want to edit from SERVER-DATA-DIR to the same place in LOCAL-DATA-DIR and edit it, then rebuild bins by running mapserver and/or ouroboros-test as needed, without the -createbins argument.<br />
Note that some files created in SERVER-BIN-DIR need to be copied to CLIENT-BIN-DIR as they are shared between server and client. These bins are the ones that are in your original bins.pigg.<br />
<br />
You should be able to run the server and client as normal from this setup, but I don't recommend it for a production server: test things then copy your new bins to a normal setup that uses piggs.<br />
<br />
<br />
[[Category:Bubble's Notes]]</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Server_Setup_for_Making_Bins&diff=1907Server Setup for Making Bins2019-12-04T16:44:43Z<p>Darwinasm86: </p>
<hr />
<div><br />
Dependencies:<br />
<br />
NOTE: This assumes building an i24 Ouroboros Server<br />
<br />
* Setup an i24 Ouro Server as per https://ourowiki.ouro-comdev.com/index.php?title=Volume_2_Server_Setup<br />
<br />
NOTE: For binning to work, you must compile from source (x86, Debug), this will generate the proper "Mapserver.exe" and "Ouroboros_Debug.exe" files. For traceability it is recommended to rename the "Mapserver.exe" to "Mapserver_Debug.exe"<br />
<br />
* You should end up with a directory structure similar to this IF you compile from source<br />
<br />
<pre><br />
F:\CoX <br />
F:\CoX\Source <br />
F:\CoX\Source\bin [We shall call this EXE-DIR]<br />
F:\CoX\Source\bin\piggs [We shall call this PIGG-DIR]<br />
F:\CoX\Source\bin\data [We shall call this DATA-DIR]<br />
F:\CoX\Source\bin\data\bin [We shall call this CLIENT-BIN-DIR]<br />
F:\CoX\Source\bin\data\server\bin [We shall call this SERVER-BIN-DIR]<br />
</pre><br />
<br />
In EXE-DIR, create folders called localdata, serverdata and tools. Tools will be empty but it triggers search behaviour we want in the server.<br />
<br />
<pre><br />
F:\CoX\Source\bin\serverdata [We shall call this SERVER-DATA-DIR]<br />
F:\CoX\Source\bin\localdata [We shall call this LOCAL-DATA-DIR]<br />
F:\CoX\Source\bin\tools [We shall call this TOOL-DIR]<br />
</pre><br />
<br />
* Download Piglet <Link><br />
* Extract the ".pigg" files from the PIGG-DIR using Piglet, into the DATA-DIR, then delete the piggs folder. <br />
<br />
Download the full data set, and put it into SERVER-DATA-DIR. At present this means downloading the following from the [https://ourowiki.ouro-comdev.com/index.php?title=Magnet_Links magnet links] page:<br />
* Paragon Data Directory Dump<br />
* Paragon Data Directory Dump - missing data<br />
<s><br />
* [https://www.dropbox.com/s/doma9x1i25ce7md/TRICKS-Full.7z?dl=0 TRICKS-Full.7z]<br />
* [https://www.dropbox.com/s/g92rnu9biy0ezaz/FX-part.7z?dl=0 FX-part.7z]<br />
</s><br />
<br />
Download 5-17 from the same page, and extract dbidmaps.7z to SERVER-DATA-DIR/Defs/dbidmaps/. Do not extract tricks.7z, it is no longer required.<br />
<br />
<s>'''Important: put tricks-full in place FIRST, then tricks on top, overwriting anything it asks you to - tricks-full does not contain tricks in some files for some reason'''</s><br />
<br />
You should now have something like this:<br />
<pre><br />
F:\CoX\Source\Bin\serverdata\AccountServer<br />
F:\CoX\Source\Bin\serverdata\AIScript<br />
...<br />
...<br />
F:\CoX\Source\Bin\serverdata\texture_library<br />
F:\CoX\Source\Bin\serverdata\tricks<br />
</pre><br />
<br />
Delete the bin files from CLIENT-BIN-DIR and SERVER-BIN-DIR<br />
<br />
Delete these from the SERVER-DATA folder:<br />
<pre><br />
object_library/Omni/EncounterSpawns/V_Atmospheric/*<br />
texture_library/MAPS/city/Map_City_05_03.texture<br />
</pre><br />
<br />
Move the entire object_library folder from SERVER-DATA-DIR to DATA-DIR to prevent the mapserver crashing when making geobins. Overwrite any files already there from the piggs.<br />
<br />
''Todo: find a better solution for this:''<br />
* City_01_05 (Echo of Atlas Park) and some RP maps seem to be missing.<br />
* Create a blank text file at SERVER-DATA-DIR/maps/City_Zones/City_01_05/City_01_05.txt<br />
* Remove the following section from DATA-DIR/server/db/maps.db:<br />
<pre><br />
Container 120<br />
MapName "maps/rp/fire/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 121<br />
MapName "maps/rp/luau/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 122<br />
MapName "maps/rp/harvest/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 123<br />
MapName "maps/rp/halloween/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 124<br />
MapName "maps/rp/winter/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
</pre><br />
<br />
<br />
{| class="wikitable" style="width:50%;"<br />
! IMPORTANT<br />
|-<br />
|''If you are running the mapserver to make bins and there are other mapservers running on the same machine, you must add '''-nosharedmemory''' to the command line to ensure it loads the files from disk, not from the mapserver shared memory pool. This is not required when using -createbins as that turns off shared memory implicitly.''<br />
|}<br />
<br />
From the command line navigate to EXE-DIR and run <pre>mapserver.exe -createbins -verbose 2</pre><br />
It will take a while but should populate SERVER-BIN-DIR.<br />
<br />
Next, run <pre>ouroboros_debug.exe -console -createbins -verbose 2 -project cov</pre><br />
This will again take a while and populate CLIENT-BIN-DIR. The client will close automatically when finished. I recommend using project cov, or some other throwaway project, for all non-production client use to avoid it accidentally messing up your main install settings. ''You MUST use ouroboros_debug not ouroboros, as the production client won't look for the server data folders.''<br />
<br />
'''Note: Both mapserver and ouroboros_debug will spew out errors, we will eventually track down and fix all these'''<br />
<br />
To make changes, copy the file you want to edit from SERVER-DATA-DIR to the same place in LOCAL-DATA-DIR and edit it, then rebuild bins by running mapserver and/or ouroboros-test as needed, without the -createbins argument.<br />
Note that some files created in SERVER-BIN-DIR need to be copied to CLIENT-BIN-DIR as they are shared between server and client. These bins are the ones that are in your original bins.pigg.<br />
<br />
You should be able to run the server and client as normal from this setup, but I don't recommend it for a production server: test things then copy your new bins to a normal setup that uses piggs.<br />
<br />
<br />
[[Category:Bubble's Notes]]</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Server_Setup_for_Making_Bins&diff=1906Server Setup for Making Bins2019-12-04T16:39:12Z<p>Darwinasm86: </p>
<hr />
<div><br />
Dependencies:<br />
<br />
NOTE: This assumes building an i24 Ouroboros Server<br />
<br />
* Setup an i24 Ouro Server as per https://ourowiki.ouro-comdev.com/index.php?title=Volume_2_Server_Setup<br />
<br />
* You should end up with a directory structure similar to this:<br />
<br />
<pre><br />
F:\CoX <br />
F:\CoX\Source <br />
F:\CoX\Source\bin [We shall call this EXE-DIR]<br />
F:\CoX\Source\bin\piggs [We shall call this PIGG-DIR]<br />
F:\CoX\Source\bin\data [We shall call this DATA-DIR]<br />
F:\CoX\Source\bin\data\bin [We shall call this CLIENT-BIN-DIR]<br />
F:\CoX\Source\bin\data\server\bin [We shall call this SERVER-BIN-DIR]<br />
</pre><br />
<br />
In EXE-DIR, create folders called localdata, serverdata and tools. Tools will be empty but it triggers search behaviour we want in the server.<br />
<br />
<pre><br />
F:\CoX\Source\bin\serverdata [We shall call this SERVER-DATA-DIR]<br />
F:\CoX\Source\bin\localdata [We shall call this LOCAL-DATA-DIR]<br />
F:\CoX\Source\bin\tools [We shall call this TOOL-DIR]<br />
</pre><br />
<br />
* Download Piglet <Link><br />
* Extract the ".pigg" files from the PIGG-DIR using Piglet, into the DATA-DIR, then delete the piggs folder. <br />
<br />
Download the full data set, and put it into SERVER-DATA-DIR. At present this means downloading the following from the [https://ourowiki.ouro-comdev.com/index.php?title=Magnet_Links magnet links] page:<br />
* Paragon Data Directory Dump<br />
* Paragon Data Directory Dump - missing data<br />
<s><br />
* [https://www.dropbox.com/s/doma9x1i25ce7md/TRICKS-Full.7z?dl=0 TRICKS-Full.7z]<br />
* [https://www.dropbox.com/s/g92rnu9biy0ezaz/FX-part.7z?dl=0 FX-part.7z]<br />
</s><br />
<br />
Download 5-17 from the same page, and extract dbidmaps.7z to SERVER-DATA-DIR/Defs/dbidmaps/. Do not extract tricks.7z, it is no longer required.<br />
<br />
<s>'''Important: put tricks-full in place FIRST, then tricks on top, overwriting anything it asks you to - tricks-full does not contain tricks in some files for some reason'''</s><br />
<br />
You should now have something like this:<br />
<pre><br />
F:\CoX\Source\Bin\serverdata\AccountServer<br />
F:\CoX\Source\Bin\serverdata\AIScript<br />
...<br />
...<br />
F:\CoX\Source\Bin\serverdata\texture_library<br />
F:\CoX\Source\Bin\serverdata\tricks<br />
</pre><br />
<br />
Delete the bin files from CLIENT-BIN-DIR and SERVER-BIN-DIR<br />
<br />
Delete these from the SERVER-DATA folder:<br />
<pre><br />
object_library/Omni/EncounterSpawns/V_Atmospheric/*<br />
texture_library/MAPS/city/Map_City_05_03.texture<br />
</pre><br />
<br />
Move the entire object_library folder from SERVER-DATA-DIR to DATA-DIR to prevent the mapserver crashing when making geobins. Overwrite any files already there from the piggs.<br />
<br />
''Todo: find a better solution for this:''<br />
* City_01_05 (Echo of Atlas Park) and some RP maps seem to be missing.<br />
* Create a blank text file at SERVER-DATA-DIR/maps/City_Zones/City_01_05/City_01_05.txt<br />
* Remove the following section from DATA-DIR/server/db/maps.db:<br />
<pre><br />
Container 120<br />
MapName "maps/rp/fire/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 121<br />
MapName "maps/rp/luau/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 122<br />
MapName "maps/rp/harvest/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 123<br />
MapName "maps/rp/halloween/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 124<br />
MapName "maps/rp/winter/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
</pre><br />
<br />
<br />
{| class="wikitable" style="width:50%;"<br />
! IMPORTANT<br />
|-<br />
|''If you are running the mapserver to make bins and there are other mapservers running on the same machine, you must add '''-nosharedmemory''' to the command line to ensure it loads the files from disk, not from the mapserver shared memory pool. This is not required when using -createbins as that turns off shared memory implicitly.''<br />
|}<br />
<br />
From the command line navigate to EXE-DIR and run <pre>mapserver.exe -createbins -verbose 2</pre><br />
It will take a while but should populate SERVER-BIN-DIR.<br />
<br />
Next, run <pre>ouroboros_debug.exe -console -createbins -verbose 2 -project cov</pre><br />
This will again take a while and populate CLIENT-BIN-DIR. The client will close automatically when finished. I recommend using project cov, or some other throwaway project, for all non-production client use to avoid it accidentally messing up your main install settings. ''You MUST use ouroboros_debug not ouroboros, as the production client won't look for the server data folders.''<br />
<br />
'''Note: Both mapserver and ouroboros_debug will spew out errors, we will eventually track down and fix all these'''<br />
<br />
To make changes, copy the file you want to edit from SERVER-DATA-DIR to the same place in LOCAL-DATA-DIR and edit it, then rebuild bins by running mapserver and/or ouroboros-test as needed, without the -createbins argument.<br />
Note that some files created in SERVER-BIN-DIR need to be copied to CLIENT-BIN-DIR as they are shared between server and client. These bins are the ones that are in your original bins.pigg.<br />
<br />
You should be able to run the server and client as normal from this setup, but I don't recommend it for a production server: test things then copy your new bins to a normal setup that uses piggs.<br />
<br />
<br />
[[Category:Bubble's Notes]]</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Server_Setup_for_Making_Bins&diff=1905Server Setup for Making Bins2019-12-04T16:31:38Z<p>Darwinasm86: </p>
<hr />
<div><br />
Dependencies:<br />
<br />
First, install a new copy of the server using the normal setup instructions and check it works. <br />
You should end up with a directory structure similar to this:<br />
<br />
<pre><br />
F:\CoX <br />
F:\CoX\Source <br />
F:\CoX\Source\bin [We shall call this EXE-DIR]<br />
F:\CoX\Source\bin\piggs [We shall call this PIGG-DIR]<br />
F:\CoX\Source\bin\data [We shall call this DATA-DIR]<br />
F:\CoX\Source\bin\data\bin [We shall call this CLIENT-BIN-DIR]<br />
F:\CoX\Source\bin\data\server\bin [We shall call this SERVER-BIN-DIR]<br />
</pre><br />
<br />
In EXE-DIR, create folders called localdata, serverdata and tools. Tools will be empty but it triggers search behaviour we want in the server.<br />
<br />
<pre><br />
F:\CoX\Source\bin\serverdata [We shall call this SERVER-DATA-DIR]<br />
F:\CoX\Source\bin\localdata [We shall call this LOCAL-DATA-DIR]<br />
F:\CoX\Source\bin\tools [We shall call this TOOL-DIR]<br />
</pre><br />
<br />
* Download Piglet <Link><br />
* Extract the ".pigg" files from the PIGG-DIR using Piglet, into the DATA-DIR, then delete the piggs folder. <br />
<br />
Download the full data set, and put it into SERVER-DATA-DIR. At present this means downloading the following from the [https://ourowiki.ouro-comdev.com/index.php?title=Magnet_Links magnet links] page:<br />
* Paragon Data Directory Dump<br />
* Paragon Data Directory Dump - missing data<br />
<s><br />
* [https://www.dropbox.com/s/doma9x1i25ce7md/TRICKS-Full.7z?dl=0 TRICKS-Full.7z]<br />
* [https://www.dropbox.com/s/g92rnu9biy0ezaz/FX-part.7z?dl=0 FX-part.7z]<br />
</s><br />
<br />
Download 5-17 from the same page, and extract dbidmaps.7z to SERVER-DATA-DIR/Defs/dbidmaps/. Do not extract tricks.7z, it is no longer required.<br />
<br />
<s>'''Important: put tricks-full in place FIRST, then tricks on top, overwriting anything it asks you to - tricks-full does not contain tricks in some files for some reason'''</s><br />
<br />
You should now have something like this:<br />
<pre><br />
F:\CoX\Source\Bin\serverdata\AccountServer<br />
F:\CoX\Source\Bin\serverdata\AIScript<br />
...<br />
...<br />
F:\CoX\Source\Bin\serverdata\texture_library<br />
F:\CoX\Source\Bin\serverdata\tricks<br />
</pre><br />
<br />
Delete the bin files from CLIENT-BIN-DIR and SERVER-BIN-DIR<br />
<br />
Delete these from the SERVER-DATA folder:<br />
<pre><br />
object_library/Omni/EncounterSpawns/V_Atmospheric/*<br />
texture_library/MAPS/city/Map_City_05_03.texture<br />
</pre><br />
<br />
Move the entire object_library folder from SERVER-DATA-DIR to DATA-DIR to prevent the mapserver crashing when making geobins. Overwrite any files already there from the piggs.<br />
<br />
''Todo: find a better solution for this:''<br />
* City_01_05 (Echo of Atlas Park) and some RP maps seem to be missing.<br />
* Create a blank text file at SERVER-DATA-DIR/maps/City_Zones/City_01_05/City_01_05.txt<br />
* Remove the following section from DATA-DIR/server/db/maps.db:<br />
<pre><br />
Container 120<br />
MapName "maps/rp/fire/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 121<br />
MapName "maps/rp/luau/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 122<br />
MapName "maps/rp/harvest/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 123<br />
MapName "maps/rp/halloween/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 124<br />
MapName "maps/rp/winter/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
</pre><br />
<br />
<br />
{| class="wikitable" style="width:50%;"<br />
! IMPORTANT<br />
|-<br />
|''If you are running the mapserver to make bins and there are other mapservers running on the same machine, you must add '''-nosharedmemory''' to the command line to ensure it loads the files from disk, not from the mapserver shared memory pool. This is not required when using -createbins as that turns off shared memory implicitly.''<br />
|}<br />
<br />
From the command line navigate to EXE-DIR and run <pre>mapserver.exe -createbins -verbose 2</pre><br />
It will take a while but should populate SERVER-BIN-DIR.<br />
<br />
Next, run <pre>ouroboros_debug.exe -console -createbins -verbose 2 -project cov</pre><br />
This will again take a while and populate CLIENT-BIN-DIR. The client will close automatically when finished. I recommend using project cov, or some other throwaway project, for all non-production client use to avoid it accidentally messing up your main install settings. ''You MUST use ouroboros_debug not ouroboros, as the production client won't look for the server data folders.''<br />
<br />
'''Note: Both mapserver and ouroboros_debug will spew out errors, we will eventually track down and fix all these'''<br />
<br />
To make changes, copy the file you want to edit from SERVER-DATA-DIR to the same place in LOCAL-DATA-DIR and edit it, then rebuild bins by running mapserver and/or ouroboros-test as needed, without the -createbins argument.<br />
Note that some files created in SERVER-BIN-DIR need to be copied to CLIENT-BIN-DIR as they are shared between server and client. These bins are the ones that are in your original bins.pigg.<br />
<br />
You should be able to run the server and client as normal from this setup, but I don't recommend it for a production server: test things then copy your new bins to a normal setup that uses piggs.<br />
<br />
<br />
[[Category:Bubble's Notes]]</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Server_Setup_for_Making_Bins&diff=1904Server Setup for Making Bins2019-12-04T00:09:03Z<p>Darwinasm86: </p>
<hr />
<div>First, install a new copy of the server using the normal setup instructions and check it works. You should end up with a directory structure similar to this:<br />
<br />
<pre><br />
F:\CoX <br />
F:\CoX\Source <br />
F:\CoX\Source\bin [We shall call this EXE-DIR]<br />
F:\CoX\Source\bin\piggs [We shall call this PIGG-DIR]<br />
F:\CoX\Source\bin\data [We shall call this DATA-DIR]<br />
F:\CoX\Source\bin\data\bin [We shall call this CLIENT-BIN-DIR]<br />
F:\CoX\Source\bin\data\server\bin [We shall call this SERVER-BIN-DIR]<br />
</pre><br />
<br />
In EXE-DIR, create folders called localdata, serverdata and tools. Tools will be empty but it triggers search behaviour we want in the server.<br />
<br />
<pre><br />
F:\CoX\Source\bin\serverdata [We shall call this SERVER-DATA-DIR]<br />
F:\CoX\Source\bin\localdata [We shall call this LOCAL-DATA-DIR]<br />
F:\CoX\Source\bin\tools [We shall call this TOOL-DIR]<br />
</pre><br />
<br />
* Download Piglet <Link><br />
* Extract the ".pigg" files from the PIGG-DIR using Piglet, into the DATA-DIR, then delete the piggs folder. <br />
<br />
Download the full data set, and put it into SERVER-DATA-DIR. At present this means downloading the following from the [https://ourowiki.ouro-comdev.com/index.php?title=Magnet_Links magnet links] page:<br />
* Paragon Data Directory Dump<br />
* Paragon Data Directory Dump - missing data<br />
<s><br />
* [https://www.dropbox.com/s/doma9x1i25ce7md/TRICKS-Full.7z?dl=0 TRICKS-Full.7z]<br />
* [https://www.dropbox.com/s/g92rnu9biy0ezaz/FX-part.7z?dl=0 FX-part.7z]<br />
</s><br />
<br />
Download 5-17 from the same page, and extract dbidmaps.7z to SERVER-DATA-DIR/Defs/dbidmaps/. Do not extract tricks.7z, it is no longer required.<br />
<br />
<s>'''Important: put tricks-full in place FIRST, then tricks on top, overwriting anything it asks you to - tricks-full does not contain tricks in some files for some reason'''</s><br />
<br />
You should now have something like this:<br />
<pre><br />
F:\CoX\Source\Bin\serverdata\AccountServer<br />
F:\CoX\Source\Bin\serverdata\AIScript<br />
...<br />
...<br />
F:\CoX\Source\Bin\serverdata\texture_library<br />
F:\CoX\Source\Bin\serverdata\tricks<br />
</pre><br />
<br />
Delete the bin files from CLIENT-BIN-DIR and SERVER-BIN-DIR<br />
<br />
Delete these from the SERVER-DATA folder:<br />
<pre><br />
object_library/Omni/EncounterSpawns/V_Atmospheric/*<br />
texture_library/MAPS/city/Map_City_05_03.texture<br />
</pre><br />
<br />
Move the entire object_library folder from SERVER-DATA-DIR to DATA-DIR to prevent the mapserver crashing when making geobins. Overwrite any files already there from the piggs.<br />
<br />
''Todo: find a better solution for this:''<br />
* City_01_05 (Echo of Atlas Park) and some RP maps seem to be missing.<br />
* Create a blank text file at SERVER-DATA-DIR/maps/City_Zones/City_01_05/City_01_05.txt<br />
* Remove the following section from DATA-DIR/server/db/maps.db:<br />
<pre><br />
Container 120<br />
MapName "maps/rp/fire/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 121<br />
MapName "maps/rp/luau/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 122<br />
MapName "maps/rp/harvest/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 123<br />
MapName "maps/rp/halloween/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
<br />
Container 124<br />
MapName "maps/rp/winter/Events_HeroCon.txt"<br />
SafePlayersLow 75<br />
SafePlayersHigh 100<br />
MaxCritters 1000<br />
DontAutoStart 1<br />
Transient 1<br />
ContainerEnd<br />
</pre><br />
<br />
<br />
{| class="wikitable" style="width:50%;"<br />
! IMPORTANT<br />
|-<br />
|''If you are running the mapserver to make bins and there are other mapservers running on the same machine, you must add '''-nosharedmemory''' to the command line to ensure it loads the files from disk, not from the mapserver shared memory pool. This is not required when using -createbins as that turns off shared memory implicitly.''<br />
|}<br />
<br />
From the command line navigate to EXE-DIR and run <pre>mapserver.exe -createbins -verbose 2</pre><br />
It will take a while but should populate SERVER-BIN-DIR.<br />
<br />
Next, run <pre>ouroboros_debug.exe -console -createbins -verbose 2 -project cov</pre><br />
This will again take a while and populate CLIENT-BIN-DIR. The client will close automatically when finished. I recommend using project cov, or some other throwaway project, for all non-production client use to avoid it accidentally messing up your main install settings. ''You MUST use ouroboros_debug not ouroboros, as the production client won't look for the server data folders.''<br />
<br />
'''Note: Both mapserver and ouroboros_debug will spew out errors, we will eventually track down and fix all these'''<br />
<br />
To make changes, copy the file you want to edit from SERVER-DATA-DIR to the same place in LOCAL-DATA-DIR and edit it, then rebuild bins by running mapserver and/or ouroboros-test as needed, without the -createbins argument.<br />
Note that some files created in SERVER-BIN-DIR need to be copied to CLIENT-BIN-DIR as they are shared between server and client. These bins are the ones that are in your original bins.pigg.<br />
<br />
You should be able to run the server and client as normal from this setup, but I don't recommend it for a production server: test things then copy your new bins to a normal setup that uses piggs.<br />
<br />
<br />
[[Category:Bubble's Notes]]</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Volume_2_Server_Setup&diff=1447Volume 2 Server Setup2019-11-15T18:12:48Z<p>Darwinasm86: /* Server database connection configuration */</p>
<hr />
<div>__TOC__<br />
This guide will help you get started in running your own City of Heroes server on your local host (127.0.0.1). It assumes that you will run the City of Heroes client on the same machine as the server. Once you have that working, you can move on to the following guide which explains how to modify your server to allow external access from game clients on other machines.<br />
<br />
== Recommended hardware and settings ==<br />
#The main requirement for City of Heroes is having a decent amount of RAM. The minimum amount for a small personal server is about 8 GB of RAM, with 32 GB of RAM being the recommended amount. <br />
#*If you are running with less than the recommended 32 GB of RAM, it is also recommended that you increase your Windows paging file to simulate having more RAM (Control Panel->System and Security->System->Advanced System Settings->Advanced->Performance Settings->Advanced->Virtual Memory->Change). Setting your paging file to 32768 MB works well for a server with 8 GB of RAM.<br />
#*To support a larger number of players connecting, you will need to add more RAM to your server, though it currently isn't clear at what numbers of players these recommended values become insufficient.<br />
#*For the purposes of this guide, I am using 64.0 GB (G. Skill Trident Z Royal Silver 3200Mhz PC4-25600). <br />
#The server is CPU-intensive, having a decent CPU is important.<br />
#*This setup has been tested with multiple configurations with the oldest recommended being an Intel Core i7 6th Generation Processor.<br />
#*For the purposes of this guide, I am using the Intel Core i9-9900K Processor.<br />
#Running the server on a solid state drive instead of a spinning disc hard drive is recommended.<br />
#If you are installing the server on a computer that you own, your router will need to support NAT loopback if you want game clients to be able to connect to it from both inside and outside of your LAN.<br />
#*For the purposes of this guide, I am using an ASUS ROG GT-AX11000 gaming router.<br />
<br />
== Required software ==<br />
Download all of the following files:<br />
# [https://www.microsoft.com/en-us/sql-server/sql-server-editions-express SQL Server 2017 Express Edition]<br />
# SQL Server Management (SSMS) 18.3.1<br />
#*https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017<br />
#*This is the latest release at the time of this documentation and has been tested.<br />
# The latest stable release of the CoX/Source files from http://build.ourodev.com/archives/Source.master.7z. These are the compiled files from the OuroDev build machine. Extract the contents of the zip file into C:\Ouroboros. (or if you want to compile the source files yourself, follow the [[Volume 2 Build]] instructions, then copy the contents of the Source\bin directory to C:\Ouroboros)<br />
# Database schema definitions. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/DBSchemas (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\DBSchemas)<br />
# Sample server config files. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/ConfigFiles (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\ConfigFiles)<br />
# the [magnet:?xt=urn:btih:n642zelj2se2yn2ovmfy2z74tyyf7scs&dn=City%20of%20Heroes&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce Issue 24 client and data files] - this is ''not'' the SCORE client/data.<br />
# [magnet:?xt=urn:btih:CCCE574F7F89229B0FC2EF8AD898BE451864863A&dn=CoHDev_Source_Files_Current%28Updated%29.zip&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce CoHDev_Source_Files_Current(Updated).zip].<br />
# [magnet:?xt=urn:btih:8CE9DE8ECCF29B899B247512F1082F20B59DC4B2&dn=ServerData.7z&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce ServerData.7z].<br />
<br />
== Optional but recommended tools ==<br />
Download all of the following:<br />
#(Optional) Install 7zip (https://www.7-zip.org/download.html)<br />
#*Useful if you do not already have a tool to handle zip files<br />
#(Optional) Install Notepad++ (https://notepad-plus-plus.org/downloads/v7.7.1/)<br />
#*Useful for editing config files.<br />
<br />
== Install SQL Server 2017 Express ==<br />
: You can install SQL Server pretty much on the default settings.<br />
:: Select Basic under installation type:<br />
::: [[File:SQL Server Install 2017 Express.png|thumb|none]]<br />
:: Agree to the EULA if you want to use SQL Server.<br />
::: [[File:SQL Server Install 2017 Express - 2.png|thumb|none]]<br />
:: Tell the server where to install files. I changed this for ease on my system.<br />
::: [[File:SQL Server Install 2017 Express - 3.png|thumb|none]]<br />
:: It should begin installing and eventually you should see "Install has completed successfully". Click close.<br />
::: [[File:SQL Server Install 2017 Express - 4.png|thumb|none]]<br />
<br />
== Install SQL Server Management(SSMS) ==<br />
: You can install SQL Server Management on default settings.<br />
:: Select the location you'd like to install SSMS to. The default is fine.<br />
::: [[File:SSMS Install - 1.png|thumb|none]]<br />
:: It will take awhile to install and you'll see a little progress bar letting you know whats going on<br />
::: [[File:SSMS Install - 2.png|thumb|none]]<br />
:: Eventually it will ask you to reboot the system. Might as well as do that now.<br />
::: [[File:SSMS Install - 3.png|thumb|none]]<br />
<br />
== Setup server files ==<br />
# At this point, you should have ''C:\Ouroboros'' containing exes and dlls<br />
# Create a directory in ''C:\Ouroboros'' called ''data''.<br />
# Open ''ServerData.7z'' and extract all files into ''C:\Ouroboros\data'' (the newly created directory).<br />
# Open ''CoHDev_Source_Files_Current(Updated).zip''.<br />
## Extract "i24 Server and Client Piggs (extracted with CoHTools)" into ''C:\Ouroboros\data''.<br />
## Copy ''maps.db'' from "map.db (modified, working on current VS2010 build)" and place it in ''C:\Ouroboros\data\server\db'', overwriting the old maps.db<br />
# Copy the ''piggs'' folder from your i24 client directory and place them in ''C:\Ouroboros\''. You should end up with ''C:\Ouroboros\piggs\'' populated.<br />
# If installing v2i1, create a directory in your C: drive called "CoH_Data" and another directory inside that, called "attributes" (''C:\CoH_Data\attributes''). In later versions, this isn't necessary.<br />
# Run the following in a command prompt. If it gives you an error message, check the [[#Troubleshooting|Troubleshooting]] section. '''It is essential to run this after all the above steps, because it will overwrite some of the files.'''<br />
#: {{ms|cd c:\Ouroboros}}<br />
#: {{ms|.\mapserver.exe -productionmode -templates}}<br />
# If installing v2i1, copy all files from ''C:\CoH_Data\attributes'' and place them into ''C:\Ouroboros\data\server\db\templates''. If installing a later version, the files should be placed there automatically.<br />
# If you didn't get them from a downloaded release, copy all sample config files from Source/Assets/ConfigFiles into ''c:\Ouroboros'' (for example: Source/Assets/ConfigFiles/data/server/db will become C:/Ouroboros/data/server/db)<br />
<br />
== Database setup ==<br />
Note: If you have a problem downloading these files, copy and paste the contents into notepad++, and then save the file into the “TMP” folder you created with the same name, for example (cohdb.sql)<br />
# Download the latest database schema definitions from the link below.<br />
#* You will need to setup an account first.<br />
#* https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/DBSchemas<br />
# You will need to choose a password for the database user. In these examples it will be "YOURL33TPASS!".<br />
# Launch SQL Server Management Studio from the start menu<br />
# Hit "Connect" on the screen that pops up, with default settings: [[File:SQL Connect.png|thumb|none]]<br />
# We need to enable the sa login so that server can login to the database.<br />
## If you look to the left panel you will see the object explorer and your connection. Right click it and select properties. [[File:SQL Properties.png|thumb|none]]<br />
## When this window comes up hit Security to the left and enable "sql server and windows authentication". Then click ok. [[File:SQL Security.png|thumb|none]]<br />
## In the same panel you used before navigate to Security -> Logins then right click and enter properties the sa user. [[File:SA Properties.png|thumb|none]]<br />
## In this window set the password to the same password you set back at step 4 [[File:Login Props.png|thumb|none]]<br />
## Choose Status from the left panel in this same window and set login to enabled and hit ok. [[File:Login Status.png|thumb|none]]<br />
## Right click the connection in the object explorer again and click Restart. [[File:SQL Restart.png|thumb|none]]<br />
# Next we need to apply the schema for the databases which require this to be done manually (account, auction, auth, and chat)<br />
## Click File -> Open -> File, navigate to the dbschemas that you downloaded at the start, and select cohauc.sql [[File:SSMS File Open.png|thumb|none]] [[File:SSMS Open DBSchema.png|thumb|none]]<br />
## You will see a '''create database''' statement near the top of the file, with two lines that include a '''filename''' parameter. [[File:SSMS DBSchema SQL SRV STR.png|thumb|none]]<br />
## Delete these lines, so that the statement is just: <syntaxhighlight lang="SQL">CREATE DATABASE [cohauc]</syntaxhighlight><br />
## Click the Execute button [[File:SSMS Execute.png|thumb|none]]<br />
## Repeat these steps for cohacc.sql, cohauth.sql and cohchat.sql. '''Do not use cohdb.sql'''<br />
<br />
== Initial database entries ==<br />
<br />
Each dbserver instance is a "shard". This needs to be manually added to authserver. In SQL Server Management Studio, expand "Databases", then right click on cohauth and select "New Query" from the menu. Several pieces of data are needed for this.<br />
<br />
* The IP address (ip) which clients will use to connect to your server. In this example, we will use 127.0.0.1<br />
* The source IP (inner_ip) from which dbserver will connect to authserver. In this example, we will use 127.0.0.1<br />
* The shard name (name) that you will use for dbserver. This will be Paragon by default. You can change it later once you have it working with the default name.<br />
* The auth shard number that you are using in turnstile_server.cfg. By default this is 1.<br />
<br />
In the new query window, enter:<br />
<br />
<syntaxhighlight lang="sql"><br />
INSERT INTO cohauth.dbo.server (id, name, ip, inner_ip, ageLimit, pk_flag, server_group_id) VALUES (1, 'Paragon', '127.0.0.1', '127.0.0.1', 0, 0, 1);<br />
INSERT INTO cohauth.dbo.worldstatus (idx, status) VALUES (1, 1);<br />
</syntaxhighlight><br />
<br />
Then press 'Execute'.<br />
<br />
You will also want to create an account so that you can test connecting to the database. For now, use the instructions in [[I25_FAQ#How_do_I_create_an_account.3F]]<br />
<br />
== Server database connection configuration ==<br />
Note: In order for the correct server name to appear when connecting to the server, browse to "C:\Ouroboros\etc" and edit the "config.txt" file. Find "ProtocolVersion" and replace that line with "ProtocolVersion = 190516"<br />
<br />
Navigate to C:\Ouroboros\data\server\db. In each of the following files, look for an SqlLogin line, and change the Pwd= value to your password. Using our example YOURL33TPASS!:<br />
SqlLogin "DRIVER={SQL Server Native Client 11.0};Server=localhost\SQLEXPRESS;Uid=sa;Pwd=YOURL33TPASS!;"<br />
<br />
* account_server.cfg<br />
* auction_server.cfg<br />
* chat_server.cfg<br />
* servers.cfg<br />
<br />
In servers.cfg, also fix SqlInit to be:<br />
SqlInit "create database cohdb;"<br />
<br />
For authserver, we have to configure the connection via ODBC data sources.<br />
<br />
# Launch "ODBC Data Sources (32-bit)" from the start menu, or run directly from C:\Windows\SysWOW64\odbcad32.exe. (Do not use the 64-bit version)<br />
# Click File DSN then click add to the right. [[File:ODBC File DSN.png|thumb|none]]<br />
# Choose ODBC Driver 17 for SQL Server. [[File:ODBC Add Auth 1.png|thumb|none]]<br />
# Click Next.<br />
# Enter AuthDB into the box [[File:ODBC Add Auth 2.png|thumb|none]]<br />
# Click Next, then Finish.<br />
# One of the boxes on the next page will say "Which SQL Server do you want to connect to?". Type localhost\SQLEXPRESS [[File:ODBC Add Auth 3.png|thumb|none]]<br />
# Click Next<br />
# Choose "With SQL Server authentication using a login ID and password entered by the user". Enter "sa" for the username, and the password that you chose: [[File:ODBC Add Auth 4.png|thumb|none]]<br />
# Click Next<br />
# Enable "Change the default database to" and select "cohauth". [[File:ODBC Add Auth 5.png|thumb|none]]<br />
# Click Next<br />
# Default settings are fine on the last page [[File:ODBC Add Auth 6.png|thumb|none]]<br />
# Click Finish<br />
# A box will appear with the settings you have selected. Click "Test Data Source" [[File:ODBC Add Auth 7.png|thumb|none]]<br />
# You should see "TESTS COMPLETED SUCCESSFULLY!" in the output. If not, go back and check your settings. [[File:ODBC Add Auth 8.png|thumb|none]]<br />
# Click OK, then OK again.<br />
<br />
Then we have to enter the username and password again into authserver itself. Start authserver.exe, and the first time that you run it, this window will appear. Enter "sa" and the password that you chose: [[File:Authserver-login.PNG|thumb|none]]<br />
<br />
This username and password is saved in the registry key HKEY_CURRENT_USER\Software\NCSoft\GLOBALAUTH<br />
<br />
== Configure firewall ==<br />
If you are running Windows Firewall, you need to configure it to allow traffic through to your CoH server.<br />
<br />
#Open the start menu, type firewall, and click on Windows Defender Firewall. (or get at it through Control Panel>System and Security>Windows Defender Firewall)<br />
#Click on Advanced settings<br />
#Click on Inbound Rules<br />
#Click on New Rule...<br />
#For Rule Type, select Port, and Next<br />
#Select TCP, Specific local ports, Enter 2106, and then Next<br />
#Allow the connection, Next<br />
#Leave all the checkboxes selected, Next<br />
#Name the rule CoH TCP, Finish<br />
#Repeat the above steps to make a second new rule, but make it UDP instead of TCP, and for ports 7000-7200. Name it CoH UDP.<br />
<br />
== Launch server ==<br />
<br />
The following server applications need to be manually started, in this order:<br />
<br />
# authserver.exe<br />
# dbserver.exe<br />
# launcher.exe<br />
<br />
The rest of the servers are started by loadBalanceShardSpecific.cfg.<br />
<br />
== Connecting a client ==<br />
<br />
Launch the client by opening a command window, and typing:<br />
cd C:\Ouroboros<br />
Ouroboros -auth 127.0.0.1 -console<br />
Login with the account you created, click on the Paragon shard, make a character and enter into the game. If all of that works correctly, then you can stop here if all you want is to play City of Heroes on your own machine by yourself. Otherwise, move on to [[Volume_2_Modifying_Server_For_External_Access|Volume 2 Modifying Server For External Access]].<br />
<br />
== Troubleshooting ==<br />
* ERROR: {{ms|Failed to open attribute file vars.attribute for writing.}} You may get this error when running <code>mapserver -productionmode -templates</code>. If you are installing v2i1, this means you didn't create the C:\CoH_Data\attributes folder before running the command. If you are installing a later version than v2i1, it is likely trying to access C:\Ouroboros\data\server\db\templates instead. It is supposed to create that folder automatically if it doesn't exist. If you are getting this error message anyways, try manually creating the C:\Ouroboros\data\server\db\templates folder and then rerun <code>mapserver -productionmode -templates</code>. <br />
* ERROR: {{ms|'gzip' is not recognized as an internal or external command, operable program or batch file.}} If you get this message, it is usually accompanying a different error message. This happens because the server is trying to compress the dump files that it creates when some errors are found. You can safely ignore any messages about a missing gzip.exe, but if you would like to make these errors not happen any more you can place a gzip.exe and a zip.exe in any folder which is in your Path windows system environment variable. Look for a standard windows gzip.exe download, and you can also download info-zip and use the zip.exe which comes with it.<br />
* ERROR: {{ms|Loading templates...}} If you get errors when you launch dbserver.exe when it tries to load templates, something went wrong with the steps involving running <code>mapserver.exe -productionmode -templates</code> in [[#Setup server files|Setup server files]], and it can't find the template files in C:\Ouroboros\data\server\db\templates.<br />
* ERROR: {{ms|Version difference between client/server.}} This is a mismatch between the client version and the Version parameter in the '''C:\Ouroboros\version.ini''' file<br />
* ERROR: {{ms|Can't connect to DBserver.}} Double-check your firewall settings. Try turning off Windows Firewall completely to see if that lets you connect. If so, then turn Windows Firewall back on and investigate your Inbound firewall rules for CoH.</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Volume_2_Server_Setup&diff=1446Volume 2 Server Setup2019-11-15T18:12:32Z<p>Darwinasm86: /* Server database connection configuration */</p>
<hr />
<div>__TOC__<br />
This guide will help you get started in running your own City of Heroes server on your local host (127.0.0.1). It assumes that you will run the City of Heroes client on the same machine as the server. Once you have that working, you can move on to the following guide which explains how to modify your server to allow external access from game clients on other machines.<br />
<br />
== Recommended hardware and settings ==<br />
#The main requirement for City of Heroes is having a decent amount of RAM. The minimum amount for a small personal server is about 8 GB of RAM, with 32 GB of RAM being the recommended amount. <br />
#*If you are running with less than the recommended 32 GB of RAM, it is also recommended that you increase your Windows paging file to simulate having more RAM (Control Panel->System and Security->System->Advanced System Settings->Advanced->Performance Settings->Advanced->Virtual Memory->Change). Setting your paging file to 32768 MB works well for a server with 8 GB of RAM.<br />
#*To support a larger number of players connecting, you will need to add more RAM to your server, though it currently isn't clear at what numbers of players these recommended values become insufficient.<br />
#*For the purposes of this guide, I am using 64.0 GB (G. Skill Trident Z Royal Silver 3200Mhz PC4-25600). <br />
#The server is CPU-intensive, having a decent CPU is important.<br />
#*This setup has been tested with multiple configurations with the oldest recommended being an Intel Core i7 6th Generation Processor.<br />
#*For the purposes of this guide, I am using the Intel Core i9-9900K Processor.<br />
#Running the server on a solid state drive instead of a spinning disc hard drive is recommended.<br />
#If you are installing the server on a computer that you own, your router will need to support NAT loopback if you want game clients to be able to connect to it from both inside and outside of your LAN.<br />
#*For the purposes of this guide, I am using an ASUS ROG GT-AX11000 gaming router.<br />
<br />
== Required software ==<br />
Download all of the following files:<br />
# [https://www.microsoft.com/en-us/sql-server/sql-server-editions-express SQL Server 2017 Express Edition]<br />
# SQL Server Management (SSMS) 18.3.1<br />
#*https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017<br />
#*This is the latest release at the time of this documentation and has been tested.<br />
# The latest stable release of the CoX/Source files from http://build.ourodev.com/archives/Source.master.7z. These are the compiled files from the OuroDev build machine. Extract the contents of the zip file into C:\Ouroboros. (or if you want to compile the source files yourself, follow the [[Volume 2 Build]] instructions, then copy the contents of the Source\bin directory to C:\Ouroboros)<br />
# Database schema definitions. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/DBSchemas (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\DBSchemas)<br />
# Sample server config files. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/ConfigFiles (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\ConfigFiles)<br />
# the [magnet:?xt=urn:btih:n642zelj2se2yn2ovmfy2z74tyyf7scs&dn=City%20of%20Heroes&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce Issue 24 client and data files] - this is ''not'' the SCORE client/data.<br />
# [magnet:?xt=urn:btih:CCCE574F7F89229B0FC2EF8AD898BE451864863A&dn=CoHDev_Source_Files_Current%28Updated%29.zip&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce CoHDev_Source_Files_Current(Updated).zip].<br />
# [magnet:?xt=urn:btih:8CE9DE8ECCF29B899B247512F1082F20B59DC4B2&dn=ServerData.7z&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce ServerData.7z].<br />
<br />
== Optional but recommended tools ==<br />
Download all of the following:<br />
#(Optional) Install 7zip (https://www.7-zip.org/download.html)<br />
#*Useful if you do not already have a tool to handle zip files<br />
#(Optional) Install Notepad++ (https://notepad-plus-plus.org/downloads/v7.7.1/)<br />
#*Useful for editing config files.<br />
<br />
== Install SQL Server 2017 Express ==<br />
: You can install SQL Server pretty much on the default settings.<br />
:: Select Basic under installation type:<br />
::: [[File:SQL Server Install 2017 Express.png|thumb|none]]<br />
:: Agree to the EULA if you want to use SQL Server.<br />
::: [[File:SQL Server Install 2017 Express - 2.png|thumb|none]]<br />
:: Tell the server where to install files. I changed this for ease on my system.<br />
::: [[File:SQL Server Install 2017 Express - 3.png|thumb|none]]<br />
:: It should begin installing and eventually you should see "Install has completed successfully". Click close.<br />
::: [[File:SQL Server Install 2017 Express - 4.png|thumb|none]]<br />
<br />
== Install SQL Server Management(SSMS) ==<br />
: You can install SQL Server Management on default settings.<br />
:: Select the location you'd like to install SSMS to. The default is fine.<br />
::: [[File:SSMS Install - 1.png|thumb|none]]<br />
:: It will take awhile to install and you'll see a little progress bar letting you know whats going on<br />
::: [[File:SSMS Install - 2.png|thumb|none]]<br />
:: Eventually it will ask you to reboot the system. Might as well as do that now.<br />
::: [[File:SSMS Install - 3.png|thumb|none]]<br />
<br />
== Setup server files ==<br />
# At this point, you should have ''C:\Ouroboros'' containing exes and dlls<br />
# Create a directory in ''C:\Ouroboros'' called ''data''.<br />
# Open ''ServerData.7z'' and extract all files into ''C:\Ouroboros\data'' (the newly created directory).<br />
# Open ''CoHDev_Source_Files_Current(Updated).zip''.<br />
## Extract "i24 Server and Client Piggs (extracted with CoHTools)" into ''C:\Ouroboros\data''.<br />
## Copy ''maps.db'' from "map.db (modified, working on current VS2010 build)" and place it in ''C:\Ouroboros\data\server\db'', overwriting the old maps.db<br />
# Copy the ''piggs'' folder from your i24 client directory and place them in ''C:\Ouroboros\''. You should end up with ''C:\Ouroboros\piggs\'' populated.<br />
# If installing v2i1, create a directory in your C: drive called "CoH_Data" and another directory inside that, called "attributes" (''C:\CoH_Data\attributes''). In later versions, this isn't necessary.<br />
# Run the following in a command prompt. If it gives you an error message, check the [[#Troubleshooting|Troubleshooting]] section. '''It is essential to run this after all the above steps, because it will overwrite some of the files.'''<br />
#: {{ms|cd c:\Ouroboros}}<br />
#: {{ms|.\mapserver.exe -productionmode -templates}}<br />
# If installing v2i1, copy all files from ''C:\CoH_Data\attributes'' and place them into ''C:\Ouroboros\data\server\db\templates''. If installing a later version, the files should be placed there automatically.<br />
# If you didn't get them from a downloaded release, copy all sample config files from Source/Assets/ConfigFiles into ''c:\Ouroboros'' (for example: Source/Assets/ConfigFiles/data/server/db will become C:/Ouroboros/data/server/db)<br />
<br />
== Database setup ==<br />
Note: If you have a problem downloading these files, copy and paste the contents into notepad++, and then save the file into the “TMP” folder you created with the same name, for example (cohdb.sql)<br />
# Download the latest database schema definitions from the link below.<br />
#* You will need to setup an account first.<br />
#* https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/DBSchemas<br />
# You will need to choose a password for the database user. In these examples it will be "YOURL33TPASS!".<br />
# Launch SQL Server Management Studio from the start menu<br />
# Hit "Connect" on the screen that pops up, with default settings: [[File:SQL Connect.png|thumb|none]]<br />
# We need to enable the sa login so that server can login to the database.<br />
## If you look to the left panel you will see the object explorer and your connection. Right click it and select properties. [[File:SQL Properties.png|thumb|none]]<br />
## When this window comes up hit Security to the left and enable "sql server and windows authentication". Then click ok. [[File:SQL Security.png|thumb|none]]<br />
## In the same panel you used before navigate to Security -> Logins then right click and enter properties the sa user. [[File:SA Properties.png|thumb|none]]<br />
## In this window set the password to the same password you set back at step 4 [[File:Login Props.png|thumb|none]]<br />
## Choose Status from the left panel in this same window and set login to enabled and hit ok. [[File:Login Status.png|thumb|none]]<br />
## Right click the connection in the object explorer again and click Restart. [[File:SQL Restart.png|thumb|none]]<br />
# Next we need to apply the schema for the databases which require this to be done manually (account, auction, auth, and chat)<br />
## Click File -> Open -> File, navigate to the dbschemas that you downloaded at the start, and select cohauc.sql [[File:SSMS File Open.png|thumb|none]] [[File:SSMS Open DBSchema.png|thumb|none]]<br />
## You will see a '''create database''' statement near the top of the file, with two lines that include a '''filename''' parameter. [[File:SSMS DBSchema SQL SRV STR.png|thumb|none]]<br />
## Delete these lines, so that the statement is just: <syntaxhighlight lang="SQL">CREATE DATABASE [cohauc]</syntaxhighlight><br />
## Click the Execute button [[File:SSMS Execute.png|thumb|none]]<br />
## Repeat these steps for cohacc.sql, cohauth.sql and cohchat.sql. '''Do not use cohdb.sql'''<br />
<br />
== Initial database entries ==<br />
<br />
Each dbserver instance is a "shard". This needs to be manually added to authserver. In SQL Server Management Studio, expand "Databases", then right click on cohauth and select "New Query" from the menu. Several pieces of data are needed for this.<br />
<br />
* The IP address (ip) which clients will use to connect to your server. In this example, we will use 127.0.0.1<br />
* The source IP (inner_ip) from which dbserver will connect to authserver. In this example, we will use 127.0.0.1<br />
* The shard name (name) that you will use for dbserver. This will be Paragon by default. You can change it later once you have it working with the default name.<br />
* The auth shard number that you are using in turnstile_server.cfg. By default this is 1.<br />
<br />
In the new query window, enter:<br />
<br />
<syntaxhighlight lang="sql"><br />
INSERT INTO cohauth.dbo.server (id, name, ip, inner_ip, ageLimit, pk_flag, server_group_id) VALUES (1, 'Paragon', '127.0.0.1', '127.0.0.1', 0, 0, 1);<br />
INSERT INTO cohauth.dbo.worldstatus (idx, status) VALUES (1, 1);<br />
</syntaxhighlight><br />
<br />
Then press 'Execute'.<br />
<br />
You will also want to create an account so that you can test connecting to the database. For now, use the instructions in [[I25_FAQ#How_do_I_create_an_account.3F]]<br />
<br />
== Server database connection configuration ==<br />
Note: In order for the correct server name to appear when connecting to the server, browse to "C:\Ouroboros\etc" and edit the "config.txt" file. Find "ProtocolVersion" and replace that line with "ProtocolVersion = 190516"<br />
<br />
Navigate to C:\Ouroboros\data\server\db. In each of the following files, look for an SqlLogin line, and change the Pwd= value to your password. Using our example YOURL33TPASS!:<br />
SqlLogin "DRIVER={SQL Server Native Client 11.0};Server=localhost\SQLEXPRESS;Uid=sa;Pwd=YOURL33TPASS!;"<br />
<br />
* account_server.cfg<br />
* auction_server.cfg<br />
* chat_server.cfg<br />
* servers.cfg<br />
<br />
In servers.cfg, also fix SqlInit to be:<br />
SqlInit "create database cohdb;"<br />
<br />
For authserver, we have to configure the connection via ODBC data sources.<br />
<br />
# Launch "ODBC Data Sources (32-bit)" from the start menu, or run directly from C:\Windows\SysWOW64\odbcad32.exe. (Do not use the 64-bit version)<br />
# Click File DSN then click add to the right. [[File:ODBC File DSN.png|thumb|none]]<br />
# Choose ODBC Driver 17 for SQL Server. [[File:ODBC Add Auth 1.png|thumb|none]]<br />
# Click Next.<br />
# Enter AuthDB into the box [[File:ODBC Add Auth 2.png|thumb|none]]<br />
# Click Next, then Finish.<br />
# One of the boxes on the next page will say "Which SQL Server do you want to connect to?". Type localhost\SQLEXPRESS [[File:ODBC Add Auth 3.png|thumb|none]]<br />
# Click Next<br />
# Choose "With SQL Server authentication using a login ID and password entered by the user". Enter "sa" for the username, and the password that you chose: [[File:ODBC Add Auth 4.png|thumb|none]]<br />
# Click Next<br />
# Enable "Change the default database to" and select "cohauth". [[File:ODBC Add Auth 5.png|thumb|none]]<br />
# Click Next<br />
# Default settings are fine on the last page [[File:ODBC Add Auth 6.png|thumb|none]]<br />
# Click Finish<br />
# A box will appear with the settings you have selected. Click "Test Data Source" [[File:ODBC Add Auth 7.png|thumb|none]]<br />
# You should see "TESTS COMPLETED SUCCESSFULLY!" in the output. If not, go back and check your settings. [[File:ODBC Add Auth 8.png|thumb|none]]<br />
# Click OK, then OK again.<br />
<br />
Then we have to enter the username and password again into authserver itself. Start authserver.exe, and the first time that you run it, this window will appear. Enter "sa" and the password that you chose: [[File:Authserver-login.PNG|thumb|none]]<br />
<br />
This username and password is saved in the registry key HKEY_CURRENT_USER\Software\NCSoft\GLOBALAUTH<br />
<br />
== Configure firewall ==<br />
If you are running Windows Firewall, you need to configure it to allow traffic through to your CoH server.<br />
<br />
#Open the start menu, type firewall, and click on Windows Defender Firewall. (or get at it through Control Panel>System and Security>Windows Defender Firewall)<br />
#Click on Advanced settings<br />
#Click on Inbound Rules<br />
#Click on New Rule...<br />
#For Rule Type, select Port, and Next<br />
#Select TCP, Specific local ports, Enter 2106, and then Next<br />
#Allow the connection, Next<br />
#Leave all the checkboxes selected, Next<br />
#Name the rule CoH TCP, Finish<br />
#Repeat the above steps to make a second new rule, but make it UDP instead of TCP, and for ports 7000-7200. Name it CoH UDP.<br />
<br />
== Launch server ==<br />
<br />
The following server applications need to be manually started, in this order:<br />
<br />
# authserver.exe<br />
# dbserver.exe<br />
# launcher.exe<br />
<br />
The rest of the servers are started by loadBalanceShardSpecific.cfg.<br />
<br />
== Connecting a client ==<br />
<br />
Launch the client by opening a command window, and typing:<br />
cd C:\Ouroboros<br />
Ouroboros -auth 127.0.0.1 -console<br />
Login with the account you created, click on the Paragon shard, make a character and enter into the game. If all of that works correctly, then you can stop here if all you want is to play City of Heroes on your own machine by yourself. Otherwise, move on to [[Volume_2_Modifying_Server_For_External_Access|Volume 2 Modifying Server For External Access]].<br />
<br />
== Troubleshooting ==<br />
* ERROR: {{ms|Failed to open attribute file vars.attribute for writing.}} You may get this error when running <code>mapserver -productionmode -templates</code>. If you are installing v2i1, this means you didn't create the C:\CoH_Data\attributes folder before running the command. If you are installing a later version than v2i1, it is likely trying to access C:\Ouroboros\data\server\db\templates instead. It is supposed to create that folder automatically if it doesn't exist. If you are getting this error message anyways, try manually creating the C:\Ouroboros\data\server\db\templates folder and then rerun <code>mapserver -productionmode -templates</code>. <br />
* ERROR: {{ms|'gzip' is not recognized as an internal or external command, operable program or batch file.}} If you get this message, it is usually accompanying a different error message. This happens because the server is trying to compress the dump files that it creates when some errors are found. You can safely ignore any messages about a missing gzip.exe, but if you would like to make these errors not happen any more you can place a gzip.exe and a zip.exe in any folder which is in your Path windows system environment variable. Look for a standard windows gzip.exe download, and you can also download info-zip and use the zip.exe which comes with it.<br />
* ERROR: {{ms|Loading templates...}} If you get errors when you launch dbserver.exe when it tries to load templates, something went wrong with the steps involving running <code>mapserver.exe -productionmode -templates</code> in [[#Setup server files|Setup server files]], and it can't find the template files in C:\Ouroboros\data\server\db\templates.<br />
* ERROR: {{ms|Version difference between client/server.}} This is a mismatch between the client version and the Version parameter in the '''C:\Ouroboros\version.ini''' file<br />
* ERROR: {{ms|Can't connect to DBserver.}} Double-check your firewall settings. Try turning off Windows Firewall completely to see if that lets you connect. If so, then turn Windows Firewall back on and investigate your Inbound firewall rules for CoH.</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Volume_2_Server_Setup&diff=1445Volume 2 Server Setup2019-11-15T17:54:19Z<p>Darwinasm86: /* Initial database entries */</p>
<hr />
<div>__TOC__<br />
This guide will help you get started in running your own City of Heroes server on your local host (127.0.0.1). It assumes that you will run the City of Heroes client on the same machine as the server. Once you have that working, you can move on to the following guide which explains how to modify your server to allow external access from game clients on other machines.<br />
<br />
== Recommended hardware and settings ==<br />
#The main requirement for City of Heroes is having a decent amount of RAM. The minimum amount for a small personal server is about 8 GB of RAM, with 32 GB of RAM being the recommended amount. <br />
#*If you are running with less than the recommended 32 GB of RAM, it is also recommended that you increase your Windows paging file to simulate having more RAM (Control Panel->System and Security->System->Advanced System Settings->Advanced->Performance Settings->Advanced->Virtual Memory->Change). Setting your paging file to 32768 MB works well for a server with 8 GB of RAM.<br />
#*To support a larger number of players connecting, you will need to add more RAM to your server, though it currently isn't clear at what numbers of players these recommended values become insufficient.<br />
#*For the purposes of this guide, I am using 64.0 GB (G. Skill Trident Z Royal Silver 3200Mhz PC4-25600). <br />
#The server is CPU-intensive, having a decent CPU is important.<br />
#*This setup has been tested with multiple configurations with the oldest recommended being an Intel Core i7 6th Generation Processor.<br />
#*For the purposes of this guide, I am using the Intel Core i9-9900K Processor.<br />
#Running the server on a solid state drive instead of a spinning disc hard drive is recommended.<br />
#If you are installing the server on a computer that you own, your router will need to support NAT loopback if you want game clients to be able to connect to it from both inside and outside of your LAN.<br />
#*For the purposes of this guide, I am using an ASUS ROG GT-AX11000 gaming router.<br />
<br />
== Required software ==<br />
Download all of the following files:<br />
# [https://www.microsoft.com/en-us/sql-server/sql-server-editions-express SQL Server 2017 Express Edition]<br />
# SQL Server Management (SSMS) 18.3.1<br />
#*https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017<br />
#*This is the latest release at the time of this documentation and has been tested.<br />
# The latest stable release of the CoX/Source files from http://build.ourodev.com/archives/Source.master.7z. These are the compiled files from the OuroDev build machine. Extract the contents of the zip file into C:\Ouroboros. (or if you want to compile the source files yourself, follow the [[Volume 2 Build]] instructions, then copy the contents of the Source\bin directory to C:\Ouroboros)<br />
# Database schema definitions. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/DBSchemas (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\DBSchemas)<br />
# Sample server config files. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/ConfigFiles (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\ConfigFiles)<br />
# the [magnet:?xt=urn:btih:n642zelj2se2yn2ovmfy2z74tyyf7scs&dn=City%20of%20Heroes&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce Issue 24 client and data files] - this is ''not'' the SCORE client/data.<br />
# [magnet:?xt=urn:btih:CCCE574F7F89229B0FC2EF8AD898BE451864863A&dn=CoHDev_Source_Files_Current%28Updated%29.zip&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce CoHDev_Source_Files_Current(Updated).zip].<br />
# [magnet:?xt=urn:btih:8CE9DE8ECCF29B899B247512F1082F20B59DC4B2&dn=ServerData.7z&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce ServerData.7z].<br />
<br />
== Optional but recommended tools ==<br />
Download all of the following:<br />
#(Optional) Install 7zip (https://www.7-zip.org/download.html)<br />
#*Useful if you do not already have a tool to handle zip files<br />
#(Optional) Install Notepad++ (https://notepad-plus-plus.org/downloads/v7.7.1/)<br />
#*Useful for editing config files.<br />
<br />
== Install SQL Server 2017 Express ==<br />
: You can install SQL Server pretty much on the default settings.<br />
:: Select Basic under installation type:<br />
::: [[File:SQL Server Install 2017 Express.png|thumb|none]]<br />
:: Agree to the EULA if you want to use SQL Server.<br />
::: [[File:SQL Server Install 2017 Express - 2.png|thumb|none]]<br />
:: Tell the server where to install files. I changed this for ease on my system.<br />
::: [[File:SQL Server Install 2017 Express - 3.png|thumb|none]]<br />
:: It should begin installing and eventually you should see "Install has completed successfully". Click close.<br />
::: [[File:SQL Server Install 2017 Express - 4.png|thumb|none]]<br />
<br />
== Install SQL Server Management(SSMS) ==<br />
: You can install SQL Server Management on default settings.<br />
:: Select the location you'd like to install SSMS to. The default is fine.<br />
::: [[File:SSMS Install - 1.png|thumb|none]]<br />
:: It will take awhile to install and you'll see a little progress bar letting you know whats going on<br />
::: [[File:SSMS Install - 2.png|thumb|none]]<br />
:: Eventually it will ask you to reboot the system. Might as well as do that now.<br />
::: [[File:SSMS Install - 3.png|thumb|none]]<br />
<br />
== Setup server files ==<br />
# At this point, you should have ''C:\Ouroboros'' containing exes and dlls<br />
# Create a directory in ''C:\Ouroboros'' called ''data''.<br />
# Open ''ServerData.7z'' and extract all files into ''C:\Ouroboros\data'' (the newly created directory).<br />
# Open ''CoHDev_Source_Files_Current(Updated).zip''.<br />
## Extract "i24 Server and Client Piggs (extracted with CoHTools)" into ''C:\Ouroboros\data''.<br />
## Copy ''maps.db'' from "map.db (modified, working on current VS2010 build)" and place it in ''C:\Ouroboros\data\server\db'', overwriting the old maps.db<br />
# Copy the ''piggs'' folder from your i24 client directory and place them in ''C:\Ouroboros\''. You should end up with ''C:\Ouroboros\piggs\'' populated.<br />
# If installing v2i1, create a directory in your C: drive called "CoH_Data" and another directory inside that, called "attributes" (''C:\CoH_Data\attributes''). In later versions, this isn't necessary.<br />
# Run the following in a command prompt. If it gives you an error message, check the [[#Troubleshooting|Troubleshooting]] section. '''It is essential to run this after all the above steps, because it will overwrite some of the files.'''<br />
#: {{ms|cd c:\Ouroboros}}<br />
#: {{ms|.\mapserver.exe -productionmode -templates}}<br />
# If installing v2i1, copy all files from ''C:\CoH_Data\attributes'' and place them into ''C:\Ouroboros\data\server\db\templates''. If installing a later version, the files should be placed there automatically.<br />
# If you didn't get them from a downloaded release, copy all sample config files from Source/Assets/ConfigFiles into ''c:\Ouroboros'' (for example: Source/Assets/ConfigFiles/data/server/db will become C:/Ouroboros/data/server/db)<br />
<br />
== Database setup ==<br />
Note: If you have a problem downloading these files, copy and paste the contents into notepad++, and then save the file into the “TMP” folder you created with the same name, for example (cohdb.sql)<br />
# Download the latest database schema definitions from the link below.<br />
#* You will need to setup an account first.<br />
#* https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/DBSchemas<br />
# You will need to choose a password for the database user. In these examples it will be "YOURL33TPASS!".<br />
# Launch SQL Server Management Studio from the start menu<br />
# Hit "Connect" on the screen that pops up, with default settings: [[File:SQL Connect.png|thumb|none]]<br />
# We need to enable the sa login so that server can login to the database.<br />
## If you look to the left panel you will see the object explorer and your connection. Right click it and select properties. [[File:SQL Properties.png|thumb|none]]<br />
## When this window comes up hit Security to the left and enable "sql server and windows authentication". Then click ok. [[File:SQL Security.png|thumb|none]]<br />
## In the same panel you used before navigate to Security -> Logins then right click and enter properties the sa user. [[File:SA Properties.png|thumb|none]]<br />
## In this window set the password to the same password you set back at step 4 [[File:Login Props.png|thumb|none]]<br />
## Choose Status from the left panel in this same window and set login to enabled and hit ok. [[File:Login Status.png|thumb|none]]<br />
## Right click the connection in the object explorer again and click Restart. [[File:SQL Restart.png|thumb|none]]<br />
# Next we need to apply the schema for the databases which require this to be done manually (account, auction, auth, and chat)<br />
## Click File -> Open -> File, navigate to the dbschemas that you downloaded at the start, and select cohauc.sql [[File:SSMS File Open.png|thumb|none]] [[File:SSMS Open DBSchema.png|thumb|none]]<br />
## You will see a '''create database''' statement near the top of the file, with two lines that include a '''filename''' parameter. [[File:SSMS DBSchema SQL SRV STR.png|thumb|none]]<br />
## Delete these lines, so that the statement is just: <syntaxhighlight lang="SQL">CREATE DATABASE [cohauc]</syntaxhighlight><br />
## Click the Execute button [[File:SSMS Execute.png|thumb|none]]<br />
## Repeat these steps for cohacc.sql, cohauth.sql and cohchat.sql. '''Do not use cohdb.sql'''<br />
<br />
== Initial database entries ==<br />
<br />
Each dbserver instance is a "shard". This needs to be manually added to authserver. In SQL Server Management Studio, expand "Databases", then right click on cohauth and select "New Query" from the menu. Several pieces of data are needed for this.<br />
<br />
* The IP address (ip) which clients will use to connect to your server. In this example, we will use 127.0.0.1<br />
* The source IP (inner_ip) from which dbserver will connect to authserver. In this example, we will use 127.0.0.1<br />
* The shard name (name) that you will use for dbserver. This will be Paragon by default. You can change it later once you have it working with the default name.<br />
* The auth shard number that you are using in turnstile_server.cfg. By default this is 1.<br />
<br />
In the new query window, enter:<br />
<br />
<syntaxhighlight lang="sql"><br />
INSERT INTO cohauth.dbo.server (id, name, ip, inner_ip, ageLimit, pk_flag, server_group_id) VALUES (1, 'Paragon', '127.0.0.1', '127.0.0.1', 0, 0, 1);<br />
INSERT INTO cohauth.dbo.worldstatus (idx, status) VALUES (1, 1);<br />
</syntaxhighlight><br />
<br />
Then press 'Execute'.<br />
<br />
You will also want to create an account so that you can test connecting to the database. For now, use the instructions in [[I25_FAQ#How_do_I_create_an_account.3F]]<br />
<br />
== Server database connection configuration ==<br />
Navigate to C:\Ouroboros\data\server\db. In each of the following files, look for an SqlLogin line, and change the Pwd= value to your password. Using our example YOURL33TPASS!:<br />
SqlLogin "DRIVER={SQL Server Native Client 11.0};Server=localhost\SQLEXPRESS;Uid=sa;Pwd=YOURL33TPASS!;"<br />
<br />
* account_server.cfg<br />
* auction_server.cfg<br />
* chat_server.cfg<br />
* servers.cfg<br />
<br />
In servers.cfg, also fix SqlInit to be:<br />
SqlInit "create database cohdb;"<br />
<br />
For authserver, we have to configure the connection via ODBC data sources.<br />
<br />
# Launch "ODBC Data Sources (32-bit)" from the start menu, or run directly from C:\Windows\SysWOW64\odbcad32.exe. (Do not use the 64-bit version)<br />
# Click File DSN then click add to the right. [[File:ODBC File DSN.png|thumb|none]]<br />
# Choose ODBC Driver 17 for SQL Server. [[File:ODBC Add Auth 1.png|thumb|none]]<br />
# Click Next.<br />
# Enter AuthDB into the box [[File:ODBC Add Auth 2.png|thumb|none]]<br />
# Click Next, then Finish.<br />
# One of the boxes on the next page will say "Which SQL Server do you want to connect to?". Type localhost\SQLEXPRESS [[File:ODBC Add Auth 3.png|thumb|none]]<br />
# Click Next<br />
# Choose "With SQL Server authentication using a login ID and password entered by the user". Enter "sa" for the username, and the password that you chose: [[File:ODBC Add Auth 4.png|thumb|none]]<br />
# Click Next<br />
# Enable "Change the default database to" and select "cohauth". [[File:ODBC Add Auth 5.png|thumb|none]]<br />
# Click Next<br />
# Default settings are fine on the last page [[File:ODBC Add Auth 6.png|thumb|none]]<br />
# Click Finish<br />
# A box will appear with the settings you have selected. Click "Test Data Source" [[File:ODBC Add Auth 7.png|thumb|none]]<br />
# You should see "TESTS COMPLETED SUCCESSFULLY!" in the output. If not, go back and check your settings. [[File:ODBC Add Auth 8.png|thumb|none]]<br />
# Click OK, then OK again.<br />
<br />
Then we have to enter the username and password again into authserver itself. Start authserver.exe, and the first time that you run it, this window will appear. Enter "sa" and the password that you chose: [[File:Authserver-login.PNG|thumb|none]]<br />
<br />
This username and password is saved in the registry key HKEY_CURRENT_USER\Software\NCSoft\GLOBALAUTH<br />
<br />
== Configure firewall ==<br />
If you are running Windows Firewall, you need to configure it to allow traffic through to your CoH server.<br />
<br />
#Open the start menu, type firewall, and click on Windows Defender Firewall. (or get at it through Control Panel>System and Security>Windows Defender Firewall)<br />
#Click on Advanced settings<br />
#Click on Inbound Rules<br />
#Click on New Rule...<br />
#For Rule Type, select Port, and Next<br />
#Select TCP, Specific local ports, Enter 2106, and then Next<br />
#Allow the connection, Next<br />
#Leave all the checkboxes selected, Next<br />
#Name the rule CoH TCP, Finish<br />
#Repeat the above steps to make a second new rule, but make it UDP instead of TCP, and for ports 7000-7200. Name it CoH UDP.<br />
<br />
== Launch server ==<br />
<br />
The following server applications need to be manually started, in this order:<br />
<br />
# authserver.exe<br />
# dbserver.exe<br />
# launcher.exe<br />
<br />
The rest of the servers are started by loadBalanceShardSpecific.cfg.<br />
<br />
== Connecting a client ==<br />
<br />
Launch the client by opening a command window, and typing:<br />
cd C:\Ouroboros<br />
Ouroboros -auth 127.0.0.1 -console<br />
Login with the account you created, click on the Paragon shard, make a character and enter into the game. If all of that works correctly, then you can stop here if all you want is to play City of Heroes on your own machine by yourself. Otherwise, move on to [[Volume_2_Modifying_Server_For_External_Access|Volume 2 Modifying Server For External Access]].<br />
<br />
== Troubleshooting ==<br />
* ERROR: {{ms|Failed to open attribute file vars.attribute for writing.}} You may get this error when running <code>mapserver -productionmode -templates</code>. If you are installing v2i1, this means you didn't create the C:\CoH_Data\attributes folder before running the command. If you are installing a later version than v2i1, it is likely trying to access C:\Ouroboros\data\server\db\templates instead. It is supposed to create that folder automatically if it doesn't exist. If you are getting this error message anyways, try manually creating the C:\Ouroboros\data\server\db\templates folder and then rerun <code>mapserver -productionmode -templates</code>. <br />
* ERROR: {{ms|'gzip' is not recognized as an internal or external command, operable program or batch file.}} If you get this message, it is usually accompanying a different error message. This happens because the server is trying to compress the dump files that it creates when some errors are found. You can safely ignore any messages about a missing gzip.exe, but if you would like to make these errors not happen any more you can place a gzip.exe and a zip.exe in any folder which is in your Path windows system environment variable. Look for a standard windows gzip.exe download, and you can also download info-zip and use the zip.exe which comes with it.<br />
* ERROR: {{ms|Loading templates...}} If you get errors when you launch dbserver.exe when it tries to load templates, something went wrong with the steps involving running <code>mapserver.exe -productionmode -templates</code> in [[#Setup server files|Setup server files]], and it can't find the template files in C:\Ouroboros\data\server\db\templates.<br />
* ERROR: {{ms|Version difference between client/server.}} This is a mismatch between the client version and the Version parameter in the '''C:\Ouroboros\version.ini''' file<br />
* ERROR: {{ms|Can't connect to DBserver.}} Double-check your firewall settings. Try turning off Windows Firewall completely to see if that lets you connect. If so, then turn Windows Firewall back on and investigate your Inbound firewall rules for CoH.</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Volume_2_Server_Setup&diff=1444Volume 2 Server Setup2019-11-15T17:09:27Z<p>Darwinasm86: /* Database setup */</p>
<hr />
<div>__TOC__<br />
This guide will help you get started in running your own City of Heroes server on your local host (127.0.0.1). It assumes that you will run the City of Heroes client on the same machine as the server. Once you have that working, you can move on to the following guide which explains how to modify your server to allow external access from game clients on other machines.<br />
<br />
== Recommended hardware and settings ==<br />
#The main requirement for City of Heroes is having a decent amount of RAM. The minimum amount for a small personal server is about 8 GB of RAM, with 32 GB of RAM being the recommended amount. <br />
#*If you are running with less than the recommended 32 GB of RAM, it is also recommended that you increase your Windows paging file to simulate having more RAM (Control Panel->System and Security->System->Advanced System Settings->Advanced->Performance Settings->Advanced->Virtual Memory->Change). Setting your paging file to 32768 MB works well for a server with 8 GB of RAM.<br />
#*To support a larger number of players connecting, you will need to add more RAM to your server, though it currently isn't clear at what numbers of players these recommended values become insufficient.<br />
#*For the purposes of this guide, I am using 64.0 GB (G. Skill Trident Z Royal Silver 3200Mhz PC4-25600). <br />
#The server is CPU-intensive, having a decent CPU is important.<br />
#*This setup has been tested with multiple configurations with the oldest recommended being an Intel Core i7 6th Generation Processor.<br />
#*For the purposes of this guide, I am using the Intel Core i9-9900K Processor.<br />
#Running the server on a solid state drive instead of a spinning disc hard drive is recommended.<br />
#If you are installing the server on a computer that you own, your router will need to support NAT loopback if you want game clients to be able to connect to it from both inside and outside of your LAN.<br />
#*For the purposes of this guide, I am using an ASUS ROG GT-AX11000 gaming router.<br />
<br />
== Required software ==<br />
Download all of the following files:<br />
# [https://www.microsoft.com/en-us/sql-server/sql-server-editions-express SQL Server 2017 Express Edition]<br />
# SQL Server Management (SSMS) 18.3.1<br />
#*https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017<br />
#*This is the latest release at the time of this documentation and has been tested.<br />
# The latest stable release of the CoX/Source files from http://build.ourodev.com/archives/Source.master.7z. These are the compiled files from the OuroDev build machine. Extract the contents of the zip file into C:\Ouroboros. (or if you want to compile the source files yourself, follow the [[Volume 2 Build]] instructions, then copy the contents of the Source\bin directory to C:\Ouroboros)<br />
# Database schema definitions. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/DBSchemas (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\DBSchemas)<br />
# Sample server config files. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/ConfigFiles (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\ConfigFiles)<br />
# the [magnet:?xt=urn:btih:n642zelj2se2yn2ovmfy2z74tyyf7scs&dn=City%20of%20Heroes&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce Issue 24 client and data files] - this is ''not'' the SCORE client/data.<br />
# [magnet:?xt=urn:btih:CCCE574F7F89229B0FC2EF8AD898BE451864863A&dn=CoHDev_Source_Files_Current%28Updated%29.zip&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce CoHDev_Source_Files_Current(Updated).zip].<br />
# [magnet:?xt=urn:btih:8CE9DE8ECCF29B899B247512F1082F20B59DC4B2&dn=ServerData.7z&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce ServerData.7z].<br />
<br />
== Optional but recommended tools ==<br />
Download all of the following:<br />
#(Optional) Install 7zip (https://www.7-zip.org/download.html)<br />
#*Useful if you do not already have a tool to handle zip files<br />
#(Optional) Install Notepad++ (https://notepad-plus-plus.org/downloads/v7.7.1/)<br />
#*Useful for editing config files.<br />
<br />
== Install SQL Server 2017 Express ==<br />
: You can install SQL Server pretty much on the default settings.<br />
:: Select Basic under installation type:<br />
::: [[File:SQL Server Install 2017 Express.png|thumb|none]]<br />
:: Agree to the EULA if you want to use SQL Server.<br />
::: [[File:SQL Server Install 2017 Express - 2.png|thumb|none]]<br />
:: Tell the server where to install files. I changed this for ease on my system.<br />
::: [[File:SQL Server Install 2017 Express - 3.png|thumb|none]]<br />
:: It should begin installing and eventually you should see "Install has completed successfully". Click close.<br />
::: [[File:SQL Server Install 2017 Express - 4.png|thumb|none]]<br />
<br />
== Install SQL Server Management(SSMS) ==<br />
: You can install SQL Server Management on default settings.<br />
:: Select the location you'd like to install SSMS to. The default is fine.<br />
::: [[File:SSMS Install - 1.png|thumb|none]]<br />
:: It will take awhile to install and you'll see a little progress bar letting you know whats going on<br />
::: [[File:SSMS Install - 2.png|thumb|none]]<br />
:: Eventually it will ask you to reboot the system. Might as well as do that now.<br />
::: [[File:SSMS Install - 3.png|thumb|none]]<br />
<br />
== Setup server files ==<br />
# At this point, you should have ''C:\Ouroboros'' containing exes and dlls<br />
# Create a directory in ''C:\Ouroboros'' called ''data''.<br />
# Open ''ServerData.7z'' and extract all files into ''C:\Ouroboros\data'' (the newly created directory).<br />
# Open ''CoHDev_Source_Files_Current(Updated).zip''.<br />
## Extract "i24 Server and Client Piggs (extracted with CoHTools)" into ''C:\Ouroboros\data''.<br />
## Copy ''maps.db'' from "map.db (modified, working on current VS2010 build)" and place it in ''C:\Ouroboros\data\server\db'', overwriting the old maps.db<br />
# Copy the ''piggs'' folder from your i24 client directory and place them in ''C:\Ouroboros\''. You should end up with ''C:\Ouroboros\piggs\'' populated.<br />
# If installing v2i1, create a directory in your C: drive called "CoH_Data" and another directory inside that, called "attributes" (''C:\CoH_Data\attributes''). In later versions, this isn't necessary.<br />
# Run the following in a command prompt. If it gives you an error message, check the [[#Troubleshooting|Troubleshooting]] section. '''It is essential to run this after all the above steps, because it will overwrite some of the files.'''<br />
#: {{ms|cd c:\Ouroboros}}<br />
#: {{ms|.\mapserver.exe -productionmode -templates}}<br />
# If installing v2i1, copy all files from ''C:\CoH_Data\attributes'' and place them into ''C:\Ouroboros\data\server\db\templates''. If installing a later version, the files should be placed there automatically.<br />
# If you didn't get them from a downloaded release, copy all sample config files from Source/Assets/ConfigFiles into ''c:\Ouroboros'' (for example: Source/Assets/ConfigFiles/data/server/db will become C:/Ouroboros/data/server/db)<br />
<br />
== Database setup ==<br />
Note: If you have a problem downloading these files, copy and paste the contents into notepad++, and then save the file into the “TMP” folder you created with the same name, for example (cohdb.sql)<br />
# Download the latest database schema definitions from the link below.<br />
#* You will need to setup an account first.<br />
#* https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/DBSchemas<br />
# You will need to choose a password for the database user. In these examples it will be "YOURL33TPASS!".<br />
# Launch SQL Server Management Studio from the start menu<br />
# Hit "Connect" on the screen that pops up, with default settings: [[File:SQL Connect.png|thumb|none]]<br />
# We need to enable the sa login so that server can login to the database.<br />
## If you look to the left panel you will see the object explorer and your connection. Right click it and select properties. [[File:SQL Properties.png|thumb|none]]<br />
## When this window comes up hit Security to the left and enable "sql server and windows authentication". Then click ok. [[File:SQL Security.png|thumb|none]]<br />
## In the same panel you used before navigate to Security -> Logins then right click and enter properties the sa user. [[File:SA Properties.png|thumb|none]]<br />
## In this window set the password to the same password you set back at step 4 [[File:Login Props.png|thumb|none]]<br />
## Choose Status from the left panel in this same window and set login to enabled and hit ok. [[File:Login Status.png|thumb|none]]<br />
## Right click the connection in the object explorer again and click Restart. [[File:SQL Restart.png|thumb|none]]<br />
# Next we need to apply the schema for the databases which require this to be done manually (account, auction, auth, and chat)<br />
## Click File -> Open -> File, navigate to the dbschemas that you downloaded at the start, and select cohauc.sql [[File:SSMS File Open.png|thumb|none]] [[File:SSMS Open DBSchema.png|thumb|none]]<br />
## You will see a '''create database''' statement near the top of the file, with two lines that include a '''filename''' parameter. [[File:SSMS DBSchema SQL SRV STR.png|thumb|none]]<br />
## Delete these lines, so that the statement is just: <syntaxhighlight lang="SQL">CREATE DATABASE [cohauc]</syntaxhighlight><br />
## Click the Execute button [[File:SSMS Execute.png|thumb|none]]<br />
## Repeat these steps for cohacc.sql, cohauth.sql and cohchat.sql. '''Do not use cohdb.sql'''<br />
<br />
== Initial database entries ==<br />
<br />
Each dbserver instance is a "shard". This needs to be manually added to authserver. In SQL Server Management Studio, expand "Databases", then right click on cohauth and select "New Query" from the menu. Several pieces of data are needed for this.<br />
<br />
* The IP address (ip) which clients will use to connect to your server. In this example, we will use 127.0.0.1<br />
* The source IP (inner_ip) from which dbserver will connect to authserver. In this example, we will use 127.0.0.1<br />
* The shard name (name) that you will use for dbserver. This will be Paragon by default. You can change it later once you have it working with the default name.<br />
* The auth shard number that you are using in turnstile_server.cfg. By default this is 1.<br />
<br />
In the new query window, enter:<br />
<br />
<syntaxhighlight lang="sql"><br />
INSERT INTO cohauth.dbo.server (id, name, ip, inner_ip, ageLimit, pk_flag, server_group_id) VALUES (1, 'Paragon', '127.0.0.1', '127.0.0.1', 0, 0, 1);<br />
INSERT INTO cohauth.dbo.worldstatus (idx, status) VALUES (1, 0);<br />
</syntaxhighlight><br />
<br />
Then press 'Execute'.<br />
<br />
You will also want to create an account so that you can test connecting to the database. For now, use the instructions in [[I25_FAQ#How_do_I_create_an_account.3F]]<br />
<br />
== Server database connection configuration ==<br />
Navigate to C:\Ouroboros\data\server\db. In each of the following files, look for an SqlLogin line, and change the Pwd= value to your password. Using our example YOURL33TPASS!:<br />
SqlLogin "DRIVER={SQL Server Native Client 11.0};Server=localhost\SQLEXPRESS;Uid=sa;Pwd=YOURL33TPASS!;"<br />
<br />
* account_server.cfg<br />
* auction_server.cfg<br />
* chat_server.cfg<br />
* servers.cfg<br />
<br />
In servers.cfg, also fix SqlInit to be:<br />
SqlInit "create database cohdb;"<br />
<br />
For authserver, we have to configure the connection via ODBC data sources.<br />
<br />
# Launch "ODBC Data Sources (32-bit)" from the start menu, or run directly from C:\Windows\SysWOW64\odbcad32.exe. (Do not use the 64-bit version)<br />
# Click File DSN then click add to the right. [[File:ODBC File DSN.png|thumb|none]]<br />
# Choose ODBC Driver 17 for SQL Server. [[File:ODBC Add Auth 1.png|thumb|none]]<br />
# Click Next.<br />
# Enter AuthDB into the box [[File:ODBC Add Auth 2.png|thumb|none]]<br />
# Click Next, then Finish.<br />
# One of the boxes on the next page will say "Which SQL Server do you want to connect to?". Type localhost\SQLEXPRESS [[File:ODBC Add Auth 3.png|thumb|none]]<br />
# Click Next<br />
# Choose "With SQL Server authentication using a login ID and password entered by the user". Enter "sa" for the username, and the password that you chose: [[File:ODBC Add Auth 4.png|thumb|none]]<br />
# Click Next<br />
# Enable "Change the default database to" and select "cohauth". [[File:ODBC Add Auth 5.png|thumb|none]]<br />
# Click Next<br />
# Default settings are fine on the last page [[File:ODBC Add Auth 6.png|thumb|none]]<br />
# Click Finish<br />
# A box will appear with the settings you have selected. Click "Test Data Source" [[File:ODBC Add Auth 7.png|thumb|none]]<br />
# You should see "TESTS COMPLETED SUCCESSFULLY!" in the output. If not, go back and check your settings. [[File:ODBC Add Auth 8.png|thumb|none]]<br />
# Click OK, then OK again.<br />
<br />
Then we have to enter the username and password again into authserver itself. Start authserver.exe, and the first time that you run it, this window will appear. Enter "sa" and the password that you chose: [[File:Authserver-login.PNG|thumb|none]]<br />
<br />
This username and password is saved in the registry key HKEY_CURRENT_USER\Software\NCSoft\GLOBALAUTH<br />
<br />
== Configure firewall ==<br />
If you are running Windows Firewall, you need to configure it to allow traffic through to your CoH server.<br />
<br />
#Open the start menu, type firewall, and click on Windows Defender Firewall. (or get at it through Control Panel>System and Security>Windows Defender Firewall)<br />
#Click on Advanced settings<br />
#Click on Inbound Rules<br />
#Click on New Rule...<br />
#For Rule Type, select Port, and Next<br />
#Select TCP, Specific local ports, Enter 2106, and then Next<br />
#Allow the connection, Next<br />
#Leave all the checkboxes selected, Next<br />
#Name the rule CoH TCP, Finish<br />
#Repeat the above steps to make a second new rule, but make it UDP instead of TCP, and for ports 7000-7200. Name it CoH UDP.<br />
<br />
== Launch server ==<br />
<br />
The following server applications need to be manually started, in this order:<br />
<br />
# authserver.exe<br />
# dbserver.exe<br />
# launcher.exe<br />
<br />
The rest of the servers are started by loadBalanceShardSpecific.cfg.<br />
<br />
== Connecting a client ==<br />
<br />
Launch the client by opening a command window, and typing:<br />
cd C:\Ouroboros<br />
Ouroboros -auth 127.0.0.1 -console<br />
Login with the account you created, click on the Paragon shard, make a character and enter into the game. If all of that works correctly, then you can stop here if all you want is to play City of Heroes on your own machine by yourself. Otherwise, move on to [[Volume_2_Modifying_Server_For_External_Access|Volume 2 Modifying Server For External Access]].<br />
<br />
== Troubleshooting ==<br />
* ERROR: {{ms|Failed to open attribute file vars.attribute for writing.}} You may get this error when running <code>mapserver -productionmode -templates</code>. If you are installing v2i1, this means you didn't create the C:\CoH_Data\attributes folder before running the command. If you are installing a later version than v2i1, it is likely trying to access C:\Ouroboros\data\server\db\templates instead. It is supposed to create that folder automatically if it doesn't exist. If you are getting this error message anyways, try manually creating the C:\Ouroboros\data\server\db\templates folder and then rerun <code>mapserver -productionmode -templates</code>. <br />
* ERROR: {{ms|'gzip' is not recognized as an internal or external command, operable program or batch file.}} If you get this message, it is usually accompanying a different error message. This happens because the server is trying to compress the dump files that it creates when some errors are found. You can safely ignore any messages about a missing gzip.exe, but if you would like to make these errors not happen any more you can place a gzip.exe and a zip.exe in any folder which is in your Path windows system environment variable. Look for a standard windows gzip.exe download, and you can also download info-zip and use the zip.exe which comes with it.<br />
* ERROR: {{ms|Loading templates...}} If you get errors when you launch dbserver.exe when it tries to load templates, something went wrong with the steps involving running <code>mapserver.exe -productionmode -templates</code> in [[#Setup server files|Setup server files]], and it can't find the template files in C:\Ouroboros\data\server\db\templates.<br />
* ERROR: {{ms|Version difference between client/server.}} This is a mismatch between the client version and the Version parameter in the '''C:\Ouroboros\version.ini''' file<br />
* ERROR: {{ms|Can't connect to DBserver.}} Double-check your firewall settings. Try turning off Windows Firewall completely to see if that lets you connect. If so, then turn Windows Firewall back on and investigate your Inbound firewall rules for CoH.</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Volume_2_Server_Setup&diff=1443Volume 2 Server Setup2019-11-15T17:07:38Z<p>Darwinasm86: /* Database setup */</p>
<hr />
<div>__TOC__<br />
This guide will help you get started in running your own City of Heroes server on your local host (127.0.0.1). It assumes that you will run the City of Heroes client on the same machine as the server. Once you have that working, you can move on to the following guide which explains how to modify your server to allow external access from game clients on other machines.<br />
<br />
== Recommended hardware and settings ==<br />
#The main requirement for City of Heroes is having a decent amount of RAM. The minimum amount for a small personal server is about 8 GB of RAM, with 32 GB of RAM being the recommended amount. <br />
#*If you are running with less than the recommended 32 GB of RAM, it is also recommended that you increase your Windows paging file to simulate having more RAM (Control Panel->System and Security->System->Advanced System Settings->Advanced->Performance Settings->Advanced->Virtual Memory->Change). Setting your paging file to 32768 MB works well for a server with 8 GB of RAM.<br />
#*To support a larger number of players connecting, you will need to add more RAM to your server, though it currently isn't clear at what numbers of players these recommended values become insufficient.<br />
#*For the purposes of this guide, I am using 64.0 GB (G. Skill Trident Z Royal Silver 3200Mhz PC4-25600). <br />
#The server is CPU-intensive, having a decent CPU is important.<br />
#*This setup has been tested with multiple configurations with the oldest recommended being an Intel Core i7 6th Generation Processor.<br />
#*For the purposes of this guide, I am using the Intel Core i9-9900K Processor.<br />
#Running the server on a solid state drive instead of a spinning disc hard drive is recommended.<br />
#If you are installing the server on a computer that you own, your router will need to support NAT loopback if you want game clients to be able to connect to it from both inside and outside of your LAN.<br />
#*For the purposes of this guide, I am using an ASUS ROG GT-AX11000 gaming router.<br />
<br />
== Required software ==<br />
Download all of the following files:<br />
# [https://www.microsoft.com/en-us/sql-server/sql-server-editions-express SQL Server 2017 Express Edition]<br />
# SQL Server Management (SSMS) 18.3.1<br />
#*https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017<br />
#*This is the latest release at the time of this documentation and has been tested.<br />
# The latest stable release of the CoX/Source files from http://build.ourodev.com/archives/Source.master.7z. These are the compiled files from the OuroDev build machine. Extract the contents of the zip file into C:\Ouroboros. (or if you want to compile the source files yourself, follow the [[Volume 2 Build]] instructions, then copy the contents of the Source\bin directory to C:\Ouroboros)<br />
# Database schema definitions. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/DBSchemas (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\DBSchemas)<br />
# Sample server config files. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/ConfigFiles (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\ConfigFiles)<br />
# the [magnet:?xt=urn:btih:n642zelj2se2yn2ovmfy2z74tyyf7scs&dn=City%20of%20Heroes&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce Issue 24 client and data files] - this is ''not'' the SCORE client/data.<br />
# [magnet:?xt=urn:btih:CCCE574F7F89229B0FC2EF8AD898BE451864863A&dn=CoHDev_Source_Files_Current%28Updated%29.zip&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce CoHDev_Source_Files_Current(Updated).zip].<br />
# [magnet:?xt=urn:btih:8CE9DE8ECCF29B899B247512F1082F20B59DC4B2&dn=ServerData.7z&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce ServerData.7z].<br />
<br />
== Optional but recommended tools ==<br />
Download all of the following:<br />
#(Optional) Install 7zip (https://www.7-zip.org/download.html)<br />
#*Useful if you do not already have a tool to handle zip files<br />
#(Optional) Install Notepad++ (https://notepad-plus-plus.org/downloads/v7.7.1/)<br />
#*Useful for editing config files.<br />
<br />
== Install SQL Server 2017 Express ==<br />
: You can install SQL Server pretty much on the default settings.<br />
:: Select Basic under installation type:<br />
::: [[File:SQL Server Install 2017 Express.png|thumb|none]]<br />
:: Agree to the EULA if you want to use SQL Server.<br />
::: [[File:SQL Server Install 2017 Express - 2.png|thumb|none]]<br />
:: Tell the server where to install files. I changed this for ease on my system.<br />
::: [[File:SQL Server Install 2017 Express - 3.png|thumb|none]]<br />
:: It should begin installing and eventually you should see "Install has completed successfully". Click close.<br />
::: [[File:SQL Server Install 2017 Express - 4.png|thumb|none]]<br />
<br />
== Install SQL Server Management(SSMS) ==<br />
: You can install SQL Server Management on default settings.<br />
:: Select the location you'd like to install SSMS to. The default is fine.<br />
::: [[File:SSMS Install - 1.png|thumb|none]]<br />
:: It will take awhile to install and you'll see a little progress bar letting you know whats going on<br />
::: [[File:SSMS Install - 2.png|thumb|none]]<br />
:: Eventually it will ask you to reboot the system. Might as well as do that now.<br />
::: [[File:SSMS Install - 3.png|thumb|none]]<br />
<br />
== Setup server files ==<br />
# At this point, you should have ''C:\Ouroboros'' containing exes and dlls<br />
# Create a directory in ''C:\Ouroboros'' called ''data''.<br />
# Open ''ServerData.7z'' and extract all files into ''C:\Ouroboros\data'' (the newly created directory).<br />
# Open ''CoHDev_Source_Files_Current(Updated).zip''.<br />
## Extract "i24 Server and Client Piggs (extracted with CoHTools)" into ''C:\Ouroboros\data''.<br />
## Copy ''maps.db'' from "map.db (modified, working on current VS2010 build)" and place it in ''C:\Ouroboros\data\server\db'', overwriting the old maps.db<br />
# Copy the ''piggs'' folder from your i24 client directory and place them in ''C:\Ouroboros\''. You should end up with ''C:\Ouroboros\piggs\'' populated.<br />
# If installing v2i1, create a directory in your C: drive called "CoH_Data" and another directory inside that, called "attributes" (''C:\CoH_Data\attributes''). In later versions, this isn't necessary.<br />
# Run the following in a command prompt. If it gives you an error message, check the [[#Troubleshooting|Troubleshooting]] section. '''It is essential to run this after all the above steps, because it will overwrite some of the files.'''<br />
#: {{ms|cd c:\Ouroboros}}<br />
#: {{ms|.\mapserver.exe -productionmode -templates}}<br />
# If installing v2i1, copy all files from ''C:\CoH_Data\attributes'' and place them into ''C:\Ouroboros\data\server\db\templates''. If installing a later version, the files should be placed there automatically.<br />
# If you didn't get them from a downloaded release, copy all sample config files from Source/Assets/ConfigFiles into ''c:\Ouroboros'' (for example: Source/Assets/ConfigFiles/data/server/db will become C:/Ouroboros/data/server/db)<br />
<br />
== Database setup ==<br />
# Download the latest database schema definitions from the link below.<br />
#* You will need to setup an account first.<br />
#* https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/DBSchemas<br />
Note: If you have a problem downloading these files, copy and paste the contents into notepad++, and then save the file into the “TMP” folder you created with the same name, for example (cohdb.sql)<br />
# You will need to choose a password for the database user. In these examples it will be "YOURL33TPASS!".<br />
# Launch SQL Server Management Studio from the start menu<br />
# Hit "Connect" on the screen that pops up, with default settings: [[File:SQL Connect.png|thumb|none]]<br />
# We need to enable the sa login so that server can login to the database.<br />
## If you look to the left panel you will see the object explorer and your connection. Right click it and select properties. [[File:SQL Properties.png|thumb|none]]<br />
## When this window comes up hit Security to the left and enable "sql server and windows authentication". Then click ok. [[File:SQL Security.png|thumb|none]]<br />
## In the same panel you used before navigate to Security -> Logins then right click and enter properties the sa user. [[File:SA Properties.png|thumb|none]]<br />
## In this window set the password to the same password you set back at step 4 [[File:Login Props.png|thumb|none]]<br />
## Choose Status from the left panel in this same window and set login to enabled and hit ok. [[File:Login Status.png|thumb|none]]<br />
## Right click the connection in the object explorer again and click Restart. [[File:SQL Restart.png|thumb|none]]<br />
# Next we need to apply the schema for the databases which require this to be done manually (account, auction, auth, and chat)<br />
## Click File -> Open -> File, navigate to the dbschemas that you downloaded at the start, and select cohauc.sql [[File:SSMS File Open.png|thumb|none]] [[File:SSMS Open DBSchema.png|thumb|none]]<br />
## You will see a '''create database''' statement near the top of the file, with two lines that include a '''filename''' parameter. [[File:SSMS DBSchema SQL SRV STR.png|thumb|none]]<br />
## Delete these lines, so that the statement is just: <syntaxhighlight lang="SQL">CREATE DATABASE [cohauc]</syntaxhighlight><br />
## Click the Execute button [[File:SSMS Execute.png|thumb|none]]<br />
## Repeat these steps for cohacc.sql, cohauth.sql and cohchat.sql. '''Do not use cohdb.sql'''<br />
<br />
== Initial database entries ==<br />
<br />
Each dbserver instance is a "shard". This needs to be manually added to authserver. In SQL Server Management Studio, expand "Databases", then right click on cohauth and select "New Query" from the menu. Several pieces of data are needed for this.<br />
<br />
* The IP address (ip) which clients will use to connect to your server. In this example, we will use 127.0.0.1<br />
* The source IP (inner_ip) from which dbserver will connect to authserver. In this example, we will use 127.0.0.1<br />
* The shard name (name) that you will use for dbserver. This will be Paragon by default. You can change it later once you have it working with the default name.<br />
* The auth shard number that you are using in turnstile_server.cfg. By default this is 1.<br />
<br />
In the new query window, enter:<br />
<br />
<syntaxhighlight lang="sql"><br />
INSERT INTO cohauth.dbo.server (id, name, ip, inner_ip, ageLimit, pk_flag, server_group_id) VALUES (1, 'Paragon', '127.0.0.1', '127.0.0.1', 0, 0, 1);<br />
INSERT INTO cohauth.dbo.worldstatus (idx, status) VALUES (1, 0);<br />
</syntaxhighlight><br />
<br />
Then press 'Execute'.<br />
<br />
You will also want to create an account so that you can test connecting to the database. For now, use the instructions in [[I25_FAQ#How_do_I_create_an_account.3F]]<br />
<br />
== Server database connection configuration ==<br />
Navigate to C:\Ouroboros\data\server\db. In each of the following files, look for an SqlLogin line, and change the Pwd= value to your password. Using our example YOURL33TPASS!:<br />
SqlLogin "DRIVER={SQL Server Native Client 11.0};Server=localhost\SQLEXPRESS;Uid=sa;Pwd=YOURL33TPASS!;"<br />
<br />
* account_server.cfg<br />
* auction_server.cfg<br />
* chat_server.cfg<br />
* servers.cfg<br />
<br />
In servers.cfg, also fix SqlInit to be:<br />
SqlInit "create database cohdb;"<br />
<br />
For authserver, we have to configure the connection via ODBC data sources.<br />
<br />
# Launch "ODBC Data Sources (32-bit)" from the start menu, or run directly from C:\Windows\SysWOW64\odbcad32.exe. (Do not use the 64-bit version)<br />
# Click File DSN then click add to the right. [[File:ODBC File DSN.png|thumb|none]]<br />
# Choose ODBC Driver 17 for SQL Server. [[File:ODBC Add Auth 1.png|thumb|none]]<br />
# Click Next.<br />
# Enter AuthDB into the box [[File:ODBC Add Auth 2.png|thumb|none]]<br />
# Click Next, then Finish.<br />
# One of the boxes on the next page will say "Which SQL Server do you want to connect to?". Type localhost\SQLEXPRESS [[File:ODBC Add Auth 3.png|thumb|none]]<br />
# Click Next<br />
# Choose "With SQL Server authentication using a login ID and password entered by the user". Enter "sa" for the username, and the password that you chose: [[File:ODBC Add Auth 4.png|thumb|none]]<br />
# Click Next<br />
# Enable "Change the default database to" and select "cohauth". [[File:ODBC Add Auth 5.png|thumb|none]]<br />
# Click Next<br />
# Default settings are fine on the last page [[File:ODBC Add Auth 6.png|thumb|none]]<br />
# Click Finish<br />
# A box will appear with the settings you have selected. Click "Test Data Source" [[File:ODBC Add Auth 7.png|thumb|none]]<br />
# You should see "TESTS COMPLETED SUCCESSFULLY!" in the output. If not, go back and check your settings. [[File:ODBC Add Auth 8.png|thumb|none]]<br />
# Click OK, then OK again.<br />
<br />
Then we have to enter the username and password again into authserver itself. Start authserver.exe, and the first time that you run it, this window will appear. Enter "sa" and the password that you chose: [[File:Authserver-login.PNG|thumb|none]]<br />
<br />
This username and password is saved in the registry key HKEY_CURRENT_USER\Software\NCSoft\GLOBALAUTH<br />
<br />
== Configure firewall ==<br />
If you are running Windows Firewall, you need to configure it to allow traffic through to your CoH server.<br />
<br />
#Open the start menu, type firewall, and click on Windows Defender Firewall. (or get at it through Control Panel>System and Security>Windows Defender Firewall)<br />
#Click on Advanced settings<br />
#Click on Inbound Rules<br />
#Click on New Rule...<br />
#For Rule Type, select Port, and Next<br />
#Select TCP, Specific local ports, Enter 2106, and then Next<br />
#Allow the connection, Next<br />
#Leave all the checkboxes selected, Next<br />
#Name the rule CoH TCP, Finish<br />
#Repeat the above steps to make a second new rule, but make it UDP instead of TCP, and for ports 7000-7200. Name it CoH UDP.<br />
<br />
== Launch server ==<br />
<br />
The following server applications need to be manually started, in this order:<br />
<br />
# authserver.exe<br />
# dbserver.exe<br />
# launcher.exe<br />
<br />
The rest of the servers are started by loadBalanceShardSpecific.cfg.<br />
<br />
== Connecting a client ==<br />
<br />
Launch the client by opening a command window, and typing:<br />
cd C:\Ouroboros<br />
Ouroboros -auth 127.0.0.1 -console<br />
Login with the account you created, click on the Paragon shard, make a character and enter into the game. If all of that works correctly, then you can stop here if all you want is to play City of Heroes on your own machine by yourself. Otherwise, move on to [[Volume_2_Modifying_Server_For_External_Access|Volume 2 Modifying Server For External Access]].<br />
<br />
== Troubleshooting ==<br />
* ERROR: {{ms|Failed to open attribute file vars.attribute for writing.}} You may get this error when running <code>mapserver -productionmode -templates</code>. If you are installing v2i1, this means you didn't create the C:\CoH_Data\attributes folder before running the command. If you are installing a later version than v2i1, it is likely trying to access C:\Ouroboros\data\server\db\templates instead. It is supposed to create that folder automatically if it doesn't exist. If you are getting this error message anyways, try manually creating the C:\Ouroboros\data\server\db\templates folder and then rerun <code>mapserver -productionmode -templates</code>. <br />
* ERROR: {{ms|'gzip' is not recognized as an internal or external command, operable program or batch file.}} If you get this message, it is usually accompanying a different error message. This happens because the server is trying to compress the dump files that it creates when some errors are found. You can safely ignore any messages about a missing gzip.exe, but if you would like to make these errors not happen any more you can place a gzip.exe and a zip.exe in any folder which is in your Path windows system environment variable. Look for a standard windows gzip.exe download, and you can also download info-zip and use the zip.exe which comes with it.<br />
* ERROR: {{ms|Loading templates...}} If you get errors when you launch dbserver.exe when it tries to load templates, something went wrong with the steps involving running <code>mapserver.exe -productionmode -templates</code> in [[#Setup server files|Setup server files]], and it can't find the template files in C:\Ouroboros\data\server\db\templates.<br />
* ERROR: {{ms|Version difference between client/server.}} This is a mismatch between the client version and the Version parameter in the '''C:\Ouroboros\version.ini''' file<br />
* ERROR: {{ms|Can't connect to DBserver.}} Double-check your firewall settings. Try turning off Windows Firewall completely to see if that lets you connect. If so, then turn Windows Firewall back on and investigate your Inbound firewall rules for CoH.</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Volume_2_Server_Setup&diff=1442Volume 2 Server Setup2019-11-15T16:48:20Z<p>Darwinasm86: /* Database setup */</p>
<hr />
<div>__TOC__<br />
This guide will help you get started in running your own City of Heroes server on your local host (127.0.0.1). It assumes that you will run the City of Heroes client on the same machine as the server. Once you have that working, you can move on to the following guide which explains how to modify your server to allow external access from game clients on other machines.<br />
<br />
== Recommended hardware and settings ==<br />
#The main requirement for City of Heroes is having a decent amount of RAM. The minimum amount for a small personal server is about 8 GB of RAM, with 32 GB of RAM being the recommended amount. <br />
#*If you are running with less than the recommended 32 GB of RAM, it is also recommended that you increase your Windows paging file to simulate having more RAM (Control Panel->System and Security->System->Advanced System Settings->Advanced->Performance Settings->Advanced->Virtual Memory->Change). Setting your paging file to 32768 MB works well for a server with 8 GB of RAM.<br />
#*To support a larger number of players connecting, you will need to add more RAM to your server, though it currently isn't clear at what numbers of players these recommended values become insufficient.<br />
#*For the purposes of this guide, I am using 64.0 GB (G. Skill Trident Z Royal Silver 3200Mhz PC4-25600). <br />
#The server is CPU-intensive, having a decent CPU is important.<br />
#*This setup has been tested with multiple configurations with the oldest recommended being an Intel Core i7 6th Generation Processor.<br />
#*For the purposes of this guide, I am using the Intel Core i9-9900K Processor.<br />
#Running the server on a solid state drive instead of a spinning disc hard drive is recommended.<br />
#If you are installing the server on a computer that you own, your router will need to support NAT loopback if you want game clients to be able to connect to it from both inside and outside of your LAN.<br />
#*For the purposes of this guide, I am using an ASUS ROG GT-AX11000 gaming router.<br />
<br />
== Required software ==<br />
Download all of the following files:<br />
# [https://www.microsoft.com/en-us/sql-server/sql-server-editions-express SQL Server 2017 Express Edition]<br />
# SQL Server Management (SSMS) 18.3.1<br />
#*https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017<br />
#*This is the latest release at the time of this documentation and has been tested.<br />
# The latest stable release of the CoX/Source files from http://build.ourodev.com/archives/Source.master.7z. These are the compiled files from the OuroDev build machine. Extract the contents of the zip file into C:\Ouroboros. (or if you want to compile the source files yourself, follow the [[Volume 2 Build]] instructions, then copy the contents of the Source\bin directory to C:\Ouroboros)<br />
# Database schema definitions. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/DBSchemas (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\DBSchemas)<br />
# Sample server config files. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/ConfigFiles (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\ConfigFiles)<br />
# the [magnet:?xt=urn:btih:n642zelj2se2yn2ovmfy2z74tyyf7scs&dn=City%20of%20Heroes&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce Issue 24 client and data files] - this is ''not'' the SCORE client/data.<br />
# [magnet:?xt=urn:btih:CCCE574F7F89229B0FC2EF8AD898BE451864863A&dn=CoHDev_Source_Files_Current%28Updated%29.zip&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce CoHDev_Source_Files_Current(Updated).zip].<br />
# [magnet:?xt=urn:btih:8CE9DE8ECCF29B899B247512F1082F20B59DC4B2&dn=ServerData.7z&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce ServerData.7z].<br />
<br />
== Optional but recommended tools ==<br />
Download all of the following:<br />
#(Optional) Install 7zip (https://www.7-zip.org/download.html)<br />
#*Useful if you do not already have a tool to handle zip files<br />
#(Optional) Install Notepad++ (https://notepad-plus-plus.org/downloads/v7.7.1/)<br />
#*Useful for editing config files.<br />
<br />
== Install SQL Server 2017 Express ==<br />
: You can install SQL Server pretty much on the default settings.<br />
:: Select Basic under installation type:<br />
::: [[File:SQL Server Install 2017 Express.png|thumb|none]]<br />
:: Agree to the EULA if you want to use SQL Server.<br />
::: [[File:SQL Server Install 2017 Express - 2.png|thumb|none]]<br />
:: Tell the server where to install files. I changed this for ease on my system.<br />
::: [[File:SQL Server Install 2017 Express - 3.png|thumb|none]]<br />
:: It should begin installing and eventually you should see "Install has completed successfully". Click close.<br />
::: [[File:SQL Server Install 2017 Express - 4.png|thumb|none]]<br />
<br />
== Install SQL Server Management(SSMS) ==<br />
: You can install SQL Server Management on default settings.<br />
:: Select the location you'd like to install SSMS to. The default is fine.<br />
::: [[File:SSMS Install - 1.png|thumb|none]]<br />
:: It will take awhile to install and you'll see a little progress bar letting you know whats going on<br />
::: [[File:SSMS Install - 2.png|thumb|none]]<br />
:: Eventually it will ask you to reboot the system. Might as well as do that now.<br />
::: [[File:SSMS Install - 3.png|thumb|none]]<br />
<br />
== Setup server files ==<br />
# At this point, you should have ''C:\Ouroboros'' containing exes and dlls<br />
# Create a directory in ''C:\Ouroboros'' called ''data''.<br />
# Open ''ServerData.7z'' and extract all files into ''C:\Ouroboros\data'' (the newly created directory).<br />
# Open ''CoHDev_Source_Files_Current(Updated).zip''.<br />
## Extract "i24 Server and Client Piggs (extracted with CoHTools)" into ''C:\Ouroboros\data''.<br />
## Copy ''maps.db'' from "map.db (modified, working on current VS2010 build)" and place it in ''C:\Ouroboros\data\server\db'', overwriting the old maps.db<br />
# Copy the ''piggs'' folder from your i24 client directory and place them in ''C:\Ouroboros\''. You should end up with ''C:\Ouroboros\piggs\'' populated.<br />
# If installing v2i1, create a directory in your C: drive called "CoH_Data" and another directory inside that, called "attributes" (''C:\CoH_Data\attributes''). In later versions, this isn't necessary.<br />
# Run the following in a command prompt. If it gives you an error message, check the [[#Troubleshooting|Troubleshooting]] section. '''It is essential to run this after all the above steps, because it will overwrite some of the files.'''<br />
#: {{ms|cd c:\Ouroboros}}<br />
#: {{ms|.\mapserver.exe -productionmode -templates}}<br />
# If installing v2i1, copy all files from ''C:\CoH_Data\attributes'' and place them into ''C:\Ouroboros\data\server\db\templates''. If installing a later version, the files should be placed there automatically.<br />
# If you didn't get them from a downloaded release, copy all sample config files from Source/Assets/ConfigFiles into ''c:\Ouroboros'' (for example: Source/Assets/ConfigFiles/data/server/db will become C:/Ouroboros/data/server/db)<br />
<br />
== Database setup ==<br />
#Download the latest database schema definitions from the link below.<br />
#*You will need to setup an account first.<br />
#*https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/DBSchemas<br />
Note: If you have a problem downloading these files, copy and paste the contents into notepad++, and then save the file into the “TMP” folder you created with the same name, for example (cohdb.sql)<br />
# You will need to choose a password for the database user. In these examples it will be "YOURL33TPASS!".<br />
# Launch SQL Server Management Studio from the start menu<br />
# Hit "Connect" on the screen that pops up, with default settings: [[File:SQL Connect.png|thumb|none]]<br />
# We need to enable the sa login so that server can login to the database.<br />
## If you look to the left panel you will see the object explorer and your connection. Right click it and select properties. [[File:SQL Properties.png|thumb|none]]<br />
## When this window comes up hit Security to the left and enable "sql server and windows authentication". Then click ok. [[File:SQL Security.png|thumb|none]]<br />
## In the same panel you used before navigate to Security -> Logins then right click and enter properties the sa user. [[File:SA Properties.png|thumb|none]]<br />
## In this window set the password to the same password you set back at step 4 [[File:Login Props.png|thumb|none]]<br />
## Choose Status from the left panel in this same window and set login to enabled and hit ok. [[File:Login Status.png|thumb|none]]<br />
## Right click the connection in the object explorer again and click Restart. [[File:SQL Restart.png|thumb|none]]<br />
# Next we need to apply the schema for the databases which require this to be done manually (account, auction, auth, and chat)<br />
## Click File -> Open -> File, navigate to the dbschemas that you downloaded at the start, and select cohauc.sql [[File:SSMS File Open.png|thumb|none]] [[File:SSMS Open DBSchema.png|thumb|none]]<br />
## You will see a '''create database''' statement near the top of the file, with two lines that include a '''filename''' parameter. [[File:SSMS DBSchema SQL SRV STR.png|thumb|none]]<br />
## Delete these lines, so that the statement is just: <syntaxhighlight lang="SQL">CREATE DATABASE [cohauc]</syntaxhighlight><br />
## Click the Execute button [[File:SSMS Execute.png|thumb|none]]<br />
## Repeat these steps for cohacc.sql, cohauth.sql and cohchat.sql. '''Do not use cohdb.sql'''<br />
<br />
== Initial database entries ==<br />
<br />
Each dbserver instance is a "shard". This needs to be manually added to authserver. In SQL Server Management Studio, expand "Databases", then right click on cohauth and select "New Query" from the menu. Several pieces of data are needed for this.<br />
<br />
* The IP address (ip) which clients will use to connect to your server. In this example, we will use 127.0.0.1<br />
* The source IP (inner_ip) from which dbserver will connect to authserver. In this example, we will use 127.0.0.1<br />
* The shard name (name) that you will use for dbserver. This will be Paragon by default. You can change it later once you have it working with the default name.<br />
* The auth shard number that you are using in turnstile_server.cfg. By default this is 1.<br />
<br />
In the new query window, enter:<br />
<br />
<syntaxhighlight lang="sql"><br />
INSERT INTO cohauth.dbo.server (id, name, ip, inner_ip, ageLimit, pk_flag, server_group_id) VALUES (1, 'Paragon', '127.0.0.1', '127.0.0.1', 0, 0, 1);<br />
INSERT INTO cohauth.dbo.worldstatus (idx, status) VALUES (1, 0);<br />
</syntaxhighlight><br />
<br />
Then press 'Execute'.<br />
<br />
You will also want to create an account so that you can test connecting to the database. For now, use the instructions in [[I25_FAQ#How_do_I_create_an_account.3F]]<br />
<br />
== Server database connection configuration ==<br />
Navigate to C:\Ouroboros\data\server\db. In each of the following files, look for an SqlLogin line, and change the Pwd= value to your password. Using our example YOURL33TPASS!:<br />
SqlLogin "DRIVER={SQL Server Native Client 11.0};Server=localhost\SQLEXPRESS;Uid=sa;Pwd=YOURL33TPASS!;"<br />
<br />
* account_server.cfg<br />
* auction_server.cfg<br />
* chat_server.cfg<br />
* servers.cfg<br />
<br />
In servers.cfg, also fix SqlInit to be:<br />
SqlInit "create database cohdb;"<br />
<br />
For authserver, we have to configure the connection via ODBC data sources.<br />
<br />
# Launch "ODBC Data Sources (32-bit)" from the start menu, or run directly from C:\Windows\SysWOW64\odbcad32.exe. (Do not use the 64-bit version)<br />
# Click File DSN then click add to the right. [[File:ODBC File DSN.png|thumb|none]]<br />
# Choose ODBC Driver 17 for SQL Server. [[File:ODBC Add Auth 1.png|thumb|none]]<br />
# Click Next.<br />
# Enter AuthDB into the box [[File:ODBC Add Auth 2.png|thumb|none]]<br />
# Click Next, then Finish.<br />
# One of the boxes on the next page will say "Which SQL Server do you want to connect to?". Type localhost\SQLEXPRESS [[File:ODBC Add Auth 3.png|thumb|none]]<br />
# Click Next<br />
# Choose "With SQL Server authentication using a login ID and password entered by the user". Enter "sa" for the username, and the password that you chose: [[File:ODBC Add Auth 4.png|thumb|none]]<br />
# Click Next<br />
# Enable "Change the default database to" and select "cohauth". [[File:ODBC Add Auth 5.png|thumb|none]]<br />
# Click Next<br />
# Default settings are fine on the last page [[File:ODBC Add Auth 6.png|thumb|none]]<br />
# Click Finish<br />
# A box will appear with the settings you have selected. Click "Test Data Source" [[File:ODBC Add Auth 7.png|thumb|none]]<br />
# You should see "TESTS COMPLETED SUCCESSFULLY!" in the output. If not, go back and check your settings. [[File:ODBC Add Auth 8.png|thumb|none]]<br />
# Click OK, then OK again.<br />
<br />
Then we have to enter the username and password again into authserver itself. Start authserver.exe, and the first time that you run it, this window will appear. Enter "sa" and the password that you chose: [[File:Authserver-login.PNG|thumb|none]]<br />
<br />
This username and password is saved in the registry key HKEY_CURRENT_USER\Software\NCSoft\GLOBALAUTH<br />
<br />
== Configure firewall ==<br />
If you are running Windows Firewall, you need to configure it to allow traffic through to your CoH server.<br />
<br />
#Open the start menu, type firewall, and click on Windows Defender Firewall. (or get at it through Control Panel>System and Security>Windows Defender Firewall)<br />
#Click on Advanced settings<br />
#Click on Inbound Rules<br />
#Click on New Rule...<br />
#For Rule Type, select Port, and Next<br />
#Select TCP, Specific local ports, Enter 2106, and then Next<br />
#Allow the connection, Next<br />
#Leave all the checkboxes selected, Next<br />
#Name the rule CoH TCP, Finish<br />
#Repeat the above steps to make a second new rule, but make it UDP instead of TCP, and for ports 7000-7200. Name it CoH UDP.<br />
<br />
== Launch server ==<br />
<br />
The following server applications need to be manually started, in this order:<br />
<br />
# authserver.exe<br />
# dbserver.exe<br />
# launcher.exe<br />
<br />
The rest of the servers are started by loadBalanceShardSpecific.cfg.<br />
<br />
== Connecting a client ==<br />
<br />
Launch the client by opening a command window, and typing:<br />
cd C:\Ouroboros<br />
Ouroboros -auth 127.0.0.1 -console<br />
Login with the account you created, click on the Paragon shard, make a character and enter into the game. If all of that works correctly, then you can stop here if all you want is to play City of Heroes on your own machine by yourself. Otherwise, move on to [[Volume_2_Modifying_Server_For_External_Access|Volume 2 Modifying Server For External Access]].<br />
<br />
== Troubleshooting ==<br />
* ERROR: {{ms|Failed to open attribute file vars.attribute for writing.}} You may get this error when running <code>mapserver -productionmode -templates</code>. If you are installing v2i1, this means you didn't create the C:\CoH_Data\attributes folder before running the command. If you are installing a later version than v2i1, it is likely trying to access C:\Ouroboros\data\server\db\templates instead. It is supposed to create that folder automatically if it doesn't exist. If you are getting this error message anyways, try manually creating the C:\Ouroboros\data\server\db\templates folder and then rerun <code>mapserver -productionmode -templates</code>. <br />
* ERROR: {{ms|'gzip' is not recognized as an internal or external command, operable program or batch file.}} If you get this message, it is usually accompanying a different error message. This happens because the server is trying to compress the dump files that it creates when some errors are found. You can safely ignore any messages about a missing gzip.exe, but if you would like to make these errors not happen any more you can place a gzip.exe and a zip.exe in any folder which is in your Path windows system environment variable. Look for a standard windows gzip.exe download, and you can also download info-zip and use the zip.exe which comes with it.<br />
* ERROR: {{ms|Loading templates...}} If you get errors when you launch dbserver.exe when it tries to load templates, something went wrong with the steps involving running <code>mapserver.exe -productionmode -templates</code> in [[#Setup server files|Setup server files]], and it can't find the template files in C:\Ouroboros\data\server\db\templates.<br />
* ERROR: {{ms|Version difference between client/server.}} This is a mismatch between the client version and the Version parameter in the '''C:\Ouroboros\version.ini''' file<br />
* ERROR: {{ms|Can't connect to DBserver.}} Double-check your firewall settings. Try turning off Windows Firewall completely to see if that lets you connect. If so, then turn Windows Firewall back on and investigate your Inbound firewall rules for CoH.</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Volume_2_Server_Setup&diff=1441Volume 2 Server Setup2019-11-15T16:47:01Z<p>Darwinasm86: /* Database setup */</p>
<hr />
<div>__TOC__<br />
This guide will help you get started in running your own City of Heroes server on your local host (127.0.0.1). It assumes that you will run the City of Heroes client on the same machine as the server. Once you have that working, you can move on to the following guide which explains how to modify your server to allow external access from game clients on other machines.<br />
<br />
== Recommended hardware and settings ==<br />
#The main requirement for City of Heroes is having a decent amount of RAM. The minimum amount for a small personal server is about 8 GB of RAM, with 32 GB of RAM being the recommended amount. <br />
#*If you are running with less than the recommended 32 GB of RAM, it is also recommended that you increase your Windows paging file to simulate having more RAM (Control Panel->System and Security->System->Advanced System Settings->Advanced->Performance Settings->Advanced->Virtual Memory->Change). Setting your paging file to 32768 MB works well for a server with 8 GB of RAM.<br />
#*To support a larger number of players connecting, you will need to add more RAM to your server, though it currently isn't clear at what numbers of players these recommended values become insufficient.<br />
#*For the purposes of this guide, I am using 64.0 GB (G. Skill Trident Z Royal Silver 3200Mhz PC4-25600). <br />
#The server is CPU-intensive, having a decent CPU is important.<br />
#*This setup has been tested with multiple configurations with the oldest recommended being an Intel Core i7 6th Generation Processor.<br />
#*For the purposes of this guide, I am using the Intel Core i9-9900K Processor.<br />
#Running the server on a solid state drive instead of a spinning disc hard drive is recommended.<br />
#If you are installing the server on a computer that you own, your router will need to support NAT loopback if you want game clients to be able to connect to it from both inside and outside of your LAN.<br />
#*For the purposes of this guide, I am using an ASUS ROG GT-AX11000 gaming router.<br />
<br />
== Required software ==<br />
Download all of the following files:<br />
# [https://www.microsoft.com/en-us/sql-server/sql-server-editions-express SQL Server 2017 Express Edition]<br />
# SQL Server Management (SSMS) 18.3.1<br />
#*https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017<br />
#*This is the latest release at the time of this documentation and has been tested.<br />
# The latest stable release of the CoX/Source files from http://build.ourodev.com/archives/Source.master.7z. These are the compiled files from the OuroDev build machine. Extract the contents of the zip file into C:\Ouroboros. (or if you want to compile the source files yourself, follow the [[Volume 2 Build]] instructions, then copy the contents of the Source\bin directory to C:\Ouroboros)<br />
# Database schema definitions. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/DBSchemas (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\DBSchemas)<br />
# Sample server config files. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/ConfigFiles (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\ConfigFiles)<br />
# the [magnet:?xt=urn:btih:n642zelj2se2yn2ovmfy2z74tyyf7scs&dn=City%20of%20Heroes&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce Issue 24 client and data files] - this is ''not'' the SCORE client/data.<br />
# [magnet:?xt=urn:btih:CCCE574F7F89229B0FC2EF8AD898BE451864863A&dn=CoHDev_Source_Files_Current%28Updated%29.zip&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce CoHDev_Source_Files_Current(Updated).zip].<br />
# [magnet:?xt=urn:btih:8CE9DE8ECCF29B899B247512F1082F20B59DC4B2&dn=ServerData.7z&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce ServerData.7z].<br />
<br />
== Optional but recommended tools ==<br />
Download all of the following:<br />
#(Optional) Install 7zip (https://www.7-zip.org/download.html)<br />
#*Useful if you do not already have a tool to handle zip files<br />
#(Optional) Install Notepad++ (https://notepad-plus-plus.org/downloads/v7.7.1/)<br />
#*Useful for editing config files.<br />
<br />
== Install SQL Server 2017 Express ==<br />
: You can install SQL Server pretty much on the default settings.<br />
:: Select Basic under installation type:<br />
::: [[File:SQL Server Install 2017 Express.png|thumb|none]]<br />
:: Agree to the EULA if you want to use SQL Server.<br />
::: [[File:SQL Server Install 2017 Express - 2.png|thumb|none]]<br />
:: Tell the server where to install files. I changed this for ease on my system.<br />
::: [[File:SQL Server Install 2017 Express - 3.png|thumb|none]]<br />
:: It should begin installing and eventually you should see "Install has completed successfully". Click close.<br />
::: [[File:SQL Server Install 2017 Express - 4.png|thumb|none]]<br />
<br />
== Install SQL Server Management(SSMS) ==<br />
: You can install SQL Server Management on default settings.<br />
:: Select the location you'd like to install SSMS to. The default is fine.<br />
::: [[File:SSMS Install - 1.png|thumb|none]]<br />
:: It will take awhile to install and you'll see a little progress bar letting you know whats going on<br />
::: [[File:SSMS Install - 2.png|thumb|none]]<br />
:: Eventually it will ask you to reboot the system. Might as well as do that now.<br />
::: [[File:SSMS Install - 3.png|thumb|none]]<br />
<br />
== Setup server files ==<br />
# At this point, you should have ''C:\Ouroboros'' containing exes and dlls<br />
# Create a directory in ''C:\Ouroboros'' called ''data''.<br />
# Open ''ServerData.7z'' and extract all files into ''C:\Ouroboros\data'' (the newly created directory).<br />
# Open ''CoHDev_Source_Files_Current(Updated).zip''.<br />
## Extract "i24 Server and Client Piggs (extracted with CoHTools)" into ''C:\Ouroboros\data''.<br />
## Copy ''maps.db'' from "map.db (modified, working on current VS2010 build)" and place it in ''C:\Ouroboros\data\server\db'', overwriting the old maps.db<br />
# Copy the ''piggs'' folder from your i24 client directory and place them in ''C:\Ouroboros\''. You should end up with ''C:\Ouroboros\piggs\'' populated.<br />
# If installing v2i1, create a directory in your C: drive called "CoH_Data" and another directory inside that, called "attributes" (''C:\CoH_Data\attributes''). In later versions, this isn't necessary.<br />
# Run the following in a command prompt. If it gives you an error message, check the [[#Troubleshooting|Troubleshooting]] section. '''It is essential to run this after all the above steps, because it will overwrite some of the files.'''<br />
#: {{ms|cd c:\Ouroboros}}<br />
#: {{ms|.\mapserver.exe -productionmode -templates}}<br />
# If installing v2i1, copy all files from ''C:\CoH_Data\attributes'' and place them into ''C:\Ouroboros\data\server\db\templates''. If installing a later version, the files should be placed there automatically.<br />
# If you didn't get them from a downloaded release, copy all sample config files from Source/Assets/ConfigFiles into ''c:\Ouroboros'' (for example: Source/Assets/ConfigFiles/data/server/db will become C:/Ouroboros/data/server/db)<br />
<br />
== Database setup ==<br />
#Download the latest database schema definitions from the link below.<br />
#*You will need to setup an account first.<br />
#*https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/DBSchemas<br />
Note: If you have a problem downloading these files, copy and paste the contents into notepad++, and then save the file into the “TMP” folder you created with the same name, for example (cohdb.sql)<br />
# You will need to choose a password for the database user. In these examples it will be "YOURL33TPASS!".<br />
# Launch SQL Server Management Studio from the start menu<br />
# Hit "Connect" on the screen that pops up, with default settings: [[File:SQL Connect.png|thumb|none]]<br />
# We need to enable the sa login so that server can login to the database.<br />
## If you look to the left panel you will see the object explorer and your connection. Right click it and select properties. [[File:SQL Properties.png|thumb|none]]<br />
## When this window comes up hit Security to the left and enable "sql server and windows authentication". Then click ok. [[File:SQL Security.png|thumb|none]]<br />
## In the same panel you used before navigate to Security -> Logins then right click and enter properties the sa user. [[File:SA Properties.png|thumb|none]]<br />
## In this window set the password to the same password you set back at step 4 [[File:Login Props.png|thumb|none]]<br />
## Choose Status from the left panel in this same window and set login to enabled and hit ok. [[File:Login Status.png|thumb|none]]<br />
## Right click the connection in the object explorer again and click Restart. [[File:SQL Restart.png|thumb|none]]<br />
# Next we need to apply the schema for the databases which require this to be done manually (account, auction, auth, and chat)<br />
## Click File -> Open -> File, navigate to the dbschemas that you downloaded at the start, and select cohauc.sql [[File:SSMS File Open.png|thumb|none]] [[File:SSMS Open DBSchema.png|thumb|none]]<br />
## You will see a '''create database''' statement near the top of the file, with two lines that include a '''filename''' parameter. [[File:SSMS DBSchema SQL SRV STR.png|thumb|none]]<br />
## Delete these lines, so that the statement is just: <syntaxhighlight lang="SQL">CREATE DATABASE [cohauc]</syntaxhighlight><br />
## Click the Execute button [[File:SSMS Execute.png|thumb|none]]<br />
## Repeat these steps for cohacc.sql, cohauth.sql and cohchat.sql. '''Do not use cohdb.sql'''<br />
<br />
== Initial database entries ==<br />
<br />
Each dbserver instance is a "shard". This needs to be manually added to authserver. In SQL Server Management Studio, expand "Databases", then right click on cohauth and select "New Query" from the menu. Several pieces of data are needed for this.<br />
<br />
* The IP address (ip) which clients will use to connect to your server. In this example, we will use 127.0.0.1<br />
* The source IP (inner_ip) from which dbserver will connect to authserver. In this example, we will use 127.0.0.1<br />
* The shard name (name) that you will use for dbserver. This will be Paragon by default. You can change it later once you have it working with the default name.<br />
* The auth shard number that you are using in turnstile_server.cfg. By default this is 1.<br />
<br />
In the new query window, enter:<br />
<br />
<syntaxhighlight lang="sql"><br />
INSERT INTO cohauth.dbo.server (id, name, ip, inner_ip, ageLimit, pk_flag, server_group_id) VALUES (1, 'Paragon', '127.0.0.1', '127.0.0.1', 0, 0, 1);<br />
INSERT INTO cohauth.dbo.worldstatus (idx, status) VALUES (1, 0);<br />
</syntaxhighlight><br />
<br />
Then press 'Execute'.<br />
<br />
You will also want to create an account so that you can test connecting to the database. For now, use the instructions in [[I25_FAQ#How_do_I_create_an_account.3F]]<br />
<br />
== Server database connection configuration ==<br />
Navigate to C:\Ouroboros\data\server\db. In each of the following files, look for an SqlLogin line, and change the Pwd= value to your password. Using our example YOURL33TPASS!:<br />
SqlLogin "DRIVER={SQL Server Native Client 11.0};Server=localhost\SQLEXPRESS;Uid=sa;Pwd=YOURL33TPASS!;"<br />
<br />
* account_server.cfg<br />
* auction_server.cfg<br />
* chat_server.cfg<br />
* servers.cfg<br />
<br />
In servers.cfg, also fix SqlInit to be:<br />
SqlInit "create database cohdb;"<br />
<br />
For authserver, we have to configure the connection via ODBC data sources.<br />
<br />
# Launch "ODBC Data Sources (32-bit)" from the start menu, or run directly from C:\Windows\SysWOW64\odbcad32.exe. (Do not use the 64-bit version)<br />
# Click File DSN then click add to the right. [[File:ODBC File DSN.png|thumb|none]]<br />
# Choose ODBC Driver 17 for SQL Server. [[File:ODBC Add Auth 1.png|thumb|none]]<br />
# Click Next.<br />
# Enter AuthDB into the box [[File:ODBC Add Auth 2.png|thumb|none]]<br />
# Click Next, then Finish.<br />
# One of the boxes on the next page will say "Which SQL Server do you want to connect to?". Type localhost\SQLEXPRESS [[File:ODBC Add Auth 3.png|thumb|none]]<br />
# Click Next<br />
# Choose "With SQL Server authentication using a login ID and password entered by the user". Enter "sa" for the username, and the password that you chose: [[File:ODBC Add Auth 4.png|thumb|none]]<br />
# Click Next<br />
# Enable "Change the default database to" and select "cohauth". [[File:ODBC Add Auth 5.png|thumb|none]]<br />
# Click Next<br />
# Default settings are fine on the last page [[File:ODBC Add Auth 6.png|thumb|none]]<br />
# Click Finish<br />
# A box will appear with the settings you have selected. Click "Test Data Source" [[File:ODBC Add Auth 7.png|thumb|none]]<br />
# You should see "TESTS COMPLETED SUCCESSFULLY!" in the output. If not, go back and check your settings. [[File:ODBC Add Auth 8.png|thumb|none]]<br />
# Click OK, then OK again.<br />
<br />
Then we have to enter the username and password again into authserver itself. Start authserver.exe, and the first time that you run it, this window will appear. Enter "sa" and the password that you chose: [[File:Authserver-login.PNG|thumb|none]]<br />
<br />
This username and password is saved in the registry key HKEY_CURRENT_USER\Software\NCSoft\GLOBALAUTH<br />
<br />
== Configure firewall ==<br />
If you are running Windows Firewall, you need to configure it to allow traffic through to your CoH server.<br />
<br />
#Open the start menu, type firewall, and click on Windows Defender Firewall. (or get at it through Control Panel>System and Security>Windows Defender Firewall)<br />
#Click on Advanced settings<br />
#Click on Inbound Rules<br />
#Click on New Rule...<br />
#For Rule Type, select Port, and Next<br />
#Select TCP, Specific local ports, Enter 2106, and then Next<br />
#Allow the connection, Next<br />
#Leave all the checkboxes selected, Next<br />
#Name the rule CoH TCP, Finish<br />
#Repeat the above steps to make a second new rule, but make it UDP instead of TCP, and for ports 7000-7200. Name it CoH UDP.<br />
<br />
== Launch server ==<br />
<br />
The following server applications need to be manually started, in this order:<br />
<br />
# authserver.exe<br />
# dbserver.exe<br />
# launcher.exe<br />
<br />
The rest of the servers are started by loadBalanceShardSpecific.cfg.<br />
<br />
== Connecting a client ==<br />
<br />
Launch the client by opening a command window, and typing:<br />
cd C:\Ouroboros<br />
Ouroboros -auth 127.0.0.1 -console<br />
Login with the account you created, click on the Paragon shard, make a character and enter into the game. If all of that works correctly, then you can stop here if all you want is to play City of Heroes on your own machine by yourself. Otherwise, move on to [[Volume_2_Modifying_Server_For_External_Access|Volume 2 Modifying Server For External Access]].<br />
<br />
== Troubleshooting ==<br />
* ERROR: {{ms|Failed to open attribute file vars.attribute for writing.}} You may get this error when running <code>mapserver -productionmode -templates</code>. If you are installing v2i1, this means you didn't create the C:\CoH_Data\attributes folder before running the command. If you are installing a later version than v2i1, it is likely trying to access C:\Ouroboros\data\server\db\templates instead. It is supposed to create that folder automatically if it doesn't exist. If you are getting this error message anyways, try manually creating the C:\Ouroboros\data\server\db\templates folder and then rerun <code>mapserver -productionmode -templates</code>. <br />
* ERROR: {{ms|'gzip' is not recognized as an internal or external command, operable program or batch file.}} If you get this message, it is usually accompanying a different error message. This happens because the server is trying to compress the dump files that it creates when some errors are found. You can safely ignore any messages about a missing gzip.exe, but if you would like to make these errors not happen any more you can place a gzip.exe and a zip.exe in any folder which is in your Path windows system environment variable. Look for a standard windows gzip.exe download, and you can also download info-zip and use the zip.exe which comes with it.<br />
* ERROR: {{ms|Loading templates...}} If you get errors when you launch dbserver.exe when it tries to load templates, something went wrong with the steps involving running <code>mapserver.exe -productionmode -templates</code> in [[#Setup server files|Setup server files]], and it can't find the template files in C:\Ouroboros\data\server\db\templates.<br />
* ERROR: {{ms|Version difference between client/server.}} This is a mismatch between the client version and the Version parameter in the '''C:\Ouroboros\version.ini''' file<br />
* ERROR: {{ms|Can't connect to DBserver.}} Double-check your firewall settings. Try turning off Windows Firewall completely to see if that lets you connect. If so, then turn Windows Firewall back on and investigate your Inbound firewall rules for CoH.</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Volume_2_Server_Setup&diff=1440Volume 2 Server Setup2019-11-15T16:44:05Z<p>Darwinasm86: /* Required software */</p>
<hr />
<div>__TOC__<br />
This guide will help you get started in running your own City of Heroes server on your local host (127.0.0.1). It assumes that you will run the City of Heroes client on the same machine as the server. Once you have that working, you can move on to the following guide which explains how to modify your server to allow external access from game clients on other machines.<br />
<br />
== Recommended hardware and settings ==<br />
#The main requirement for City of Heroes is having a decent amount of RAM. The minimum amount for a small personal server is about 8 GB of RAM, with 32 GB of RAM being the recommended amount. <br />
#*If you are running with less than the recommended 32 GB of RAM, it is also recommended that you increase your Windows paging file to simulate having more RAM (Control Panel->System and Security->System->Advanced System Settings->Advanced->Performance Settings->Advanced->Virtual Memory->Change). Setting your paging file to 32768 MB works well for a server with 8 GB of RAM.<br />
#*To support a larger number of players connecting, you will need to add more RAM to your server, though it currently isn't clear at what numbers of players these recommended values become insufficient.<br />
#*For the purposes of this guide, I am using 64.0 GB (G. Skill Trident Z Royal Silver 3200Mhz PC4-25600). <br />
#The server is CPU-intensive, having a decent CPU is important.<br />
#*This setup has been tested with multiple configurations with the oldest recommended being an Intel Core i7 6th Generation Processor.<br />
#*For the purposes of this guide, I am using the Intel Core i9-9900K Processor.<br />
#Running the server on a solid state drive instead of a spinning disc hard drive is recommended.<br />
#If you are installing the server on a computer that you own, your router will need to support NAT loopback if you want game clients to be able to connect to it from both inside and outside of your LAN.<br />
#*For the purposes of this guide, I am using an ASUS ROG GT-AX11000 gaming router.<br />
<br />
== Required software ==<br />
Download all of the following files:<br />
# [https://www.microsoft.com/en-us/sql-server/sql-server-editions-express SQL Server 2017 Express Edition]<br />
# SQL Server Management (SSMS) 18.3.1<br />
#*https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017<br />
#*This is the latest release at the time of this documentation and has been tested.<br />
# The latest stable release of the CoX/Source files from http://build.ourodev.com/archives/Source.master.7z. These are the compiled files from the OuroDev build machine. Extract the contents of the zip file into C:\Ouroboros. (or if you want to compile the source files yourself, follow the [[Volume 2 Build]] instructions, then copy the contents of the Source\bin directory to C:\Ouroboros)<br />
# Database schema definitions. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/DBSchemas (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\DBSchemas)<br />
# Sample server config files. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/ConfigFiles (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\ConfigFiles)<br />
# the [magnet:?xt=urn:btih:n642zelj2se2yn2ovmfy2z74tyyf7scs&dn=City%20of%20Heroes&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce Issue 24 client and data files] - this is ''not'' the SCORE client/data.<br />
# [magnet:?xt=urn:btih:CCCE574F7F89229B0FC2EF8AD898BE451864863A&dn=CoHDev_Source_Files_Current%28Updated%29.zip&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce CoHDev_Source_Files_Current(Updated).zip].<br />
# [magnet:?xt=urn:btih:8CE9DE8ECCF29B899B247512F1082F20B59DC4B2&dn=ServerData.7z&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce ServerData.7z].<br />
<br />
== Optional but recommended tools ==<br />
Download all of the following:<br />
#(Optional) Install 7zip (https://www.7-zip.org/download.html)<br />
#*Useful if you do not already have a tool to handle zip files<br />
#(Optional) Install Notepad++ (https://notepad-plus-plus.org/downloads/v7.7.1/)<br />
#*Useful for editing config files.<br />
<br />
== Install SQL Server 2017 Express ==<br />
: You can install SQL Server pretty much on the default settings.<br />
:: Select Basic under installation type:<br />
::: [[File:SQL Server Install 2017 Express.png|thumb|none]]<br />
:: Agree to the EULA if you want to use SQL Server.<br />
::: [[File:SQL Server Install 2017 Express - 2.png|thumb|none]]<br />
:: Tell the server where to install files. I changed this for ease on my system.<br />
::: [[File:SQL Server Install 2017 Express - 3.png|thumb|none]]<br />
:: It should begin installing and eventually you should see "Install has completed successfully". Click close.<br />
::: [[File:SQL Server Install 2017 Express - 4.png|thumb|none]]<br />
<br />
== Install SQL Server Management(SSMS) ==<br />
: You can install SQL Server Management on default settings.<br />
:: Select the location you'd like to install SSMS to. The default is fine.<br />
::: [[File:SSMS Install - 1.png|thumb|none]]<br />
:: It will take awhile to install and you'll see a little progress bar letting you know whats going on<br />
::: [[File:SSMS Install - 2.png|thumb|none]]<br />
:: Eventually it will ask you to reboot the system. Might as well as do that now.<br />
::: [[File:SSMS Install - 3.png|thumb|none]]<br />
<br />
== Setup server files ==<br />
# At this point, you should have ''C:\Ouroboros'' containing exes and dlls<br />
# Create a directory in ''C:\Ouroboros'' called ''data''.<br />
# Open ''ServerData.7z'' and extract all files into ''C:\Ouroboros\data'' (the newly created directory).<br />
# Open ''CoHDev_Source_Files_Current(Updated).zip''.<br />
## Extract "i24 Server and Client Piggs (extracted with CoHTools)" into ''C:\Ouroboros\data''.<br />
## Copy ''maps.db'' from "map.db (modified, working on current VS2010 build)" and place it in ''C:\Ouroboros\data\server\db'', overwriting the old maps.db<br />
# Copy the ''piggs'' folder from your i24 client directory and place them in ''C:\Ouroboros\''. You should end up with ''C:\Ouroboros\piggs\'' populated.<br />
# If installing v2i1, create a directory in your C: drive called "CoH_Data" and another directory inside that, called "attributes" (''C:\CoH_Data\attributes''). In later versions, this isn't necessary.<br />
# Run the following in a command prompt. If it gives you an error message, check the [[#Troubleshooting|Troubleshooting]] section. '''It is essential to run this after all the above steps, because it will overwrite some of the files.'''<br />
#: {{ms|cd c:\Ouroboros}}<br />
#: {{ms|.\mapserver.exe -productionmode -templates}}<br />
# If installing v2i1, copy all files from ''C:\CoH_Data\attributes'' and place them into ''C:\Ouroboros\data\server\db\templates''. If installing a later version, the files should be placed there automatically.<br />
# If you didn't get them from a downloaded release, copy all sample config files from Source/Assets/ConfigFiles into ''c:\Ouroboros'' (for example: Source/Assets/ConfigFiles/data/server/db will become C:/Ouroboros/data/server/db)<br />
<br />
== Database setup ==<br />
# You will need to choose a password for the database user. In these examples it will be "YOURL33TPASS!".<br />
# Launch SQL Server Management Studio from the start menu<br />
# Hit "Connect" on the screen that pops up, with default settings: [[File:SQL Connect.png|thumb|none]]<br />
# We need to enable the sa login so that server can login to the database.<br />
## If you look to the left panel you will see the object explorer and your connection. Right click it and select properties. [[File:SQL Properties.png|thumb|none]]<br />
## When this window comes up hit Security to the left and enable "sql server and windows authentication". Then click ok. [[File:SQL Security.png|thumb|none]]<br />
## In the same panel you used before navigate to Security -> Logins then right click and enter properties the sa user. [[File:SA Properties.png|thumb|none]]<br />
## In this window set the password to the same password you set back at step 4 [[File:Login Props.png|thumb|none]]<br />
## Choose Status from the left panel in this same window and set login to enabled and hit ok. [[File:Login Status.png|thumb|none]]<br />
## Right click the connection in the object explorer again and click Restart. [[File:SQL Restart.png|thumb|none]]<br />
# Next we need to apply the schema for the databases which require this to be done manually (account, auction, auth, and chat)<br />
## Click File -> Open -> File, navigate to the dbschemas that you downloaded at the start, and select cohauc.sql [[File:SSMS File Open.png|thumb|none]] [[File:SSMS Open DBSchema.png|thumb|none]]<br />
## You will see a '''create database''' statement near the top of the file, with two lines that include a '''filename''' parameter. [[File:SSMS DBSchema SQL SRV STR.png|thumb|none]]<br />
## Delete these lines, so that the statement is just: <syntaxhighlight lang="SQL">CREATE DATABASE [cohauc]</syntaxhighlight><br />
## Click the Execute button [[File:SSMS Execute.png|thumb|none]]<br />
## Repeat these steps for cohacc.sql, cohauth.sql and cohchat.sql. '''Do not use cohdb.sql'''<br />
<br />
== Initial database entries ==<br />
<br />
Each dbserver instance is a "shard". This needs to be manually added to authserver. In SQL Server Management Studio, expand "Databases", then right click on cohauth and select "New Query" from the menu. Several pieces of data are needed for this.<br />
<br />
* The IP address (ip) which clients will use to connect to your server. In this example, we will use 127.0.0.1<br />
* The source IP (inner_ip) from which dbserver will connect to authserver. In this example, we will use 127.0.0.1<br />
* The shard name (name) that you will use for dbserver. This will be Paragon by default. You can change it later once you have it working with the default name.<br />
* The auth shard number that you are using in turnstile_server.cfg. By default this is 1.<br />
<br />
In the new query window, enter:<br />
<br />
<syntaxhighlight lang="sql"><br />
INSERT INTO cohauth.dbo.server (id, name, ip, inner_ip, ageLimit, pk_flag, server_group_id) VALUES (1, 'Paragon', '127.0.0.1', '127.0.0.1', 0, 0, 1);<br />
INSERT INTO cohauth.dbo.worldstatus (idx, status) VALUES (1, 0);<br />
</syntaxhighlight><br />
<br />
Then press 'Execute'.<br />
<br />
You will also want to create an account so that you can test connecting to the database. For now, use the instructions in [[I25_FAQ#How_do_I_create_an_account.3F]]<br />
<br />
== Server database connection configuration ==<br />
Navigate to C:\Ouroboros\data\server\db. In each of the following files, look for an SqlLogin line, and change the Pwd= value to your password. Using our example YOURL33TPASS!:<br />
SqlLogin "DRIVER={SQL Server Native Client 11.0};Server=localhost\SQLEXPRESS;Uid=sa;Pwd=YOURL33TPASS!;"<br />
<br />
* account_server.cfg<br />
* auction_server.cfg<br />
* chat_server.cfg<br />
* servers.cfg<br />
<br />
In servers.cfg, also fix SqlInit to be:<br />
SqlInit "create database cohdb;"<br />
<br />
For authserver, we have to configure the connection via ODBC data sources.<br />
<br />
# Launch "ODBC Data Sources (32-bit)" from the start menu, or run directly from C:\Windows\SysWOW64\odbcad32.exe. (Do not use the 64-bit version)<br />
# Click File DSN then click add to the right. [[File:ODBC File DSN.png|thumb|none]]<br />
# Choose ODBC Driver 17 for SQL Server. [[File:ODBC Add Auth 1.png|thumb|none]]<br />
# Click Next.<br />
# Enter AuthDB into the box [[File:ODBC Add Auth 2.png|thumb|none]]<br />
# Click Next, then Finish.<br />
# One of the boxes on the next page will say "Which SQL Server do you want to connect to?". Type localhost\SQLEXPRESS [[File:ODBC Add Auth 3.png|thumb|none]]<br />
# Click Next<br />
# Choose "With SQL Server authentication using a login ID and password entered by the user". Enter "sa" for the username, and the password that you chose: [[File:ODBC Add Auth 4.png|thumb|none]]<br />
# Click Next<br />
# Enable "Change the default database to" and select "cohauth". [[File:ODBC Add Auth 5.png|thumb|none]]<br />
# Click Next<br />
# Default settings are fine on the last page [[File:ODBC Add Auth 6.png|thumb|none]]<br />
# Click Finish<br />
# A box will appear with the settings you have selected. Click "Test Data Source" [[File:ODBC Add Auth 7.png|thumb|none]]<br />
# You should see "TESTS COMPLETED SUCCESSFULLY!" in the output. If not, go back and check your settings. [[File:ODBC Add Auth 8.png|thumb|none]]<br />
# Click OK, then OK again.<br />
<br />
Then we have to enter the username and password again into authserver itself. Start authserver.exe, and the first time that you run it, this window will appear. Enter "sa" and the password that you chose: [[File:Authserver-login.PNG|thumb|none]]<br />
<br />
This username and password is saved in the registry key HKEY_CURRENT_USER\Software\NCSoft\GLOBALAUTH<br />
<br />
== Configure firewall ==<br />
If you are running Windows Firewall, you need to configure it to allow traffic through to your CoH server.<br />
<br />
#Open the start menu, type firewall, and click on Windows Defender Firewall. (or get at it through Control Panel>System and Security>Windows Defender Firewall)<br />
#Click on Advanced settings<br />
#Click on Inbound Rules<br />
#Click on New Rule...<br />
#For Rule Type, select Port, and Next<br />
#Select TCP, Specific local ports, Enter 2106, and then Next<br />
#Allow the connection, Next<br />
#Leave all the checkboxes selected, Next<br />
#Name the rule CoH TCP, Finish<br />
#Repeat the above steps to make a second new rule, but make it UDP instead of TCP, and for ports 7000-7200. Name it CoH UDP.<br />
<br />
== Launch server ==<br />
<br />
The following server applications need to be manually started, in this order:<br />
<br />
# authserver.exe<br />
# dbserver.exe<br />
# launcher.exe<br />
<br />
The rest of the servers are started by loadBalanceShardSpecific.cfg.<br />
<br />
== Connecting a client ==<br />
<br />
Launch the client by opening a command window, and typing:<br />
cd C:\Ouroboros<br />
Ouroboros -auth 127.0.0.1 -console<br />
Login with the account you created, click on the Paragon shard, make a character and enter into the game. If all of that works correctly, then you can stop here if all you want is to play City of Heroes on your own machine by yourself. Otherwise, move on to [[Volume_2_Modifying_Server_For_External_Access|Volume 2 Modifying Server For External Access]].<br />
<br />
== Troubleshooting ==<br />
* ERROR: {{ms|Failed to open attribute file vars.attribute for writing.}} You may get this error when running <code>mapserver -productionmode -templates</code>. If you are installing v2i1, this means you didn't create the C:\CoH_Data\attributes folder before running the command. If you are installing a later version than v2i1, it is likely trying to access C:\Ouroboros\data\server\db\templates instead. It is supposed to create that folder automatically if it doesn't exist. If you are getting this error message anyways, try manually creating the C:\Ouroboros\data\server\db\templates folder and then rerun <code>mapserver -productionmode -templates</code>. <br />
* ERROR: {{ms|'gzip' is not recognized as an internal or external command, operable program or batch file.}} If you get this message, it is usually accompanying a different error message. This happens because the server is trying to compress the dump files that it creates when some errors are found. You can safely ignore any messages about a missing gzip.exe, but if you would like to make these errors not happen any more you can place a gzip.exe and a zip.exe in any folder which is in your Path windows system environment variable. Look for a standard windows gzip.exe download, and you can also download info-zip and use the zip.exe which comes with it.<br />
* ERROR: {{ms|Loading templates...}} If you get errors when you launch dbserver.exe when it tries to load templates, something went wrong with the steps involving running <code>mapserver.exe -productionmode -templates</code> in [[#Setup server files|Setup server files]], and it can't find the template files in C:\Ouroboros\data\server\db\templates.<br />
* ERROR: {{ms|Version difference between client/server.}} This is a mismatch between the client version and the Version parameter in the '''C:\Ouroboros\version.ini''' file<br />
* ERROR: {{ms|Can't connect to DBserver.}} Double-check your firewall settings. Try turning off Windows Firewall completely to see if that lets you connect. If so, then turn Windows Firewall back on and investigate your Inbound firewall rules for CoH.</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Volume_2_Server_Setup&diff=1439Volume 2 Server Setup2019-11-15T16:43:28Z<p>Darwinasm86: /* Required software */</p>
<hr />
<div>__TOC__<br />
This guide will help you get started in running your own City of Heroes server on your local host (127.0.0.1). It assumes that you will run the City of Heroes client on the same machine as the server. Once you have that working, you can move on to the following guide which explains how to modify your server to allow external access from game clients on other machines.<br />
<br />
== Recommended hardware and settings ==<br />
#The main requirement for City of Heroes is having a decent amount of RAM. The minimum amount for a small personal server is about 8 GB of RAM, with 32 GB of RAM being the recommended amount. <br />
#*If you are running with less than the recommended 32 GB of RAM, it is also recommended that you increase your Windows paging file to simulate having more RAM (Control Panel->System and Security->System->Advanced System Settings->Advanced->Performance Settings->Advanced->Virtual Memory->Change). Setting your paging file to 32768 MB works well for a server with 8 GB of RAM.<br />
#*To support a larger number of players connecting, you will need to add more RAM to your server, though it currently isn't clear at what numbers of players these recommended values become insufficient.<br />
#*For the purposes of this guide, I am using 64.0 GB (G. Skill Trident Z Royal Silver 3200Mhz PC4-25600). <br />
#The server is CPU-intensive, having a decent CPU is important.<br />
#*This setup has been tested with multiple configurations with the oldest recommended being an Intel Core i7 6th Generation Processor.<br />
#*For the purposes of this guide, I am using the Intel Core i9-9900K Processor.<br />
#Running the server on a solid state drive instead of a spinning disc hard drive is recommended.<br />
#If you are installing the server on a computer that you own, your router will need to support NAT loopback if you want game clients to be able to connect to it from both inside and outside of your LAN.<br />
#*For the purposes of this guide, I am using an ASUS ROG GT-AX11000 gaming router.<br />
<br />
== Required software ==<br />
Download all of the following files:<br />
# [https://www.microsoft.com/en-us/sql-server/sql-server-editions-express SQL Server 2017 Express Edition]<br />
# SQL Server Management (SSMS) 18.3.1<br />
#*https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017<br />
#*This is the latest release at the time of this documentation and has been tested.<br />
#*Once Downloaded, Run the executable.<br />
# The latest stable release of the CoX/Source files from http://build.ourodev.com/archives/Source.master.7z. These are the compiled files from the OuroDev build machine. Extract the contents of the zip file into C:\Ouroboros. (or if you want to compile the source files yourself, follow the [[Volume 2 Build]] instructions, then copy the contents of the Source\bin directory to C:\Ouroboros)<br />
# Database schema definitions. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/DBSchemas (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\DBSchemas)<br />
# Sample server config files. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/ConfigFiles (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\ConfigFiles)<br />
# the [magnet:?xt=urn:btih:n642zelj2se2yn2ovmfy2z74tyyf7scs&dn=City%20of%20Heroes&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce Issue 24 client and data files] - this is ''not'' the SCORE client/data.<br />
# [magnet:?xt=urn:btih:CCCE574F7F89229B0FC2EF8AD898BE451864863A&dn=CoHDev_Source_Files_Current%28Updated%29.zip&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce CoHDev_Source_Files_Current(Updated).zip].<br />
# [magnet:?xt=urn:btih:8CE9DE8ECCF29B899B247512F1082F20B59DC4B2&dn=ServerData.7z&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce ServerData.7z].<br />
<br />
== Optional but recommended tools ==<br />
Download all of the following:<br />
#(Optional) Install 7zip (https://www.7-zip.org/download.html)<br />
#*Useful if you do not already have a tool to handle zip files<br />
#(Optional) Install Notepad++ (https://notepad-plus-plus.org/downloads/v7.7.1/)<br />
#*Useful for editing config files.<br />
<br />
== Install SQL Server 2017 Express ==<br />
: You can install SQL Server pretty much on the default settings.<br />
:: Select Basic under installation type:<br />
::: [[File:SQL Server Install 2017 Express.png|thumb|none]]<br />
:: Agree to the EULA if you want to use SQL Server.<br />
::: [[File:SQL Server Install 2017 Express - 2.png|thumb|none]]<br />
:: Tell the server where to install files. I changed this for ease on my system.<br />
::: [[File:SQL Server Install 2017 Express - 3.png|thumb|none]]<br />
:: It should begin installing and eventually you should see "Install has completed successfully". Click close.<br />
::: [[File:SQL Server Install 2017 Express - 4.png|thumb|none]]<br />
<br />
== Install SQL Server Management(SSMS) ==<br />
: You can install SQL Server Management on default settings.<br />
:: Select the location you'd like to install SSMS to. The default is fine.<br />
::: [[File:SSMS Install - 1.png|thumb|none]]<br />
:: It will take awhile to install and you'll see a little progress bar letting you know whats going on<br />
::: [[File:SSMS Install - 2.png|thumb|none]]<br />
:: Eventually it will ask you to reboot the system. Might as well as do that now.<br />
::: [[File:SSMS Install - 3.png|thumb|none]]<br />
<br />
== Setup server files ==<br />
# At this point, you should have ''C:\Ouroboros'' containing exes and dlls<br />
# Create a directory in ''C:\Ouroboros'' called ''data''.<br />
# Open ''ServerData.7z'' and extract all files into ''C:\Ouroboros\data'' (the newly created directory).<br />
# Open ''CoHDev_Source_Files_Current(Updated).zip''.<br />
## Extract "i24 Server and Client Piggs (extracted with CoHTools)" into ''C:\Ouroboros\data''.<br />
## Copy ''maps.db'' from "map.db (modified, working on current VS2010 build)" and place it in ''C:\Ouroboros\data\server\db'', overwriting the old maps.db<br />
# Copy the ''piggs'' folder from your i24 client directory and place them in ''C:\Ouroboros\''. You should end up with ''C:\Ouroboros\piggs\'' populated.<br />
# If installing v2i1, create a directory in your C: drive called "CoH_Data" and another directory inside that, called "attributes" (''C:\CoH_Data\attributes''). In later versions, this isn't necessary.<br />
# Run the following in a command prompt. If it gives you an error message, check the [[#Troubleshooting|Troubleshooting]] section. '''It is essential to run this after all the above steps, because it will overwrite some of the files.'''<br />
#: {{ms|cd c:\Ouroboros}}<br />
#: {{ms|.\mapserver.exe -productionmode -templates}}<br />
# If installing v2i1, copy all files from ''C:\CoH_Data\attributes'' and place them into ''C:\Ouroboros\data\server\db\templates''. If installing a later version, the files should be placed there automatically.<br />
# If you didn't get them from a downloaded release, copy all sample config files from Source/Assets/ConfigFiles into ''c:\Ouroboros'' (for example: Source/Assets/ConfigFiles/data/server/db will become C:/Ouroboros/data/server/db)<br />
<br />
== Database setup ==<br />
# You will need to choose a password for the database user. In these examples it will be "YOURL33TPASS!".<br />
# Launch SQL Server Management Studio from the start menu<br />
# Hit "Connect" on the screen that pops up, with default settings: [[File:SQL Connect.png|thumb|none]]<br />
# We need to enable the sa login so that server can login to the database.<br />
## If you look to the left panel you will see the object explorer and your connection. Right click it and select properties. [[File:SQL Properties.png|thumb|none]]<br />
## When this window comes up hit Security to the left and enable "sql server and windows authentication". Then click ok. [[File:SQL Security.png|thumb|none]]<br />
## In the same panel you used before navigate to Security -> Logins then right click and enter properties the sa user. [[File:SA Properties.png|thumb|none]]<br />
## In this window set the password to the same password you set back at step 4 [[File:Login Props.png|thumb|none]]<br />
## Choose Status from the left panel in this same window and set login to enabled and hit ok. [[File:Login Status.png|thumb|none]]<br />
## Right click the connection in the object explorer again and click Restart. [[File:SQL Restart.png|thumb|none]]<br />
# Next we need to apply the schema for the databases which require this to be done manually (account, auction, auth, and chat)<br />
## Click File -> Open -> File, navigate to the dbschemas that you downloaded at the start, and select cohauc.sql [[File:SSMS File Open.png|thumb|none]] [[File:SSMS Open DBSchema.png|thumb|none]]<br />
## You will see a '''create database''' statement near the top of the file, with two lines that include a '''filename''' parameter. [[File:SSMS DBSchema SQL SRV STR.png|thumb|none]]<br />
## Delete these lines, so that the statement is just: <syntaxhighlight lang="SQL">CREATE DATABASE [cohauc]</syntaxhighlight><br />
## Click the Execute button [[File:SSMS Execute.png|thumb|none]]<br />
## Repeat these steps for cohacc.sql, cohauth.sql and cohchat.sql. '''Do not use cohdb.sql'''<br />
<br />
== Initial database entries ==<br />
<br />
Each dbserver instance is a "shard". This needs to be manually added to authserver. In SQL Server Management Studio, expand "Databases", then right click on cohauth and select "New Query" from the menu. Several pieces of data are needed for this.<br />
<br />
* The IP address (ip) which clients will use to connect to your server. In this example, we will use 127.0.0.1<br />
* The source IP (inner_ip) from which dbserver will connect to authserver. In this example, we will use 127.0.0.1<br />
* The shard name (name) that you will use for dbserver. This will be Paragon by default. You can change it later once you have it working with the default name.<br />
* The auth shard number that you are using in turnstile_server.cfg. By default this is 1.<br />
<br />
In the new query window, enter:<br />
<br />
<syntaxhighlight lang="sql"><br />
INSERT INTO cohauth.dbo.server (id, name, ip, inner_ip, ageLimit, pk_flag, server_group_id) VALUES (1, 'Paragon', '127.0.0.1', '127.0.0.1', 0, 0, 1);<br />
INSERT INTO cohauth.dbo.worldstatus (idx, status) VALUES (1, 0);<br />
</syntaxhighlight><br />
<br />
Then press 'Execute'.<br />
<br />
You will also want to create an account so that you can test connecting to the database. For now, use the instructions in [[I25_FAQ#How_do_I_create_an_account.3F]]<br />
<br />
== Server database connection configuration ==<br />
Navigate to C:\Ouroboros\data\server\db. In each of the following files, look for an SqlLogin line, and change the Pwd= value to your password. Using our example YOURL33TPASS!:<br />
SqlLogin "DRIVER={SQL Server Native Client 11.0};Server=localhost\SQLEXPRESS;Uid=sa;Pwd=YOURL33TPASS!;"<br />
<br />
* account_server.cfg<br />
* auction_server.cfg<br />
* chat_server.cfg<br />
* servers.cfg<br />
<br />
In servers.cfg, also fix SqlInit to be:<br />
SqlInit "create database cohdb;"<br />
<br />
For authserver, we have to configure the connection via ODBC data sources.<br />
<br />
# Launch "ODBC Data Sources (32-bit)" from the start menu, or run directly from C:\Windows\SysWOW64\odbcad32.exe. (Do not use the 64-bit version)<br />
# Click File DSN then click add to the right. [[File:ODBC File DSN.png|thumb|none]]<br />
# Choose ODBC Driver 17 for SQL Server. [[File:ODBC Add Auth 1.png|thumb|none]]<br />
# Click Next.<br />
# Enter AuthDB into the box [[File:ODBC Add Auth 2.png|thumb|none]]<br />
# Click Next, then Finish.<br />
# One of the boxes on the next page will say "Which SQL Server do you want to connect to?". Type localhost\SQLEXPRESS [[File:ODBC Add Auth 3.png|thumb|none]]<br />
# Click Next<br />
# Choose "With SQL Server authentication using a login ID and password entered by the user". Enter "sa" for the username, and the password that you chose: [[File:ODBC Add Auth 4.png|thumb|none]]<br />
# Click Next<br />
# Enable "Change the default database to" and select "cohauth". [[File:ODBC Add Auth 5.png|thumb|none]]<br />
# Click Next<br />
# Default settings are fine on the last page [[File:ODBC Add Auth 6.png|thumb|none]]<br />
# Click Finish<br />
# A box will appear with the settings you have selected. Click "Test Data Source" [[File:ODBC Add Auth 7.png|thumb|none]]<br />
# You should see "TESTS COMPLETED SUCCESSFULLY!" in the output. If not, go back and check your settings. [[File:ODBC Add Auth 8.png|thumb|none]]<br />
# Click OK, then OK again.<br />
<br />
Then we have to enter the username and password again into authserver itself. Start authserver.exe, and the first time that you run it, this window will appear. Enter "sa" and the password that you chose: [[File:Authserver-login.PNG|thumb|none]]<br />
<br />
This username and password is saved in the registry key HKEY_CURRENT_USER\Software\NCSoft\GLOBALAUTH<br />
<br />
== Configure firewall ==<br />
If you are running Windows Firewall, you need to configure it to allow traffic through to your CoH server.<br />
<br />
#Open the start menu, type firewall, and click on Windows Defender Firewall. (or get at it through Control Panel>System and Security>Windows Defender Firewall)<br />
#Click on Advanced settings<br />
#Click on Inbound Rules<br />
#Click on New Rule...<br />
#For Rule Type, select Port, and Next<br />
#Select TCP, Specific local ports, Enter 2106, and then Next<br />
#Allow the connection, Next<br />
#Leave all the checkboxes selected, Next<br />
#Name the rule CoH TCP, Finish<br />
#Repeat the above steps to make a second new rule, but make it UDP instead of TCP, and for ports 7000-7200. Name it CoH UDP.<br />
<br />
== Launch server ==<br />
<br />
The following server applications need to be manually started, in this order:<br />
<br />
# authserver.exe<br />
# dbserver.exe<br />
# launcher.exe<br />
<br />
The rest of the servers are started by loadBalanceShardSpecific.cfg.<br />
<br />
== Connecting a client ==<br />
<br />
Launch the client by opening a command window, and typing:<br />
cd C:\Ouroboros<br />
Ouroboros -auth 127.0.0.1 -console<br />
Login with the account you created, click on the Paragon shard, make a character and enter into the game. If all of that works correctly, then you can stop here if all you want is to play City of Heroes on your own machine by yourself. Otherwise, move on to [[Volume_2_Modifying_Server_For_External_Access|Volume 2 Modifying Server For External Access]].<br />
<br />
== Troubleshooting ==<br />
* ERROR: {{ms|Failed to open attribute file vars.attribute for writing.}} You may get this error when running <code>mapserver -productionmode -templates</code>. If you are installing v2i1, this means you didn't create the C:\CoH_Data\attributes folder before running the command. If you are installing a later version than v2i1, it is likely trying to access C:\Ouroboros\data\server\db\templates instead. It is supposed to create that folder automatically if it doesn't exist. If you are getting this error message anyways, try manually creating the C:\Ouroboros\data\server\db\templates folder and then rerun <code>mapserver -productionmode -templates</code>. <br />
* ERROR: {{ms|'gzip' is not recognized as an internal or external command, operable program or batch file.}} If you get this message, it is usually accompanying a different error message. This happens because the server is trying to compress the dump files that it creates when some errors are found. You can safely ignore any messages about a missing gzip.exe, but if you would like to make these errors not happen any more you can place a gzip.exe and a zip.exe in any folder which is in your Path windows system environment variable. Look for a standard windows gzip.exe download, and you can also download info-zip and use the zip.exe which comes with it.<br />
* ERROR: {{ms|Loading templates...}} If you get errors when you launch dbserver.exe when it tries to load templates, something went wrong with the steps involving running <code>mapserver.exe -productionmode -templates</code> in [[#Setup server files|Setup server files]], and it can't find the template files in C:\Ouroboros\data\server\db\templates.<br />
* ERROR: {{ms|Version difference between client/server.}} This is a mismatch between the client version and the Version parameter in the '''C:\Ouroboros\version.ini''' file<br />
* ERROR: {{ms|Can't connect to DBserver.}} Double-check your firewall settings. Try turning off Windows Firewall completely to see if that lets you connect. If so, then turn Windows Firewall back on and investigate your Inbound firewall rules for CoH.</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Volume_2_Server_Setup&diff=1438Volume 2 Server Setup2019-11-15T16:41:22Z<p>Darwinasm86: /* Required software */</p>
<hr />
<div>__TOC__<br />
This guide will help you get started in running your own City of Heroes server on your local host (127.0.0.1). It assumes that you will run the City of Heroes client on the same machine as the server. Once you have that working, you can move on to the following guide which explains how to modify your server to allow external access from game clients on other machines.<br />
<br />
== Recommended hardware and settings ==<br />
#The main requirement for City of Heroes is having a decent amount of RAM. The minimum amount for a small personal server is about 8 GB of RAM, with 32 GB of RAM being the recommended amount. <br />
#*If you are running with less than the recommended 32 GB of RAM, it is also recommended that you increase your Windows paging file to simulate having more RAM (Control Panel->System and Security->System->Advanced System Settings->Advanced->Performance Settings->Advanced->Virtual Memory->Change). Setting your paging file to 32768 MB works well for a server with 8 GB of RAM.<br />
#*To support a larger number of players connecting, you will need to add more RAM to your server, though it currently isn't clear at what numbers of players these recommended values become insufficient.<br />
#*For the purposes of this guide, I am using 64.0 GB (G. Skill Trident Z Royal Silver 3200Mhz PC4-25600). <br />
#The server is CPU-intensive, having a decent CPU is important.<br />
#*This setup has been tested with multiple configurations with the oldest recommended being an Intel Core i7 6th Generation Processor.<br />
#*For the purposes of this guide, I am using the Intel Core i9-9900K Processor.<br />
#Running the server on a solid state drive instead of a spinning disc hard drive is recommended.<br />
#If you are installing the server on a computer that you own, your router will need to support NAT loopback if you want game clients to be able to connect to it from both inside and outside of your LAN.<br />
#*For the purposes of this guide, I am using an ASUS ROG GT-AX11000 gaming router.<br />
<br />
== Required software ==<br />
Download all of the following files:<br />
# [https://www.microsoft.com/en-us/sql-server/sql-server-editions-express SQL Server 2017 Express Edition]<br />
# [https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017 SQL Server Management(SSMS) 2017]<br />
# The latest stable release of the CoX/Source files from http://build.ourodev.com/archives/Source.master.7z. These are the compiled files from the OuroDev build machine. Extract the contents of the zip file into C:\Ouroboros. (or if you want to compile the source files yourself, follow the [[Volume 2 Build]] instructions, then copy the contents of the Source\bin directory to C:\Ouroboros)<br />
# Database schema definitions. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/DBSchemas (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\DBSchemas)<br />
# Sample server config files. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/ConfigFiles (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\ConfigFiles)<br />
# the [magnet:?xt=urn:btih:n642zelj2se2yn2ovmfy2z74tyyf7scs&dn=City%20of%20Heroes&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce Issue 24 client and data files] - this is ''not'' the SCORE client/data.<br />
# [magnet:?xt=urn:btih:CCCE574F7F89229B0FC2EF8AD898BE451864863A&dn=CoHDev_Source_Files_Current%28Updated%29.zip&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce CoHDev_Source_Files_Current(Updated).zip].<br />
# [magnet:?xt=urn:btih:8CE9DE8ECCF29B899B247512F1082F20B59DC4B2&dn=ServerData.7z&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce ServerData.7z].<br />
<br />
== Optional but recommended tools ==<br />
Download all of the following:<br />
#(Optional) Install 7zip (https://www.7-zip.org/download.html)<br />
#*Useful if you do not already have a tool to handle zip files<br />
#(Optional) Install Notepad++ (https://notepad-plus-plus.org/downloads/v7.7.1/)<br />
#*Useful for editing config files.<br />
<br />
== Install SQL Server 2017 Express ==<br />
: You can install SQL Server pretty much on the default settings.<br />
:: Select Basic under installation type:<br />
::: [[File:SQL Server Install 2017 Express.png|thumb|none]]<br />
:: Agree to the EULA if you want to use SQL Server.<br />
::: [[File:SQL Server Install 2017 Express - 2.png|thumb|none]]<br />
:: Tell the server where to install files. I changed this for ease on my system.<br />
::: [[File:SQL Server Install 2017 Express - 3.png|thumb|none]]<br />
:: It should begin installing and eventually you should see "Install has completed successfully". Click close.<br />
::: [[File:SQL Server Install 2017 Express - 4.png|thumb|none]]<br />
<br />
== Install SQL Server Management(SSMS) ==<br />
: You can install SQL Server Management on default settings.<br />
:: Select the location you'd like to install SSMS to. The default is fine.<br />
::: [[File:SSMS Install - 1.png|thumb|none]]<br />
:: It will take awhile to install and you'll see a little progress bar letting you know whats going on<br />
::: [[File:SSMS Install - 2.png|thumb|none]]<br />
:: Eventually it will ask you to reboot the system. Might as well as do that now.<br />
::: [[File:SSMS Install - 3.png|thumb|none]]<br />
<br />
== Setup server files ==<br />
# At this point, you should have ''C:\Ouroboros'' containing exes and dlls<br />
# Create a directory in ''C:\Ouroboros'' called ''data''.<br />
# Open ''ServerData.7z'' and extract all files into ''C:\Ouroboros\data'' (the newly created directory).<br />
# Open ''CoHDev_Source_Files_Current(Updated).zip''.<br />
## Extract "i24 Server and Client Piggs (extracted with CoHTools)" into ''C:\Ouroboros\data''.<br />
## Copy ''maps.db'' from "map.db (modified, working on current VS2010 build)" and place it in ''C:\Ouroboros\data\server\db'', overwriting the old maps.db<br />
# Copy the ''piggs'' folder from your i24 client directory and place them in ''C:\Ouroboros\''. You should end up with ''C:\Ouroboros\piggs\'' populated.<br />
# If installing v2i1, create a directory in your C: drive called "CoH_Data" and another directory inside that, called "attributes" (''C:\CoH_Data\attributes''). In later versions, this isn't necessary.<br />
# Run the following in a command prompt. If it gives you an error message, check the [[#Troubleshooting|Troubleshooting]] section. '''It is essential to run this after all the above steps, because it will overwrite some of the files.'''<br />
#: {{ms|cd c:\Ouroboros}}<br />
#: {{ms|.\mapserver.exe -productionmode -templates}}<br />
# If installing v2i1, copy all files from ''C:\CoH_Data\attributes'' and place them into ''C:\Ouroboros\data\server\db\templates''. If installing a later version, the files should be placed there automatically.<br />
# If you didn't get them from a downloaded release, copy all sample config files from Source/Assets/ConfigFiles into ''c:\Ouroboros'' (for example: Source/Assets/ConfigFiles/data/server/db will become C:/Ouroboros/data/server/db)<br />
<br />
== Database setup ==<br />
# You will need to choose a password for the database user. In these examples it will be "YOURL33TPASS!".<br />
# Launch SQL Server Management Studio from the start menu<br />
# Hit "Connect" on the screen that pops up, with default settings: [[File:SQL Connect.png|thumb|none]]<br />
# We need to enable the sa login so that server can login to the database.<br />
## If you look to the left panel you will see the object explorer and your connection. Right click it and select properties. [[File:SQL Properties.png|thumb|none]]<br />
## When this window comes up hit Security to the left and enable "sql server and windows authentication". Then click ok. [[File:SQL Security.png|thumb|none]]<br />
## In the same panel you used before navigate to Security -> Logins then right click and enter properties the sa user. [[File:SA Properties.png|thumb|none]]<br />
## In this window set the password to the same password you set back at step 4 [[File:Login Props.png|thumb|none]]<br />
## Choose Status from the left panel in this same window and set login to enabled and hit ok. [[File:Login Status.png|thumb|none]]<br />
## Right click the connection in the object explorer again and click Restart. [[File:SQL Restart.png|thumb|none]]<br />
# Next we need to apply the schema for the databases which require this to be done manually (account, auction, auth, and chat)<br />
## Click File -> Open -> File, navigate to the dbschemas that you downloaded at the start, and select cohauc.sql [[File:SSMS File Open.png|thumb|none]] [[File:SSMS Open DBSchema.png|thumb|none]]<br />
## You will see a '''create database''' statement near the top of the file, with two lines that include a '''filename''' parameter. [[File:SSMS DBSchema SQL SRV STR.png|thumb|none]]<br />
## Delete these lines, so that the statement is just: <syntaxhighlight lang="SQL">CREATE DATABASE [cohauc]</syntaxhighlight><br />
## Click the Execute button [[File:SSMS Execute.png|thumb|none]]<br />
## Repeat these steps for cohacc.sql, cohauth.sql and cohchat.sql. '''Do not use cohdb.sql'''<br />
<br />
== Initial database entries ==<br />
<br />
Each dbserver instance is a "shard". This needs to be manually added to authserver. In SQL Server Management Studio, expand "Databases", then right click on cohauth and select "New Query" from the menu. Several pieces of data are needed for this.<br />
<br />
* The IP address (ip) which clients will use to connect to your server. In this example, we will use 127.0.0.1<br />
* The source IP (inner_ip) from which dbserver will connect to authserver. In this example, we will use 127.0.0.1<br />
* The shard name (name) that you will use for dbserver. This will be Paragon by default. You can change it later once you have it working with the default name.<br />
* The auth shard number that you are using in turnstile_server.cfg. By default this is 1.<br />
<br />
In the new query window, enter:<br />
<br />
<syntaxhighlight lang="sql"><br />
INSERT INTO cohauth.dbo.server (id, name, ip, inner_ip, ageLimit, pk_flag, server_group_id) VALUES (1, 'Paragon', '127.0.0.1', '127.0.0.1', 0, 0, 1);<br />
INSERT INTO cohauth.dbo.worldstatus (idx, status) VALUES (1, 0);<br />
</syntaxhighlight><br />
<br />
Then press 'Execute'.<br />
<br />
You will also want to create an account so that you can test connecting to the database. For now, use the instructions in [[I25_FAQ#How_do_I_create_an_account.3F]]<br />
<br />
== Server database connection configuration ==<br />
Navigate to C:\Ouroboros\data\server\db. In each of the following files, look for an SqlLogin line, and change the Pwd= value to your password. Using our example YOURL33TPASS!:<br />
SqlLogin "DRIVER={SQL Server Native Client 11.0};Server=localhost\SQLEXPRESS;Uid=sa;Pwd=YOURL33TPASS!;"<br />
<br />
* account_server.cfg<br />
* auction_server.cfg<br />
* chat_server.cfg<br />
* servers.cfg<br />
<br />
In servers.cfg, also fix SqlInit to be:<br />
SqlInit "create database cohdb;"<br />
<br />
For authserver, we have to configure the connection via ODBC data sources.<br />
<br />
# Launch "ODBC Data Sources (32-bit)" from the start menu, or run directly from C:\Windows\SysWOW64\odbcad32.exe. (Do not use the 64-bit version)<br />
# Click File DSN then click add to the right. [[File:ODBC File DSN.png|thumb|none]]<br />
# Choose ODBC Driver 17 for SQL Server. [[File:ODBC Add Auth 1.png|thumb|none]]<br />
# Click Next.<br />
# Enter AuthDB into the box [[File:ODBC Add Auth 2.png|thumb|none]]<br />
# Click Next, then Finish.<br />
# One of the boxes on the next page will say "Which SQL Server do you want to connect to?". Type localhost\SQLEXPRESS [[File:ODBC Add Auth 3.png|thumb|none]]<br />
# Click Next<br />
# Choose "With SQL Server authentication using a login ID and password entered by the user". Enter "sa" for the username, and the password that you chose: [[File:ODBC Add Auth 4.png|thumb|none]]<br />
# Click Next<br />
# Enable "Change the default database to" and select "cohauth". [[File:ODBC Add Auth 5.png|thumb|none]]<br />
# Click Next<br />
# Default settings are fine on the last page [[File:ODBC Add Auth 6.png|thumb|none]]<br />
# Click Finish<br />
# A box will appear with the settings you have selected. Click "Test Data Source" [[File:ODBC Add Auth 7.png|thumb|none]]<br />
# You should see "TESTS COMPLETED SUCCESSFULLY!" in the output. If not, go back and check your settings. [[File:ODBC Add Auth 8.png|thumb|none]]<br />
# Click OK, then OK again.<br />
<br />
Then we have to enter the username and password again into authserver itself. Start authserver.exe, and the first time that you run it, this window will appear. Enter "sa" and the password that you chose: [[File:Authserver-login.PNG|thumb|none]]<br />
<br />
This username and password is saved in the registry key HKEY_CURRENT_USER\Software\NCSoft\GLOBALAUTH<br />
<br />
== Configure firewall ==<br />
If you are running Windows Firewall, you need to configure it to allow traffic through to your CoH server.<br />
<br />
#Open the start menu, type firewall, and click on Windows Defender Firewall. (or get at it through Control Panel>System and Security>Windows Defender Firewall)<br />
#Click on Advanced settings<br />
#Click on Inbound Rules<br />
#Click on New Rule...<br />
#For Rule Type, select Port, and Next<br />
#Select TCP, Specific local ports, Enter 2106, and then Next<br />
#Allow the connection, Next<br />
#Leave all the checkboxes selected, Next<br />
#Name the rule CoH TCP, Finish<br />
#Repeat the above steps to make a second new rule, but make it UDP instead of TCP, and for ports 7000-7200. Name it CoH UDP.<br />
<br />
== Launch server ==<br />
<br />
The following server applications need to be manually started, in this order:<br />
<br />
# authserver.exe<br />
# dbserver.exe<br />
# launcher.exe<br />
<br />
The rest of the servers are started by loadBalanceShardSpecific.cfg.<br />
<br />
== Connecting a client ==<br />
<br />
Launch the client by opening a command window, and typing:<br />
cd C:\Ouroboros<br />
Ouroboros -auth 127.0.0.1 -console<br />
Login with the account you created, click on the Paragon shard, make a character and enter into the game. If all of that works correctly, then you can stop here if all you want is to play City of Heroes on your own machine by yourself. Otherwise, move on to [[Volume_2_Modifying_Server_For_External_Access|Volume 2 Modifying Server For External Access]].<br />
<br />
== Troubleshooting ==<br />
* ERROR: {{ms|Failed to open attribute file vars.attribute for writing.}} You may get this error when running <code>mapserver -productionmode -templates</code>. If you are installing v2i1, this means you didn't create the C:\CoH_Data\attributes folder before running the command. If you are installing a later version than v2i1, it is likely trying to access C:\Ouroboros\data\server\db\templates instead. It is supposed to create that folder automatically if it doesn't exist. If you are getting this error message anyways, try manually creating the C:\Ouroboros\data\server\db\templates folder and then rerun <code>mapserver -productionmode -templates</code>. <br />
* ERROR: {{ms|'gzip' is not recognized as an internal or external command, operable program or batch file.}} If you get this message, it is usually accompanying a different error message. This happens because the server is trying to compress the dump files that it creates when some errors are found. You can safely ignore any messages about a missing gzip.exe, but if you would like to make these errors not happen any more you can place a gzip.exe and a zip.exe in any folder which is in your Path windows system environment variable. Look for a standard windows gzip.exe download, and you can also download info-zip and use the zip.exe which comes with it.<br />
* ERROR: {{ms|Loading templates...}} If you get errors when you launch dbserver.exe when it tries to load templates, something went wrong with the steps involving running <code>mapserver.exe -productionmode -templates</code> in [[#Setup server files|Setup server files]], and it can't find the template files in C:\Ouroboros\data\server\db\templates.<br />
* ERROR: {{ms|Version difference between client/server.}} This is a mismatch between the client version and the Version parameter in the '''C:\Ouroboros\version.ini''' file<br />
* ERROR: {{ms|Can't connect to DBserver.}} Double-check your firewall settings. Try turning off Windows Firewall completely to see if that lets you connect. If so, then turn Windows Firewall back on and investigate your Inbound firewall rules for CoH.</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Volume_2_Server_Setup&diff=1437Volume 2 Server Setup2019-11-15T16:37:10Z<p>Darwinasm86: </p>
<hr />
<div>__TOC__<br />
This guide will help you get started in running your own City of Heroes server on your local host (127.0.0.1). It assumes that you will run the City of Heroes client on the same machine as the server. Once you have that working, you can move on to the following guide which explains how to modify your server to allow external access from game clients on other machines.<br />
<br />
== Recommended hardware and settings ==<br />
#The main requirement for City of Heroes is having a decent amount of RAM. The minimum amount for a small personal server is about 8 GB of RAM, with 32 GB of RAM being the recommended amount. <br />
#*If you are running with less than the recommended 32 GB of RAM, it is also recommended that you increase your Windows paging file to simulate having more RAM (Control Panel->System and Security->System->Advanced System Settings->Advanced->Performance Settings->Advanced->Virtual Memory->Change). Setting your paging file to 32768 MB works well for a server with 8 GB of RAM.<br />
#*To support a larger number of players connecting, you will need to add more RAM to your server, though it currently isn't clear at what numbers of players these recommended values become insufficient.<br />
#*For the purposes of this guide, I am using 64.0 GB (G. Skill Trident Z Royal Silver 3200Mhz PC4-25600). <br />
#The server is CPU-intensive, having a decent CPU is important.<br />
#*This setup has been tested with multiple configurations with the oldest recommended being an Intel Core i7 6th Generation Processor.<br />
#*For the purposes of this guide, I am using the Intel Core i9-9900K Processor.<br />
#Running the server on a solid state drive instead of a spinning disc hard drive is recommended.<br />
#If you are installing the server on a computer that you own, your router will need to support NAT loopback if you want game clients to be able to connect to it from both inside and outside of your LAN.<br />
#*For the purposes of this guide, I am using an ASUS ROG GT-AX11000 gaming router.<br />
<br />
== Required software ==<br />
Download all of the following files:<br />
# [https://www.microsoft.com/en-us/sql-server/sql-server-editions-express SQL Server 2017 Express Edition]<br />
# [https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017 SQL Server Management(SSMS) 2017]<br />
# The latest stable release of the CoX/Source files from http://build.ourodev.com/archives/Source.master.7z. These are the compiled files from the OuroDev build machine. Extract the contents of the zip file into C:\Ouroboros. (or if you want to compile the source files yourself, follow the [[Volume 2 Build]] instructions, then copy the contents of the Source\bin directory to C:\Ouroboros)<br />
# Database schema definitions. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/DBSchemas (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\DBSchemas)<br />
# Sample server config files. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/ConfigFiles (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\ConfigFiles)<br />
# the [magnet:?xt=urn:btih:n642zelj2se2yn2ovmfy2z74tyyf7scs&dn=City%20of%20Heroes&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce Issue 24 client and data files] - this is ''not'' the SCORE client/data.<br />
# [magnet:?xt=urn:btih:CCCE574F7F89229B0FC2EF8AD898BE451864863A&dn=CoHDev_Source_Files_Current%28Updated%29.zip&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce CoHDev_Source_Files_Current(Updated).zip].<br />
# [magnet:?xt=urn:btih:8CE9DE8ECCF29B899B247512F1082F20B59DC4B2&dn=ServerData.7z&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce ServerData.7z].<br />
<br />
== Install SQL Server 2017 Express ==<br />
: You can install SQL Server pretty much on the default settings.<br />
:: Select Basic under installation type:<br />
::: [[File:SQL Server Install 2017 Express.png|thumb|none]]<br />
:: Agree to the EULA if you want to use SQL Server.<br />
::: [[File:SQL Server Install 2017 Express - 2.png|thumb|none]]<br />
:: Tell the server where to install files. I changed this for ease on my system.<br />
::: [[File:SQL Server Install 2017 Express - 3.png|thumb|none]]<br />
:: It should begin installing and eventually you should see "Install has completed successfully". Click close.<br />
::: [[File:SQL Server Install 2017 Express - 4.png|thumb|none]]<br />
<br />
== Install SQL Server Management(SSMS) ==<br />
: You can install SQL Server Management on default settings.<br />
:: Select the location you'd like to install SSMS to. The default is fine.<br />
::: [[File:SSMS Install - 1.png|thumb|none]]<br />
:: It will take awhile to install and you'll see a little progress bar letting you know whats going on<br />
::: [[File:SSMS Install - 2.png|thumb|none]]<br />
:: Eventually it will ask you to reboot the system. Might as well as do that now.<br />
::: [[File:SSMS Install - 3.png|thumb|none]]<br />
<br />
== Setup server files ==<br />
# At this point, you should have ''C:\Ouroboros'' containing exes and dlls<br />
# Create a directory in ''C:\Ouroboros'' called ''data''.<br />
# Open ''ServerData.7z'' and extract all files into ''C:\Ouroboros\data'' (the newly created directory).<br />
# Open ''CoHDev_Source_Files_Current(Updated).zip''.<br />
## Extract "i24 Server and Client Piggs (extracted with CoHTools)" into ''C:\Ouroboros\data''.<br />
## Copy ''maps.db'' from "map.db (modified, working on current VS2010 build)" and place it in ''C:\Ouroboros\data\server\db'', overwriting the old maps.db<br />
# Copy the ''piggs'' folder from your i24 client directory and place them in ''C:\Ouroboros\''. You should end up with ''C:\Ouroboros\piggs\'' populated.<br />
# If installing v2i1, create a directory in your C: drive called "CoH_Data" and another directory inside that, called "attributes" (''C:\CoH_Data\attributes''). In later versions, this isn't necessary.<br />
# Run the following in a command prompt. If it gives you an error message, check the [[#Troubleshooting|Troubleshooting]] section. '''It is essential to run this after all the above steps, because it will overwrite some of the files.'''<br />
#: {{ms|cd c:\Ouroboros}}<br />
#: {{ms|.\mapserver.exe -productionmode -templates}}<br />
# If installing v2i1, copy all files from ''C:\CoH_Data\attributes'' and place them into ''C:\Ouroboros\data\server\db\templates''. If installing a later version, the files should be placed there automatically.<br />
# If you didn't get them from a downloaded release, copy all sample config files from Source/Assets/ConfigFiles into ''c:\Ouroboros'' (for example: Source/Assets/ConfigFiles/data/server/db will become C:/Ouroboros/data/server/db)<br />
<br />
== Database setup ==<br />
# You will need to choose a password for the database user. In these examples it will be "YOURL33TPASS!".<br />
# Launch SQL Server Management Studio from the start menu<br />
# Hit "Connect" on the screen that pops up, with default settings: [[File:SQL Connect.png|thumb|none]]<br />
# We need to enable the sa login so that server can login to the database.<br />
## If you look to the left panel you will see the object explorer and your connection. Right click it and select properties. [[File:SQL Properties.png|thumb|none]]<br />
## When this window comes up hit Security to the left and enable "sql server and windows authentication". Then click ok. [[File:SQL Security.png|thumb|none]]<br />
## In the same panel you used before navigate to Security -> Logins then right click and enter properties the sa user. [[File:SA Properties.png|thumb|none]]<br />
## In this window set the password to the same password you set back at step 4 [[File:Login Props.png|thumb|none]]<br />
## Choose Status from the left panel in this same window and set login to enabled and hit ok. [[File:Login Status.png|thumb|none]]<br />
## Right click the connection in the object explorer again and click Restart. [[File:SQL Restart.png|thumb|none]]<br />
# Next we need to apply the schema for the databases which require this to be done manually (account, auction, auth, and chat)<br />
## Click File -> Open -> File, navigate to the dbschemas that you downloaded at the start, and select cohauc.sql [[File:SSMS File Open.png|thumb|none]] [[File:SSMS Open DBSchema.png|thumb|none]]<br />
## You will see a '''create database''' statement near the top of the file, with two lines that include a '''filename''' parameter. [[File:SSMS DBSchema SQL SRV STR.png|thumb|none]]<br />
## Delete these lines, so that the statement is just: <syntaxhighlight lang="SQL">CREATE DATABASE [cohauc]</syntaxhighlight><br />
## Click the Execute button [[File:SSMS Execute.png|thumb|none]]<br />
## Repeat these steps for cohacc.sql, cohauth.sql and cohchat.sql. '''Do not use cohdb.sql'''<br />
<br />
== Initial database entries ==<br />
<br />
Each dbserver instance is a "shard". This needs to be manually added to authserver. In SQL Server Management Studio, expand "Databases", then right click on cohauth and select "New Query" from the menu. Several pieces of data are needed for this.<br />
<br />
* The IP address (ip) which clients will use to connect to your server. In this example, we will use 127.0.0.1<br />
* The source IP (inner_ip) from which dbserver will connect to authserver. In this example, we will use 127.0.0.1<br />
* The shard name (name) that you will use for dbserver. This will be Paragon by default. You can change it later once you have it working with the default name.<br />
* The auth shard number that you are using in turnstile_server.cfg. By default this is 1.<br />
<br />
In the new query window, enter:<br />
<br />
<syntaxhighlight lang="sql"><br />
INSERT INTO cohauth.dbo.server (id, name, ip, inner_ip, ageLimit, pk_flag, server_group_id) VALUES (1, 'Paragon', '127.0.0.1', '127.0.0.1', 0, 0, 1);<br />
INSERT INTO cohauth.dbo.worldstatus (idx, status) VALUES (1, 0);<br />
</syntaxhighlight><br />
<br />
Then press 'Execute'.<br />
<br />
You will also want to create an account so that you can test connecting to the database. For now, use the instructions in [[I25_FAQ#How_do_I_create_an_account.3F]]<br />
<br />
== Server database connection configuration ==<br />
Navigate to C:\Ouroboros\data\server\db. In each of the following files, look for an SqlLogin line, and change the Pwd= value to your password. Using our example YOURL33TPASS!:<br />
SqlLogin "DRIVER={SQL Server Native Client 11.0};Server=localhost\SQLEXPRESS;Uid=sa;Pwd=YOURL33TPASS!;"<br />
<br />
* account_server.cfg<br />
* auction_server.cfg<br />
* chat_server.cfg<br />
* servers.cfg<br />
<br />
In servers.cfg, also fix SqlInit to be:<br />
SqlInit "create database cohdb;"<br />
<br />
For authserver, we have to configure the connection via ODBC data sources.<br />
<br />
# Launch "ODBC Data Sources (32-bit)" from the start menu, or run directly from C:\Windows\SysWOW64\odbcad32.exe. (Do not use the 64-bit version)<br />
# Click File DSN then click add to the right. [[File:ODBC File DSN.png|thumb|none]]<br />
# Choose ODBC Driver 17 for SQL Server. [[File:ODBC Add Auth 1.png|thumb|none]]<br />
# Click Next.<br />
# Enter AuthDB into the box [[File:ODBC Add Auth 2.png|thumb|none]]<br />
# Click Next, then Finish.<br />
# One of the boxes on the next page will say "Which SQL Server do you want to connect to?". Type localhost\SQLEXPRESS [[File:ODBC Add Auth 3.png|thumb|none]]<br />
# Click Next<br />
# Choose "With SQL Server authentication using a login ID and password entered by the user". Enter "sa" for the username, and the password that you chose: [[File:ODBC Add Auth 4.png|thumb|none]]<br />
# Click Next<br />
# Enable "Change the default database to" and select "cohauth". [[File:ODBC Add Auth 5.png|thumb|none]]<br />
# Click Next<br />
# Default settings are fine on the last page [[File:ODBC Add Auth 6.png|thumb|none]]<br />
# Click Finish<br />
# A box will appear with the settings you have selected. Click "Test Data Source" [[File:ODBC Add Auth 7.png|thumb|none]]<br />
# You should see "TESTS COMPLETED SUCCESSFULLY!" in the output. If not, go back and check your settings. [[File:ODBC Add Auth 8.png|thumb|none]]<br />
# Click OK, then OK again.<br />
<br />
Then we have to enter the username and password again into authserver itself. Start authserver.exe, and the first time that you run it, this window will appear. Enter "sa" and the password that you chose: [[File:Authserver-login.PNG|thumb|none]]<br />
<br />
This username and password is saved in the registry key HKEY_CURRENT_USER\Software\NCSoft\GLOBALAUTH<br />
<br />
== Configure firewall ==<br />
If you are running Windows Firewall, you need to configure it to allow traffic through to your CoH server.<br />
<br />
#Open the start menu, type firewall, and click on Windows Defender Firewall. (or get at it through Control Panel>System and Security>Windows Defender Firewall)<br />
#Click on Advanced settings<br />
#Click on Inbound Rules<br />
#Click on New Rule...<br />
#For Rule Type, select Port, and Next<br />
#Select TCP, Specific local ports, Enter 2106, and then Next<br />
#Allow the connection, Next<br />
#Leave all the checkboxes selected, Next<br />
#Name the rule CoH TCP, Finish<br />
#Repeat the above steps to make a second new rule, but make it UDP instead of TCP, and for ports 7000-7200. Name it CoH UDP.<br />
<br />
== Launch server ==<br />
<br />
The following server applications need to be manually started, in this order:<br />
<br />
# authserver.exe<br />
# dbserver.exe<br />
# launcher.exe<br />
<br />
The rest of the servers are started by loadBalanceShardSpecific.cfg.<br />
<br />
== Connecting a client ==<br />
<br />
Launch the client by opening a command window, and typing:<br />
cd C:\Ouroboros<br />
Ouroboros -auth 127.0.0.1 -console<br />
Login with the account you created, click on the Paragon shard, make a character and enter into the game. If all of that works correctly, then you can stop here if all you want is to play City of Heroes on your own machine by yourself. Otherwise, move on to [[Volume_2_Modifying_Server_For_External_Access|Volume 2 Modifying Server For External Access]].<br />
<br />
== Troubleshooting ==<br />
* ERROR: {{ms|Failed to open attribute file vars.attribute for writing.}} You may get this error when running <code>mapserver -productionmode -templates</code>. If you are installing v2i1, this means you didn't create the C:\CoH_Data\attributes folder before running the command. If you are installing a later version than v2i1, it is likely trying to access C:\Ouroboros\data\server\db\templates instead. It is supposed to create that folder automatically if it doesn't exist. If you are getting this error message anyways, try manually creating the C:\Ouroboros\data\server\db\templates folder and then rerun <code>mapserver -productionmode -templates</code>. <br />
* ERROR: {{ms|'gzip' is not recognized as an internal or external command, operable program or batch file.}} If you get this message, it is usually accompanying a different error message. This happens because the server is trying to compress the dump files that it creates when some errors are found. You can safely ignore any messages about a missing gzip.exe, but if you would like to make these errors not happen any more you can place a gzip.exe and a zip.exe in any folder which is in your Path windows system environment variable. Look for a standard windows gzip.exe download, and you can also download info-zip and use the zip.exe which comes with it.<br />
* ERROR: {{ms|Loading templates...}} If you get errors when you launch dbserver.exe when it tries to load templates, something went wrong with the steps involving running <code>mapserver.exe -productionmode -templates</code> in [[#Setup server files|Setup server files]], and it can't find the template files in C:\Ouroboros\data\server\db\templates.<br />
* ERROR: {{ms|Version difference between client/server.}} This is a mismatch between the client version and the Version parameter in the '''C:\Ouroboros\version.ini''' file<br />
* ERROR: {{ms|Can't connect to DBserver.}} Double-check your firewall settings. Try turning off Windows Firewall completely to see if that lets you connect. If so, then turn Windows Firewall back on and investigate your Inbound firewall rules for CoH.</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Volume_2_Server_Setup&diff=1436Volume 2 Server Setup2019-11-15T16:35:19Z<p>Darwinasm86: </p>
<hr />
<div>__TOC__<br />
This guide will help you get started in running your own City of Heroes server on your local host (127.0.0.1). It assumes that you will run the City of Heroes client on the same machine as the server. Once you have that working, you can move on to the following guide which explains how to modify your server to allow external access from game clients on other machines.<br />
<br />
== Recommended hardware and settings ==<br />
#The main requirement for City of Heroes is having a decent amount of RAM. The minimum amount for a small personal server is about 8 GB of RAM, with 32 GB of RAM being the recommended amount. <br />
#*If you are running with less than the recommended 32 GB of RAM, it is also recommended that you increase your Windows paging file to simulate having more RAM (Control Panel->System and Security->System->Advanced System Settings->Advanced->Performance Settings->Advanced->Virtual Memory->Change). Setting your paging file to 32768 MB works well for a server with 8 GB of RAM.<br />
#*To support a larger number of players connecting, you will need to add more RAM to your server, though it currently isn't clear at what numbers of players these recommended values become insufficient.<br />
#*This guide has been tested using 64.0 GB (G. Skill Trident Z Royal Silver 3200Mhz PC4-25600). <br />
#The server is CPU-intensive, having a decent CPU is important.<br />
#*This setup has been tested with multiple configurations with the oldest recommended being an Intel Core i7 6th Generation Processor.<br />
#*This guide focuses on the latest hardware Intel Core i9-9900K Processor.<br />
#Running the server on a solid state drive instead of a spinning disc hard drive is recommended.<br />
#If you are installing the server on a computer that you own, your router will need to support NAT loopback if you want game clients to be able to connect to it from both inside and outside of your LAN.<br />
#*This guide was tested using an ASUS ROG GT-AX11000 gaming router.<br />
<br />
== Required software ==<br />
Download all of the following files:<br />
# [https://www.microsoft.com/en-us/sql-server/sql-server-editions-express SQL Server 2017 Express Edition]<br />
# [https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017 SQL Server Management(SSMS) 2017]<br />
# The latest stable release of the CoX/Source files from http://build.ourodev.com/archives/Source.master.7z. These are the compiled files from the OuroDev build machine. Extract the contents of the zip file into C:\Ouroboros. (or if you want to compile the source files yourself, follow the [[Volume 2 Build]] instructions, then copy the contents of the Source\bin directory to C:\Ouroboros)<br />
# Database schema definitions. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/DBSchemas (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\DBSchemas)<br />
# Sample server config files. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/ConfigFiles (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\ConfigFiles)<br />
# the [magnet:?xt=urn:btih:n642zelj2se2yn2ovmfy2z74tyyf7scs&dn=City%20of%20Heroes&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce Issue 24 client and data files] - this is ''not'' the SCORE client/data.<br />
# [magnet:?xt=urn:btih:CCCE574F7F89229B0FC2EF8AD898BE451864863A&dn=CoHDev_Source_Files_Current%28Updated%29.zip&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce CoHDev_Source_Files_Current(Updated).zip].<br />
# [magnet:?xt=urn:btih:8CE9DE8ECCF29B899B247512F1082F20B59DC4B2&dn=ServerData.7z&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce ServerData.7z].<br />
<br />
== Install SQL Server 2017 Express ==<br />
: You can install SQL Server pretty much on the default settings.<br />
:: Select Basic under installation type:<br />
::: [[File:SQL Server Install 2017 Express.png|thumb|none]]<br />
:: Agree to the EULA if you want to use SQL Server.<br />
::: [[File:SQL Server Install 2017 Express - 2.png|thumb|none]]<br />
:: Tell the server where to install files. I changed this for ease on my system.<br />
::: [[File:SQL Server Install 2017 Express - 3.png|thumb|none]]<br />
:: It should begin installing and eventually you should see "Install has completed successfully". Click close.<br />
::: [[File:SQL Server Install 2017 Express - 4.png|thumb|none]]<br />
<br />
== Install SQL Server Management(SSMS) ==<br />
: You can install SQL Server Management on default settings.<br />
:: Select the location you'd like to install SSMS to. The default is fine.<br />
::: [[File:SSMS Install - 1.png|thumb|none]]<br />
:: It will take awhile to install and you'll see a little progress bar letting you know whats going on<br />
::: [[File:SSMS Install - 2.png|thumb|none]]<br />
:: Eventually it will ask you to reboot the system. Might as well as do that now.<br />
::: [[File:SSMS Install - 3.png|thumb|none]]<br />
<br />
== Setup server files ==<br />
# At this point, you should have ''C:\Ouroboros'' containing exes and dlls<br />
# Create a directory in ''C:\Ouroboros'' called ''data''.<br />
# Open ''ServerData.7z'' and extract all files into ''C:\Ouroboros\data'' (the newly created directory).<br />
# Open ''CoHDev_Source_Files_Current(Updated).zip''.<br />
## Extract "i24 Server and Client Piggs (extracted with CoHTools)" into ''C:\Ouroboros\data''.<br />
## Copy ''maps.db'' from "map.db (modified, working on current VS2010 build)" and place it in ''C:\Ouroboros\data\server\db'', overwriting the old maps.db<br />
# Copy the ''piggs'' folder from your i24 client directory and place them in ''C:\Ouroboros\''. You should end up with ''C:\Ouroboros\piggs\'' populated.<br />
# If installing v2i1, create a directory in your C: drive called "CoH_Data" and another directory inside that, called "attributes" (''C:\CoH_Data\attributes''). In later versions, this isn't necessary.<br />
# Run the following in a command prompt. If it gives you an error message, check the [[#Troubleshooting|Troubleshooting]] section. '''It is essential to run this after all the above steps, because it will overwrite some of the files.'''<br />
#: {{ms|cd c:\Ouroboros}}<br />
#: {{ms|.\mapserver.exe -productionmode -templates}}<br />
# If installing v2i1, copy all files from ''C:\CoH_Data\attributes'' and place them into ''C:\Ouroboros\data\server\db\templates''. If installing a later version, the files should be placed there automatically.<br />
# If you didn't get them from a downloaded release, copy all sample config files from Source/Assets/ConfigFiles into ''c:\Ouroboros'' (for example: Source/Assets/ConfigFiles/data/server/db will become C:/Ouroboros/data/server/db)<br />
<br />
== Database setup ==<br />
# You will need to choose a password for the database user. In these examples it will be "YOURL33TPASS!".<br />
# Launch SQL Server Management Studio from the start menu<br />
# Hit "Connect" on the screen that pops up, with default settings: [[File:SQL Connect.png|thumb|none]]<br />
# We need to enable the sa login so that server can login to the database.<br />
## If you look to the left panel you will see the object explorer and your connection. Right click it and select properties. [[File:SQL Properties.png|thumb|none]]<br />
## When this window comes up hit Security to the left and enable "sql server and windows authentication". Then click ok. [[File:SQL Security.png|thumb|none]]<br />
## In the same panel you used before navigate to Security -> Logins then right click and enter properties the sa user. [[File:SA Properties.png|thumb|none]]<br />
## In this window set the password to the same password you set back at step 4 [[File:Login Props.png|thumb|none]]<br />
## Choose Status from the left panel in this same window and set login to enabled and hit ok. [[File:Login Status.png|thumb|none]]<br />
## Right click the connection in the object explorer again and click Restart. [[File:SQL Restart.png|thumb|none]]<br />
# Next we need to apply the schema for the databases which require this to be done manually (account, auction, auth, and chat)<br />
## Click File -> Open -> File, navigate to the dbschemas that you downloaded at the start, and select cohauc.sql [[File:SSMS File Open.png|thumb|none]] [[File:SSMS Open DBSchema.png|thumb|none]]<br />
## You will see a '''create database''' statement near the top of the file, with two lines that include a '''filename''' parameter. [[File:SSMS DBSchema SQL SRV STR.png|thumb|none]]<br />
## Delete these lines, so that the statement is just: <syntaxhighlight lang="SQL">CREATE DATABASE [cohauc]</syntaxhighlight><br />
## Click the Execute button [[File:SSMS Execute.png|thumb|none]]<br />
## Repeat these steps for cohacc.sql, cohauth.sql and cohchat.sql. '''Do not use cohdb.sql'''<br />
<br />
== Initial database entries ==<br />
<br />
Each dbserver instance is a "shard". This needs to be manually added to authserver. In SQL Server Management Studio, expand "Databases", then right click on cohauth and select "New Query" from the menu. Several pieces of data are needed for this.<br />
<br />
* The IP address (ip) which clients will use to connect to your server. In this example, we will use 127.0.0.1<br />
* The source IP (inner_ip) from which dbserver will connect to authserver. In this example, we will use 127.0.0.1<br />
* The shard name (name) that you will use for dbserver. This will be Paragon by default. You can change it later once you have it working with the default name.<br />
* The auth shard number that you are using in turnstile_server.cfg. By default this is 1.<br />
<br />
In the new query window, enter:<br />
<br />
<syntaxhighlight lang="sql"><br />
INSERT INTO cohauth.dbo.server (id, name, ip, inner_ip, ageLimit, pk_flag, server_group_id) VALUES (1, 'Paragon', '127.0.0.1', '127.0.0.1', 0, 0, 1);<br />
INSERT INTO cohauth.dbo.worldstatus (idx, status) VALUES (1, 0);<br />
</syntaxhighlight><br />
<br />
Then press 'Execute'.<br />
<br />
You will also want to create an account so that you can test connecting to the database. For now, use the instructions in [[I25_FAQ#How_do_I_create_an_account.3F]]<br />
<br />
== Server database connection configuration ==<br />
Navigate to C:\Ouroboros\data\server\db. In each of the following files, look for an SqlLogin line, and change the Pwd= value to your password. Using our example YOURL33TPASS!:<br />
SqlLogin "DRIVER={SQL Server Native Client 11.0};Server=localhost\SQLEXPRESS;Uid=sa;Pwd=YOURL33TPASS!;"<br />
<br />
* account_server.cfg<br />
* auction_server.cfg<br />
* chat_server.cfg<br />
* servers.cfg<br />
<br />
In servers.cfg, also fix SqlInit to be:<br />
SqlInit "create database cohdb;"<br />
<br />
For authserver, we have to configure the connection via ODBC data sources.<br />
<br />
# Launch "ODBC Data Sources (32-bit)" from the start menu, or run directly from C:\Windows\SysWOW64\odbcad32.exe. (Do not use the 64-bit version)<br />
# Click File DSN then click add to the right. [[File:ODBC File DSN.png|thumb|none]]<br />
# Choose ODBC Driver 17 for SQL Server. [[File:ODBC Add Auth 1.png|thumb|none]]<br />
# Click Next.<br />
# Enter AuthDB into the box [[File:ODBC Add Auth 2.png|thumb|none]]<br />
# Click Next, then Finish.<br />
# One of the boxes on the next page will say "Which SQL Server do you want to connect to?". Type localhost\SQLEXPRESS [[File:ODBC Add Auth 3.png|thumb|none]]<br />
# Click Next<br />
# Choose "With SQL Server authentication using a login ID and password entered by the user". Enter "sa" for the username, and the password that you chose: [[File:ODBC Add Auth 4.png|thumb|none]]<br />
# Click Next<br />
# Enable "Change the default database to" and select "cohauth". [[File:ODBC Add Auth 5.png|thumb|none]]<br />
# Click Next<br />
# Default settings are fine on the last page [[File:ODBC Add Auth 6.png|thumb|none]]<br />
# Click Finish<br />
# A box will appear with the settings you have selected. Click "Test Data Source" [[File:ODBC Add Auth 7.png|thumb|none]]<br />
# You should see "TESTS COMPLETED SUCCESSFULLY!" in the output. If not, go back and check your settings. [[File:ODBC Add Auth 8.png|thumb|none]]<br />
# Click OK, then OK again.<br />
<br />
Then we have to enter the username and password again into authserver itself. Start authserver.exe, and the first time that you run it, this window will appear. Enter "sa" and the password that you chose: [[File:Authserver-login.PNG|thumb|none]]<br />
<br />
This username and password is saved in the registry key HKEY_CURRENT_USER\Software\NCSoft\GLOBALAUTH<br />
<br />
== Configure firewall ==<br />
If you are running Windows Firewall, you need to configure it to allow traffic through to your CoH server.<br />
<br />
#Open the start menu, type firewall, and click on Windows Defender Firewall. (or get at it through Control Panel>System and Security>Windows Defender Firewall)<br />
#Click on Advanced settings<br />
#Click on Inbound Rules<br />
#Click on New Rule...<br />
#For Rule Type, select Port, and Next<br />
#Select TCP, Specific local ports, Enter 2106, and then Next<br />
#Allow the connection, Next<br />
#Leave all the checkboxes selected, Next<br />
#Name the rule CoH TCP, Finish<br />
#Repeat the above steps to make a second new rule, but make it UDP instead of TCP, and for ports 7000-7200. Name it CoH UDP.<br />
<br />
== Launch server ==<br />
<br />
The following server applications need to be manually started, in this order:<br />
<br />
# authserver.exe<br />
# dbserver.exe<br />
# launcher.exe<br />
<br />
The rest of the servers are started by loadBalanceShardSpecific.cfg.<br />
<br />
== Connecting a client ==<br />
<br />
Launch the client by opening a command window, and typing:<br />
cd C:\Ouroboros<br />
Ouroboros -auth 127.0.0.1 -console<br />
Login with the account you created, click on the Paragon shard, make a character and enter into the game. If all of that works correctly, then you can stop here if all you want is to play City of Heroes on your own machine by yourself. Otherwise, move on to [[Volume_2_Modifying_Server_For_External_Access|Volume 2 Modifying Server For External Access]].<br />
<br />
== Troubleshooting ==<br />
* ERROR: {{ms|Failed to open attribute file vars.attribute for writing.}} You may get this error when running <code>mapserver -productionmode -templates</code>. If you are installing v2i1, this means you didn't create the C:\CoH_Data\attributes folder before running the command. If you are installing a later version than v2i1, it is likely trying to access C:\Ouroboros\data\server\db\templates instead. It is supposed to create that folder automatically if it doesn't exist. If you are getting this error message anyways, try manually creating the C:\Ouroboros\data\server\db\templates folder and then rerun <code>mapserver -productionmode -templates</code>. <br />
* ERROR: {{ms|'gzip' is not recognized as an internal or external command, operable program or batch file.}} If you get this message, it is usually accompanying a different error message. This happens because the server is trying to compress the dump files that it creates when some errors are found. You can safely ignore any messages about a missing gzip.exe, but if you would like to make these errors not happen any more you can place a gzip.exe and a zip.exe in any folder which is in your Path windows system environment variable. Look for a standard windows gzip.exe download, and you can also download info-zip and use the zip.exe which comes with it.<br />
* ERROR: {{ms|Loading templates...}} If you get errors when you launch dbserver.exe when it tries to load templates, something went wrong with the steps involving running <code>mapserver.exe -productionmode -templates</code> in [[#Setup server files|Setup server files]], and it can't find the template files in C:\Ouroboros\data\server\db\templates.<br />
* ERROR: {{ms|Version difference between client/server.}} This is a mismatch between the client version and the Version parameter in the '''C:\Ouroboros\version.ini''' file<br />
* ERROR: {{ms|Can't connect to DBserver.}} Double-check your firewall settings. Try turning off Windows Firewall completely to see if that lets you connect. If so, then turn Windows Firewall back on and investigate your Inbound firewall rules for CoH.</div>Darwinasm86https://wiki.ourodev.com/index.php?title=Volume_2_Server_Setup&diff=1435Volume 2 Server Setup2019-11-15T16:34:33Z<p>Darwinasm86: </p>
<hr />
<div>__TOC__<br />
This guide will help you get started in running your own City of Heroes server on your local host (127.0.0.1). It assumes that you will run the City of Heroes client on the same machine as the server. Once you have that working, you can move on to the following guide which explains how to modify your server to allow external access from game clients on other machines.<br />
<br />
== Recommended hardware and settings ==<br />
#The main requirement for City of Heroes is having a decent amount of RAM. The minimum amount for a small personal server is about 8 GB of RAM, with 32 GB of RAM being the recommended amount. <br />
#*If you are running with less than the recommended 32 GB of RAM, it is also recommended that you increase your Windows paging file to simulate having more RAM (Control Panel->System and Security->System->Advanced System Settings->Advanced->Performance Settings->Advanced->Virtual Memory->Change). Setting your paging file to 32768 MB works well for a server with 8 GB of RAM.<br />
#*To support a larger number of players connecting, you will need to add more RAM to your server, though it currently isn't clear at what numbers of players these recommended values become insufficient.<br />
#*This guide has been tested using 64.0 GB (G. Skill Trident Z Royal Silver 3200Mhz PC4-25600). <br />
#The server is CPU-intensive, having a decent CPU is important.<br />
#*This setup has been tested with multiple configurations with the oldest recommended being a Core i7 6th Generation Processor.<br />
#*This guide focuses the newest hardware Intel Core i9-9900K Processor.<br />
#Running the server on a solid state drive instead of a spinning disc hard drive is recommended.<br />
#If you are installing the server on a computer that you own, your router will need to support NAT loopback if you want game clients to be able to connect to it from both inside and outside of your LAN.<br />
#*This guide was tested using an ASUS ROG GT-AX11000 gaming router.<br />
<br />
== Required software ==<br />
Download all of the following files:<br />
# [https://www.microsoft.com/en-us/sql-server/sql-server-editions-express SQL Server 2017 Express Edition]<br />
# [https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017 SQL Server Management(SSMS) 2017]<br />
# The latest stable release of the CoX/Source files from http://build.ourodev.com/archives/Source.master.7z. These are the compiled files from the OuroDev build machine. Extract the contents of the zip file into C:\Ouroboros. (or if you want to compile the source files yourself, follow the [[Volume 2 Build]] instructions, then copy the contents of the Source\bin directory to C:\Ouroboros)<br />
# Database schema definitions. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/DBSchemas (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\DBSchemas)<br />
# Sample server config files. For now, get them from https://git.ourodev.com/CoX/Source/src/tag/v2-i1.0.0/Assets/ConfigFiles (or if you have cloned the CoX/Assets repository from Git, you can get them from C:\Git\CoX\Source\Assets\ConfigFiles)<br />
# the [magnet:?xt=urn:btih:n642zelj2se2yn2ovmfy2z74tyyf7scs&dn=City%20of%20Heroes&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce Issue 24 client and data files] - this is ''not'' the SCORE client/data.<br />
# [magnet:?xt=urn:btih:CCCE574F7F89229B0FC2EF8AD898BE451864863A&dn=CoHDev_Source_Files_Current%28Updated%29.zip&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce CoHDev_Source_Files_Current(Updated).zip].<br />
# [magnet:?xt=urn:btih:8CE9DE8ECCF29B899B247512F1082F20B59DC4B2&dn=ServerData.7z&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce ServerData.7z].<br />
<br />
== Install SQL Server 2017 Express ==<br />
: You can install SQL Server pretty much on the default settings.<br />
:: Select Basic under installation type:<br />
::: [[File:SQL Server Install 2017 Express.png|thumb|none]]<br />
:: Agree to the EULA if you want to use SQL Server.<br />
::: [[File:SQL Server Install 2017 Express - 2.png|thumb|none]]<br />
:: Tell the server where to install files. I changed this for ease on my system.<br />
::: [[File:SQL Server Install 2017 Express - 3.png|thumb|none]]<br />
:: It should begin installing and eventually you should see "Install has completed successfully". Click close.<br />
::: [[File:SQL Server Install 2017 Express - 4.png|thumb|none]]<br />
<br />
== Install SQL Server Management(SSMS) ==<br />
: You can install SQL Server Management on default settings.<br />
:: Select the location you'd like to install SSMS to. The default is fine.<br />
::: [[File:SSMS Install - 1.png|thumb|none]]<br />
:: It will take awhile to install and you'll see a little progress bar letting you know whats going on<br />
::: [[File:SSMS Install - 2.png|thumb|none]]<br />
:: Eventually it will ask you to reboot the system. Might as well as do that now.<br />
::: [[File:SSMS Install - 3.png|thumb|none]]<br />
<br />
== Setup server files ==<br />
# At this point, you should have ''C:\Ouroboros'' containing exes and dlls<br />
# Create a directory in ''C:\Ouroboros'' called ''data''.<br />
# Open ''ServerData.7z'' and extract all files into ''C:\Ouroboros\data'' (the newly created directory).<br />
# Open ''CoHDev_Source_Files_Current(Updated).zip''.<br />
## Extract "i24 Server and Client Piggs (extracted with CoHTools)" into ''C:\Ouroboros\data''.<br />
## Copy ''maps.db'' from "map.db (modified, working on current VS2010 build)" and place it in ''C:\Ouroboros\data\server\db'', overwriting the old maps.db<br />
# Copy the ''piggs'' folder from your i24 client directory and place them in ''C:\Ouroboros\''. You should end up with ''C:\Ouroboros\piggs\'' populated.<br />
# If installing v2i1, create a directory in your C: drive called "CoH_Data" and another directory inside that, called "attributes" (''C:\CoH_Data\attributes''). In later versions, this isn't necessary.<br />
# Run the following in a command prompt. If it gives you an error message, check the [[#Troubleshooting|Troubleshooting]] section. '''It is essential to run this after all the above steps, because it will overwrite some of the files.'''<br />
#: {{ms|cd c:\Ouroboros}}<br />
#: {{ms|.\mapserver.exe -productionmode -templates}}<br />
# If installing v2i1, copy all files from ''C:\CoH_Data\attributes'' and place them into ''C:\Ouroboros\data\server\db\templates''. If installing a later version, the files should be placed there automatically.<br />
# If you didn't get them from a downloaded release, copy all sample config files from Source/Assets/ConfigFiles into ''c:\Ouroboros'' (for example: Source/Assets/ConfigFiles/data/server/db will become C:/Ouroboros/data/server/db)<br />
<br />
== Database setup ==<br />
# You will need to choose a password for the database user. In these examples it will be "YOURL33TPASS!".<br />
# Launch SQL Server Management Studio from the start menu<br />
# Hit "Connect" on the screen that pops up, with default settings: [[File:SQL Connect.png|thumb|none]]<br />
# We need to enable the sa login so that server can login to the database.<br />
## If you look to the left panel you will see the object explorer and your connection. Right click it and select properties. [[File:SQL Properties.png|thumb|none]]<br />
## When this window comes up hit Security to the left and enable "sql server and windows authentication". Then click ok. [[File:SQL Security.png|thumb|none]]<br />
## In the same panel you used before navigate to Security -> Logins then right click and enter properties the sa user. [[File:SA Properties.png|thumb|none]]<br />
## In this window set the password to the same password you set back at step 4 [[File:Login Props.png|thumb|none]]<br />
## Choose Status from the left panel in this same window and set login to enabled and hit ok. [[File:Login Status.png|thumb|none]]<br />
## Right click the connection in the object explorer again and click Restart. [[File:SQL Restart.png|thumb|none]]<br />
# Next we need to apply the schema for the databases which require this to be done manually (account, auction, auth, and chat)<br />
## Click File -> Open -> File, navigate to the dbschemas that you downloaded at the start, and select cohauc.sql [[File:SSMS File Open.png|thumb|none]] [[File:SSMS Open DBSchema.png|thumb|none]]<br />
## You will see a '''create database''' statement near the top of the file, with two lines that include a '''filename''' parameter. [[File:SSMS DBSchema SQL SRV STR.png|thumb|none]]<br />
## Delete these lines, so that the statement is just: <syntaxhighlight lang="SQL">CREATE DATABASE [cohauc]</syntaxhighlight><br />
## Click the Execute button [[File:SSMS Execute.png|thumb|none]]<br />
## Repeat these steps for cohacc.sql, cohauth.sql and cohchat.sql. '''Do not use cohdb.sql'''<br />
<br />
== Initial database entries ==<br />
<br />
Each dbserver instance is a "shard". This needs to be manually added to authserver. In SQL Server Management Studio, expand "Databases", then right click on cohauth and select "New Query" from the menu. Several pieces of data are needed for this.<br />
<br />
* The IP address (ip) which clients will use to connect to your server. In this example, we will use 127.0.0.1<br />
* The source IP (inner_ip) from which dbserver will connect to authserver. In this example, we will use 127.0.0.1<br />
* The shard name (name) that you will use for dbserver. This will be Paragon by default. You can change it later once you have it working with the default name.<br />
* The auth shard number that you are using in turnstile_server.cfg. By default this is 1.<br />
<br />
In the new query window, enter:<br />
<br />
<syntaxhighlight lang="sql"><br />
INSERT INTO cohauth.dbo.server (id, name, ip, inner_ip, ageLimit, pk_flag, server_group_id) VALUES (1, 'Paragon', '127.0.0.1', '127.0.0.1', 0, 0, 1);<br />
INSERT INTO cohauth.dbo.worldstatus (idx, status) VALUES (1, 0);<br />
</syntaxhighlight><br />
<br />
Then press 'Execute'.<br />
<br />
You will also want to create an account so that you can test connecting to the database. For now, use the instructions in [[I25_FAQ#How_do_I_create_an_account.3F]]<br />
<br />
== Server database connection configuration ==<br />
Navigate to C:\Ouroboros\data\server\db. In each of the following files, look for an SqlLogin line, and change the Pwd= value to your password. Using our example YOURL33TPASS!:<br />
SqlLogin "DRIVER={SQL Server Native Client 11.0};Server=localhost\SQLEXPRESS;Uid=sa;Pwd=YOURL33TPASS!;"<br />
<br />
* account_server.cfg<br />
* auction_server.cfg<br />
* chat_server.cfg<br />
* servers.cfg<br />
<br />
In servers.cfg, also fix SqlInit to be:<br />
SqlInit "create database cohdb;"<br />
<br />
For authserver, we have to configure the connection via ODBC data sources.<br />
<br />
# Launch "ODBC Data Sources (32-bit)" from the start menu, or run directly from C:\Windows\SysWOW64\odbcad32.exe. (Do not use the 64-bit version)<br />
# Click File DSN then click add to the right. [[File:ODBC File DSN.png|thumb|none]]<br />
# Choose ODBC Driver 17 for SQL Server. [[File:ODBC Add Auth 1.png|thumb|none]]<br />
# Click Next.<br />
# Enter AuthDB into the box [[File:ODBC Add Auth 2.png|thumb|none]]<br />
# Click Next, then Finish.<br />
# One of the boxes on the next page will say "Which SQL Server do you want to connect to?". Type localhost\SQLEXPRESS [[File:ODBC Add Auth 3.png|thumb|none]]<br />
# Click Next<br />
# Choose "With SQL Server authentication using a login ID and password entered by the user". Enter "sa" for the username, and the password that you chose: [[File:ODBC Add Auth 4.png|thumb|none]]<br />
# Click Next<br />
# Enable "Change the default database to" and select "cohauth". [[File:ODBC Add Auth 5.png|thumb|none]]<br />
# Click Next<br />
# Default settings are fine on the last page [[File:ODBC Add Auth 6.png|thumb|none]]<br />
# Click Finish<br />
# A box will appear with the settings you have selected. Click "Test Data Source" [[File:ODBC Add Auth 7.png|thumb|none]]<br />
# You should see "TESTS COMPLETED SUCCESSFULLY!" in the output. If not, go back and check your settings. [[File:ODBC Add Auth 8.png|thumb|none]]<br />
# Click OK, then OK again.<br />
<br />
Then we have to enter the username and password again into authserver itself. Start authserver.exe, and the first time that you run it, this window will appear. Enter "sa" and the password that you chose: [[File:Authserver-login.PNG|thumb|none]]<br />
<br />
This username and password is saved in the registry key HKEY_CURRENT_USER\Software\NCSoft\GLOBALAUTH<br />
<br />
== Configure firewall ==<br />
If you are running Windows Firewall, you need to configure it to allow traffic through to your CoH server.<br />
<br />
#Open the start menu, type firewall, and click on Windows Defender Firewall. (or get at it through Control Panel>System and Security>Windows Defender Firewall)<br />
#Click on Advanced settings<br />
#Click on Inbound Rules<br />
#Click on New Rule...<br />
#For Rule Type, select Port, and Next<br />
#Select TCP, Specific local ports, Enter 2106, and then Next<br />
#Allow the connection, Next<br />
#Leave all the checkboxes selected, Next<br />
#Name the rule CoH TCP, Finish<br />
#Repeat the above steps to make a second new rule, but make it UDP instead of TCP, and for ports 7000-7200. Name it CoH UDP.<br />
<br />
== Launch server ==<br />
<br />
The following server applications need to be manually started, in this order:<br />
<br />
# authserver.exe<br />
# dbserver.exe<br />
# launcher.exe<br />
<br />
The rest of the servers are started by loadBalanceShardSpecific.cfg.<br />
<br />
== Connecting a client ==<br />
<br />
Launch the client by opening a command window, and typing:<br />
cd C:\Ouroboros<br />
Ouroboros -auth 127.0.0.1 -console<br />
Login with the account you created, click on the Paragon shard, make a character and enter into the game. If all of that works correctly, then you can stop here if all you want is to play City of Heroes on your own machine by yourself. Otherwise, move on to [[Volume_2_Modifying_Server_For_External_Access|Volume 2 Modifying Server For External Access]].<br />
<br />
== Troubleshooting ==<br />
* ERROR: {{ms|Failed to open attribute file vars.attribute for writing.}} You may get this error when running <code>mapserver -productionmode -templates</code>. If you are installing v2i1, this means you didn't create the C:\CoH_Data\attributes folder before running the command. If you are installing a later version than v2i1, it is likely trying to access C:\Ouroboros\data\server\db\templates instead. It is supposed to create that folder automatically if it doesn't exist. If you are getting this error message anyways, try manually creating the C:\Ouroboros\data\server\db\templates folder and then rerun <code>mapserver -productionmode -templates</code>. <br />
* ERROR: {{ms|'gzip' is not recognized as an internal or external command, operable program or batch file.}} If you get this message, it is usually accompanying a different error message. This happens because the server is trying to compress the dump files that it creates when some errors are found. You can safely ignore any messages about a missing gzip.exe, but if you would like to make these errors not happen any more you can place a gzip.exe and a zip.exe in any folder which is in your Path windows system environment variable. Look for a standard windows gzip.exe download, and you can also download info-zip and use the zip.exe which comes with it.<br />
* ERROR: {{ms|Loading templates...}} If you get errors when you launch dbserver.exe when it tries to load templates, something went wrong with the steps involving running <code>mapserver.exe -productionmode -templates</code> in [[#Setup server files|Setup server files]], and it can't find the template files in C:\Ouroboros\data\server\db\templates.<br />
* ERROR: {{ms|Version difference between client/server.}} This is a mismatch between the client version and the Version parameter in the '''C:\Ouroboros\version.ini''' file<br />
* ERROR: {{ms|Can't connect to DBserver.}} Double-check your firewall settings. Try turning off Windows Firewall completely to see if that lets you connect. If so, then turn Windows Firewall back on and investigate your Inbound firewall rules for CoH.</div>Darwinasm86