Skip to content

Commit

Permalink
Add server directory; add map rotation docs
Browse files Browse the repository at this point in the history
  • Loading branch information
MotoLegacy committed Dec 27, 2024
1 parent 646dfab commit edfb507
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build/
build/
.DS_Store
2 changes: 1 addition & 1 deletion generate_docs.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
rm -rf build/
mkdir -p build/{res,landing,mapping,internal}
mkdir -p build/{res,landing,mapping,internal,server}
cp -r markdown/res build/
mkdir -p build/ && cd markdown/
find . -iname "*.md" -type f -exec sh -c 'pandoc --standalone --toc --template ../template/template.html --from=markdown --to=html5 --lua-filter=../links-to-html.lua -o "../build/${0%.md}.html" "${0}"' {} \;
8 changes: 7 additions & 1 deletion markdown/landing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,15 @@ At this current moment, no marked-stable builds of Nazi Zombies: Portable are ma

Core documents contain information about Nazi Zombies: Portable's internal design. They may not be specifically relevant to custom content creators, though overlap will be present for map features that interact with NZ:P's QuakeC or for specialty features.

- [Dedicated Server](../internal/dedicated-server.md)
- [Weapon IDs](../internal/weapon-ids.md)

## Dedicated Server Documentation

Documents relevant for those who are looking to host a dedicated server for Nazi Zombies: Portable.

- [Dedicated Server Setup](../server/server-setup.md)
- [Map Rotation & Voting](../server/map-rotation.md)

## Mapping & Modding Documentation

These documents are relevant for level creators who wish to create content for Nazi Zombies: Portable. These documents assume you have basic knowledge of [mapping for Quake](https://www.youtube.com/playlist?list=PLgDKRPte5Y0AZ_K_PZbWbgBAEt5xf74aE), as well as [TrenchBroom](https://trenchbroom.github.io/) knowledge. Nazi Zombies: Portable also supports Valve HAMMER based mapping software via a separate FGD.
Expand Down
Binary file added markdown/res/images/mapvote.webp
Binary file not shown.
File renamed without changes.
51 changes: 51 additions & 0 deletions markdown/server/map-rotation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
% Map Rotation & Voting - NZ:P Mapping Documentation
# Map Rotation & Voting

__NOTE: This guide uses the terms "level" and "map" interchangeably.__

## Introduction

Nazi Zombies: Portable supports Map Rotation as well as in-game Map Voting for server hosters to provide a selection of maps to clients automatically, as opposed to forcing manual map selection and map repetition.

## Means of Map Changing

### Map Voting

`sv_enablechatplugins` is required to allow for map voting on your server.

Users can use the `mapvote <mapname>` chat command to vote to issue a `changelevel` after the vote duration and grace period. Issuing this command will alert all clients in the server of a request to change levels, and how they can use `mapvote_y` or `mapvote_n` to vote on the decided level. Votes are public.

Votes last 60 seconds, and provided a vote passes, a 15 second wait is in place before the change of level. There is no limit on the amount of votes users can start, but only one can be active at a time.

Votes take priority over map rotation settings.

![Map Vote in-action](../res/images/mapvote.webp)

### Map Rotation

Nazi Zombies: Portable supports three modes of Map Rotation, controlled via the `sv_maprotationmode` cvar:

```
0 : Do Not Rotate
1 : Fixed Map Rotation
2 : Random Map Rotation
```

#### Do Not Rotate

Rotation mode `0` disables map rotation, the currently loaded level will begin again.

#### Fixed Map Rotation

Rotation mode `1` picks linearly from a list of rotations from a plain text (`.txt`) file in the `nzp/` directory. The basename is controlled by `sv_maprotationbasename` (by default it is `map_rotation`). The contents should only be the raw (`.bsp`) names for the levels you want to rotate. For example, to switch between *Warehouse (Classic)* and *Warehouse*, your rotation file would look like so:

```
nzp_warehouse
nzp_warehouse2
```

If a rotation file is not found, the *Random Map Rotation* (`2`) setting will be used instead.

#### Random Map Rotation

Rotation mode `2` chooses a random map from the server's installed maps.

0 comments on commit edfb507

Please sign in to comment.