Loading...   

[Show Table of Contents]


§Windows Private Login Server Setup Guide

  • Credits: Based on a post by PallbearerX
  • This guide should be used in conjunction with the current Windows Server Setup guide (henceforth referred to as "the server setup guide"). It assumes you have gone through that guide at least once (or at least read and understood it) and are therefore familiar with how to get the source code, required tools etc.
  • If you wish to run your own login server for local access (perhaps during development or you wish to play only with people on your LAN), then there are a number of steps you must go through to achieve this, and, unless you initially enabled EQEMU_BUILD_LOGIN will also require a recompilation of your server code. 

§Step 1: Enable EQEMU_BUILD_LOGIN

  • Run CMake again as detailed in step 4 c) of the server setup guide. Ensure EQEMU_BUILD_LOGIN is ticked.
  • Click on Configure then Generate.

§Step 2: (Re)Compile the source code

  • Open the new EqEmu.sln in Visual Studio, right click the "ALL_BUILD" project and select "Build". Some items will be "skipped" if you are not compiling for the first time. There should be no failed projects.

§Step 3: Copy the executable.

  • If compilation was successful, you should have a loginserver.exe in your \EQ\Source\Build\Bin\Debug directory
  • Copy the loginserver.exe (and loginserver.pdb optionally) from the \EQ\Source\Build\Bin\Debug directory into the \EQ\EQEmuServer directory.

§Step 4: Create the necessary database tables.

  • This assumes you have fetched the database files as detailed in the server set up guide section 6 a). One of those files that you have until now ignored is "load_login.sql'.
  • Open up a command prompt. Navigate to the directory in which load_login.sql is stored. e.g.

cd C:\EQ\SQL

  • Then type

mysql -uroot -ppassword peq

  • where password is the password you chose when installing MySQL, and "peq" is the database name you chose (change it if you didn't call it peq!). When the mysql prompt comes up, type:

source load_login.sql;

  • The database tables are now created.

§Step 5: Create a login account.

  • You now have the required database tables, but they are empty and so no one will be able to log in yet. Open up either HeidiSQL or just do this in the mysql prompt:-
INSERT INTO tblloginserveraccounts (AccountName,AccountPassword,AccountEmail,LastIPAddress,LastLoginDate)
VALUES ('your_account_name',sha('your_password'),'me@me.com','127.0.0.1','2014-01-01 00:00:01');
  • Changing 'your_account_name' to the name of the account you wish to create, 'your_password' to the password you want to use. Of course, you can create as many accounts as you like this way.

§Step 6: Edit eqemu_config.xml to point to your login server.

  • Open up your eqemu_config.xml file in an editor, find the section and alter it as follows:-

  127.0.0.1
  5998
  
  

  • NOTE 1: 5998 is the correct port. Do not confuse changing the EQ client's eqhost.txt file port with changing the login server port.
  • NOTE 2: The account and password are intentionally left blank. Leave these blank!

§Step 7: Recreate/edit startup.bat

  • You need to have your login server run first so alter (or create) startup.bat
@echo off
shared_memory.exe
start loginserver.exe
start world.exe
echo Waiting for the world to finish loading before starting zones...
ping -n 10 127.0.0.1 > nul
start queryserv.exe
start ucs.exe
start eqlaunch.exe zone
exit

§Step 8: Download and copy new dependencies

  • Go to  http://eqemu.github.io/ and download Windows_LoginServerCrypto.zip. Unzip it and choose either the x64 or x86 version of EQEmuAuthCrypto.dll. If you did not elect to build everything as 64 bit, use the x86 version. Copy this file into your EqEmu folder where your executables are (e.g. C:\EQ\EqEmuServer\ )

§Step 9: Setup login.ini

  • In the \EQ\Source\loginserver\login_util folder, edit the login.ini file and provide DB access information.
[database]
host = 127.0.0.1
port = 3306
db = peq
user = root
password = your_password
subsystem = MySQL
  • Then, copy the following files from the \EQ\Source\loginserver\login_util folder to the \EQ\EQEmuServer folder.
login.ini
login_opcodes.conf
login_opcodes_sod.conf
  • Congratulations! Fire up your start.bat, ensure your clients eqhost.txt file is pointing to 127.0.0.1 and you're good to go!