<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Connecting</title><link>https://sourceforge.net/p/hercules/wiki/Connecting/</link><description>Recent changes to Connecting</description><atom:link href="https://sourceforge.net/p/hercules/wiki/Connecting/feed" rel="self"/><language>en</language><lastBuildDate>Mon, 20 Feb 2023 05:00:55 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/hercules/wiki/Connecting/feed" rel="self" type="application/rss+xml"/><item><title>Connecting modified by Brynner</title><link>https://sourceforge.net/p/hercules/wiki/Connecting/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;{{outdated}}&lt;/p&gt;
&lt;p&gt;This article covers taking the configuration steps to ensure a successful&lt;br/&gt;
connection to your servers. You are required to know the in and outs of your&lt;br/&gt;
OS, as well as what a &lt;a class="" href="../LAN%20IP"&gt;wikipedia:Local area network&lt;/a&gt; and a&lt;br/&gt;
&lt;a class="" href="../WAN%20IP"&gt;wikipedia:Wide area network&lt;/a&gt; are.&lt;/p&gt;
&lt;div class="toc"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#basics-of-the-three-servers"&gt;Basics of the three servers&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="#login-server"&gt;Login Server&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#character-server"&gt;Character Server&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#map-server"&gt;Map Server&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#port-forwarding"&gt;Port Forwarding&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#configuring-hercules-for-use"&gt;Configuring Hercules for use&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="#using-the-confimport-folder-gitconfimport-tmpl"&gt;Using the /conf/import/ folder ({{git|conf/import-tmpl/}})&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#step-1-interserver-communication-passwords"&gt;Step 1. Interserver Communication Passwords&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#step-2-gitconflogin-serverconf"&gt;Step 2. {{git|conf/login-server.conf}}&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#step-3-gitconfchar-serverconf"&gt;Step 3. {{git|conf/char-server.conf}}&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#step-4-gitconfmap-serverconf"&gt;Step 4. {{git|conf/map-server.conf}}&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#step-5-gitconfinter-serverconf"&gt;Step 5. {{git|conf/inter-server.conf}}&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#starting-hercules"&gt;Starting Hercules&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#client-side"&gt;Client Side&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="#diff-your-client"&gt;Diff your client&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#data-folder"&gt;Data Folder&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#connect"&gt;Connect&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#trouble-shooting"&gt;Trouble Shooting&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="#character_info-size-error"&gt;CHARACTER_INFO size error!!&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;h2 id="basics-of-the-three-servers"&gt;Basics of the three servers&lt;/h2&gt;
&lt;h3 id="login-server"&gt;Login Server&lt;/h3&gt;
&lt;p&gt;The login server handles all login packets from the client. The client sees&lt;br/&gt;
the login server first and connects to it first. The login server listens on&lt;br/&gt;
the port 6900 by default and usually reads data from the login table. The&lt;br/&gt;
login server connects directly to the character server and passes it's&lt;br/&gt;
information to it once the client has successfully logged in. If your login&lt;br/&gt;
server won't connect, your players cannot login in, but can play.&lt;/p&gt;
&lt;h3 id="character-server"&gt;Character Server&lt;/h3&gt;
&lt;p&gt;The character server handles all character selection and character loading for&lt;br/&gt;
the map server. The character server receives commands to primarily display&lt;br/&gt;
characters once the client has logged in. The character server listens on the&lt;br/&gt;
port 6121 by default. It also handles the loading and saving of most character&lt;br/&gt;
data. If the character server becomes disconnected, character data saving is&lt;br/&gt;
not possible.&lt;/p&gt;
&lt;h3 id="map-server"&gt;Map Server&lt;/h3&gt;
&lt;p&gt;The map server handles all map functions, including, but not limited to, mob&lt;br/&gt;
functions, map functions, NPC loading and unloading, as well as NPC&lt;br/&gt;
processing. the map server is your bread and butter and allows people to play&lt;br/&gt;
on your server. It listens on the port 5121 by default.&lt;/p&gt;
&lt;p&gt;If the character server becomes disconnected from your map server, it's likely&lt;br/&gt;
the mapserver will disconnect everyone from it. This is not the case when the&lt;br/&gt;
MySQL server loses its connection to Hercules, as Hercules currently does not&lt;br/&gt;
restore this connection.&lt;/p&gt;
&lt;h3 id="port-forwarding"&gt;Port Forwarding&lt;/h3&gt;
&lt;p&gt;If you intend to let your players play from an external internet connection,&lt;br/&gt;
you &lt;em&gt;must&lt;/em&gt; forward ports 6900, 6121, and 5121 respectively in your router's&lt;br/&gt;
control panel. Simply forwarding port 6900 is not enough to allow clients to&lt;br/&gt;
connect, and traffic will not be passed solely through your login server, even&lt;br/&gt;
though they can communicate with one another internally on your localhost&lt;br/&gt;
address.&lt;/p&gt;
&lt;h2 id="configuring-hercules-for-use"&gt;Configuring Hercules for use&lt;/h2&gt;
&lt;p&gt;After you have finished &lt;a class="alink" href="/p/hercules/wiki/Compiling/"&gt;[Compiling]&lt;/a&gt; Hercules, you can set it up for use.&lt;br/&gt;
There will be four files that we will concentrate on. Any settings we change&lt;br/&gt;
in these files should &lt;strong&gt;always&lt;/strong&gt; be moved to the relevant import folder files.&lt;br/&gt;
If your compiler hasn't already made a copy of the {{git|conf/import-tmpl}}&lt;br/&gt;
folder and named it /conf/import do that now.&lt;/p&gt;
&lt;h5 id="using-the-confimport-folder-gitconfimport-tmpl"&gt;Using the /conf/import/ folder ({{git|conf/import-tmpl/}})&lt;/h5&gt;
&lt;p&gt;In this folder, you can 'import' your settings into each of the respected&lt;br/&gt;
files. All you need is each parameter. When you do this, your settings will&lt;br/&gt;
never be overwritten when you need to update your GIT, as the import folder is&lt;br/&gt;
built once. You can throw all of your settings in here and they will remain as&lt;br/&gt;
they are, and will read AFTER the main settings, which means these settings&lt;br/&gt;
will take priority.&lt;/p&gt;
&lt;h3 id="step-1-interserver-communication-passwords"&gt;Step 1. Interserver Communication Passwords&lt;/h3&gt;
&lt;p&gt;First, you will need to set an intercommunication password and user. This is&lt;br/&gt;
one of the most important steps to securing your server.&lt;/p&gt;
&lt;p&gt;In order for the char-server to accept commands and packets from the login&lt;br/&gt;
server, and for the map-server to accept commands and packets from the char-&lt;br/&gt;
server they have to 'log-in' to each other, using the Server Communication&lt;br/&gt;
passwords. You MUST set these to something other than defaults, but you can&lt;br/&gt;
set them to random characters, as long as they are the same in the three&lt;br/&gt;
places they appear in, which are: {{git|conf/char-server.conf}},&lt;br/&gt;
{{git|conf/map-server.conf}} and your login sql table. They are defaulted to&lt;br/&gt;
s1/p1, and &lt;strong&gt;MUST&lt;/strong&gt; be changed.&lt;/p&gt;
&lt;p&gt;Changes must be made to the import folder to ensure proper upgradability. A&lt;br/&gt;
good habit to get into when working with GIT. Simply copy and paste the lines&lt;br/&gt;
you wish to alter from the .conf file to the relevant .txt file in the import&lt;br/&gt;
folder. Your /conf/import/char_conf.txt &lt;em&gt;and&lt;/em&gt; /conf/import/map_conf.txt files&lt;br/&gt;
should look as follows, with &lt;em&gt;no&lt;/em&gt; changes made to {{git|conf/char-&lt;br/&gt;
server.conf}} or {{git|conf/map-server.conf}}:  &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;lt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="n"&gt;pre&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;gt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="c1"&gt;// Server Communication username and password.&lt;/span&gt;
&lt;span class="nl"&gt;userid&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="nl"&gt;passwd&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;password&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&amp;lt;/pre&amp;gt;&lt;/p&gt;
&lt;p&gt;Your login table should match. Use this SQL query (or make the changes using&lt;br/&gt;
your favourite SQL gui):&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;lt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="n"&gt;pre&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;gt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="n"&gt;use&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;databasename_rag&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;UPDATE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;login&lt;/span&gt;
&lt;span class="n"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;`&lt;/span&gt;&lt;span class="n"&gt;userid&lt;/span&gt;&lt;span class="err"&gt;`&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"[new user]"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;`&lt;/span&gt;&lt;span class="n"&gt;user_pass&lt;/span&gt;&lt;span class="err"&gt;`&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"[new password]"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;where&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;`&lt;/span&gt;&lt;span class="n"&gt;account_id&lt;/span&gt;&lt;span class="err"&gt;`&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&amp;lt;/pre&amp;gt;&lt;/p&gt;
&lt;p&gt;After the user and password is set, you can move on down the page.&lt;/p&gt;
&lt;h3 id="step-2-gitconflogin-serverconf"&gt;Step 2. {{git|conf/login-server.conf}}&lt;/h3&gt;
&lt;p&gt;Usually there is nothing to be done here in terms on connection. You may want&lt;br/&gt;
to edit your login_port to something other than default, but it must be an&lt;br/&gt;
unused port by your OS.&lt;/p&gt;
&lt;p&gt;You can find this out by starting all the services that you need on the server&lt;br/&gt;
and issuing the following commands to your console:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If using Windows:&lt;/strong&gt;&lt;br/&gt;
Goto Start, then click 'Run'. Type 'cmd' and press enter. Run the following&lt;br/&gt;
command:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&amp;amp;lt;pre&amp;amp;gt;netstat -a
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&amp;lt;/pre&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If using *nix:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&amp;amp;lt;pre&amp;amp;gt;$ lsof -i
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&amp;lt;/pre&amp;gt;&lt;/p&gt;
&lt;p&gt;Once you have selected a port if you're going to change it, your&lt;br/&gt;
/conf/import/login_conf.txt file should look as follows, with &lt;em&gt;no&lt;/em&gt; changes&lt;br/&gt;
made to {{git|conf/login-server.conf}} (again just copy pasting the lines we&lt;br/&gt;
want to change from one file to the other):  &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;lt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="n"&gt;pre&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;gt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="c1"&gt;// Login Server Port&lt;/span&gt;
&lt;span class="nl"&gt;login_port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;port&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&amp;lt;/pre&amp;gt;&lt;/p&gt;
&lt;h3 id="step-3-gitconfchar-serverconf"&gt;Step 3. {{git|conf/char-server.conf}}&lt;/h3&gt;
&lt;p&gt;This file sets parameters for the char-server to read. When you open this up,&lt;br/&gt;
there are a few things we need to do in here.&lt;/p&gt;
&lt;p&gt;Firstly we should name our server:&lt;/p&gt;
&lt;p&gt;When setting server_name, be sure to not use spaces as it says.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;lt&lt;/span&gt;&lt;span class="c1"&gt;;pre&amp;amp;gt;// Server name, use alternative character such as ASCII 160 for spaces.&lt;/span&gt;
&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;NOTE&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;Do&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;not&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;use&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;spaces&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;name&lt;/span&gt;,&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;or&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;guild&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;emblems&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;won&lt;/span&gt;&lt;span class="err"&gt;'t work client-side!&lt;/span&gt;
&lt;span class="err"&gt;server_name: [new server name]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&amp;lt;/pre&amp;gt;&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;lt&lt;/span&gt;&lt;span class="c1"&gt;;pre&amp;amp;gt;// Wisp name for server: used to send wisp from server to players (between 4 to 23 characters)&lt;/span&gt;
&lt;span class="nv"&gt;wisp_server_name&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;[&lt;span class="nv"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;server&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;name&lt;/span&gt;]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&amp;lt;/pre&amp;gt;&lt;/p&gt;
&lt;p&gt;Usually, Hercules will auto-detect your external and internal IP if the IP&lt;br/&gt;
fields are &lt;a class="" href="../commented%20out"&gt;comments&lt;/a&gt;, but let's go ahead and remove the two&lt;br/&gt;
slashes (//) from login_ip and char_ip.&lt;/p&gt;
&lt;p&gt;The login_ip will point to the IP address where the login server will be&lt;br/&gt;
running. Usually this is the localhost, or 127.0.0.1. If the login-server is&lt;br/&gt;
to be located on the same network as the char-server (but on a different PC),&lt;br/&gt;
use the LAN IP of the login server's machine. If you are running a dedicated&lt;br/&gt;
machine in a datacenter, or you know your IP is not going to change, you can&lt;br/&gt;
set this to your WAN IP.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&amp;amp;lt;pre&amp;amp;gt;// Login Server IP
// The character server connects to the login server using this IP address.
// NOTE: This is useful when you are running behind a firewall or are on
// a machine with multiple interfaces.
login_ip: [new ip here]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&amp;lt;/pre&amp;gt;&lt;/p&gt;
&lt;p&gt;The char_ip parameter will &lt;strong&gt;ALWAYS&lt;/strong&gt; be your WAN IP, no exceptions. This is&lt;br/&gt;
the IP that the char-server will accept connections with.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;lt&lt;/span&gt;&lt;span class="c1"&gt;;pre&amp;amp;gt;// Character Server IP&lt;/span&gt;
&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;The&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;IP&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;address&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;which&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;clients&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;will&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;use&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;connect&lt;/span&gt;.
&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;this&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;what&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;your&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;server&lt;/span&gt;&lt;span class="err"&gt;'s public IP address is.&lt;/span&gt;
&lt;span class="err"&gt;char_ip: [your wan ip here]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&amp;lt;/pre&amp;gt;&lt;/p&gt;
&lt;p&gt;If you changed the login_port in login-server.conf, this setting here will&lt;br/&gt;
need to match it.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;lt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="n"&gt;pre&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;gt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="c1"&gt;// Login Server Port&lt;/span&gt;
&lt;span class="nl"&gt;login_port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;port&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&amp;lt;/pre&amp;gt;&lt;/p&gt;
&lt;p&gt;Make sure to make any changes in the import folder as always.&lt;/p&gt;
&lt;h3 id="step-4-gitconfmap-serverconf"&gt;Step 4. {{git|conf/map-server.conf}}&lt;/h3&gt;
&lt;p&gt;This file sets parameters for the map-server to read.&lt;/p&gt;
&lt;p&gt;The char_ip will point to the IP address where the login server will be&lt;br/&gt;
running. Usually this is the localhost, or 127.0.0.1. If the char-server is to&lt;br/&gt;
be located on the same network as the map-server (but on a different PC), use&lt;br/&gt;
the LAN IP of the char server's machine. If you are running a dedicated&lt;br/&gt;
machine in a datacenter, or you know your IP is not going to change, you can&lt;br/&gt;
set this to your WAN IP.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&amp;amp;lt;pre&amp;amp;gt;// Character Server IP
// The map server connects to the character server using this IP address.
// NOTE: This is useful when you are running behind a firewall or are on
// a machine with multiple interfaces.
char_ip: [new ip here]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&amp;lt;/pre&amp;gt;&lt;/p&gt;
&lt;p&gt;The map_ip parameter will &lt;strong&gt;ALWAYS&lt;/strong&gt; be your WAN IP, no exceptions. This is&lt;br/&gt;
the IP that the map-server will accept connections with.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;lt&lt;/span&gt;&lt;span class="c1"&gt;;pre&amp;amp;gt;// Map Server IP&lt;/span&gt;
&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;The&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;IP&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;address&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;which&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;clients&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;will&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;use&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;connect&lt;/span&gt;.
&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;this&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;what&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;your&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;server&lt;/span&gt;&lt;span class="err"&gt;'s public IP address is.&lt;/span&gt;
&lt;span class="err"&gt;map_ip: [your wan ip here]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&amp;lt;/pre&amp;gt;&lt;/p&gt;
&lt;p&gt;Make sure to make any changes in the import folder as always.&lt;/p&gt;
&lt;h3 id="step-5-gitconfinter-serverconf"&gt;Step 5. {{git|conf/inter-server.conf}}&lt;/h3&gt;
&lt;p&gt;About midway down this file, you will find your SQL settings. These will be&lt;br/&gt;
set as accordingly.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The 'sql.db' settings control what the login-server reads for it's database settings. &lt;/li&gt;
&lt;li&gt;Hostname is the IP of the SQL server. &lt;/li&gt;
&lt;li&gt;Username is the username you use to login. For security, this should &lt;strong&gt;NEVER&lt;/strong&gt; be root! &lt;/li&gt;
&lt;li&gt;Password is the password that the user will login with. &lt;/li&gt;
&lt;li&gt;The database is set to whatever the database name will be. Usually, this is just 'ragnarok'. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you make any changes in here, copy paste the lines you change into&lt;br/&gt;
/conf/import/inter_conf.txt and modify them there.&lt;/p&gt;
&lt;h2 id="starting-hercules"&gt;Starting Hercules&lt;/h2&gt;
&lt;p&gt;When you're all done configuring Hercules, you can start it up. You can do&lt;br/&gt;
this by simply running each of the three servers, or athena-start.&lt;/p&gt;
&lt;h2 id="client-side"&gt;Client Side&lt;/h2&gt;
&lt;h3 id="diff-your-client"&gt;Diff your client&lt;/h3&gt;
&lt;p&gt;See &lt;a class="" href="../Hexing"&gt;Hexing#Creating_custom_RagRE_client_using_a_DIFF_patcher&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id="data-folder"&gt;Data Folder&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Download the most recent data folder &lt;a class="" href="http://svn6.assembla.com/svn/ClientSide/" rel="nofollow"&gt;here&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;Edit your &lt;a class="" href="/p/hercules/wiki/Clientinfo.xml/"&gt;Clientinfo&lt;/a&gt; as needed. &lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="connect"&gt;Connect&lt;/h3&gt;
&lt;p&gt;Execute your exe.&lt;/p&gt;
&lt;h2 id="trouble-shooting"&gt;Trouble Shooting&lt;/h2&gt;
&lt;p&gt;Its always best to post in the &lt;a class="" href="http://herc.ws/board/forum/31-client-side-support/" rel="nofollow"&gt;client&lt;br/&gt;
support&lt;/a&gt; sub-forum for&lt;br/&gt;
things that go wrong with the client, and &lt;a class="" href="http://herc.ws/board/forum/14-general-server-support/" rel="nofollow"&gt;server&lt;br/&gt;
support&lt;/a&gt; sub-forum for&lt;br/&gt;
things that go wrong with Hercules connecting or if errors pop up in your&lt;br/&gt;
server log.&lt;/p&gt;
&lt;h3 id="character_info-size-error"&gt;CHARACTER_INFO size error!!&lt;/h3&gt;
&lt;p&gt;To fix this, locate the src/common folder and open mmo.h in notepad. Find the&lt;br/&gt;
following line:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&amp;amp;lt;pre&amp;amp;gt;#ifndef PACKETVER
    #define PACKETVER 20110609
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Edit this Part, put:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;#define PACKETVER YOURCLIENTDATE
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;So if my client was 2011-10-25aRagexeRE it would look like:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;#define PACKETVER 20111025
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;span&gt;[Category:Configuration]&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brynner</dc:creator><pubDate>Mon, 20 Feb 2023 05:00:55 -0000</pubDate><guid>https://sourceforge.net4171d20ebccc0f464d3ecb25cbc53954fda1ed4d</guid></item></channel></rss>