How to use the old Mabinogi launcher for extra nostalgia (rev. 2 by Kerrich on 05-10-17, 07:41 am)
Posted at 05-10-17, 07:25 am Link | #1
Kerrich

Posts: 7
Joined: 05-07-17
Last post: 2766 days
Last view: 2727 days
TL;DR Guide at bottom.
P.s. I'm sorry.
P.p.s Probably not worth it to event bother.
P.p.p.s I need a new "hobby".

Since I already wasted several hours into understanding how the thing works, to the best of my limited ability to do so, because of butthurt over direct launch being taken away I've decided to post about it since otherwise that time was "wasted".

*Note: version 181 of the launcher will just popup a message about direct launch being discontinued so you'll need to find an older version. I believe if you do a fresh install from Steam you'll get version 162. You can also download it from the Mabinogi ftp server.

When you open the Mabinogi Launcher, Mabinogi.exe, it first looks for a file called "client.exe" it doesn't even have to be valid, it just has to exist so a blank text file you renamed to client.exe is enough to make it go to the next step.

Next it checks whether it is the latest version of the launcher/game and where the server is by reading the patch info file located on Nexon's web server, http://mabipatchinfo.nexon.net/patch/patch.txt This is hard coded into the launcher and can be edited in a hex editor (a domain or IP address is acceptable), at least to some degree (probably because they didn't sign it). This is the 1st of 2 files (that I've found so far) that need to be on a web server(excluding the launcher's html page).

Up to a certain point the parameters/arguments/variables (whatever you call them) in patch.txt need to be in a specific order otherwise the launcher gets upset.
The launcher writes it's error log to "C:\Users\{username}\Documents\Mabinogi\Report error"

At the time of this writing the official server's patch.txt looks like this:
patch_accept=1
local_version=250
local_ftp=mabipatch.nexon.net/game
main_version=250
main_ftp=mabipatch.nexon.net/game
launcherinfo=181
login=208.85.109.35
arg=chatip:208.85.109.37 chatport:8002 setting:"file://data/features.xml=Regular, USA"
lang=patch_langpack.txt

Everything from patch_accept to login are required to exist, be in that order, and somewhat valid.
patch_accept=0 tells the launcher that the game is down for maintenance.
I haven't fully experimented with them but it appears that the client will use the highest number between local_version and main_version.
You can change the ftp server to be your own ftp server.
The launcher will try main_ ftp first then local_ftp if it fails.
launcherinfo is the version of the launcher. If the version of the launcher is less that the version specified then it will connect to the ftp server and check Mabinogi.txt for more info.
The launcher sends "anonymous" as the user and "User@" as the password.

Mabinogi.txt is structured like so.
1
launcher_181.bin,1189968,2FAA61C9F679B90356C5A0081E4E5BD2

The "1" is the total number of files to download. launcher_181.bin is the name of the file(s) to download. 2FAA61C9F679B90356C5A0081E4E5BD2 is the md5 hash of the file.
After the launcher downloads it, it gets renamed to Mabinogi.exe and replaces the current launcher.

Next is patching/downloading the game. First it checks the current version's folder on the ftp server for {local ver #}_to_{current ver #}.txt which tells the launcher which files to download to update to {current ver #}. This file is structured similarly to Mabinogi.txt

Nexon's 246_to_247.txt
7
246_to_247.000, 10485760, 6b3096bb72b530af04a6faacc401e1f0
(skipping to the end)
246_to_247.006, 1333891, e795a37105f16df41100777a3f067585

The patch files are a zip archive that was split.
If you download all of the parts of the patch you can manually reassemble them by using "copy /b" on Windows then just copy the zip archive's contents into the game's folder and overwrite.

