Intro
It's a strange thing to try and rebuild a dead MMORPG that was deemed "a failure". Especially when the game still lives on in a new form. I feel like 1.0 is still a historical relic of FFXIV and players should be able to visit it and check it out. The game itself is also chalk full of lore that got cut off after the calamity and it would be nice to be able to revisit and experience those parts of the story. It's also something for me to do after 3.0 turned a bit dull as I wait for 3.1 :P. Regardless, I hope you have a fun time looking over my progress posts and maybe in the future enjoy playing on the server itself (once it's released)!
The Seventh Umbral Server
I'd be a lying if I said the server was all done by me. In fact, this started off as a continuation of the "Seventh Umbral" project. Some of you may have heard of it, but basically it was the first and earliest attempt at building a server emulator for FFXIV 1.23b. I was watching the project closely and was disappointed that no update to the code had happened for over a year. So I decided to continue the project and add features that were missing. The current version of the SU server let's you do some basic things:
- Login to a pre-defined character only. No lobby functionality other than select character is implemented. The character can be modified using acontrol panel on the SU website.
- Basic script functionality, mainly to open the cutscene book and exit the inn to the world.
- Some simple commands to teleport between various zones at pre-defined spots, ride a chocobo, and change the weather.
- A simple battle system.
Luckily the creator had figured out a lot of the ground work which sped up progress on figuring out the more "interesting" things. I decided to check out the source code and see what I could do to add to it. Setting up the project turned into a bit of a mess. The game used a lot of dependencies from the Boost library, to the creator's own frameworks used in PS2 emulation (so it seemed). Not only that, the whole solution was filled with different projects related to reading FFXIV's game files. It took me a day or two due to my inexperience with Visual Studio but after tons of fiddling, I finally got the message:
Build: 1 succeeded
I booted up the server and connected using the SU launcher. I selected the pre-defined character and he woke up in a Gridanian inn, 5 years before 2.0, with a giant red moon looming over in the sky. It seemed that everything worked!
First changes
I began to look over the source code and get an idea of how the server and game worked. That is where I learned the server was never designed to actually be multiplayer. Ever player is running in their own separate instance, forever walled off from each other (I am getting Pink Floyd's "Hey You" imagery here). Still, I was able to figure out and implement the chat system (say, yell, and tell) as well as some of the missing scripts for the Armoire and the Bed. To aid in getting around blocked doors (they can't open), I added in a custom teleport command as well as one to get your current position. However one thing really annoyed me; the fact that you had to use some external website to manage your characters. That and you only got one character per account. So I decided to switch work to figuring out the lobby server.
The lobby server
The way SU was designed was that both the lobby and map servers were handled on the same program. I decided to split them since that is how they are suppose to run, and if you ever wanted the lobby to handle more than one server, you'd have to do that anyway. To help figure out the various packet opcodes, I booted up OllyDbg and checked out what was going on underneath the hood. Turned out that the game was still firing off debug messages! Thanks to this, I was able to figure out the modification opcode and it's subcommands: charaReserve (checks if a name is available and makes a DB entry), charaMake (fills the entry with chara info), charaDelete, charaRename, charaRenameRetainer. I was able to implement these functions, as well as the lists that get sent to the client when getCharacters is fired: the Account List, World List, Import Names List (used to import FFXI names into ARR), and Character List. After a month of work, I had completed the lobby server and 90% of the functionality is there. The only thing missing is some GM commands that I could not figure out.
The map server
Because of the limitations of the SU server, and my own when it comes to C/C++ programming, I decided to write the map server from scratch in C#. So far I've implemented the groundwork and the first few login packets. Unlike SU, these are not hardcoded from the sniffed files he provided, rather filled in with the correct information to allow multiple users. In SU everyone has the same "Actor ID" (the same init packet is sent to everyone)... I've given a unique one for everyone allowing communication between the various clients. I have also documented many of the actor initialization packets, which theoretically should mean NPCs, objects, and even other players should be easily creatable. I'll still be using SU as a test bed but hopefully in the coming months the FFXIV Classic server should overtake the functionality of SU.
Anyway, I hope you have a fun time reading the various progress updates I post as I learn more and more about how FFXIV 1.23b worked!