Friday, December 28, 2018

Source code and project files for RZN's MapLib & MapViewer now available!

Big announcement, everybody! Our good friend atom0s managed to finally get ahold of RZN today, and RZN gave atom0s full permission to share the source code and project files for his old MapLib and MapViewer projects in the hopes that doing so will help others in FFXI's modding community. For those who don't know, these two programs are essentially model viewers for zones (MapViewer for viewing the zones, and MapLib for extracting and saving the zones). RZN's source code and project files used to be available on an old version of the FFEvo website which, unfortunately, was lost in a hardware failure back in 2015. FFEvo itself has since returned, but none of the old data could be recovered. Thankfully, atom0s had a backup copy of RZN's source code and project files saved on his own personal hard drive, and he has apparently been sitting on these files for several years. Though out of respect for RZN's privacy, atom0s has been keeping the files to himself until such a time when he could manage to contact RZN and get his permission to share the files with others. And on the morning of Friday, December 28th, 2018, that's exactly what happened! Contact was finally made, and RZN gave atom0s his blessing to share his source code and project files with the world.

You can download RZN's projects below:


Downloads:

Source Code & Project Files:
RZN's MapLib
(Size: 12.0 KB)

  • Source code to the MapLib project by RZN.
  • This lib can open and dump the map DAT files for all areas before the Adoulin expansion.
  • Permission was granted by RZN to allow atom0s to share this source code on Dec. 28, 2018.
  • The source code in this repository is © 2015-2018 to RZN.
RZN's MapViewer
(Size: 40.0 KB)

  • Source code to the MapViewer project by RZN.
  • Permission was granted by RZN to allow atom0s to share this source code on Dec. 28, 2018.
  • The source code in this repository is © 2009-2018 to RZN.
NOTE: In order to compile and run the above source code, you will need to either install the DirectX9 SDK, or at least download the d3d9 header files and libs, and then in Visual Studio add an include path to wherever you saved them.


Compiled, Stand-Alone Applications:
RZN's MapLib
(COMING SOON!!!)

Program library used to generate data -- i.e. extract and save the 3D geometry of zone/areas so they can be imported into other programs. MapLib can read all zones except the ones from the last expansion pack, Seekers of Adoulin.
RZN's MapViewer
(Size: 144 KB)

Application used to view maps (the word "map" here refers to the 3D geometry of the zones/areas).

The following is a simple set of instructions I've put together.

Controls:

Key

Action

Up Arrow Key Move foreward.
Down Arrow Key Move backward.
Right Arrow Key Rotate clockwise.
Left Arrow Key Rotate counterclockwise.
Page Up Move down.
Page Down Move up.
Ctrl Increase speed.
Home Reset position.

Wednesday, December 19, 2018

GalkaReeve's Map Viewer — Model Viewer for Zones

Since 2016, the source code of an unfinished map viewer program for FFXI has been available on the GitHub respository of a Reddit user known as GalkaReeve. You can either download his original source code and project files and compile them yourself, or you can download a standalone application which I compiled myself. The link to the already compiled version is provided further down below in this blog post.

Download Source Code & Project Files:
GalkaReeve's GitHub repository
(Size: 212 MB)

    19 May 2016

    • fix a bug that cause premature stop in extracting dat. Main reason why some dat have missing MMB & img.
    • add a default VAO creation, to fix no Model/Map display for window 10. User need to update latest glm/glfw3 as well, else it will generate compile error.
    • fix DXT3 convert error, should be using BCD2Decode.
    • NOTE: for user that encounter GLFW3 crash when calling glfwInit(), u have to goto Project Properties -> C/C++ -> Code Generation -> Runtime Library, change /MDd to /MD

    7 June 2016

    • fix transparency for mapViewer
    • add func 'v' to view individual Model within each MMB.
    • Note: mapViewer uses VisualStudio NuGet Manager for opengl, glfw2, glew. The packages is 'nupengl.core' access thru 'Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution'
    • Remember to change --- char ffxidir[512]="E:\Program Files (x86)\PlayOnline2\SquareEnix\FINAL FANTASY XI\"; to your folder.
