**MualaniImpact** is an **open-source project reverse-engineering Genshin Impact server binaries**. This means that all logic and architecture code is being reimplemented according to decompiled pseudocode of official servers.
## How
The original server binaries are written in C++. This project aims to rewrite them in rust. Because of that, some implementation details may be different (due to rust ownership model and so on).<br>We also use PostgreSQL instead of MySQL that is used by miHoYo.
## Implemented services
- Dispatch
- Gateserver
- Dbgate
- Gameserver (work-in-progress)
- SDKServer (not part of game-specific services, but required for authentification, emulates miHoYo account API)
Navigate to the [Releases](https://git.xeondev.com/ReversedRooms/MualaniImpact/releases)
page and download the latest release for your platform.<br>
Launch all services: `sdkserver`, `dispatch`, `dbgate`, `gateserver`, `gameserver`
##### NOTE: you don't have to install Rust if you're going to use pre-built binaries, although the preferred way is building from sources.<br>We don't provide support for pre-built binaries.
#### Configuration
You should configure each service using their own config files. They're being created in current working directory upon first startup.
##### Database section
You have to specify connection strings for **PostgreSQL** (`connection_string`) and **Redis** (`redis_url`)
If you're going to host all services locally, you don't have to modify anything here.<br>If you're deploying services on different machines, you have to configure their `inner_ip`.<br>Every service should have its own unique `app_id`<br>Example of application entry for `Gateserver`:
```
[[applications.Gateserver]]
app_id = 2
inner_ip = "127.0.0.1:22002"
```
##### NOTE: the top most `app_id` line (before application entries) specifies `app_id` of current service.
#### Data
The data files: TSV tables (`data/txt`) and JSON configs (`data/json`) are included in this repository. Keep in mind that you need to have the `data` subdirectory in current working directory.
You have to download client of **current supported game version** (at this moment it's 5.0.50, you can [get it here](https://git.xeondev.com/xeon/3/raw/branch/3/hk4e_cncbwin5.0.50_reversedrooms.torrent)), and apply the [encryption patch](https://git.xeondev.com/reversedrooms/hk4e-patch/releases).
##### NOTE: once you got all services up and running, you have to create game account.<br>By default, you can do so at http://127.0.0.1:21000/account/register
### Troubleshooting
[Visit our discord](https://discord.gg/reversedrooms) if you have any questions/issues