mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-14 16:04:38 +01:00
Update README.md
This commit is contained in:
52
README.md
52
README.md
@@ -1,45 +1,61 @@
|
|||||||
# Erupe
|
# Erupe
|
||||||
## WARNING
|
## WARNING
|
||||||
This project is in its infancy and currently doesn't do anything worth noting. Additionally, it has no documentation, no support, and cannot be used without binary resources that are not in the repo.
|
This project is in its infancy and currently doesn't do anything worth noting. Additionally, it has no documentation and no support.
|
||||||
|
|
||||||
|
This project is soley 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.
|
||||||
|
|
||||||
# General info
|
# General info
|
||||||
Originally based on the TW version, but (slowly) transitioning to JP.
|
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 (Names and character data are not correct, placeholders are in use)
|
||||||
|
* Use (local) chat.
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
1. Clone the repo with `git clone https://github.com/Andoryuuta/Erupe.git`
|
1. Clone the repo with `git clone https://github.com/Andoryuuta/Erupe.git`
|
||||||
2. Install PostgreSQL
|
2. Install PostgreSQL
|
||||||
3. Launch psql shell, `CREATE DATABASE erupe;`.
|
3. Launch psql shell, `CREATE DATABASE erupe;`.
|
||||||
|
|
||||||
4. Setup database with golang-migrate:
|
4. Setup database with golang-migrate:
|
||||||
```
|
|
||||||
> go get -tags 'postgres' -u github.com/golang-migrate/migrate/cmd/migrate
|
|
||||||
|
|
||||||
> set POSTGRESQL_URL=postgres://postgres:password@localhost:5432/erupe?sslmode=disable
|
Windows:
|
||||||
|
```
|
||||||
|
> go get -tags 'postgres' -u github.com/golang-migrate/migrate/cmd/migrate
|
||||||
|
|
||||||
> migrate -database %POSTGRESQL_URL% -path migrations up
|
> set POSTGRESQL_URL=postgres://postgres:password@localhost:5432/erupe?sslmode=disable
|
||||||
```
|
|
||||||
|
|
||||||
5. Open psql shell and manually insert an account into the users table.
|
> cd erupe
|
||||||
|
|
||||||
6. Manually extract the binary response from a pcap, strip the header, and decrypt the ~50 packets that are used in `./channelserver/session.go`, and place them in `./bin_resp/{OPCODE}_resp.bin`. (**These are not included in the repo**)
|
> migrate -database %POSTGRESQL_URL% -path migrations up
|
||||||
|
```
|
||||||
|
|
||||||
|
Linux:
|
||||||
|
```
|
||||||
|
> go get -tags 'postgres' -u github.com/golang-migrate/migrate/cmd/migrate
|
||||||
|
|
||||||
|
> export POSTGRESQL_URL=postgres://postgres:password@localhost:5432/erupe?sslmode=disable
|
||||||
|
|
||||||
|
> cd erupe
|
||||||
|
|
||||||
|
> migrate -database $POSTGRESQL_URL -path migrations up
|
||||||
|
```
|
||||||
|
|
||||||
|
(Replacing `postgres:password` with your postgres username and password)
|
||||||
|
|
||||||
|
5. Edit the config.json
|
||||||
|
Namely:
|
||||||
|
* Update the database username and password
|
||||||
|
* Update the `host_ip` and `ip` fields (there are multiple) to your external IP if you are hosting for multiple clients.
|
||||||
|
|
||||||
|
|
||||||
## Launcher
|
## Launcher
|
||||||
Erupe now ships with a rudimentary custom launcher, so you don't need to obtain the original TW/JP files to simply get ingame. However, it does still support using the original files if you choose to. To set this up, place a copy of the original launcher html/js/css in `./www/tw/`, and `/www/jp/` for the TW and JP files respectively.
|
Erupe ships with a rudimentary custom launcher, so you don't need to obtain the original TW/JP files to simply get ingame. However, it does still support using the original files if you choose to. To set this up, place a copy of the original launcher html/js/css in `./www/tw/`, and `/www/jp/` for the TW and JP files respectively.
|
||||||
|
|
||||||
Then, modify the the `/launcher/js/launcher.js` file as such:
|
Then, modify the the `/launcher/js/launcher.js` file as such:
|
||||||
* Find the call to `startUpdateProcess();` in a case statement and replace it with `finishUpdateProcess();`. (This disables the file check and updating)
|
* Find the call to `startUpdateProcess();` in a case statement and replace it with `finishUpdateProcess();`. (This disables the file check and updating)
|
||||||
* (JP ONLY): replace all uses of "https://" with "http://" in the file.
|
* (JP ONLY): replace all uses of "https://" with "http://" in the file.
|
||||||
|
|
||||||
Finally, edit `main.go` and change:
|
Finally, edit the config.json and set `UseOriginalLauncherFiles` to `true` under the launcher settings.
|
||||||
|
|
||||||
`go serveLauncherHTML(":80", false)`
|
|
||||||
|
|
||||||
to:
|
|
||||||
|
|
||||||
`go serveLauncherHTML(":80", true)`
|
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
### Note: If you are switching to/from the custom launcher html, you will have to clear your IE cache @ `C:\Users\<user>\AppData\Local\Microsoft\Windows\INetCache`.
|
### Note: If you are switching to/from the custom launcher html, you will have to clear your IE cache @ `C:\Users\<user>\AppData\Local\Microsoft\Windows\INetCache`.
|
||||||
|
|||||||
Reference in New Issue
Block a user