If version.dat does not exists or the local version is too far from the current version(unverified) the game will look for {current ver #}_full.txt to download the full install archive.

lang tells the launcher the name of the file that tells the launcher where to get the language pack file. lang is optional
patch_langpack.txt is the 2nd of the 2 files (that I've found so far) that need to be on a web server.

patch_langpack.txt is 54 bytes and largely in hex

The last patch_langpack.txt Nexon had looked like during ver 249:
87 51 FE 5D 1A B4 D2 01 87 51 FE 5D 1A B4 D2 01 FF E7 36 20 20 20 20 20 96 86 24 79 8D 1F 87 1C C5 3F E8 27 9A 61 50 B1 32 34 39 5F 6C 61 6E 67 75 61 67 65 2E 70 5F

I don't know what the 1st 24 bytes are for. Bytes 25 through 40 are the md5 hash of the language pack file. Bytes 41 through 54 are the name of the language pack file.
The language pack file needs to be on the ftp server in the same folder as the current version.
Said otherwise the name of the file to download is 249_language.p_ it is in the 249 folder on the ftp server and the md5 hash is 968624798D1F871CC53FE8279A6150B1.
249_language.p_ gets renamed to language.pack and put in the package folder by the launcher.

Lastly login & arg. These are the IP of the login server (208.85.109.35) IP of the chat server(208.85.109.37) port of the chat server(8002) and where to load the translation from("file://data/features.xml=Regular, USA") (Not completely sure about that last one)

Misc: I dug through the launcher and found several possible additional parameters.
Client parameters:
piurl: (couldn't figure this one out) (patch info url?)
latestfullver: (didn't seem to work)
latestver: (didn't seem to work)
dir/w (didn't test, is it even a parameter?)
domain: (didn't test)
npc (didn't test, is it even a parameter?)
devftp: (didn't test)
ftp: (does work)
copylauncher
launcherver: (does work)
clientver: (didn't test)
forcemainftp mode (didn't test, is it even a parameter?)
forcemainftp (didn't test, is it even a parameter?)
force_updatelauncher mode (didn't test, is it even a parameter?)
force_updatelauncher (didn't test, is it even a parameter?)
force_patch mode (didn't test, is it even a parameter?)
force_patch (didn't test, is it even a parameter?)
ExePatcher mode (didn't test, is it even a parameter?)
/ngm_install (didn't test)
/localize (didn't test)
Uninstaller mode (didn't test, is it even a parameter?)
/uninstall (didn't test)
divied_data_drive: (didn't test, is it even a parameter?)
/divied_data_drive: (didn't test)
divied_installer_file_path: (didn't test, is it even a parameter?)
/divied_installer_file_path: (didn't test)
/download_install (didn't test)
Copy Installer mode (didn't test, is it even a parameter?)
/vista_install (didn't test)
Divied Installer mode (didn't test, is it even a parameter?)
/divied_install (didn't test)
Installer mode (didn't test, is it even a parameter?)
/install (didn't test)
/Steam (didn't test)
/NPP: (didn't test)
/P: (didn't test)
/T: (didn't test)
/V: (didn't test)
/N: (didn't test)
patch.txt parameters:
dumpip (didn't test)
main_fullversion (works, can be used to tell launcher what version the last full version is or something like that) (don't know what will happen when the version number difference gets too large)
local_fullversion (didn't test)
main_ftp_list (didn't test)
ping (didn't test)
addin (didn't test)

Todo: Look into possibility of changing the url that the launcher loads it's splash page (is that what it's called?) from.

-------------------------------------------------------
Wrapping it all together I bring you the guide.

1. Setup a web server & ftp server
1a. *Optional: repackage the client and host it on your server (the launcher had an issue unpacking the videos so I didn't package them, probably won't fix because it was a real pain manually putting all of that together)
2. Create & host patch.txt* where your launcher can find it.
3. Point launcher to server by editing launcher or the host file to point mabipatchinfo.nexon.net & mabipatch.nexon.net (they probably aren't using them any more since the dropped direct launch).
3a. *Optional: watch as the launcher downloads your packaged client
4. ??????????
5. Profit.

* my patch.txt looks like this:
patch_accept=1
local_version=224
local_ftp={IP of local ftp}
main_version=224
main_ftp={IP of local ftp}
launcherinfo=162
login={Mabi.pro server IP}
main_fullversion=208
arg=chatip:{Mabi.pro server IP} chatport:8002 setting:"file://data/features.xml=Regular, Japan"
Posted at 05-10-17, 10:21 am Link | #2
Drahan GM

Posts: 2147
Joined: 02-06-17
Last post: 310 days
Last view: 37 days
This will certainly work, but you must change that setting to the same setting MabiPro uses, which is Regular, Japan.
Also, our patch system is incompatible, so you will have to manually patch after you do this.
Posted at 05-11-17, 12:22 am Link | #3
Kerrich

Posts: 7
Joined: 05-07-17
Last post: 2766 days
Last view: 2727 days
This will certainly work, but you must change that setting to the same setting MabiPro uses, which is Regular, Japan.
I am aware (It's at the very bottom) however I do agree that I didn't call out this point adequately.
Also, our patch system is incompatible, so you will have to manually patch after you do this.
Also a very valid point, one I hardly touched upon if at all. One would have to check for updates periodically and manually patch or repackage them and put them on the ftp server for the launcher to apply.
Terms

Powered by mabi.pro v1.0034-arisa (View credits)
MabiPro is not associated with Nexon Co., Ltd. in any way shape or form.