<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.dspt.info/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Deviltti2</id>
		<title>DSP Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.dspt.info/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Deviltti2"/>
		<link rel="alternate" type="text/html" href="http://wiki.dspt.info/index.php/Special:Contributions/Deviltti2"/>
		<updated>2026-04-26T23:51:34Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.2</generator>

	<entry>
		<id>http://wiki.dspt.info/index.php?title=Building_the_Server&amp;diff=21953</id>
		<title>Building the Server</title>
		<link rel="alternate" type="text/html" href="http://wiki.dspt.info/index.php?title=Building_the_Server&amp;diff=21953"/>
				<updated>2015-07-22T02:22:28Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti2: /* MySQL 5.6 (Updated) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing &amp;amp; Setting up the DS Server on Windows ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
In this section we will download every program/tool we will need to setup and maintain the servers. Do not install these yet.&lt;br /&gt;
&lt;br /&gt;
[http://dev.mysql.com/downloads/mysql/ MySQL Community Server] (flag)&lt;br /&gt;
-Or-&lt;br /&gt;
[http://dev.mysql.com/downloads/installer/5.6.html/ MySQL Community Server 5.6 (Updated)] (flag)&lt;br /&gt;
-Or-&lt;br /&gt;
[https://downloads.mariadb.org/ MariaDB]&lt;br /&gt;
&lt;br /&gt;
[http://dev.mysql.com/downloads/workbench/ MySQL Workbench]&lt;br /&gt;
&lt;br /&gt;
[http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx Visual Studio 2013 or higher (Full or Express)]&lt;br /&gt;
&lt;br /&gt;
[https://code.google.com/p/msysgit/downloads/list?q=full+installer+official+git/ Git For Windows]&lt;br /&gt;
&lt;br /&gt;
[https://code.google.com/p/tortoisegit/ TortoiseGit]&lt;br /&gt;
&lt;br /&gt;
[http://www.microsoft.com/en-us/download/details.aspx?id=40784 Visual C++ Redistributable Runtimes 2013]&lt;br /&gt;
&lt;br /&gt;
[http://www.microsoft.com/download/en/details.aspx?id=21 .Net 3.5 Runtime] (already comes with Win 7)&lt;br /&gt;
&lt;br /&gt;
[http://www.microsoft.com/download/en/details.aspx?id=22 .Net 3.5sp1 Runtime] (already comes with Win 7)&lt;br /&gt;
&lt;br /&gt;
[http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=17851 .Net 4 Runtime]&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
==== MySql ==== &lt;br /&gt;
(flag)&lt;br /&gt;
&lt;br /&gt;
Choose Typical Installation&lt;br /&gt;
&lt;br /&gt;
After the main installation, select Launch the MySQL Instance Configuration Wizard&lt;br /&gt;
&lt;br /&gt;
Select Detailed Configuration&lt;br /&gt;
&lt;br /&gt;
Select Developer Machine&lt;br /&gt;
&lt;br /&gt;
Select Multi-functional Database&lt;br /&gt;
&lt;br /&gt;
Standard Installation Directory&lt;br /&gt;
&lt;br /&gt;
Select Manual Setting and 1000 Concurrent connections&lt;br /&gt;
&lt;br /&gt;
Select Enable TCP/IP Networking, Port Number 3306, and Enable Strict Mode&lt;br /&gt;
&lt;br /&gt;
Select Best Support for Multilingualism&lt;br /&gt;
&lt;br /&gt;
Select Install as Windows Service, Launch the MySQL Server automatically, and Include Bin Directory in Windows PATH.&lt;br /&gt;
&lt;br /&gt;
Select Modify Security Settings, and enter a new password twice. Write down the MySQL password.&lt;br /&gt;
(DO NOT LEAVE BLANK.)&lt;br /&gt;
&lt;br /&gt;
Select Next, Execute, then Finish&lt;br /&gt;
&lt;br /&gt;
==== MySQL 5.6 '''(Updated)'''==== &lt;br /&gt;
Note: Server is x86, but will install 32-bit and 64-bit binaries.&lt;br /&gt;
&lt;br /&gt;
Accept License Terms&lt;br /&gt;
&lt;br /&gt;
Skip Check for updates&lt;br /&gt;
&lt;br /&gt;
Select Developer Default&lt;br /&gt;
&lt;br /&gt;
Check requirements and click Execute - will launch installers for anything you're missing&lt;br /&gt;
&lt;br /&gt;
Default Installation - ~5min&lt;br /&gt;
&lt;br /&gt;
Default Configuration - Check box for &amp;quot;Show Advance Options&amp;quot; - Click Next&lt;br /&gt;
&lt;br /&gt;
Enter MySQL Root Password, twice. Remember it! - Click Next&lt;br /&gt;
&lt;br /&gt;
It will show windows service details, leave as default and Click Next&lt;br /&gt;
&lt;br /&gt;
It will show Logging options, leave as default and  Click Next&lt;br /&gt;
&lt;br /&gt;
Configuration will complete, Click Next&lt;br /&gt;
&lt;br /&gt;
Samples and examples will configure - ~5min - Click Next&lt;br /&gt;
&lt;br /&gt;
Click Finish&lt;br /&gt;
&lt;br /&gt;
==== MySQL Workbench ==== &lt;br /&gt;
&lt;br /&gt;
Use default installation options.&lt;br /&gt;
&lt;br /&gt;
==== Visual Studio 2015 ====&lt;br /&gt;
&lt;br /&gt;
Any edition works.  Community is free.&lt;br /&gt;
&lt;br /&gt;
Make sure you install C++! At the time of this writing, it is NOT in the default options (use custom to select it under Languages).&lt;br /&gt;
&lt;br /&gt;
==== Git for Windows ====&lt;br /&gt;
&lt;br /&gt;
Use default installation options.&lt;br /&gt;
&lt;br /&gt;
==== TortoiseGit ====&lt;br /&gt;
&lt;br /&gt;
Use default installation options. You can skip the step to reboot since we'll reboot once everything else is installed.&lt;br /&gt;
&lt;br /&gt;
==== Visual C++ Redistributable Runtime 2013 and 2015 ====&lt;br /&gt;
&lt;br /&gt;
Use default installation options.&lt;br /&gt;
&lt;br /&gt;
==== .Net 4.6 ====&lt;br /&gt;
&lt;br /&gt;
Use default installation options.  It probably comes with Visual Studio 2015&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point everything should be installed that needs to be and you can restart your PC to finalize them.&lt;br /&gt;
&lt;br /&gt;
=== Downloading the Server Source Code ===&lt;br /&gt;
&lt;br /&gt;
'''In this section we will use TortoiseGit to download the latest git source code for the server.'''&lt;br /&gt;
&lt;br /&gt;
Open Windows Explorer (right click the start button and choose Windows Explorer)&lt;br /&gt;
&lt;br /&gt;
Right click on any folder select Git Clone&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;URL&amp;quot; field put in the following url: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://github.com/DarkstarProject/darkstar.git&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the &amp;quot;Directory&amp;quot; to your choice (blank will default to current location /darkstar&lt;br /&gt;
&lt;br /&gt;
Click OK.&lt;br /&gt;
&lt;br /&gt;
Wait for the download to finish.&lt;br /&gt;
&lt;br /&gt;
Click OK to close TortoiseGit.&lt;br /&gt;
&lt;br /&gt;
Close windows explorer&lt;br /&gt;
&lt;br /&gt;
At this point you have downloaded all of the source code for the latest version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting up the Database ===&lt;br /&gt;
&lt;br /&gt;
'''In this section we will use the data that you downloaded to build a database in MySQL.'''&lt;br /&gt;
&lt;br /&gt;
==== Using a bat script ====&lt;br /&gt;
&lt;br /&gt;
If you follow this step, you may skip the next one. &lt;br /&gt;
&lt;br /&gt;
Paste the following into notepad and save it as DSP_Import.bat in your dsp\sql folder:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@ECHO OFF&lt;br /&gt;
REM =============================================================================&lt;br /&gt;
REM =============================================================================&lt;br /&gt;
REM ======                                                              =========&lt;br /&gt;
REM ====== THis script will drop the DB specificed, then create the DB  =========&lt;br /&gt;
REM ====== specified, and then load all .sql tables from its run dir to =========&lt;br /&gt;
REM ====== the the DB.                                                  =========&lt;br /&gt;
REM ======                                                              =========&lt;br /&gt;
REM ====== File needs to be run from within the \dsp\sql folder (same   =========&lt;br /&gt;
REM ====== folder with all the .sql files. Please edit as needed. By    =========&lt;br /&gt;
REM ====== default it WILL DROP the standard dspdb DB, loosing all      =========&lt;br /&gt;
REM ====== accounts and characters. If this is not desired, then update =========&lt;br /&gt;
REM ====== the file to load the new DB into a new DB name.              =========&lt;br /&gt;
REM ======                                                              =========&lt;br /&gt;
REM ====== Update -p with MySQL password. If you password is 'foo',     =========&lt;br /&gt;
REM ====== then change '-pMYSQLPASS' to '-pfoo' (3 places).             =========&lt;br /&gt;
REM ======                                                              =========&lt;br /&gt;
REM ====== If you want to use a different database name, change 'dspdb' =========&lt;br /&gt;
REM ====== with a database name of your choosing.                       =========&lt;br /&gt;
REM ======                                                              =========&lt;br /&gt;
REM =============================================================================&lt;br /&gt;
REM =============================================================================&lt;br /&gt;
REM ======                                                              =========&lt;br /&gt;
REM ====== by Thrydwolf 9/8/2012                                        =========&lt;br /&gt;
REM ====== Updated with status by bluekirby0 3/30/2012                  =========&lt;br /&gt;
REM ====== Updated by Thrydwolf 9/18/2012                               =========&lt;br /&gt;
REM ======                                                              =========&lt;br /&gt;
REM =============================================================================&lt;br /&gt;
REM =============================================================================&lt;br /&gt;
&lt;br /&gt;
ECHO Creating Database dspdb&lt;br /&gt;
mysqladmin -h localhost -u root -pMYSQLPASS DROP dspdb&lt;br /&gt;
&lt;br /&gt;
ECHO Creating Database dspdb&lt;br /&gt;
mysqladmin -h localhost -u root -pMYSQLPASS CREATE dspdb&lt;br /&gt;
&lt;br /&gt;
ECHO Loading dspdb tables into the database&lt;br /&gt;
cd c:\darkstar\sql&lt;br /&gt;
FOR %%X IN (*.sql) DO ECHO Importing %%X &amp;amp; &amp;quot;c:\program files\mysql\mysql server 5.6\bin\mysql&amp;quot; dspdb -h localhost -u root -pMYSQLPASS &amp;lt; %%X&lt;br /&gt;
&lt;br /&gt;
ECHO Finished!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a minimum you will need to change -pMYSQLPASS in the script to where root is your mysql root password. If your password is 'foo' then you would use '-pfoo' instead. You may also have to change the path of your mysql installation as well.&lt;br /&gt;
&lt;br /&gt;
You can use this script any time the repository is updated, but it will drop the table and thus delete all your player data. You may want to make manual changes instead unless you are using it purely as a test server.&lt;br /&gt;
&lt;br /&gt;
After you've done your initial load, you can use the following script that will preserve character data&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd c:\darkstar\sql&lt;br /&gt;
del auction_house.sql&lt;br /&gt;
del chars.sql&lt;br /&gt;
del accounts.sql&lt;br /&gt;
del accounts_banned.sql&lt;br /&gt;
del char_effects.sql&lt;br /&gt;
del char_equip.sql&lt;br /&gt;
del char_exp.sql&lt;br /&gt;
del char_inventory.sql&lt;br /&gt;
del char_jobs.sql&lt;br /&gt;
del char_look.sql&lt;br /&gt;
del char_pet.sql&lt;br /&gt;
del char_pet_name.sql&lt;br /&gt;
del char_points.sql&lt;br /&gt;
del char_profile.sql&lt;br /&gt;
del char_skills.sql&lt;br /&gt;
del char_stats.sql&lt;br /&gt;
del char_storage.sql&lt;br /&gt;
del char_vars.sql&lt;br /&gt;
del char_weapon_skill_points.sql&lt;br /&gt;
del chars.sql&lt;br /&gt;
del conquest_system.sql&lt;br /&gt;
del delivery_box.sql&lt;br /&gt;
del linkshells.sql&lt;br /&gt;
FOR %%X IN (*.sql) DO ECHO Importing %%X &amp;amp; &amp;quot;c:\program files\mysql\mysql server 5.6\bin\mysql&amp;quot; dspdb -h localhost -u root -pMYSQLPASS &amp;lt; %%X&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using Navicat ==== &lt;br /&gt;
(flag)&lt;br /&gt;
&lt;br /&gt;
This is the more hands-on approach, and being comfortable doing it this way may make it easier to update individual tables later without having to learn the mysql command-line interface.&lt;br /&gt;
&lt;br /&gt;
Open Navicat&lt;br /&gt;
&lt;br /&gt;
Click Connection (or File, New Connection)&lt;br /&gt;
&lt;br /&gt;
Connection name: DarkStar&lt;br /&gt;
&lt;br /&gt;
Host Name/IP: localhost&lt;br /&gt;
&lt;br /&gt;
Port: 3306&lt;br /&gt;
&lt;br /&gt;
User Name: root&lt;br /&gt;
&lt;br /&gt;
Password: Enter the password you wrote down during the mySQL installation.&lt;br /&gt;
&lt;br /&gt;
Check Save Password&lt;br /&gt;
&lt;br /&gt;
Click OK&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the connections pane double click DarkStar&lt;br /&gt;
&lt;br /&gt;
Right click on DarkStar and select New Database...&lt;br /&gt;
&lt;br /&gt;
Name it dspdb&lt;br /&gt;
&lt;br /&gt;
Use the Default character set&lt;br /&gt;
&lt;br /&gt;
Select OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double click dspdb&lt;br /&gt;
&lt;br /&gt;
Right click on dspdb and select Execute SQL File...&lt;br /&gt;
&lt;br /&gt;
Browse to C:\dsp\sql and select abilities.sql&lt;br /&gt;
&lt;br /&gt;
Click Start&lt;br /&gt;
&lt;br /&gt;
Continue this process for each file in the folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have an issue with the triggers.sql file then follow this step. If not, proceed to the next step (IP address for the map server):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Navicat Open accounts table&lt;br /&gt;
&lt;br /&gt;
Click File, Design Table&lt;br /&gt;
&lt;br /&gt;
Click the Triggers tab&lt;br /&gt;
&lt;br /&gt;
There should a line already listed with account_delete in the Name field&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not:&lt;br /&gt;
&lt;br /&gt;
click Add Trigger&lt;br /&gt;
&lt;br /&gt;
Name column should be account_delete&lt;br /&gt;
&lt;br /&gt;
Fires column should be Before&lt;br /&gt;
&lt;br /&gt;
Check the box in the Delete column&lt;br /&gt;
&lt;br /&gt;
In the definition box below add the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   DELETE FROM `accounts_banned` WHERE `accid` = OLD.id;&lt;br /&gt;
   DELETE FROM `chars` WHERE `accid` = OLD.id;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select Save and then close the table.&lt;br /&gt;
&lt;br /&gt;
Open the chars table&lt;br /&gt;
&lt;br /&gt;
Click File, Design Table&lt;br /&gt;
&lt;br /&gt;
Click the Triggers tab&lt;br /&gt;
&lt;br /&gt;
There should already be a line listed with char_delete in the name field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not:&lt;br /&gt;
&lt;br /&gt;
click Add Trigger&lt;br /&gt;
&lt;br /&gt;
Name column should be char_delete&lt;br /&gt;
&lt;br /&gt;
Fires column should be Before&lt;br /&gt;
&lt;br /&gt;
Check the box in the Delete column&lt;br /&gt;
&lt;br /&gt;
In the definition box below add the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   DELETE FROM `char_exp` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_jobs` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_equip` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_effects` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_look` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_stats` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_skills` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_titles` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_inventory` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_vars` WHERE `charid` = OLD.charid;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select Save and then close the table.&lt;br /&gt;
&lt;br /&gt;
Note: Leave Navicat open for the next section.&lt;br /&gt;
&lt;br /&gt;
==== Configure the ZoneIP for the Map Server ====&lt;br /&gt;
&lt;br /&gt;
Now you need to determine what IP address that will be used for the Map Server, then update MySQL with it.&lt;br /&gt;
&lt;br /&gt;
Most devs &amp;amp; enthusiasts will not have a separate map server, but will run both map server and login server on the same PC. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Determine what IP address will be used for the map server.&lt;br /&gt;
&lt;br /&gt;
If the server will be public, then use your external IP in the next step. (Looks really random like 173.194.43.104)&lt;br /&gt;
&lt;br /&gt;
If the server will be internal and you want it available on other PCs in your internal network, use the internal network IP (192.168.x.x) in the next step.&lt;br /&gt;
&lt;br /&gt;
If you only plan to run the client and the server on the same PC, you can use the localhost address (127.0.0.1) in the next step.&lt;br /&gt;
&lt;br /&gt;
2. Update the zone_settings table with the ip&lt;br /&gt;
(flag)&lt;br /&gt;
In Navicat double click on the table dspdb and expand&lt;br /&gt;
&lt;br /&gt;
Click on Query&lt;br /&gt;
&lt;br /&gt;
Right click and select New Query&lt;br /&gt;
&lt;br /&gt;
Add the following code into the empty space, inserting the value calculated above. The value in the code below (127.0.0.1) would be used if only running the client from the same PC as the server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    UPDATE zone_settings SET zoneip = '127.0.0.1';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select Run. You should get a message stating that many (280+) records were changed.&lt;br /&gt;
&lt;br /&gt;
I recommend you save the Query in case you need to run it again later after updating the server.&lt;br /&gt;
&lt;br /&gt;
Close Navicat.&lt;br /&gt;
&lt;br /&gt;
=== Building the Servers ===&lt;br /&gt;
&lt;br /&gt;
'''In this section we will be building the Dark Star servers.'''&lt;br /&gt;
&lt;br /&gt;
Dark Star uses 3 separate servers. A Login server, a Map/Game server, and an optional Search/Auction House server. Using the ZoneIP mentioned earlier, every map could run on its own server at a different IP address. If you have 4 computers each computer could run different areas, as long as they were all connected to the same MySQL database server.&lt;br /&gt;
&lt;br /&gt;
==== Build the Server ====&lt;br /&gt;
&lt;br /&gt;
Open Visual Studio&lt;br /&gt;
&lt;br /&gt;
Click File, Open, Project/Solution (or Ctrl+Shift+O)&lt;br /&gt;
&lt;br /&gt;
Navigate to C:\dsp\win32&lt;br /&gt;
&lt;br /&gt;
Select darkstar.sln&lt;br /&gt;
&lt;br /&gt;
It may take a few minutes to load files.&lt;br /&gt;
&lt;br /&gt;
Click Debug then Build Server (or F7, or Ctrl+Shift+B)&lt;br /&gt;
&lt;br /&gt;
Building will take a few minutes.&lt;br /&gt;
&lt;br /&gt;
Once complete, validate that there are no Errors listed in the summary line at the bottom. It should look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;========== Build: 3 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there are any SQL errors it is probably caused by the SQL dev package was extracted to the wrong folder.&lt;br /&gt;
&lt;br /&gt;
If there is a #include error, change that #include to say #include &amp;lt;mysql/mysql.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== When all of the Servers are built ====&lt;br /&gt;
&lt;br /&gt;
Verify in the C:\dsp directory that the servers you built are there: &lt;br /&gt;
&lt;br /&gt;
DSConnect-server.exe for the Login Server&lt;br /&gt;
&lt;br /&gt;
DSGame-server.exe for the Map Server&lt;br /&gt;
&lt;br /&gt;
DSSearch-server.exe for the Search Server&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuring the Servers ===&lt;br /&gt;
&lt;br /&gt;
'''Now you will configure the Login Server and Map Server to connect to the MySQL database.'''&lt;br /&gt;
&lt;br /&gt;
Do not mess with any other settings in these files unless you know what they are for and what they do.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Login Server Settings ====&lt;br /&gt;
&lt;br /&gt;
In windows explorer navigate to c:\dsp\conf&lt;br /&gt;
&lt;br /&gt;
Open login_darkstar.conf in a text editer (notepad)&lt;br /&gt;
&lt;br /&gt;
Scroll down to the bottom and validate/update the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql_host: 127.0.0.1&lt;br /&gt;
mysql_port: 3306&lt;br /&gt;
mysql_login: root&lt;br /&gt;
mysql_password: root &amp;lt;-- change this to your password you wrote down during the MySQL install (flag)&lt;br /&gt;
mysql_database: dspdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Map Server Settings ====&lt;br /&gt;
&lt;br /&gt;
In windows explorer navigate to c:\dsp\conf&lt;br /&gt;
&lt;br /&gt;
Open map_darkstar.conf in a text editer (notepad)&lt;br /&gt;
&lt;br /&gt;
Scroll down to the bottom and validate/update the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql_host: 127.0.0.1&lt;br /&gt;
mysql_port: 3306&lt;br /&gt;
mysql_login: root&lt;br /&gt;
mysql_password: root &amp;lt;-- change this to your password you wrote down during the MySQL install (flag)&lt;br /&gt;
mysql_database: dspdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Search Server Settings ====&lt;br /&gt;
&lt;br /&gt;
In windows explorer navigate to c:\dsp\conf&lt;br /&gt;
&lt;br /&gt;
Open search_server.conf in a text editer (notepad)&lt;br /&gt;
&lt;br /&gt;
Scroll down to the bottom and validate/update the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql_host: 127.0.0.1&lt;br /&gt;
mysql_port: 3306&lt;br /&gt;
mysql_login: root&lt;br /&gt;
mysql_password: root &amp;lt;-- change this to your password you wrote down during the MySQL install (flag)&lt;br /&gt;
mysql_database: dspdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point we have configured the servers to connect to the SQL database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Starting the Servers ===&lt;br /&gt;
&lt;br /&gt;
'''In this section we will launch our new servers.'''&lt;br /&gt;
&lt;br /&gt;
Navigate to c:\dsp&lt;br /&gt;
&lt;br /&gt;
Run DSConnect-server.exe as Admin&lt;br /&gt;
&lt;br /&gt;
Run DSGame-server.exe as Admin&lt;br /&gt;
&lt;br /&gt;
(Optional) Run DSSearch-server.exe as Admin&lt;br /&gt;
&lt;br /&gt;
At this point if your servers fail to load, you probably missed a step. Go back through the steps and try to find out what you missed. It may also be helpful to look at the log files located in c:\dsp\log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Forward Ports to Allow Others to Join (&amp;amp; Firewall) ===&lt;br /&gt;
&lt;br /&gt;
'''In this section we will provide the port numbers that need to be forwarded to the server. This is only needed to allow people outside your local intranet to join your server.'''&lt;br /&gt;
&lt;br /&gt;
In your router and firewall the following ports need to be opened/forwarded to your server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TCP Ports:&lt;br /&gt;
54230&lt;br /&gt;
54231&lt;br /&gt;
54001&lt;br /&gt;
54002&lt;br /&gt;
&lt;br /&gt;
UDP Port:&lt;br /&gt;
54230&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If still having trouble, disable any firewall software completely for testing. This includes the Windows firewall that comes on all modern Windows systems, which can be found in the Control Panel.&lt;br /&gt;
&lt;br /&gt;
== Installing &amp;amp; Setting up the DS Server on Linux ==&lt;br /&gt;
&lt;br /&gt;
The server is known to build in recent [http://www.ubuntu.com/ Ubuntu] versions (14.04), and is tested regularly against it. &lt;br /&gt;
&lt;br /&gt;
Generic build instructions for most POSIX (GNU/Linux, and possibly FreeBSD, NetBSD, UNIX or even OSX with some additional work) systems follow. Some knowledge of how to compile software on your distribution is assumed. You may find it helpful to reference the Windows guide above if something is unclear.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites: ===&lt;br /&gt;
A compiler with C++11/14 support. Currently tested with GCC and G++, and requires a minimum version of 4.9&lt;br /&gt;
&lt;br /&gt;
Git to retrieve the source code.&lt;br /&gt;
&lt;br /&gt;
Autotools (automake autoconf m4sh) and pkg-config to generate the configure script and Makefile&lt;br /&gt;
&lt;br /&gt;
mysql server&lt;br /&gt;
&lt;br /&gt;
mysql client library (select the developer version if your distro has one - for ubuntu it's libmysqlclient-dev)&lt;br /&gt;
&lt;br /&gt;
luajit library version 5.1 or higher (select the developer version if your distro has one - for ubuntu it's luajit-5.1-dev)&lt;br /&gt;
&lt;br /&gt;
libzmq (select the developer version if your distro has one - for ubuntu it's libzmq3-dev)&lt;br /&gt;
&lt;br /&gt;
If you plan to run from a console, you may also wish to install &amp;quot;screen&amp;quot; as there is no daemon mode for the servers yet.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the Source Code ===&lt;br /&gt;
&lt;br /&gt;
Once you have everything mentioned above installed, grab the latest source from the repository via the command:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;git clone http://github.com/DarkstarProject/darkstar.git/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compiling ===&lt;br /&gt;
&lt;br /&gt;
Next is a typical autotools build. Run the autogen script, followed by configure, and then make:&lt;br /&gt;
 sh autogen.sh&lt;br /&gt;
 ./configure --enable-debug&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
You can choose not to configure with debug enabled, but there is very little potential gain in this and it prevents many useful break statements from triggering. The Makefile also has separate targets to build each server named &amp;quot;dsconnect&amp;quot; &amp;quot;dsgame&amp;quot; and &amp;quot;dssearch&amp;quot; but will build all 3 if none are specified.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting Up the Database ===&lt;br /&gt;
&lt;br /&gt;
If you do not know your mysql root password, the default on most systems is blank. It is a good idea to change this for security reasons, as your mysql root user has full permissions on all databases. The first time you run the mysql client, you should be prompted to change the password. After doing so, you will want to create a user specifically for dealing with the darkstar server database. Run mysql as follows:&lt;br /&gt;
 mysql -u root -p&lt;br /&gt;
&lt;br /&gt;
Enter your root password at the prompt. Next, create a new user as follows:&lt;br /&gt;
 CREATE USER 'darkstar'@'localhost' IDENTIFIED BY 'password';&lt;br /&gt;
&lt;br /&gt;
Substitute &amp;quot;password&amp;quot; with a password of your choice. Next, we want to create a database, and set up our new user with permissions to work with it.&lt;br /&gt;
 CREATE DATABASE dspdb;&lt;br /&gt;
 USE dspdb;&lt;br /&gt;
 GRANT ALL PRIVILEGES ON dspdb.* TO 'darkstar'@'localhost';&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
This will make it to where your new user can do anything necessary, but can only connect from localhost, so even if your password is compromised, it will be difficult to mess with the database remotely. If you need to be able to access the database remotely (like if the database is stored on a separate machine from the server), change the configuration according to the host that will be accessing the database.&lt;br /&gt;
&lt;br /&gt;
Now, you need to populate the database.&lt;br /&gt;
 cd sql&lt;br /&gt;
 for f in *.sql&lt;br /&gt;
   do&lt;br /&gt;
      echo -n &amp;quot;Importing $f into the database...&amp;quot;&lt;br /&gt;
      mysql dspdb -u darkstar -ppassword &amp;lt; $f &amp;amp;&amp;amp; echo &amp;quot;Success&amp;quot;      &lt;br /&gt;
   done&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
To set up your ZoneIP, see the related windows section [[Building_the_Server#Configure_the_ZoneIP_for_the_Map_Server]] above for how to calculate it, and then run:&lt;br /&gt;
 mysql -u darkstar -ppassword&lt;br /&gt;
 USE dspdb;&lt;br /&gt;
 UPDATE zone_settings SET zoneip = '127.0.0.1';&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
replacing &amp;quot;127.0.0.1&amp;quot; with the value you determined in your calculation. You should see a message that at least 256 changes have occured after the update command.&lt;br /&gt;
&lt;br /&gt;
=== Configuring the Server ===&lt;br /&gt;
Before running your new servers, you will need to update the configuration files to tell it how to talk to the database. You will need to update the files in the conf/ sub-folder named &amp;quot;login_darkstar.conf&amp;quot; &amp;quot;map_darkstar.conf&amp;quot; and &amp;quot;search_server.conf&amp;quot; at a minimum. Find the mysql settings in each and change as appropriate, using the new user, password and database you created earlier.&lt;br /&gt;
&lt;br /&gt;
You may also wish to browse through the various configuration files for any settings that might be of interest to you, but more details on server customization can be found at [[Customizing Your Server]].&lt;br /&gt;
&lt;br /&gt;
=== Starting the Servers ===&lt;br /&gt;
You may now start your new servers. If you are using a desktop environment, you may wish to open 3 separate terminals and run each server in a separate one to monitor them efficiently. Otherwise, you will want to run them in screen sessions as follows:&lt;br /&gt;
 screen -d -m -S dsconnect ./dsconnect&lt;br /&gt;
 screen -d -m -S dsgame ./dsgame&lt;br /&gt;
 screen -d -m -S dssearch ./dssearch&lt;br /&gt;
&lt;br /&gt;
This will start and auto-detach all three servers, assigning them meaningful names to make it easy to reattach later by using the commands:&lt;br /&gt;
 screen -r dsconnect&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
 screen -r dsgame&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
 screen -r dssearch&lt;br /&gt;
&lt;br /&gt;
to monitor a given server. Once you've attached to a screen, you can detach by first pressing &amp;quot;ctrl+a&amp;quot; and then &amp;quot;d&amp;quot;. There are many other useful ways to use screen, so do whatever suits yoru preference.&lt;br /&gt;
&lt;br /&gt;
Your server is now up-and-running, and a client should be able to connect as long as there are no obvious errors on any of the server screens. If the search server is having issues, it is not vital for basic game functionality, but you will be unable to use search functions or the auction house. If you have run into any major issues, contact bluekirby0 (the current maintainer of the linux port as of the time of this writing) on IRC #darkstarproject@irc.rizon.net or in the [http://forums.dspt.info forums].&lt;br /&gt;
&lt;br /&gt;
== Automatic Server Restarts &amp;amp; Crash Logs ==&lt;br /&gt;
&lt;br /&gt;
If your server goes down, no one can connect. If it goes down when you're not looking, it can be down for an extended period of time. To fix this, you probably want to have a way to have your server auto-restart. In addition, it's good to know when the server crashed.&lt;br /&gt;
===Getting the software===&lt;br /&gt;
First, you'll want to download Knas Restarter here: [http://www.knas.se/Applications/Restarter.aspx].&lt;br /&gt;
===Creating the Logging files===&lt;br /&gt;
In the dsp directory where your game, connect, and search server reside, create a 'tools' folder. In the folder create 4 new text files by right clicking, and going to New &amp;gt; Text Document&lt;br /&gt;
&lt;br /&gt;
Make sure you have file extension view turned on so that you can see the .txt at the end.&lt;br /&gt;
&lt;br /&gt;
Rename the 4 files to the following:&lt;br /&gt;
&lt;br /&gt;
connect_crash.bat  &amp;lt;Change the file type to bat file, deleting .txt&lt;br /&gt;
&lt;br /&gt;
connect_crash_log.txt&lt;br /&gt;
&lt;br /&gt;
game_crash.bat  &amp;lt;Change the file type to bat file, deleting .txt&lt;br /&gt;
&lt;br /&gt;
game_crash_log.txt&lt;br /&gt;
&lt;br /&gt;
Right click on connect_crash.bat and click 'edit'&lt;br /&gt;
Place the following inside:&lt;br /&gt;
echo %date% %time% &amp;gt;&amp;gt; connect_crash_log.txt&lt;br /&gt;
Save and close&lt;br /&gt;
&lt;br /&gt;
Right click on game_crash.bat and click 'edit'&lt;br /&gt;
Place the following inside:&lt;br /&gt;
echo %date% %time% &amp;gt;&amp;gt; game_crash_log.txt&lt;br /&gt;
Save and close&lt;br /&gt;
&lt;br /&gt;
===Connect Server Restart===&lt;br /&gt;
Launch Knas Restarter&lt;br /&gt;
Find DSConnect-server.exe and click on it&lt;br /&gt;
Click &amp;quot;Select&amp;quot;&lt;br /&gt;
Change itnerval to 10 seconds&lt;br /&gt;
Under &amp;quot;Restart Paramters&amp;quot;;&lt;br /&gt;
Check Keep restarter minimized&lt;br /&gt;
in &amp;quot;Working Directory&amp;quot; enter the directory where dsp is installed&lt;br /&gt;
Under Actions;&lt;br /&gt;
Check &amp;quot;External Script&amp;quot; and browse to your tools folder and select connect_crash.bat&lt;br /&gt;
Click &amp;quot;Create Shortcut&amp;quot; and save to your desktop&lt;br /&gt;
&lt;br /&gt;
===Game Server Restart===&lt;br /&gt;
Launch Knas Restarter&lt;br /&gt;
Find DSGame-server.exe and click on it&lt;br /&gt;
Click &amp;quot;Select&amp;quot;&lt;br /&gt;
Change itnerval to 10 seconds&lt;br /&gt;
Under &amp;quot;Restart Paramters&amp;quot;;&lt;br /&gt;
Check Keep restarter minimized&lt;br /&gt;
in &amp;quot;Working Directory&amp;quot; enter the directory where dsp is installed&lt;br /&gt;
Under Actions;&lt;br /&gt;
Check &amp;quot;External Script&amp;quot; and browse to your tools folder and select game_crash.bat&lt;br /&gt;
Click &amp;quot;Create Shortcut&amp;quot; and save to your desktop&lt;br /&gt;
&lt;br /&gt;
===Launching===&lt;br /&gt;
Open the shortcuts you created on your desktop, and open the search server as you normally would.&lt;br /&gt;
&lt;br /&gt;
Crash logs will be found in the text files you created in the tools directory showing the date and time the crash occurred.&lt;br /&gt;
===Problems===&lt;br /&gt;
In some Windows opperating systems, a window will pop up saying the program has crashed, leaving the crashed program up and preventing an auto-restart. This can be avoided by disabling the user interface for critical errors. To do this follow these steps:&lt;br /&gt;
&lt;br /&gt;
Start &amp;gt; Run gpedit.msc&lt;br /&gt;
&lt;br /&gt;
Computer Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Error Reporting&lt;br /&gt;
Set Prevent Display of the user interface for critical errors&amp;quot; to Enabled&lt;br /&gt;
&lt;br /&gt;
== Common Errors ==&lt;br /&gt;
&lt;br /&gt;
=== Getting Errors on Load / In Game ===&lt;br /&gt;
&lt;br /&gt;
You have to run all changed sql files! Be careful you keep zoneip correct in zone_settings.sql.&lt;br /&gt;
&lt;br /&gt;
=== Can't Connect to Game Server ===&lt;br /&gt;
&lt;br /&gt;
Make sure your zoneip in zone_settings table is correct. Also make sure packets can reach the 53445 port.&lt;br /&gt;
&lt;br /&gt;
Restart server after changing zoneip.&lt;br /&gt;
&lt;br /&gt;
=== Packet or key is invalid: ===&lt;br /&gt;
&lt;br /&gt;
Restart login server, game server and game client.&lt;br /&gt;
&lt;br /&gt;
=== make: *** No rule to make target ===&lt;br /&gt;
&lt;br /&gt;
Delete .deps&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source autogen.sh&lt;br /&gt;
./configure&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
The original windows guide was written by thrydwolf, and has been formatted for the wiki and updated by bluekirby0&lt;/div&gt;</summary>
		<author><name>Deviltti2</name></author>	</entry>

	<entry>
		<id>http://wiki.dspt.info/index.php?title=Building_the_Server&amp;diff=21952</id>
		<title>Building the Server</title>
		<link rel="alternate" type="text/html" href="http://wiki.dspt.info/index.php?title=Building_the_Server&amp;diff=21952"/>
				<updated>2015-07-22T02:20:47Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti2: /* Navicat Lite */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing &amp;amp; Setting up the DS Server on Windows ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
