# HollowPS mod by inkursion

A Server emulator for closed beta test 1 version (cbt1) of the game [`Zenless Zone Zero`](https://zenless.hoyoverse.com/en-us/) with 5 custom levels and a few new features

It's just a glimpse at how custom levels for TV mode can be built for ZZZ private servers.

I'm nowhere close Xeon's skill level, so my code is held together by dact-tape and "if" statements and definitely isn't accurate to cbt1, but I wanted this version of the game to have a bit more content to play and it was pretty fun to make.

## Changes:

- New levels can be added and quests actually will send you to different grid maps instead of every HDD quest sending you to the same map (you need to specify which quest links to which map if you want to add new ones in "../gameserver/src/net/handlers/world.rs" and the maps themselves are hardcoded into the server in "../gameserver/src/game/manager/hollow_grid.rs" and can be edited there)

- 5 Custom levels designed by me, sorted by difficulty in the HDD. I wanted them to be non-linear except for 1 which is just a strict time trial(don't get fooled by it being lvl 1, it's the hardest level in the Cretan Hollow). Idk how well I accomplished that tho. 

- Different time of day and weather for every commission. ChessboardID ultimately controls this and some battle encounters have set parameters, but the time of day is left blank for most IDs so it can be changed in "world.rs". (ChessboardIDs with their weather and time of day params can be found in ChessBoardPerformTemplateCollection)

- Levels can be replayed now without logging out 

- Separate battle lists for every level (again, hardcoded in "hollow_grid.rs" and can be edited there. All of the game's battle Ids can be found in BattleEventConfigTemplateCollection). 

- Character parameters (level, ascension, star rank, talents(proto mindscapes), skill levels) and use of manual chain attacks can now be set in the config file

- VisibleAtGridAround tiles

- TV screens in the room light up

## Installation

### From Source

#### Requirements

- [Rust](https://www.rust-lang.org/tools/install)

**NOTE**: Nightly Rust is required to build the project. To install it, first install
Rust itself, then run the following command:

```sh
rustup toolchain install nightly
rustup default nightly
```

#### Building

```sh
git clone https://git.xeondev.com/inkursion/HollowPS_Custom_levels.git
cd HollowPS
cargo install --path gameserver
cargo install --path sdkserver
```

### From Pre-built Binaries

Navigate to the [Releases](https://git.xeondev.com/inkursion/HollowPS_Custom_levels/releases)
page and download the latest release.

## Usage

To begin using the server, you need to run both the SDK server and the game server.

If you installed from source, Rust's installer should have added .cargo/bin to your
path, so simply run the following:

```sh
nap-gameserver
nap-sdkserver
```

If you installed from pre-built binaries, navigate to the directory where you downloaded
the binaries and either a) double-click on the following executable names or b)
run the following in a terminal:

```sh
./nap-gameserver
./nap-sdkserver
```
Once you get into the game world, DON'T TOUCH THE SOFA! You will be stuck on a black screen until you restart the game

## Configuration

The game server can be configured using a `gameserver.json` file.
Configuration file with default settings will be created in
the working directory upon first startup.

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss
what you would like to change, and why.

## Bug Reports

If you find a bug, please open an issue with as much detail as possible. If you
can, please include steps to reproduce the bug.

Bad issues such as "This doesn't work" will be closed immediately, be _sure_ to
provide exact detailed steps to reproduce your bug. If it's hard to reproduce, try
to explain it and write a reproducer as best as you can.