In order to compile GalkaReeve's code, you will need to setup OpenGL Mathematics (GLM) in the project after you've downloaded it. GalkaReeve's code requires GLM, but does not include it. If you're having difficulty figuring out how to setup GLM, watch the following YouTube video tutorial:
Note that the above video is a generic tutorial about setting up GLM for any project, and is not specifically related to GalkaReeve's Map Viewer, or even to FFXI. It's just about setting up GLM in Visual Studio. I did not make this video.

If you'd like additional information about the project from GalkaReeve himself, there's an old Reddit post of his from three years ago, which you can read at the following link:

Reddit Topic: ffxi dat reverse engineering

As you can see, GalkaReeve has (or rather had) multiple FFXI projects in the works, but his mapViewer program is the one I want to focus on. The program hasn't been updated by GalkaReeve himself since 2016, so I'm assuming he has abandoned the project. And so, for the sake of everyone's convenience, I've taken the liberty of compiling his source code into a standalone application and uploading it to my own DropBox account. You can download the program at the following link:

Download Compiled, Standalone Application:
GalkaReeve's Map Viewer
(Size: 2.04 MB)

    At the moment, this program only works if you have FFXI installed in the default directory, which is as follows:

    C:\Program Files (x86)\PlayOnline\SquareEnix\FINAL FANTASY XI\

    If you have FFXI installed in any other directory, or under any other drive letter besides the 'C' drive, the Map Viewer program will not run. I plan to eventually fix this when I have time, but I don't know when that will be.


The following is a simple set of instructions I've put together. Note that I figured out these commands through my own experimentation with the program, and as such, this list may be incomplete.



Controls


Standard Mode:

Key

Action

Notes

ESCQuit ProgramExits the program.
Arrow KeysMove aroundAllows user to navigate the zone by moving the camera around.
MouseAim Camera Allows user to point the camera in a particular direction.
Page UpNext ZoneLoad the next zone.
Page DownPrevious ZoneLoad the previous zone.
WToggle wireframe modeToggles between normal rendering and wireframe rendering.
JGet ID of geometry piece?Warning!!! Crashes the program!!!
CDraw CubeDraws boxes around each geometry chunk.
XToggle model inclusive/exclusiveSeems to toggle between two pieces when viewing an individual chunk.

Visible Set Mode:

Key

Action

Notes

SEnable potential visible set*
DUnknown subcommand*
FUnknown subcommand*
* I haven't figured out how to enable visual sets, so I can't tell what any of the above commands actually do. However, I do know that with no visual set enabled or selected, pressing either 'D' or 'F' prints the following line of text to the console window:
"press S to enable Potential visible set"

Dual Camera Mode:

Key

Action

Notes

GToggle Dual CameraEnables a second rendering camera separate from the viewing camera.
EToggle EyeWhile Dual Camera mode is enabled, press 'E' to activate the "Eye" (i.e. second camera) and use the arrow keys and/or mouse to move the Eye around.
CDraw Cube / View FrustumDraws boxes around each geometry chunk, and also draw the Frustrum (viewing cone) of the "Eye" (second camera)

Octree Mode:

Key

Action

Notes

ORemove octreeToggles between viewing the entire zone and viewing one individual chunk of geometry.
MSwitch between MMB/MZBToggle between object prefabs (MMB) and instances (MZB).
VView sub-pieceCycle through all the various sub-pieces of the currently selected individual chunk.*
*Pressing 'V' outside of Octree Mode prints the following line of text to the console window:
"To view individual MMB/MZB, press 'O' to remove octree, 'M' to switch, 'V' to view subPiece"



There may be more that this program can do, but those are all the functions I can figure out for now. If anyone else thinks they can add to this list, please let me know. Thanks.

Friday, December 14, 2018

JediFirefly Gaming: Old DAT Modding Tutorials from 2008

Here's some old videos from ten years ago (Jesus Christ has it really been that long!?) that go over some of the basics of simple DAT swapping, as well as editing models in a program called Virtual Reality Studio (VRS). I did not make these videos. I'm simply sharing them here for the sake of convenience.

DAT Modding Part 1 - Basic DAT Swapping:


Basic DAT Swapping - Taking 1 in-game model and switching it for another.

DAT Modding Part 2 - Basic DAT Swapping 2:


Basic DAT swapping using downloaded DAT mod's instead of in-game models.

DAT Modding Part 3 - Basic DAT Editing:


Basic DAT editing - Removing unwanted parts of an armor model.