In this section we will download every program/tool we will need to setup and maintain the servers. Do not install these yet.&lt;br /&gt;
&lt;br /&gt;
[http://dev.mysql.com/downloads/mysql/ MySQL Community Server] (flag)&lt;br /&gt;
-Or-&lt;br /&gt;
[http://dev.mysql.com/downloads/installer/5.6.html/ MySQL Community Server 5.6 (Updated)] (flag)&lt;br /&gt;
-Or-&lt;br /&gt;
[https://downloads.mariadb.org/ MariaDB]&lt;br /&gt;
&lt;br /&gt;
[http://dev.mysql.com/downloads/workbench/ MySQL Workbench]&lt;br /&gt;
&lt;br /&gt;
[http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx Visual Studio 2013 or higher (Full or Express)]&lt;br /&gt;
&lt;br /&gt;
[https://code.google.com/p/msysgit/downloads/list?q=full+installer+official+git/ Git For Windows]&lt;br /&gt;
&lt;br /&gt;
[https://code.google.com/p/tortoisegit/ TortoiseGit]&lt;br /&gt;
&lt;br /&gt;
[http://www.microsoft.com/en-us/download/details.aspx?id=40784 Visual C++ Redistributable Runtimes 2013]&lt;br /&gt;
&lt;br /&gt;
[http://www.microsoft.com/download/en/details.aspx?id=21 .Net 3.5 Runtime] (already comes with Win 7)&lt;br /&gt;
&lt;br /&gt;
[http://www.microsoft.com/download/en/details.aspx?id=22 .Net 3.5sp1 Runtime] (already comes with Win 7)&lt;br /&gt;
&lt;br /&gt;
[http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=17851 .Net 4 Runtime]&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
==== MySql ==== &lt;br /&gt;
(flag)&lt;br /&gt;
&lt;br /&gt;
Choose Typical Installation&lt;br /&gt;
&lt;br /&gt;
After the main installation, select Launch the MySQL Instance Configuration Wizard&lt;br /&gt;
&lt;br /&gt;
Select Detailed Configuration&lt;br /&gt;
&lt;br /&gt;
Select Developer Machine&lt;br /&gt;
&lt;br /&gt;
Select Multi-functional Database&lt;br /&gt;
&lt;br /&gt;
Standard Installation Directory&lt;br /&gt;
&lt;br /&gt;
Select Manual Setting and 1000 Concurrent connections&lt;br /&gt;
&lt;br /&gt;
Select Enable TCP/IP Networking, Port Number 3306, and Enable Strict Mode&lt;br /&gt;
&lt;br /&gt;
Select Best Support for Multilingualism&lt;br /&gt;
&lt;br /&gt;
Select Install as Windows Service, Launch the MySQL Server automatically, and Include Bin Directory in Windows PATH.&lt;br /&gt;
&lt;br /&gt;
Select Modify Security Settings, and enter a new password twice. Write down the MySQL password.&lt;br /&gt;
(DO NOT LEAVE BLANK.)&lt;br /&gt;
&lt;br /&gt;
Select Next, Execute, then Finish&lt;br /&gt;
&lt;br /&gt;
==== MySQL 5.6 '''(Updated)'''==== &lt;br /&gt;
Note: Server is x86, but will install 32-bit and 64-bit binaries.&lt;br /&gt;
&lt;br /&gt;
Accept License Terms&lt;br /&gt;
&lt;br /&gt;
Skip Check for updates&lt;br /&gt;
&lt;br /&gt;
Select Developer Default&lt;br /&gt;
&lt;br /&gt;
Check requirements and click Execute - will launch installers for anything you're missing&lt;br /&gt;
&lt;br /&gt;
Default Installation - ~5min&lt;br /&gt;
&lt;br /&gt;
Default Configuration - Check box for &amp;quot;Show Advance Options&amp;quot; - Click Next&lt;br /&gt;
&lt;br /&gt;
Enter MySQL Root Password, twice. Remember it! - Click Next&lt;br /&gt;
&lt;br /&gt;
It will show windows service details, leave as default and Click Next&lt;br /&gt;
&lt;br /&gt;
It will show Logging options, leave as default and  Click Next&lt;br /&gt;
&lt;br /&gt;
Configuration will complete, Click Next&lt;br /&gt;
&lt;br /&gt;
Samples and examples will configure - ~5min - Click Next&lt;br /&gt;
&lt;br /&gt;
Uncheck &amp;quot;launch MySQL Workbench, Click Finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== MySQL Workbench ==== &lt;br /&gt;
&lt;br /&gt;
Use default installation options.&lt;br /&gt;
&lt;br /&gt;
==== Visual Studio 2015 ====&lt;br /&gt;
&lt;br /&gt;
Any edition works.  Community is free.&lt;br /&gt;
&lt;br /&gt;
Make sure you install C++! At the time of this writing, it is NOT in the default options (use custom to select it under Languages).&lt;br /&gt;
&lt;br /&gt;
==== Git for Windows ====&lt;br /&gt;
&lt;br /&gt;
Use default installation options.&lt;br /&gt;
&lt;br /&gt;
==== TortoiseGit ====&lt;br /&gt;
&lt;br /&gt;
Use default installation options. You can skip the step to reboot since we'll reboot once everything else is installed.&lt;br /&gt;
&lt;br /&gt;
==== Visual C++ Redistributable Runtime 2013 and 2015 ====&lt;br /&gt;
&lt;br /&gt;
Use default installation options.&lt;br /&gt;
&lt;br /&gt;
==== .Net 4.6 ====&lt;br /&gt;
&lt;br /&gt;
Use default installation options.  It probably comes with Visual Studio 2015&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point everything should be installed that needs to be and you can restart your PC to finalize them.&lt;br /&gt;
&lt;br /&gt;
=== Downloading the Server Source Code ===&lt;br /&gt;
&lt;br /&gt;
'''In this section we will use TortoiseGit to download the latest git source code for the server.'''&lt;br /&gt;
&lt;br /&gt;
Open Windows Explorer (right click the start button and choose Windows Explorer)&lt;br /&gt;
&lt;br /&gt;
Right click on any folder select Git Clone&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;URL&amp;quot; field put in the following url: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://github.com/DarkstarProject/darkstar.git&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the &amp;quot;Directory&amp;quot; to your choice (blank will default to current location /darkstar&lt;br /&gt;
&lt;br /&gt;
Click OK.&lt;br /&gt;
&lt;br /&gt;
Wait for the download to finish.&lt;br /&gt;
&lt;br /&gt;
Click OK to close TortoiseGit.&lt;br /&gt;
&lt;br /&gt;
Close windows explorer&lt;br /&gt;
&lt;br /&gt;
At this point you have downloaded all of the source code for the latest version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting up the Database ===&lt;br /&gt;
&lt;br /&gt;
'''In this section we will use the data that you downloaded to build a database in MySQL.'''&lt;br /&gt;
&lt;br /&gt;
==== Using a bat script ====&lt;br /&gt;
&lt;br /&gt;
If you follow this step, you may skip the next one. &lt;br /&gt;
&lt;br /&gt;
Paste the following into notepad and save it as DSP_Import.bat in your dsp\sql folder:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@ECHO OFF&lt;br /&gt;
REM =============================================================================&lt;br /&gt;
REM =============================================================================&lt;br /&gt;
REM ======                                                              =========&lt;br /&gt;
REM ====== THis script will drop the DB specificed, then create the DB  =========&lt;br /&gt;
REM ====== specified, and then load all .sql tables from its run dir to =========&lt;br /&gt;
REM ====== the the DB.                                                  =========&lt;br /&gt;
REM ======                                                              =========&lt;br /&gt;
REM ====== File needs to be run from within the \dsp\sql folder (same   =========&lt;br /&gt;
REM ====== folder with all the .sql files. Please edit as needed. By    =========&lt;br /&gt;
REM ====== default it WILL DROP the standard dspdb DB, loosing all      =========&lt;br /&gt;
REM ====== accounts and characters. If this is not desired, then update =========&lt;br /&gt;
REM ====== the file to load the new DB into a new DB name.              =========&lt;br /&gt;
REM ======                                                              =========&lt;br /&gt;
REM ====== Update -p with MySQL password. If you password is 'foo',     =========&lt;br /&gt;
REM ====== then change '-pMYSQLPASS' to '-pfoo' (3 places).             =========&lt;br /&gt;
REM ======                                                              =========&lt;br /&gt;
REM ====== If you want to use a different database name, change 'dspdb' =========&lt;br /&gt;
REM ====== with a database name of your choosing.                       =========&lt;br /&gt;
REM ======                                                              =========&lt;br /&gt;
REM =============================================================================&lt;br /&gt;
REM =============================================================================&lt;br /&gt;
REM ======                                                              =========&lt;br /&gt;
REM ====== by Thrydwolf 9/8/2012                                        =========&lt;br /&gt;
REM ====== Updated with status by bluekirby0 3/30/2012                  =========&lt;br /&gt;
REM ====== Updated by Thrydwolf 9/18/2012                               =========&lt;br /&gt;
REM ======                                                              =========&lt;br /&gt;
REM =============================================================================&lt;br /&gt;
REM =============================================================================&lt;br /&gt;
&lt;br /&gt;
ECHO Creating Database dspdb&lt;br /&gt;
mysqladmin -h localhost -u root -pMYSQLPASS DROP dspdb&lt;br /&gt;
&lt;br /&gt;
ECHO Creating Database dspdb&lt;br /&gt;
mysqladmin -h localhost -u root -pMYSQLPASS CREATE dspdb&lt;br /&gt;
&lt;br /&gt;
ECHO Loading dspdb tables into the database&lt;br /&gt;
cd c:\darkstar\sql&lt;br /&gt;
FOR %%X IN (*.sql) DO ECHO Importing %%X &amp;amp; &amp;quot;c:\program files\mysql\mysql server 5.6\bin\mysql&amp;quot; dspdb -h localhost -u root -pMYSQLPASS &amp;lt; %%X&lt;br /&gt;
&lt;br /&gt;
ECHO Finished!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a minimum you will need to change -pMYSQLPASS in the script to where root is your mysql root password. If your password is 'foo' then you would use '-pfoo' instead. You may also have to change the path of your mysql installation as well.&lt;br /&gt;
&lt;br /&gt;
You can use this script any time the repository is updated, but it will drop the table and thus delete all your player data. You may want to make manual changes instead unless you are using it purely as a test server.&lt;br /&gt;
&lt;br /&gt;
After you've done your initial load, you can use the following script that will preserve character data&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd c:\darkstar\sql&lt;br /&gt;
del auction_house.sql&lt;br /&gt;
del chars.sql&lt;br /&gt;
del accounts.sql&lt;br /&gt;
del accounts_banned.sql&lt;br /&gt;
del char_effects.sql&lt;br /&gt;
del char_equip.sql&lt;br /&gt;
del char_exp.sql&lt;br /&gt;
del char_inventory.sql&lt;br /&gt;
del char_jobs.sql&lt;br /&gt;
del char_look.sql&lt;br /&gt;
del char_pet.sql&lt;br /&gt;
del char_pet_name.sql&lt;br /&gt;
del char_points.sql&lt;br /&gt;
del char_profile.sql&lt;br /&gt;
del char_skills.sql&lt;br /&gt;
del char_stats.sql&lt;br /&gt;
del char_storage.sql&lt;br /&gt;
del char_vars.sql&lt;br /&gt;
del char_weapon_skill_points.sql&lt;br /&gt;
del chars.sql&lt;br /&gt;
del conquest_system.sql&lt;br /&gt;
del delivery_box.sql&lt;br /&gt;
del linkshells.sql&lt;br /&gt;
FOR %%X IN (*.sql) DO ECHO Importing %%X &amp;amp; &amp;quot;c:\program files\mysql\mysql server 5.6\bin\mysql&amp;quot; dspdb -h localhost -u root -pMYSQLPASS &amp;lt; %%X&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using Navicat ==== &lt;br /&gt;
(flag)&lt;br /&gt;
&lt;br /&gt;
This is the more hands-on approach, and being comfortable doing it this way may make it easier to update individual tables later without having to learn the mysql command-line interface.&lt;br /&gt;
&lt;br /&gt;
Open Navicat&lt;br /&gt;
&lt;br /&gt;
Click Connection (or File, New Connection)&lt;br /&gt;
&lt;br /&gt;
Connection name: DarkStar&lt;br /&gt;
&lt;br /&gt;
Host Name/IP: localhost&lt;br /&gt;
&lt;br /&gt;
Port: 3306&lt;br /&gt;
&lt;br /&gt;
User Name: root&lt;br /&gt;
&lt;br /&gt;
Password: Enter the password you wrote down during the mySQL installation.&lt;br /&gt;
&lt;br /&gt;
Check Save Password&lt;br /&gt;
&lt;br /&gt;
Click OK&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the connections pane double click DarkStar&lt;br /&gt;
&lt;br /&gt;
Right click on DarkStar and select New Database...&lt;br /&gt;
&lt;br /&gt;
Name it dspdb&lt;br /&gt;
&lt;br /&gt;
Use the Default character set&lt;br /&gt;
&lt;br /&gt;
Select OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double click dspdb&lt;br /&gt;
&lt;br /&gt;
Right click on dspdb and select Execute SQL File...&lt;br /&gt;
&lt;br /&gt;
Browse to C:\dsp\sql and select abilities.sql&lt;br /&gt;
&lt;br /&gt;
Click Start&lt;br /&gt;
&lt;br /&gt;
Continue this process for each file in the folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have an issue with the triggers.sql file then follow this step. If not, proceed to the next step (IP address for the map server):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Navicat Open accounts table&lt;br /&gt;
&lt;br /&gt;
Click File, Design Table&lt;br /&gt;
&lt;br /&gt;
Click the Triggers tab&lt;br /&gt;
&lt;br /&gt;
There should a line already listed with account_delete in the Name field&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not:&lt;br /&gt;
&lt;br /&gt;
click Add Trigger&lt;br /&gt;
&lt;br /&gt;
Name column should be account_delete&lt;br /&gt;
&lt;br /&gt;
Fires column should be Before&lt;br /&gt;
&lt;br /&gt;
Check the box in the Delete column&lt;br /&gt;
&lt;br /&gt;
In the definition box below add the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   DELETE FROM `accounts_banned` WHERE `accid` = OLD.id;&lt;br /&gt;
   DELETE FROM `chars` WHERE `accid` = OLD.id;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select Save and then close the table.&lt;br /&gt;
&lt;br /&gt;
Open the chars table&lt;br /&gt;
&lt;br /&gt;
Click File, Design Table&lt;br /&gt;
&lt;br /&gt;
Click the Triggers tab&lt;br /&gt;
&lt;br /&gt;
There should already be a line listed with char_delete in the name field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not:&lt;br /&gt;
&lt;br /&gt;
click Add Trigger&lt;br /&gt;
&lt;br /&gt;
Name column should be char_delete&lt;br /&gt;
&lt;br /&gt;
Fires column should be Before&lt;br /&gt;
&lt;br /&gt;
Check the box in the Delete column&lt;br /&gt;
&lt;br /&gt;
In the definition box below add the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   DELETE FROM `char_exp` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_jobs` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_equip` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_effects` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_look` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_stats` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_skills` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_titles` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_inventory` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_vars` WHERE `charid` = OLD.charid;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select Save and then close the table.&lt;br /&gt;
&lt;br /&gt;
Note: Leave Navicat open for the next section.&lt;br /&gt;
&lt;br /&gt;
==== Configure the ZoneIP for the Map Server ====&lt;br /&gt;
&lt;br /&gt;
Now you need to determine what IP address that will be used for the Map Server, then update MySQL with it.&lt;br /&gt;
&lt;br /&gt;
Most devs &amp;amp; enthusiasts will not have a separate map server, but will run both map server and login server on the same PC. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Determine what IP address will be used for the map server.&lt;br /&gt;
&lt;br /&gt;
If the server will be public, then use your external IP in the next step. (Looks really random like 173.194.43.104)&lt;br /&gt;
&lt;br /&gt;
If the server will be internal and you want it available on other PCs in your internal network, use the internal network IP (192.168.x.x) in the next step.&lt;br /&gt;
&lt;br /&gt;
If you only plan to run the client and the server on the same PC, you can use the localhost address (127.0.0.1) in the next step.&lt;br /&gt;
&lt;br /&gt;
2. Update the zone_settings table with the ip&lt;br /&gt;
(flag)&lt;br /&gt;
In Navicat double click on the table dspdb and expand&lt;br /&gt;
&lt;br /&gt;
Click on Query&lt;br /&gt;
&lt;br /&gt;
Right click and select New Query&lt;br /&gt;
&lt;br /&gt;
Add the following code into the empty space, inserting the value calculated above. The value in the code below (127.0.0.1) would be used if only running the client from the same PC as the server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    UPDATE zone_settings SET zoneip = '127.0.0.1';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select Run. You should get a message stating that many (280+) records were changed.&lt;br /&gt;
&lt;br /&gt;
I recommend you save the Query in case you need to run it again later after updating the server.&lt;br /&gt;
&lt;br /&gt;
Close Navicat.&lt;br /&gt;
&lt;br /&gt;
=== Building the Servers ===&lt;br /&gt;
&lt;br /&gt;
'''In this section we will be building the Dark Star servers.'''&lt;br /&gt;
&lt;br /&gt;
Dark Star uses 3 separate servers. A Login server, a Map/Game server, and an optional Search/Auction House server. Using the ZoneIP mentioned earlier, every map could run on its own server at a different IP address. If you have 4 computers each computer could run different areas, as long as they were all connected to the same MySQL database server.&lt;br /&gt;
&lt;br /&gt;
==== Build the Server ====&lt;br /&gt;
&lt;br /&gt;
Open Visual Studio&lt;br /&gt;
&lt;br /&gt;
Click File, Open, Project/Solution (or Ctrl+Shift+O)&lt;br /&gt;
&lt;br /&gt;
Navigate to C:\dsp\win32&lt;br /&gt;
&lt;br /&gt;
Select darkstar.sln&lt;br /&gt;
&lt;br /&gt;
It may take a few minutes to load files.&lt;br /&gt;
&lt;br /&gt;
Click Debug then Build Server (or F7, or Ctrl+Shift+B)&lt;br /&gt;
&lt;br /&gt;
Building will take a few minutes.&lt;br /&gt;
&lt;br /&gt;
Once complete, validate that there are no Errors listed in the summary line at the bottom. It should look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;========== Build: 3 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there are any SQL errors it is probably caused by the SQL dev package was extracted to the wrong folder.&lt;br /&gt;
&lt;br /&gt;
If there is a #include error, change that #include to say #include &amp;lt;mysql/mysql.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== When all of the Servers are built ====&lt;br /&gt;
&lt;br /&gt;
Verify in the C:\dsp directory that the servers you built are there: &lt;br /&gt;
&lt;br /&gt;
DSConnect-server.exe for the Login Server&lt;br /&gt;
&lt;br /&gt;
DSGame-server.exe for the Map Server&lt;br /&gt;
&lt;br /&gt;
DSSearch-server.exe for the Search Server&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuring the Servers ===&lt;br /&gt;
&lt;br /&gt;
'''Now you will configure the Login Server and Map Server to connect to the MySQL database.'''&lt;br /&gt;
&lt;br /&gt;
Do not mess with any other settings in these files unless you know what they are for and what they do.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Login Server Settings ====&lt;br /&gt;
&lt;br /&gt;
In windows explorer navigate to c:\dsp\conf&lt;br /&gt;
&lt;br /&gt;
Open login_darkstar.conf in a text editer (notepad)&lt;br /&gt;
&lt;br /&gt;
Scroll down to the bottom and validate/update the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql_host: 127.0.0.1&lt;br /&gt;
mysql_port: 3306&lt;br /&gt;
mysql_login: root&lt;br /&gt;
mysql_password: root &amp;lt;-- change this to your password you wrote down during the MySQL install (flag)&lt;br /&gt;
mysql_database: dspdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Map Server Settings ====&lt;br /&gt;
&lt;br /&gt;
In windows explorer navigate to c:\dsp\conf&lt;br /&gt;
&lt;br /&gt;
Open map_darkstar.conf in a text editer (notepad)&lt;br /&gt;
&lt;br /&gt;
Scroll down to the bottom and validate/update the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql_host: 127.0.0.1&lt;br /&gt;
mysql_port: 3306&lt;br /&gt;
mysql_login: root&lt;br /&gt;
mysql_password: root &amp;lt;-- change this to your password you wrote down during the MySQL install (flag)&lt;br /&gt;
mysql_database: dspdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Search Server Settings ====&lt;br /&gt;
&lt;br /&gt;
In windows explorer navigate to c:\dsp\conf&lt;br /&gt;
&lt;br /&gt;
Open search_server.conf in a text editer (notepad)&lt;br /&gt;
&lt;br /&gt;
Scroll down to the bottom and validate/update the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql_host: 127.0.0.1&lt;br /&gt;
mysql_port: 3306&lt;br /&gt;
mysql_login: root&lt;br /&gt;
mysql_password: root &amp;lt;-- change this to your password you wrote down during the MySQL install (flag)&lt;br /&gt;
mysql_database: dspdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point we have configured the servers to connect to the SQL database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Starting the Servers ===&lt;br /&gt;
&lt;br /&gt;
'''In this section we will launch our new servers.'''&lt;br /&gt;
&lt;br /&gt;
Navigate to c:\dsp&lt;br /&gt;
&lt;br /&gt;
Run DSConnect-server.exe as Admin&lt;br /&gt;
&lt;br /&gt;
Run DSGame-server.exe as Admin&lt;br /&gt;
&lt;br /&gt;
(Optional) Run DSSearch-server.exe as Admin&lt;br /&gt;
&lt;br /&gt;
At this point if your servers fail to load, you probably missed a step. Go back through the steps and try to find out what you missed. It may also be helpful to look at the log files located in c:\dsp\log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Forward Ports to Allow Others to Join (&amp;amp; Firewall) ===&lt;br /&gt;
&lt;br /&gt;
'''In this section we will provide the port numbers that need to be forwarded to the server. This is only needed to allow people outside your local intranet to join your server.'''&lt;br /&gt;
&lt;br /&gt;
In your router and firewall the following ports need to be opened/forwarded to your server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TCP Ports:&lt;br /&gt;
54230&lt;br /&gt;
54231&lt;br /&gt;
54001&lt;br /&gt;
54002&lt;br /&gt;
&lt;br /&gt;
UDP Port:&lt;br /&gt;
54230&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If still having trouble, disable any firewall software completely for testing. This includes the Windows firewall that comes on all modern Windows systems, which can be found in the Control Panel.&lt;br /&gt;
&lt;br /&gt;
== Installing &amp;amp; Setting up the DS Server on Linux ==&lt;br /&gt;
&lt;br /&gt;
The server is known to build in recent [http://www.ubuntu.com/ Ubuntu] versions (14.04), and is tested regularly against it. &lt;br /&gt;
&lt;br /&gt;
Generic build instructions for most POSIX (GNU/Linux, and possibly FreeBSD, NetBSD, UNIX or even OSX with some additional work) systems follow. Some knowledge of how to compile software on your distribution is assumed. You may find it helpful to reference the Windows guide above if something is unclear.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites: ===&lt;br /&gt;
A compiler with C++11/14 support. Currently tested with GCC and G++, and requires a minimum version of 4.9&lt;br /&gt;
&lt;br /&gt;
Git to retrieve the source code.&lt;br /&gt;
&lt;br /&gt;
Autotools (automake autoconf m4sh) and pkg-config to generate the configure script and Makefile&lt;br /&gt;
&lt;br /&gt;
mysql server&lt;br /&gt;
&lt;br /&gt;
mysql client library (select the developer version if your distro has one - for ubuntu it's libmysqlclient-dev)&lt;br /&gt;
&lt;br /&gt;
luajit library version 5.1 or higher (select the developer version if your distro has one - for ubuntu it's luajit-5.1-dev)&lt;br /&gt;
&lt;br /&gt;
libzmq (select the developer version if your distro has one - for ubuntu it's libzmq3-dev)&lt;br /&gt;
&lt;br /&gt;
If you plan to run from a console, you may also wish to install &amp;quot;screen&amp;quot; as there is no daemon mode for the servers yet.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the Source Code ===&lt;br /&gt;
&lt;br /&gt;
Once you have everything mentioned above installed, grab the latest source from the repository via the command:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;git clone http://github.com/DarkstarProject/darkstar.git/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compiling ===&lt;br /&gt;
&lt;br /&gt;
Next is a typical autotools build. Run the autogen script, followed by configure, and then make:&lt;br /&gt;
 sh autogen.sh&lt;br /&gt;
 ./configure --enable-debug&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
You can choose not to configure with debug enabled, but there is very little potential gain in this and it prevents many useful break statements from triggering. The Makefile also has separate targets to build each server named &amp;quot;dsconnect&amp;quot; &amp;quot;dsgame&amp;quot; and &amp;quot;dssearch&amp;quot; but will build all 3 if none are specified.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting Up the Database ===&lt;br /&gt;
&lt;br /&gt;
If you do not know your mysql root password, the default on most systems is blank. It is a good idea to change this for security reasons, as your mysql root user has full permissions on all databases. The first time you run the mysql client, you should be prompted to change the password. After doing so, you will want to create a user specifically for dealing with the darkstar server database. Run mysql as follows:&lt;br /&gt;
 mysql -u root -p&lt;br /&gt;
&lt;br /&gt;
Enter your root password at the prompt. Next, create a new user as follows:&lt;br /&gt;
 CREATE USER 'darkstar'@'localhost' IDENTIFIED BY 'password';&lt;br /&gt;
&lt;br /&gt;
Substitute &amp;quot;password&amp;quot; with a password of your choice. Next, we want to create a database, and set up our new user with permissions to work with it.&lt;br /&gt;
 CREATE DATABASE dspdb;&lt;br /&gt;
 USE dspdb;&lt;br /&gt;
 GRANT ALL PRIVILEGES ON dspdb.* TO 'darkstar'@'localhost';&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
This will make it to where your new user can do anything necessary, but can only connect from localhost, so even if your password is compromised, it will be difficult to mess with the database remotely. If you need to be able to access the database remotely (like if the database is stored on a separate machine from the server), change the configuration according to the host that will be accessing the database.&lt;br /&gt;
&lt;br /&gt;
Now, you need to populate the database.&lt;br /&gt;
 cd sql&lt;br /&gt;
 for f in *.sql&lt;br /&gt;
   do&lt;br /&gt;
      echo -n &amp;quot;Importing $f into the database...&amp;quot;&lt;br /&gt;
      mysql dspdb -u darkstar -ppassword &amp;lt; $f &amp;amp;&amp;amp; echo &amp;quot;Success&amp;quot;      &lt;br /&gt;
   done&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
To set up your ZoneIP, see the related windows section [[Building_the_Server#Configure_the_ZoneIP_for_the_Map_Server]] above for how to calculate it, and then run:&lt;br /&gt;
 mysql -u darkstar -ppassword&lt;br /&gt;
 USE dspdb;&lt;br /&gt;
 UPDATE zone_settings SET zoneip = '127.0.0.1';&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
replacing &amp;quot;127.0.0.1&amp;quot; with the value you determined in your calculation. You should see a message that at least 256 changes have occured after the update command.&lt;br /&gt;
&lt;br /&gt;
=== Configuring the Server ===&lt;br /&gt;
Before running your new servers, you will need to update the configuration files to tell it how to talk to the database. You will need to update the files in the conf/ sub-folder named &amp;quot;login_darkstar.conf&amp;quot; &amp;quot;map_darkstar.conf&amp;quot; and &amp;quot;search_server.conf&amp;quot; at a minimum. Find the mysql settings in each and change as appropriate, using the new user, password and database you created earlier.&lt;br /&gt;
&lt;br /&gt;
You may also wish to browse through the various configuration files for any settings that might be of interest to you, but more details on server customization can be found at [[Customizing Your Server]].&lt;br /&gt;
&lt;br /&gt;
=== Starting the Servers ===&lt;br /&gt;
You may now start your new servers. If you are using a desktop environment, you may wish to open 3 separate terminals and run each server in a separate one to monitor them efficiently. Otherwise, you will want to run them in screen sessions as follows:&lt;br /&gt;
 screen -d -m -S dsconnect ./dsconnect&lt;br /&gt;
 screen -d -m -S dsgame ./dsgame&lt;br /&gt;
 screen -d -m -S dssearch ./dssearch&lt;br /&gt;
&lt;br /&gt;
This will start and auto-detach all three servers, assigning them meaningful names to make it easy to reattach later by using the commands:&lt;br /&gt;
 screen -r dsconnect&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
 screen -r dsgame&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
 screen -r dssearch&lt;br /&gt;
&lt;br /&gt;
to monitor a given server. Once you've attached to a screen, you can detach by first pressing &amp;quot;ctrl+a&amp;quot; and then &amp;quot;d&amp;quot;. There are many other useful ways to use screen, so do whatever suits yoru preference.&lt;br /&gt;
&lt;br /&gt;
Your server is now up-and-running, and a client should be able to connect as long as there are no obvious errors on any of the server screens. If the search server is having issues, it is not vital for basic game functionality, but you will be unable to use search functions or the auction house. If you have run into any major issues, contact bluekirby0 (the current maintainer of the linux port as of the time of this writing) on IRC #darkstarproject@irc.rizon.net or in the [http://forums.dspt.info forums].&lt;br /&gt;
&lt;br /&gt;
== Automatic Server Restarts &amp;amp; Crash Logs ==&lt;br /&gt;
&lt;br /&gt;
If your server goes down, no one can connect. If it goes down when you're not looking, it can be down for an extended period of time. To fix this, you probably want to have a way to have your server auto-restart. In addition, it's good to know when the server crashed.&lt;br /&gt;
===Getting the software===&lt;br /&gt;
First, you'll want to download Knas Restarter here: [http://www.knas.se/Applications/Restarter.aspx].&lt;br /&gt;
===Creating the Logging files===&lt;br /&gt;
In the dsp directory where your game, connect, and search server reside, create a 'tools' folder. In the folder create 4 new text files by right clicking, and going to New &amp;gt; Text Document&lt;br /&gt;
&lt;br /&gt;
Make sure you have file extension view turned on so that you can see the .txt at the end.&lt;br /&gt;
&lt;br /&gt;
Rename the 4 files to the following:&lt;br /&gt;
&lt;br /&gt;
connect_crash.bat  &amp;lt;Change the file type to bat file, deleting .txt&lt;br /&gt;
&lt;br /&gt;
connect_crash_log.txt&lt;br /&gt;
&lt;br /&gt;
game_crash.bat  &amp;lt;Change the file type to bat file, deleting .txt&lt;br /&gt;
&lt;br /&gt;
game_crash_log.txt&lt;br /&gt;
&lt;br /&gt;
Right click on connect_crash.bat and click 'edit'&lt;br /&gt;
Place the following inside:&lt;br /&gt;
echo %date% %time% &amp;gt;&amp;gt; connect_crash_log.txt&lt;br /&gt;
Save and close&lt;br /&gt;
&lt;br /&gt;
Right click on game_crash.bat and click 'edit'&lt;br /&gt;
Place the following inside:&lt;br /&gt;
echo %date% %time% &amp;gt;&amp;gt; game_crash_log.txt&lt;br /&gt;
Save and close&lt;br /&gt;
&lt;br /&gt;
===Connect Server Restart===&lt;br /&gt;
Launch Knas Restarter&lt;br /&gt;
Find DSConnect-server.exe and click on it&lt;br /&gt;
Click &amp;quot;Select&amp;quot;&lt;br /&gt;
Change itnerval to 10 seconds&lt;br /&gt;
Under &amp;quot;Restart Paramters&amp;quot;;&lt;br /&gt;
Check Keep restarter minimized&lt;br /&gt;
in &amp;quot;Working Directory&amp;quot; enter the directory where dsp is installed&lt;br /&gt;
Under Actions;&lt;br /&gt;
Check &amp;quot;External Script&amp;quot; and browse to your tools folder and select connect_crash.bat&lt;br /&gt;
Click &amp;quot;Create Shortcut&amp;quot; and save to your desktop&lt;br /&gt;
&lt;br /&gt;
===Game Server Restart===&lt;br /&gt;
Launch Knas Restarter&lt;br /&gt;
Find DSGame-server.exe and click on it&lt;br /&gt;
Click &amp;quot;Select&amp;quot;&lt;br /&gt;
Change itnerval to 10 seconds&lt;br /&gt;
Under &amp;quot;Restart Paramters&amp;quot;;&lt;br /&gt;
Check Keep restarter minimized&lt;br /&gt;
in &amp;quot;Working Directory&amp;quot; enter the directory where dsp is installed&lt;br /&gt;
Under Actions;&lt;br /&gt;
Check &amp;quot;External Script&amp;quot; and browse to your tools folder and select game_crash.bat&lt;br /&gt;
Click &amp;quot;Create Shortcut&amp;quot; and save to your desktop&lt;br /&gt;
&lt;br /&gt;
===Launching===&lt;br /&gt;
Open the shortcuts you created on your desktop, and open the search server as you normally would.&lt;br /&gt;
&lt;br /&gt;
Crash logs will be found in the text files you created in the tools directory showing the date and time the crash occurred.&lt;br /&gt;
===Problems===&lt;br /&gt;
In some Windows opperating systems, a window will pop up saying the program has crashed, leaving the crashed program up and preventing an auto-restart. This can be avoided by disabling the user interface for critical errors. To do this follow these steps:&lt;br /&gt;
&lt;br /&gt;
Start &amp;gt; Run gpedit.msc&lt;br /&gt;
&lt;br /&gt;
Computer Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Error Reporting&lt;br /&gt;
Set Prevent Display of the user interface for critical errors&amp;quot; to Enabled&lt;br /&gt;
&lt;br /&gt;
== Common Errors ==&lt;br /&gt;
&lt;br /&gt;
=== Getting Errors on Load / In Game ===&lt;br /&gt;
&lt;br /&gt;
You have to run all changed sql files! Be careful you keep zoneip correct in zone_settings.sql.&lt;br /&gt;
&lt;br /&gt;
=== Can't Connect to Game Server ===&lt;br /&gt;
&lt;br /&gt;
Make sure your zoneip in zone_settings table is correct. Also make sure packets can reach the 53445 port.&lt;br /&gt;
&lt;br /&gt;
Restart server after changing zoneip.&lt;br /&gt;
&lt;br /&gt;
=== Packet or key is invalid: ===&lt;br /&gt;
&lt;br /&gt;
Restart login server, game server and game client.&lt;br /&gt;
&lt;br /&gt;
=== make: *** No rule to make target ===&lt;br /&gt;
&lt;br /&gt;
Delete .deps&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source autogen.sh&lt;br /&gt;
./configure&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
The original windows guide was written by thrydwolf, and has been formatted for the wiki and updated by bluekirby0&lt;/div&gt;</summary>
		<author><name>Deviltti2</name></author>	</entry>

	<entry>
		<id>http://wiki.dspt.info/index.php?title=Building_the_Server&amp;diff=21951</id>
		<title>Building the Server</title>
		<link rel="alternate" type="text/html" href="http://wiki.dspt.info/index.php?title=Building_the_Server&amp;diff=21951"/>
				<updated>2015-07-22T02:20:01Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti2: /* Installing &amp;amp; Setting up the DS Server on Windows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing &amp;amp; Setting up the DS Server on Windows ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
In this section we will download every program/tool we will need to setup and maintain the servers. Do not install these yet.&lt;br /&gt;
&lt;br /&gt;
[http://dev.mysql.com/downloads/mysql/ MySQL Community Server] (flag)&lt;br /&gt;
-Or-&lt;br /&gt;
[http://dev.mysql.com/downloads/installer/5.6.html/ MySQL Community Server 5.6 (Updated)] (flag)&lt;br /&gt;
-Or-&lt;br /&gt;
[https://downloads.mariadb.org/ MariaDB]&lt;br /&gt;
&lt;br /&gt;
[http://dev.mysql.com/downloads/workbench/ MySQL Workbench]&lt;br /&gt;
&lt;br /&gt;
[http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx Visual Studio 2013 or higher (Full or Express)]&lt;br /&gt;
&lt;br /&gt;
[https://code.google.com/p/msysgit/downloads/list?q=full+installer+official+git/ Git For Windows]&lt;br /&gt;
&lt;br /&gt;
[https://code.google.com/p/tortoisegit/ TortoiseGit]&lt;br /&gt;
&lt;br /&gt;
[http://www.microsoft.com/en-us/download/details.aspx?id=40784 Visual C++ Redistributable Runtimes 2013]&lt;br /&gt;
&lt;br /&gt;
[http://www.microsoft.com/download/en/details.aspx?id=21 .Net 3.5 Runtime] (already comes with Win 7)&lt;br /&gt;
&lt;br /&gt;
[http://www.microsoft.com/download/en/details.aspx?id=22 .Net 3.5sp1 Runtime] (already comes with Win 7)&lt;br /&gt;
&lt;br /&gt;
[http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=17851 .Net 4 Runtime]&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
==== MySql ==== &lt;br /&gt;
(flag)&lt;br /&gt;
&lt;br /&gt;
Choose Typical Installation&lt;br /&gt;
&lt;br /&gt;
After the main installation, select Launch the MySQL Instance Configuration Wizard&lt;br /&gt;
&lt;br /&gt;
Select Detailed Configuration&lt;br /&gt;
&lt;br /&gt;
Select Developer Machine&lt;br /&gt;
&lt;br /&gt;
Select Multi-functional Database&lt;br /&gt;
&lt;br /&gt;
Standard Installation Directory&lt;br /&gt;
&lt;br /&gt;
Select Manual Setting and 1000 Concurrent connections&lt;br /&gt;
&lt;br /&gt;
Select Enable TCP/IP Networking, Port Number 3306, and Enable Strict Mode&lt;br /&gt;
&lt;br /&gt;
Select Best Support for Multilingualism&lt;br /&gt;
&lt;br /&gt;
Select Install as Windows Service, Launch the MySQL Server automatically, and Include Bin Directory in Windows PATH.&lt;br /&gt;
&lt;br /&gt;
Select Modify Security Settings, and enter a new password twice. Write down the MySQL password.&lt;br /&gt;
(DO NOT LEAVE BLANK.)&lt;br /&gt;
&lt;br /&gt;
Select Next, Execute, then Finish&lt;br /&gt;
&lt;br /&gt;
==== MySQL 5.6 '''(Updated)'''==== &lt;br /&gt;
Note: Server is x86, but will install 32-bit and 64-bit binaries.&lt;br /&gt;
&lt;br /&gt;
Accept License Terms&lt;br /&gt;
&lt;br /&gt;
Skip Check for updates&lt;br /&gt;
&lt;br /&gt;
Select Developer Default&lt;br /&gt;
&lt;br /&gt;
Check requirements and click Execute - will launch installers for anything you're missing&lt;br /&gt;
&lt;br /&gt;
Default Installation - ~5min&lt;br /&gt;
&lt;br /&gt;
Default Configuration - Check box for &amp;quot;Show Advance Options&amp;quot; - Click Next&lt;br /&gt;
&lt;br /&gt;
Enter MySQL Root Password, twice. Remember it! - Click Next&lt;br /&gt;
&lt;br /&gt;
It will show windows service details, leave as default and Click Next&lt;br /&gt;
&lt;br /&gt;
It will show Logging options, leave as default and  Click Next&lt;br /&gt;
&lt;br /&gt;
Configuration will complete, Click Next&lt;br /&gt;
&lt;br /&gt;
Samples and examples will configure - ~5min - Click Next&lt;br /&gt;
&lt;br /&gt;
Uncheck &amp;quot;launch MySQL Workbench, Click Finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Navicat Lite ==== &lt;br /&gt;
(flag)&lt;br /&gt;
&lt;br /&gt;
Use default installation options.&lt;br /&gt;
&lt;br /&gt;
==== Visual Studio 2015 ====&lt;br /&gt;
&lt;br /&gt;
Any edition works.  Community is free.&lt;br /&gt;
&lt;br /&gt;
Make sure you install C++! At the time of this writing, it is NOT in the default options (use custom to select it under Languages).&lt;br /&gt;
&lt;br /&gt;
==== Git for Windows ====&lt;br /&gt;
&lt;br /&gt;
Use default installation options.&lt;br /&gt;
&lt;br /&gt;
==== TortoiseGit ====&lt;br /&gt;
&lt;br /&gt;
Use default installation options. You can skip the step to reboot since we'll reboot once everything else is installed.&lt;br /&gt;
&lt;br /&gt;
==== Visual C++ Redistributable Runtime 2013 and 2015 ====&lt;br /&gt;
&lt;br /&gt;
Use default installation options.&lt;br /&gt;
&lt;br /&gt;
==== .Net 4.6 ====&lt;br /&gt;
&lt;br /&gt;
Use default installation options.  It probably comes with Visual Studio 2015&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point everything should be installed that needs to be and you can restart your PC to finalize them.&lt;br /&gt;
&lt;br /&gt;
=== Downloading the Server Source Code ===&lt;br /&gt;
&lt;br /&gt;
'''In this section we will use TortoiseGit to download the latest git source code for the server.'''&lt;br /&gt;
&lt;br /&gt;
Open Windows Explorer (right click the start button and choose Windows Explorer)&lt;br /&gt;
&lt;br /&gt;
Right click on any folder select Git Clone&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;URL&amp;quot; field put in the following url: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://github.com/DarkstarProject/darkstar.git&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the &amp;quot;Directory&amp;quot; to your choice (blank will default to current location /darkstar&lt;br /&gt;
&lt;br /&gt;
Click OK.&lt;br /&gt;
&lt;br /&gt;
Wait for the download to finish.&lt;br /&gt;
&lt;br /&gt;
Click OK to close TortoiseGit.&lt;br /&gt;
&lt;br /&gt;
Close windows explorer&lt;br /&gt;
&lt;br /&gt;
At this point you have downloaded all of the source code for the latest version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting up the Database ===&lt;br /&gt;
&lt;br /&gt;
'''In this section we will use the data that you downloaded to build a database in MySQL.'''&lt;br /&gt;
&lt;br /&gt;
==== Using a bat script ====&lt;br /&gt;
&lt;br /&gt;
If you follow this step, you may skip the next one. &lt;br /&gt;
&lt;br /&gt;
Paste the following into notepad and save it as DSP_Import.bat in your dsp\sql folder:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@ECHO OFF&lt;br /&gt;
REM =============================================================================&lt;br /&gt;
REM =============================================================================&lt;br /&gt;
REM ======                                                              =========&lt;br /&gt;
REM ====== THis script will drop the DB specificed, then create the DB  =========&lt;br /&gt;
REM ====== specified, and then load all .sql tables from its run dir to =========&lt;br /&gt;
REM ====== the the DB.                                                  =========&lt;br /&gt;
REM ======                                                              =========&lt;br /&gt;
REM ====== File needs to be run from within the \dsp\sql folder (same   =========&lt;br /&gt;
REM ====== folder with all the .sql files. Please edit as needed. By    =========&lt;br /&gt;
REM ====== default it WILL DROP the standard dspdb DB, loosing all      =========&lt;br /&gt;
REM ====== accounts and characters. If this is not desired, then update =========&lt;br /&gt;
REM ====== the file to load the new DB into a new DB name.              =========&lt;br /&gt;
REM ======                                                              =========&lt;br /&gt;
REM ====== Update -p with MySQL password. If you password is 'foo',     =========&lt;br /&gt;
REM ====== then change '-pMYSQLPASS' to '-pfoo' (3 places).             =========&lt;br /&gt;
REM ======                                                              =========&lt;br /&gt;
REM ====== If you want to use a different database name, change 'dspdb' =========&lt;br /&gt;
REM ====== with a database name of your choosing.                       =========&lt;br /&gt;
REM ======                                                              =========&lt;br /&gt;
REM =============================================================================&lt;br /&gt;
REM =============================================================================&lt;br /&gt;
REM ======                                                              =========&lt;br /&gt;
REM ====== by Thrydwolf 9/8/2012                                        =========&lt;br /&gt;
REM ====== Updated with status by bluekirby0 3/30/2012                  =========&lt;br /&gt;
REM ====== Updated by Thrydwolf 9/18/2012                               =========&lt;br /&gt;
REM ======                                                              =========&lt;br /&gt;
REM =============================================================================&lt;br /&gt;
REM =============================================================================&lt;br /&gt;
&lt;br /&gt;
ECHO Creating Database dspdb&lt;br /&gt;
mysqladmin -h localhost -u root -pMYSQLPASS DROP dspdb&lt;br /&gt;
&lt;br /&gt;
ECHO Creating Database dspdb&lt;br /&gt;
mysqladmin -h localhost -u root -pMYSQLPASS CREATE dspdb&lt;br /&gt;
&lt;br /&gt;
ECHO Loading dspdb tables into the database&lt;br /&gt;
cd c:\darkstar\sql&lt;br /&gt;
FOR %%X IN (*.sql) DO ECHO Importing %%X &amp;amp; &amp;quot;c:\program files\mysql\mysql server 5.6\bin\mysql&amp;quot; dspdb -h localhost -u root -pMYSQLPASS &amp;lt; %%X&lt;br /&gt;
&lt;br /&gt;
ECHO Finished!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At a minimum you will need to change -pMYSQLPASS in the script to where root is your mysql root password. If your password is 'foo' then you would use '-pfoo' instead. You may also have to change the path of your mysql installation as well.&lt;br /&gt;
&lt;br /&gt;
You can use this script any time the repository is updated, but it will drop the table and thus delete all your player data. You may want to make manual changes instead unless you are using it purely as a test server.&lt;br /&gt;
&lt;br /&gt;
After you've done your initial load, you can use the following script that will preserve character data&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd c:\darkstar\sql&lt;br /&gt;
del auction_house.sql&lt;br /&gt;
del chars.sql&lt;br /&gt;
del accounts.sql&lt;br /&gt;
del accounts_banned.sql&lt;br /&gt;
del char_effects.sql&lt;br /&gt;
del char_equip.sql&lt;br /&gt;
del char_exp.sql&lt;br /&gt;
del char_inventory.sql&lt;br /&gt;
del char_jobs.sql&lt;br /&gt;
del char_look.sql&lt;br /&gt;
del char_pet.sql&lt;br /&gt;
del char_pet_name.sql&lt;br /&gt;
del char_points.sql&lt;br /&gt;
del char_profile.sql&lt;br /&gt;
del char_skills.sql&lt;br /&gt;
del char_stats.sql&lt;br /&gt;
del char_storage.sql&lt;br /&gt;
del char_vars.sql&lt;br /&gt;
del char_weapon_skill_points.sql&lt;br /&gt;
del chars.sql&lt;br /&gt;
del conquest_system.sql&lt;br /&gt;
del delivery_box.sql&lt;br /&gt;
del linkshells.sql&lt;br /&gt;
FOR %%X IN (*.sql) DO ECHO Importing %%X &amp;amp; &amp;quot;c:\program files\mysql\mysql server 5.6\bin\mysql&amp;quot; dspdb -h localhost -u root -pMYSQLPASS &amp;lt; %%X&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using Navicat ==== &lt;br /&gt;
(flag)&lt;br /&gt;
&lt;br /&gt;
This is the more hands-on approach, and being comfortable doing it this way may make it easier to update individual tables later without having to learn the mysql command-line interface.&lt;br /&gt;
&lt;br /&gt;
Open Navicat&lt;br /&gt;
&lt;br /&gt;
Click Connection (or File, New Connection)&lt;br /&gt;
&lt;br /&gt;
Connection name: DarkStar&lt;br /&gt;
&lt;br /&gt;
Host Name/IP: localhost&lt;br /&gt;
&lt;br /&gt;
Port: 3306&lt;br /&gt;
&lt;br /&gt;
User Name: root&lt;br /&gt;
&lt;br /&gt;
Password: Enter the password you wrote down during the mySQL installation.&lt;br /&gt;
&lt;br /&gt;
Check Save Password&lt;br /&gt;
&lt;br /&gt;
Click OK&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the connections pane double click DarkStar&lt;br /&gt;
&lt;br /&gt;
Right click on DarkStar and select New Database...&lt;br /&gt;
&lt;br /&gt;
Name it dspdb&lt;br /&gt;
&lt;br /&gt;
Use the Default character set&lt;br /&gt;
&lt;br /&gt;
Select OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double click dspdb&lt;br /&gt;
&lt;br /&gt;
Right click on dspdb and select Execute SQL File...&lt;br /&gt;
&lt;br /&gt;
Browse to C:\dsp\sql and select abilities.sql&lt;br /&gt;
&lt;br /&gt;
Click Start&lt;br /&gt;
&lt;br /&gt;
Continue this process for each file in the folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have an issue with the triggers.sql file then follow this step. If not, proceed to the next step (IP address for the map server):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Navicat Open accounts table&lt;br /&gt;
&lt;br /&gt;
Click File, Design Table&lt;br /&gt;
&lt;br /&gt;
Click the Triggers tab&lt;br /&gt;
&lt;br /&gt;
There should a line already listed with account_delete in the Name field&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not:&lt;br /&gt;
&lt;br /&gt;
click Add Trigger&lt;br /&gt;
&lt;br /&gt;
Name column should be account_delete&lt;br /&gt;
&lt;br /&gt;
Fires column should be Before&lt;br /&gt;
&lt;br /&gt;
Check the box in the Delete column&lt;br /&gt;
&lt;br /&gt;
In the definition box below add the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   DELETE FROM `accounts_banned` WHERE `accid` = OLD.id;&lt;br /&gt;
   DELETE FROM `chars` WHERE `accid` = OLD.id;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select Save and then close the table.&lt;br /&gt;
&lt;br /&gt;
Open the chars table&lt;br /&gt;
&lt;br /&gt;
Click File, Design Table&lt;br /&gt;
&lt;br /&gt;
Click the Triggers tab&lt;br /&gt;
&lt;br /&gt;
There should already be a line listed with char_delete in the name field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not:&lt;br /&gt;
&lt;br /&gt;
click Add Trigger&lt;br /&gt;
&lt;br /&gt;
Name column should be char_delete&lt;br /&gt;
&lt;br /&gt;
Fires column should be Before&lt;br /&gt;
&lt;br /&gt;
Check the box in the Delete column&lt;br /&gt;
&lt;br /&gt;
In the definition box below add the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   DELETE FROM `char_exp` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_jobs` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_equip` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_effects` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_look` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_stats` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_skills` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_titles` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_inventory` WHERE `charid` = OLD.charid;&lt;br /&gt;
   DELETE FROM `char_vars` WHERE `charid` = OLD.charid;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select Save and then close the table.&lt;br /&gt;
&lt;br /&gt;
Note: Leave Navicat open for the next section.&lt;br /&gt;
&lt;br /&gt;
==== Configure the ZoneIP for the Map Server ====&lt;br /&gt;
&lt;br /&gt;
Now you need to determine what IP address that will be used for the Map Server, then update MySQL with it.&lt;br /&gt;
&lt;br /&gt;
Most devs &amp;amp; enthusiasts will not have a separate map server, but will run both map server and login server on the same PC. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Determine what IP address will be used for the map server.&lt;br /&gt;
&lt;br /&gt;
If the server will be public, then use your external IP in the next step. (Looks really random like 173.194.43.104)&lt;br /&gt;
&lt;br /&gt;
If the server will be internal and you want it available on other PCs in your internal network, use the internal network IP (192.168.x.x) in the next step.&lt;br /&gt;
&lt;br /&gt;
If you only plan to run the client and the server on the same PC, you can use the localhost address (127.0.0.1) in the next step.&lt;br /&gt;
&lt;br /&gt;
2. Update the zone_settings table with the ip&lt;br /&gt;
(flag)&lt;br /&gt;
In Navicat double click on the table dspdb and expand&lt;br /&gt;
&lt;br /&gt;
Click on Query&lt;br /&gt;
&lt;br /&gt;
Right click and select New Query&lt;br /&gt;
&lt;br /&gt;
Add the following code into the empty space, inserting the value calculated above. The value in the code below (127.0.0.1) would be used if only running the client from the same PC as the server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    UPDATE zone_settings SET zoneip = '127.0.0.1';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select Run. You should get a message stating that many (280+) records were changed.&lt;br /&gt;
&lt;br /&gt;
I recommend you save the Query in case you need to run it again later after updating the server.&lt;br /&gt;
&lt;br /&gt;
Close Navicat.&lt;br /&gt;
&lt;br /&gt;
=== Building the Servers ===&lt;br /&gt;
&lt;br /&gt;
'''In this section we will be building the Dark Star servers.'''&lt;br /&gt;
&lt;br /&gt;
Dark Star uses 3 separate servers. A Login server, a Map/Game server, and an optional Search/Auction House server. Using the ZoneIP mentioned earlier, every map could run on its own server at a different IP address. If you have 4 computers each computer could run different areas, as long as they were all connected to the same MySQL database server.&lt;br /&gt;
&lt;br /&gt;
==== Build the Server ====&lt;br /&gt;
&lt;br /&gt;
Open Visual Studio&lt;br /&gt;
&lt;br /&gt;
Click File, Open, Project/Solution (or Ctrl+Shift+O)&lt;br /&gt;
&lt;br /&gt;
Navigate to C:\dsp\win32&lt;br /&gt;
&lt;br /&gt;
Select darkstar.sln&lt;br /&gt;
&lt;br /&gt;
It may take a few minutes to load files.&lt;br /&gt;
&lt;br /&gt;
Click Debug then Build Server (or F7, or Ctrl+Shift+B)&lt;br /&gt;
&lt;br /&gt;
Building will take a few minutes.&lt;br /&gt;
&lt;br /&gt;
Once complete, validate that there are no Errors listed in the summary line at the bottom. It should look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;========== Build: 3 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there are any SQL errors it is probably caused by the SQL dev package was extracted to the wrong folder.&lt;br /&gt;
&lt;br /&gt;
If there is a #include error, change that #include to say #include &amp;lt;mysql/mysql.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== When all of the Servers are built ====&lt;br /&gt;
&lt;br /&gt;
Verify in the C:\dsp directory that the servers you built are there: &lt;br /&gt;
&lt;br /&gt;
DSConnect-server.exe for the Login Server&lt;br /&gt;
&lt;br /&gt;
DSGame-server.exe for the Map Server&lt;br /&gt;
&lt;br /&gt;
DSSearch-server.exe for the Search Server&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuring the Servers ===&lt;br /&gt;
&lt;br /&gt;
'''Now you will configure the Login Server and Map Server to connect to the MySQL database.'''&lt;br /&gt;
&lt;br /&gt;
Do not mess with any other settings in these files unless you know what they are for and what they do.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Login Server Settings ====&lt;br /&gt;
&lt;br /&gt;
In windows explorer navigate to c:\dsp\conf&lt;br /&gt;
&lt;br /&gt;
Open login_darkstar.conf in a text editer (notepad)&lt;br /&gt;
&lt;br /&gt;
Scroll down to the bottom and validate/update the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql_host: 127.0.0.1&lt;br /&gt;
mysql_port: 3306&lt;br /&gt;
mysql_login: root&lt;br /&gt;
mysql_password: root &amp;lt;-- change this to your password you wrote down during the MySQL install (flag)&lt;br /&gt;
mysql_database: dspdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Map Server Settings ====&lt;br /&gt;
&lt;br /&gt;
In windows explorer navigate to c:\dsp\conf&lt;br /&gt;
&lt;br /&gt;
Open map_darkstar.conf in a text editer (notepad)&lt;br /&gt;
&lt;br /&gt;
Scroll down to the bottom and validate/update the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql_host: 127.0.0.1&lt;br /&gt;
mysql_port: 3306&lt;br /&gt;
mysql_login: root&lt;br /&gt;
mysql_password: root &amp;lt;-- change this to your password you wrote down during the MySQL install (flag)&lt;br /&gt;
mysql_database: dspdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Search Server Settings ====&lt;br /&gt;
&lt;br /&gt;
In windows explorer navigate to c:\dsp\conf&lt;br /&gt;
&lt;br /&gt;
Open search_server.conf in a text editer (notepad)&lt;br /&gt;
&lt;br /&gt;
Scroll down to the bottom and validate/update the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql_host: 127.0.0.1&lt;br /&gt;
mysql_port: 3306&lt;br /&gt;
mysql_login: root&lt;br /&gt;
mysql_password: root &amp;lt;-- change this to your password you wrote down during the MySQL install (flag)&lt;br /&gt;
mysql_database: dspdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point we have configured the servers to connect to the SQL database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Starting the Servers ===&lt;br /&gt;
&lt;br /&gt;
'''In this section we will launch our new servers.'''&lt;br /&gt;
&lt;br /&gt;
Navigate to c:\dsp&lt;br /&gt;
&lt;br /&gt;
Run DSConnect-server.exe as Admin&lt;br /&gt;
&lt;br /&gt;
Run DSGame-server.exe as Admin&lt;br /&gt;
&lt;br /&gt;
(Optional) Run DSSearch-server.exe as Admin&lt;br /&gt;
&lt;br /&gt;
At this point if your servers fail to load, you probably missed a step. Go back through the steps and try to find out what you missed. It may also be helpful to look at the log files located in c:\dsp\log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Forward Ports to Allow Others to Join (&amp;amp; Firewall) ===&lt;br /&gt;
&lt;br /&gt;
'''In this section we will provide the port numbers that need to be forwarded to the server. This is only needed to allow people outside your local intranet to join your server.'''&lt;br /&gt;
&lt;br /&gt;
In your router and firewall the following ports need to be opened/forwarded to your server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TCP Ports:&lt;br /&gt;
54230&lt;br /&gt;
54231&lt;br /&gt;
54001&lt;br /&gt;
54002&lt;br /&gt;
&lt;br /&gt;
UDP Port:&lt;br /&gt;
54230&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If still having trouble, disable any firewall software completely for testing. This includes the Windows firewall that comes on all modern Windows systems, which can be found in the Control Panel.&lt;br /&gt;
&lt;br /&gt;
== Installing &amp;amp; Setting up the DS Server on Linux ==&lt;br /&gt;
&lt;br /&gt;
The server is known to build in recent [http://www.ubuntu.com/ Ubuntu] versions (14.04), and is tested regularly against it. &lt;br /&gt;
&lt;br /&gt;
Generic build instructions for most POSIX (GNU/Linux, and possibly FreeBSD, NetBSD, UNIX or even OSX with some additional work) systems follow. Some knowledge of how to compile software on your distribution is assumed. You may find it helpful to reference the Windows guide above if something is unclear.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites: ===&lt;br /&gt;
A compiler with C++11/14 support. Currently tested with GCC and G++, and requires a minimum version of 4.9&lt;br /&gt;
&lt;br /&gt;
Git to retrieve the source code.&lt;br /&gt;
&lt;br /&gt;
Autotools (automake autoconf m4sh) and pkg-config to generate the configure script and Makefile&lt;br /&gt;
&lt;br /&gt;
mysql server&lt;br /&gt;
&lt;br /&gt;
mysql client library (select the developer version if your distro has one - for ubuntu it's libmysqlclient-dev)&lt;br /&gt;
&lt;br /&gt;
luajit library version 5.1 or higher (select the developer version if your distro has one - for ubuntu it's luajit-5.1-dev)&lt;br /&gt;
&lt;br /&gt;
libzmq (select the developer version if your distro has one - for ubuntu it's libzmq3-dev)&lt;br /&gt;
&lt;br /&gt;
If you plan to run from a console, you may also wish to install &amp;quot;screen&amp;quot; as there is no daemon mode for the servers yet.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the Source Code ===&lt;br /&gt;
&lt;br /&gt;
Once you have everything mentioned above installed, grab the latest source from the repository via the command:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;git clone http://github.com/DarkstarProject/darkstar.git/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compiling ===&lt;br /&gt;
&lt;br /&gt;
Next is a typical autotools build. Run the autogen script, followed by configure, and then make:&lt;br /&gt;
 sh autogen.sh&lt;br /&gt;
 ./configure --enable-debug&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
You can choose not to configure with debug enabled, but there is very little potential gain in this and it prevents many useful break statements from triggering. The Makefile also has separate targets to build each server named &amp;quot;dsconnect&amp;quot; &amp;quot;dsgame&amp;quot; and &amp;quot;dssearch&amp;quot; but will build all 3 if none are specified.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting Up the Database ===&lt;br /&gt;
&lt;br /&gt;
If you do not know your mysql root password, the default on most systems is blank. It is a good idea to change this for security reasons, as your mysql root user has full permissions on all databases. The first time you run the mysql client, you should be prompted to change the password. After doing so, you will want to create a user specifically for dealing with the darkstar server database. Run mysql as follows:&lt;br /&gt;
 mysql -u root -p&lt;br /&gt;
&lt;br /&gt;
Enter your root password at the prompt. Next, create a new user as follows:&lt;br /&gt;
 CREATE USER 'darkstar'@'localhost' IDENTIFIED BY 'password';&lt;br /&gt;
&lt;br /&gt;
Substitute &amp;quot;password&amp;quot; with a password of your choice. Next, we want to create a database, and set up our new user with permissions to work with it.&lt;br /&gt;
 CREATE DATABASE dspdb;&lt;br /&gt;
 USE dspdb;&lt;br /&gt;
 GRANT ALL PRIVILEGES ON dspdb.* TO 'darkstar'@'localhost';&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
This will make it to where your new user can do anything necessary, but can only connect from localhost, so even if your password is compromised, it will be difficult to mess with the database remotely. If you need to be able to access the database remotely (like if the database is stored on a separate machine from the server), change the configuration according to the host that will be accessing the database.&lt;br /&gt;
&lt;br /&gt;
Now, you need to populate the database.&lt;br /&gt;
 cd sql&lt;br /&gt;
 for f in *.sql&lt;br /&gt;
   do&lt;br /&gt;
      echo -n &amp;quot;Importing $f into the database...&amp;quot;&lt;br /&gt;
      mysql dspdb -u darkstar -ppassword &amp;lt; $f &amp;amp;&amp;amp; echo &amp;quot;Success&amp;quot;      &lt;br /&gt;
   done&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
To set up your ZoneIP, see the related windows section [[Building_the_Server#Configure_the_ZoneIP_for_the_Map_Server]] above for how to calculate it, and then run:&lt;br /&gt;
 mysql -u darkstar -ppassword&lt;br /&gt;
 USE dspdb;&lt;br /&gt;
 UPDATE zone_settings SET zoneip = '127.0.0.1';&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
replacing &amp;quot;127.0.0.1&amp;quot; with the value you determined in your calculation. You should see a message that at least 256 changes have occured after the update command.&lt;br /&gt;
&lt;br /&gt;
=== Configuring the Server ===&lt;br /&gt;
Before running your new servers, you will need to update the configuration files to tell it how to talk to the database. You will need to update the files in the conf/ sub-folder named &amp;quot;login_darkstar.conf&amp;quot; &amp;quot;map_darkstar.conf&amp;quot; and &amp;quot;search_server.conf&amp;quot; at a minimum. Find the mysql settings in each and change as appropriate, using the new user, password and database you created earlier.&lt;br /&gt;
&lt;br /&gt;
You may also wish to browse through the various configuration files for any settings that might be of interest to you, but more details on server customization can be found at [[Customizing Your Server]].&lt;br /&gt;
&lt;br /&gt;
=== Starting the Servers ===&lt;br /&gt;
You may now start your new servers. If you are using a desktop environment, you may wish to open 3 separate terminals and run each server in a separate one to monitor them efficiently. Otherwise, you will want to run them in screen sessions as follows:&lt;br /&gt;
 screen -d -m -S dsconnect ./dsconnect&lt;br /&gt;
 screen -d -m -S dsgame ./dsgame&lt;br /&gt;
 screen -d -m -S dssearch ./dssearch&lt;br /&gt;
&lt;br /&gt;
This will start and auto-detach all three servers, assigning them meaningful names to make it easy to reattach later by using the commands:&lt;br /&gt;
 screen -r dsconnect&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
 screen -r dsgame&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
 screen -r dssearch&lt;br /&gt;
&lt;br /&gt;
to monitor a given server. Once you've attached to a screen, you can detach by first pressing &amp;quot;ctrl+a&amp;quot; and then &amp;quot;d&amp;quot;. There are many other useful ways to use screen, so do whatever suits yoru preference.&lt;br /&gt;
&lt;br /&gt;
Your server is now up-and-running, and a client should be able to connect as long as there are no obvious errors on any of the server screens. If the search server is having issues, it is not vital for basic game functionality, but you will be unable to use search functions or the auction house. If you have run into any major issues, contact bluekirby0 (the current maintainer of the linux port as of the time of this writing) on IRC #darkstarproject@irc.rizon.net or in the [http://forums.dspt.info forums].&lt;br /&gt;
&lt;br /&gt;
== Automatic Server Restarts &amp;amp; Crash Logs ==&lt;br /&gt;
&lt;br /&gt;
If your server goes down, no one can connect. If it goes down when you're not looking, it can be down for an extended period of time. To fix this, you probably want to have a way to have your server auto-restart. In addition, it's good to know when the server crashed.&lt;br /&gt;
===Getting the software===&lt;br /&gt;
First, you'll want to download Knas Restarter here: [http://www.knas.se/Applications/Restarter.aspx].&lt;br /&gt;
===Creating the Logging files===&lt;br /&gt;
In the dsp directory where your game, connect, and search server reside, create a 'tools' folder. In the folder create 4 new text files by right clicking, and going to New &amp;gt; Text Document&lt;br /&gt;
&lt;br /&gt;
Make sure you have file extension view turned on so that you can see the .txt at the end.&lt;br /&gt;
&lt;br /&gt;
Rename the 4 files to the following:&lt;br /&gt;
&lt;br /&gt;
connect_crash.bat  &amp;lt;Change the file type to bat file, deleting .txt&lt;br /&gt;
&lt;br /&gt;
connect_crash_log.txt&lt;br /&gt;
&lt;br /&gt;
game_crash.bat  &amp;lt;Change the file type to bat file, deleting .txt&lt;br /&gt;
&lt;br /&gt;
game_crash_log.txt&lt;br /&gt;
&lt;br /&gt;
Right click on connect_crash.bat and click 'edit'&lt;br /&gt;
Place the following inside:&lt;br /&gt;
echo %date% %time% &amp;gt;&amp;gt; connect_crash_log.txt&lt;br /&gt;
Save and close&lt;br /&gt;
&lt;br /&gt;
Right click on game_crash.bat and click 'edit'&lt;br /&gt;
Place the following inside:&lt;br /&gt;
echo %date% %time% &amp;gt;&amp;gt; game_crash_log.txt&lt;br /&gt;
Save and close&lt;br /&gt;
&lt;br /&gt;
===Connect Server Restart===&lt;br /&gt;
Launch Knas Restarter&lt;br /&gt;
Find DSConnect-server.exe and click on it&lt;br /&gt;
Click &amp;quot;Select&amp;quot;&lt;br /&gt;
Change itnerval to 10 seconds&lt;br /&gt;
Under &amp;quot;Restart Paramters&amp;quot;;&lt;br /&gt;
Check Keep restarter minimized&lt;br /&gt;
in &amp;quot;Working Directory&amp;quot; enter the directory where dsp is installed&lt;br /&gt;
Under Actions;&lt;br /&gt;
Check &amp;quot;External Script&amp;quot; and browse to your tools folder and select connect_crash.bat&lt;br /&gt;
Click &amp;quot;Create Shortcut&amp;quot; and save to your desktop&lt;br /&gt;
&lt;br /&gt;
===Game Server Restart===&lt;br /&gt;
Launch Knas Restarter&lt;br /&gt;
Find DSGame-server.exe and click on it&lt;br /&gt;
Click &amp;quot;Select&amp;quot;&lt;br /&gt;
Change itnerval to 10 seconds&lt;br /&gt;
Under &amp;quot;Restart Paramters&amp;quot;;&lt;br /&gt;
Check Keep restarter minimized&lt;br /&gt;
in &amp;quot;Working Directory&amp;quot; enter the directory where dsp is installed&lt;br /&gt;
Under Actions;&lt;br /&gt;
Check &amp;quot;External Script&amp;quot; and browse to your tools folder and select game_crash.bat&lt;br /&gt;
Click &amp;quot;Create Shortcut&amp;quot; and save to your desktop&lt;br /&gt;
&lt;br /&gt;
===Launching===&lt;br /&gt;
Open the shortcuts you created on your desktop, and open the search server as you normally would.&lt;br /&gt;
&lt;br /&gt;
Crash logs will be found in the text files you created in the tools directory showing the date and time the crash occurred.&lt;br /&gt;
===Problems===&lt;br /&gt;
In some Windows opperating systems, a window will pop up saying the program has crashed, leaving the crashed program up and preventing an auto-restart. This can be avoided by disabling the user interface for critical errors. To do this follow these steps:&lt;br /&gt;
&lt;br /&gt;
Start &amp;gt; Run gpedit.msc&lt;br /&gt;
&lt;br /&gt;
Computer Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Error Reporting&lt;br /&gt;
Set Prevent Display of the user interface for critical errors&amp;quot; to Enabled&lt;br /&gt;
&lt;br /&gt;
== Common Errors ==&lt;br /&gt;
&lt;br /&gt;
=== Getting Errors on Load / In Game ===&lt;br /&gt;
&lt;br /&gt;
You have to run all changed sql files! Be careful you keep zoneip correct in zone_settings.sql.&lt;br /&gt;
&lt;br /&gt;
=== Can't Connect to Game Server ===&lt;br /&gt;
&lt;br /&gt;
Make sure your zoneip in zone_settings table is correct. Also make sure packets can reach the 53445 port.&lt;br /&gt;
&lt;br /&gt;
Restart server after changing zoneip.&lt;br /&gt;
&lt;br /&gt;
=== Packet or key is invalid: ===&lt;br /&gt;
&lt;br /&gt;
Restart login server, game server and game client.&lt;br /&gt;
&lt;br /&gt;
=== make: *** No rule to make target ===&lt;br /&gt;
&lt;br /&gt;
Delete .deps&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source autogen.sh&lt;br /&gt;
./configure&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
The original windows guide was written by thrydwolf, and has been formatted for the wiki and updated by bluekirby0&lt;/div&gt;</summary>
		<author><name>Deviltti2</name></author>	</entry>

	</feed>