repository cleanup

This commit is contained in:
wish
2022-07-29 03:12:08 +10:00
parent 6f3f88165f
commit a0be6c627c
20 changed files with 78 additions and 156 deletions

View File

@@ -26,4 +26,5 @@ jobs:
./Erupe/config.json ./Erupe/config.json
./Erupe/www/ ./Erupe/www/
./Erupe/savedata/ ./Erupe/savedata/
./RoadShopItems.csv ./Erupe/bin/
./Erupe/RoadShopItems.csv

13
.gitignore vendored
View File

@@ -1 +1,14 @@
.idea/ .idea/
www/jp/
vendor/
bin/*.bin
bin/*.bak
bin/quests/*.bin
bin/questlists/*.bin
bin/scenarios/*.bin
bin/debug/*.bin
savedata/*/
*.exe
*.lnk
*.bat

6
Erupe/.gitignore vendored
View File

@@ -1,6 +1,6 @@
www/jp/
.idea/ .idea/
www/jp/
vendor/ vendor/
bin/*.bin bin/*.bin
bin/*.bak bin/*.bak
@@ -8,7 +8,7 @@ bin/quests/*.bin
bin/questlists/*.bin bin/questlists/*.bin
bin/scenarios/*.bin bin/scenarios/*.bin
bin/debug/*.bin bin/debug/*.bin
savedata/ savedata/*/
*.exe *.exe
*.lnk *.lnk
*.bat *.bat

View File

@@ -1 +0,0 @@
0 is no event, 1 is "Week 1 Timestamp (broken), 2 is "Week 2 Timestamp (broken), 3 is Diva Defense

View File

@@ -1,83 +0,0 @@
# Erupe
## WARNING
This project is in its infancy and has no reliable active developer, no documentation, and no support.
# General info
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
* Use chat*
# Installation
## Server
1. Clone the repo with `git clone https://github.com/Andoryuuta/Erupe.git`
2. Install PostgreSQL
3. Launch psql shell, `CREATE DATABASE erupe;`.
4. Setup database with golang-migrate:
Windows:
```
> go get -tags 'postgres' -u github.com/golang-migrate/migrate/v4/cmd/migrate/
> set POSTGRESQL_URL=postgres://postgres:password@localhost:5432/erupe?sslmode=disable
> cd erupe
> migrate -database %POSTGRESQL_URL% -path migrations up
```
Linux:
```
> go get -tags 'postgres' -u github.com/golang-migrate/migrate/v4/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.
6. Place quest/scenario binaries.
The quest and scenario binary files should be placed in `bin/quests/` and `bin/scenarios` respectively.
## Launcher
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:
* 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.
Finally, edit the config.json and set `UseOriginalLauncherFiles` to `true` under the launcher settings.
# 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`.
## Server
```
cd Erupe
go run .
```
## Client
Add to hosts:
```
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
```
Run mhf.exe normally (with locale emulator or appropriate timezone).

View File

@@ -1,8 +0,0 @@
To bring up fresh database:
migrate.exe -database postgres://user:password@host:port/dbname?sslmode=disable -path /pathto/migrations up
To tear down database
migrate.exe -database postgres://user:password@host:port/dbname?sslmode=disable -path /pathto/migrations down
More info:
https://github.com/golang-migrate/migrate/releases/tag/v4.15.2

Binary file not shown.