Feel free to contribute, make pull requests, open issues, etc.
Please be respectful of peoples wishes.
This project is in its infancy and has no reliable active developer, no documentation, and no support.
This project has been solely developed in my spare time for the educational experience of making a server emulator, which I haven't done before. Expectations regarding functionally and code quality should be set accordingly.
WARNING: All current features can be assumed to be very limited or buggy.
Currently allows a JP MHF client (with GameGuard removed) to:
- Login and register an account (registration is automatic if account doesn't exist).
- Create a character.
- Get ingame to the main city.
- See other players walk around.
- Do quests:
- Only quests shipped with the game are on the counter.
- Requires binary quest files not in the repository.
- Use (local) chat.
- Partial guild support.
The erupe server is still heavily in development and you should expect numerous bugs, crashes, and other unintended behavior during use.
Really take a moment to figure out why you want to do this setup, and if you're capable enough to do it. This guide tries to make everything as simple as possible, but will still require a fairly good understanding of how computers operate.
This server is experimental, many bugs, crashes, and other unintended behavior WILL occur. This is not suited for gameplay, you can play the game, but keep in mind the above. This is primarily for development and research purposes.
This guide is intended for use on Windows 10 platforms.
- Download the code repository (repo) using the dropdown within the green “Code” button and choose: Download ZIP.
- Extract the contents of the folder into the directory of you choice (I would recommend avoiding Program Files due to possible permission errors).
- Download the PostgreSQL Installer for your operating system and choose the latest PostgreSQL version.
- Run the Installer
- Ensure these components are checked to install:
- PostgreSQL Server (the actual database technology).
- pgAdmin 4 (a GUI management tool for our PostgreSQL server).
- Command Line Tools (a command line tool for managing PostgreSQL servers) - not used in this tutorial but you’ll want it for some management stuff in the future.
- Select the Data Directory of your choice (the default pre-filled option should be fine).
- Create a password for the default database user (postgres).
- Select a port for the database server to listen to (the default 5432 should be fine).
- Select the Locale (the default should be fine).
- Finish the installation.
- Ensure these components are checked to install:
- Download the Golang Installer for your operating system.
- Run the installer using the default options.
Step 4: Prepare the Database & Install Migration Tools (Facilitates setting up the tables to store information in the database)
- Open pgAdmin 4 and connect using the credentials you supplied in the Download and Install PostgreSQL steps (the default username is postgres).
- Right click on your PostgreSQL server and select Create -> Database (photo below for assistance).
- Fill in the Database field with the value:
erupe
.- Click save.
- You should now see a second database called
erupe
created in the browser on the left.
- Download the latest version of PowerShell from its Github releases page.
- Most users will want the file under assets named something like:
PowerShell-7.0.4-win-x64.msi
(the version may change depending on when you access this page). - Run the installer.
- Most users will want the file under assets named something like:
- Open Powershell and use it to install Scoop by typing the command:
iwr -useb get.scoop.sh | iex
. - Install golang-migrate by opening a new Powershell window and typing the command:
scoop install migrate
.
- Navigate to the root directory of your erupe server files (image for context below).
- In the file browser path, type in cmd and then press enter to launch a command prompt at this location.
- Run the command:
migrate -database postgres://postgres:password@localhost:5432/erupe?sslmode=disable -path migrations up
.- NOTE: Replace the
password
with the password you set up during the database installation step. If you changed the default port from 5432 during the database installation step, replace it.
- Open the
config.json
file with the text editor of your choice. - Under the “database” section, find the port, username, and password fields and change their values to be whatever you chose during the database installation steps.
- NOTE: You may not need to change the port value if you kept the default
5432
port. The default PostgreSQL username ispostgres
. - Replace the 127.0.0.1 (localhost) with your external IPV4 address (of your router).
Your network is set to block incoming requests by default (so that malicious actors aren’t able to get into your network), but sometimes we want users outside of our network to be able to reach services (for example, the server software) without being stopped by our network security. The solution to this is port forwarding, where we essentially say “Hey, if users try to reach resources on this port, let them through”.
In the config.json, there are port entries for the following services (these values can change if you’ve edited your config to use non-default values):
Database: 5432
Launcher: 80
Sign: 53312
Channel: 54001
Entrance: 53310
You will want to forward ports for everything below the line. You could forward the port for the database, but you likely don’t want external users having access directly to the PostgreSQL database because they interact with the server which interacts with the database on their behalf. If you forward the port for the database, the only thing stopping users from doing anything they want on your database instance is not knowing your database user (which is the default postgres so they actually do know that) and its password (which they really shouldn’t know). If that password is compromised, all bets are off. In short, don’t port forward the database port unless you have a reason to and know what you’re doing. Once you’ve forwarded these ports for the various services that use them, outside clients IN THEORY should be able to connect to your server (once it’s running in Step 7).
- Navigate to the root directory of your erupe server files.
- In the file browser path, type in cmd and then press enter to launch a command prompt at this location.
- Enter the following command:
go run .
. - Assuming everything has been set up correctly, you should now have a functioning server that clients are able to connect to (they need to follow the section about adding entries to their hosts files here, but instead of 127.0.0.1 they should be entering the IP you found in step 6.
- In short, what this does is change the outbound request for the urls (example being
mhfg.capcom.com.tw
) routing from that actual location to the newly specified IP address. This enables the server to get this request and act as if it’s the (now offline) Capcom server. - If you want to play the game on the same machine you’re hosting the server on, you also need to do the host entries instructions above but you WILL KEEP the
127.0.0.1
entries.
- In short, what this does is change the outbound request for the urls (example being
- To close the server, press
CTRL + C
.
- Get the MHF-ZZ_Installed_Files.zip from archive.org.
- Extract the contents of this folder wherever you want the game.
- Download the latest Python 3 release.
- Install and MAKE SURE YOU SELECT THE OPTION TO ADD PYTHON TO PATH.
- Open a new command prompt (not a python shell).
- Enter the command:
pip install frida
.
- Within your
MFH-ZZ_Installed_Files
folder (or whatever you named the folder containing mhf.exe) either download this script or copy and paste it into the same named file within this directory. - NOTE: This has to be done for two reasons, there are protections on the mhf.exe itself called AsProtect and an
Anti-CheatMalware program called GameGuard. Both prevent us from being unable to connect to private servers, and this python script bypasses both to allow us to successfully launch the game.
- We need to fool our client into thinking it’s reaching out to the official capcom jp or tw servers when in reality it’s connecting to our local ip (127.0.0.1) or an external host ip (the external ipv4 address of whomever is hosting).
- Navigate to
C:/Windows/System32/drivers/etc/hosts
and add the following entries:
127.0.0.1 mhfg.capcom.com.tw
127.0.0.1 mhf-n.capcom.com.tw
127.0.0.1 cog-members.mhf-z.jp
127.0.0.1 www.capcom-onlinegames.jp
127.0.0.1 srv-mhf.capcom-networks.jp
NOTE: Any time you’re messing with files in System32, really take an extra minute to verify you know what operation you’re doing and why. I imagine a lot of less technically inclined people will try this, and in general anytime you find yourself in some part of the System32 directory ensure that you’re not being led horribly astray. That’s why throughout this guide I try to give you the “why” of what you’re doing.
- For this to work, the server has to be running in order to authenticate against our private server.
- Open a command prompt as an administrator and navigate to the root directory of your MHF-ZZ_Installed_Files folder (or wherever you extracted its contents) and enter the following:
py no_gg_jp.py
.- The game launcher should now open and bring you to a screen with a username and password. Enter anything for these as the server will create a new entry in the db if the user doesn’t exist.
- Select the premade character and enter the game. This will allow you to make your actual character in-game.
- Hyper-V support / WSL2 ports may conflict with the ones used by Erupe (issue), to fix this, run the following:
- Run:
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V
. - Reboot your device.
- Run:
netsh int ipv4 add excludedportrange protocol=tcp startport=53310 numberofports=1 netsh int ipv4 add excludedportrange protocol=tcp startport=53312 numberofports=1 netsh int ipv4 add excludedportrange protocol=tcp startport=54001 numberofports=1 dism.exe /Online /Enable-Feature:Microsoft-Hyper-V
- Reboot your device.
- Run: