So ya wanna build an FFXI Server eh!

Install and more!
Locked
User avatar
Enko
Member
Member
Posts: 63
Joined: Sun Nov 19, 2017 1:21 pm

So ya wanna build an FFXI Server eh!

Post by Enko » Thu Dec 13, 2018 10:32 am

I have had my own server for quite some time now. I use it for testing scripts, but also for testing missions and BCNMs to see the best way to tackle them before trying on Era and dying :)

There is a Tutorial on Darkstar, but I know people who have tried and failed so I will do this Tut and have a nice video to hold your hand.
https://www.youtube.com/watch?v=XvaJ9tU ... e=youtu.be

Ok, First you need some Files, download them all first to save confusion


FILES NEEDED

MySQL Community Server 5.7
https://dev.mysql.com/downloads/file/?id=481157
(use no thanks just start my download)

Something to interact with the MySQL Server (I use Navicat or PHP MyAdmin)
MySQL Workbench
http://dev.mysql.com/downloads/workbench/

Visual Studio 2017 Community (select C++ development and windows SDK during install)
https://www.visualstudio.com/downloads/

Git for Windows
https://git-for-windows.github.io/

Tortoise Git
https://tortoisegit.org/

Visual C++ Redistributable Runtimes 2015 (should already be installed)
https://www.microsoft.com/en-ca/downloa ... x?id=48145

Net Framework 4.6 or Later (should already be installed)
https://www.microsoft.com/en-us/downloa ... x?id=53344


INSTALLING THIS SHIT

MySQL 5.7
Check I accept licence ternms - Next
Leave settings at Default - Next
Check Requirements - Hit Execute for it to download and install Reqs.
Agree to any Requests to ok licence terms or close etc, you can ignore The ones that say manual. - Next
Agree to continue without products
Click Execute and wait for the components to install - Next
Group replication - Leave default - Next
Type and Networking - Leave default - Next
Accounts and Roles - Enter a Root password twice ***REMEMBER IT OR YOU ARE FUCKED*** In the vid I used EnkoEra
Windows Service - Leave default - Next
Plugins and Extensions - Leave Default - Next
Apply configuration - Click Execute - Click Finish
Product Configuration - Next - Finish
Connect to server - Enter the password for you Installation and click check - Next
Apply Configuration Click Execute when done click finish
Product Configuration - Next - Finish
Skip reboot as we will do this at the end


Installation is complete for you MySQL Server

MySQL Workbench
After it has opened fully, shut it down.

Visual Studio 2017
Click continue for VS to download Installer files and start installer.
Install Desktop development with C++ when selecting development packages.
Add the Windows 8.1 SDK and all Windows 10 SDKs on the right - Click Install


Git for Windows
Use Defaults


Tortoise Git
Use defaults

Visual C++ Redistributable Runtime 2015
Use defaults. (May error if already installed, ignore and move on)

Net framework 4.6 min
Probably comes with Virtual Studio.

Downloading the Server Source Code

Open Windows Explorer (File Explorer)
RIGHT CLICK on any folder select Git Clone
In the "URL" field put in the following url:
http://github.com/DarkstarProject/darkstar.git
Set the "Directory" to your choice (blank will default to current location\darkstar)
Click OK.
Wait for download to finish
Click Close
At this point you have downloaded all of the source code for the latest version.


Reboot your Machine

Next we are going to actually start building the server


This setup is for Server and game install on the same machine. Look in the addendum at the bottom for other options
Last edited by Enko on Thu Dec 13, 2018 2:01 pm, edited 13 times in total.



User avatar
Enko
Member
Member
Posts: 63
Joined: Sun Nov 19, 2017 1:21 pm

Re: So ya wanna build an FFXI Server eh! - Populate DB

Post by Enko » Thu Dec 13, 2018 10:35 am

Setting up the Game Database

Paste the following code into notepad and save as SetSQL.bat in the SQL folder of Darkstar

Below this Line ----------------------------------------------------------------------


@ECHO OFF

REM ====== by Thrydwolf 9/8/2012
REM ====== Updated with status by bluekirby0 3/30/2012
REM ====== Updated by Thrydwolf 9/18/2012


ECHO Creating Database dspdb
"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqladmin" -h localhost -u root -pMYSQLPASS DROP dspdb

ECHO Creating Database dspdb
"c:\program files\mysql\mysql server 5.7\bin\mysqladmin" -h localhost -u root -pMYSQLPASS CREATE dspdb

ECHO Loading dspdb tables into the database
cd c:\darkstar\sql
FOR %%X IN (*.sql) DO ECHO Importing %%X & "c:\program files\mysql\mysql server 5.7\bin\mysql" dspdb -h localhost -u root -pMYSQLPASS < %%X

ECHO Finished!
Pause

Above this line -----------------------------------------------------------------------

Ignore the password warnings


The items in RED will be your MySQL root password

Open MySQL Workbench
Tab Database > connect to Database
In dropdown choose Local Instance of MySQL57
Click Store In Vault and enter your MySQL Password and do Ok
Under Schemas double click DSPDB
Edit > Preferences > SQL Editor - scroll to the bottom and uncheck "Safe Updates"
Restart SQL Workbench
The following is for Client and Game on the same machine. See PART 4 for access from different machine / External
Highlight Query 1, click into the text box next to 1 and paste - UPDATE zone_settings SET zoneip = '127.0.0.1';
If you want to check do new query - select * from zone_settings where zoneip ="127.0.0.1"



This setup is for Server and game install on the same machine. Look in the addendum at the bottom for other options
Last edited by Enko on Thu Dec 13, 2018 2:01 pm, edited 4 times in total.

User avatar
Enko
Member
Member
Posts: 63
Joined: Sun Nov 19, 2017 1:21 pm

Re: So ya wanna build an FFXI Server eh! - Build Servers

Post by Enko » Thu Dec 13, 2018 10:40 am

Build The Server
This is to build the 3 DSP Servers Login, Map (main game) and Search servers

Open visual studio
Click File, Open, Project/Solution
Navigate to C:\dsp\win32 and Select darkstar.sln, be patient!
Watch the bar at the very bottom. Wait for Ready!
At the top change Debug to Release and Win32 to x64
Under Build Tab choose Build soloution, much patience!



Configure the Servers


Login Server

In windows explorer navigate to c:\darkstar\conf and Open login_darkstar.conf in notepad
Scroll to the bottom and change
mysql_password: root (change root to your MySQL Password)


Map Server

Same Dirctory Open map_darkstar.conf in Notepad
Scroll to the bottom and change
mysql_password: root (change root to your MySQL Password)


Search Server

Same Directory open search_server.conf
Scroll to the bottom and change
mysql_password: root (change root to your MySQL Password)


The servers are now set to connect to the MySQL servers
In c:\Darkstar start the DSConnect-server_64.exe
In c:\Darkstar start the DSGame-server_64.exe
In c:\Darkstar start the DSSearch-server_64.exe

If the window just closes, you haven't set your MySQL passwords correctly in the .conf files


This setup is for Server and game install on the same machine. Look in the addendum below for options
Last edited by Enko on Thu Dec 13, 2018 2:02 pm, edited 1 time in total.

User avatar
Enko
Member
Member
Posts: 63
Joined: Sun Nov 19, 2017 1:21 pm

Re: So ya wanna build an FFXI Server eh! - Addendum - Other Options

Post by Enko » Thu Dec 13, 2018 10:46 am

To Access your server From other machines on the same network.

The following is for accessing the Game on the same local network.
Get the IP Address of your server. Easiest way is to open a CMD box and type ipconfig
Make a note of the IPv4 Address in my case 192.168.1.149 (you will want to set this as static later probably)
Restart SQL Workbench
Highlight Query 1, click into the text box next to 1 and paste - UPDATE zone_settings SET zoneip = '192.168.1.149';
If you want to check do new query - select * from zone_settings where zoneip ="192.168.1.149"

In your windower / ashita set --server 192.168.1.149 --user --pass

To Access the server From the internet.

Get the External IP Address of your server. Easiest way is to google WhatsMyIP
Make a note of your Public IP Address in my case something like 83.199.32.111 (Made up of course)
Restart SQL Workbench
Highlight Query 1, click into the text box next to 1 and paste - UPDATE zone_settings SET zoneip = '83.199.32.111';
If you want to check do new query - select * from zone_settings where zoneip ="83.199.32.111"

You need to forward ports in your router / firewall to allow players to join from outside
Open the following ports and forward them to your Server LOCAL IPv4 address (in this case it was 192.168.1.149)


Next I will show you how to make your Char GM and set out some GM Only Commands.

User avatar
Enko
Member
Member
Posts: 63
Joined: Sun Nov 19, 2017 1:21 pm

Re: So ya wanna be a [GM] eh!

Post by Enko » Thu Dec 13, 2018 12:59 pm

Video is here - https://www.youtube.com/watch?v=IG0jtVH ... e=youtu.be

Download HeidiSQL 9.5
https://www.heidisql.com/installers/Hei ... _Setup.exe
Run and put your MySQL password in the Password box
Hit Open
On the left choose dspdb
In the right window, double click Chars
On the top use tab Data
Scroll to the right until you come to GMLEVEL
Double click in the Area under that with 0 in it
Clear that and put 4 in and hit return


You are now ready to [GM] in game.
Log in and do /s !togglegm and you will see the GM icon above your head. Time for some fun!

This is the DSP Wiki Page for GM Commands. I will show some of the most common below
https://wiki.dspt.info/index.php/GM_Commands

All commands start with ! ex /s !togglegm

Additem itemID amount Get the item id from your DB or this page https://wiki.dspt.info/index.php/Basic_Item_IDs
Addkeyitem itemID amount Get the Key item id from your DB or this page https://wiki.dspt.info/index.php/Key_Item_IDs
Zone zonenumber (or type part of the zone name and use tab to select)
Godmode You want immortal, here it is
Changejob JOB LVL ex - setjob BLM 99
Changesjob same as above for Sub job
pos ex pos 33 -29 241

Try a few then read all the commands on the Wiki. And... have fun

Hit me up if you have any questions

Enko

Locked