V Rising Dedicated Server

## Server Requirements

* Windows 10 or Server 2016+ & 64-Bit
* Quad Core processor (requires up to 2 full cores)
* Up to 16GB memory (currently uses around 4GB memory minimum)
* 5GB disk space

## Installation

There are two ways to install:

* Steam - install **V Rising Dedicated Server** which is free. The console will completion-match on the item namely available to anyone
* SteamCMD - install app **1829350**

## Running the Server

Run the server once to generate a new config file:

* To run the server, its recommended to go to your install directory and copy `start_server_example.bat` to a new file called `start_server.bat`
* Edit `start_server.bat` with notepad, it's recommended to at least update serverName.
* Run `start_server.bat` and the server will load.

### Start Server Batch File

```
@echo off
REM Copy this script to your own file and modify to your content. This file can be overwritten when updating.
set SteamAppId=1604030
echo "Starting V Rising Dedicated Server - PRESS CTRL-C to exit"

@echo on
VRisingServer.exe -persistentDataPath .\save-data -serverName "My V Rising Server" -saveName "world1" -logFile ".\logs\VRisingServer.log"

```

\*After you run the default batch file, it is recommended to copy/paste VRisingServer\_Data/StreamingAssets/Settings/ServerHostSettings.json, ServerGameSettings.json, into a new folder called <serverdirectory>\save-data\Settings. Not doing so could result in losing your configuration changes with new updates. Your adminlist.txt and banlist.txt file must remain in "VRisingServer\_Data/StreamingAssets/Settings/".

### Launch Commands

Note, the launch commands will override settings in your ServerHostSettings.json mentioned later on in this wiki.

## Server Configuration

### Settings File Location

After a server runs for the first time, it generates default config files into the folder: VRisingServer\_Data/StreamingAssets/Settings/

* ServerHostSettings.json (ports, server name, etc)
* ServerGameSettings.json (day/night cycle lengths, etc)

**As mentioned previously, it's recommended NOT to edit the above files, or your changes could be lost with new updates.**

If you haven't done so already, copy the files next to your Save folder, in a folder called Settings:

* If you are using the example start server batch file, then you will want to paste the files into: <serverdirectory>\save-data\Settings\
* If you're not using the batch file, (ie, you don't specify a persistentDataPath), then you will want to paste your config files into: %USERPROFILE%\AppData\LocalLow\Stunlock Studios\VRisingServer\Settings

### Port Forwarding

Make sure to add an incoming rule to your Windows Firewall for UDP/TCP port 9876 (game uses UDP, rcon uses TCP) and UDP port 9877 (Steam query uses UDP) .

You may additionally need to add a forwarding rule to your network router. You can use PortForward.com to read how to do this.

### Server Host Settings

The *ServerHostSettings.json* file will let you configure network and administrative settings.

#### Example Configuration

```
{
  "Name": "Awesome V Rising PvP",
  "Description": "PvP server that is really awesome.",
  "Port": 9876,
  "QueryPort": 9877,
  "MaxConnectedUsers": 40,
  "MaxConnectedAdmins": 4,
  "ServerFps": 30,
  "SaveName": "world1",
  "Password": "secret123",
  "Secure": true,
  "ListOnMasterServer": true,
  "AutoSaveCount": 50,
  "AutoSaveInterval": 600,
  "GameSettingsPreset": "StandardPvP",
  "AdminOnlyDebugEvents": true,
  "DisableDebugEvents": false,
  "Rcon": {
	"Password": "secret456",
	"Enabled": true,
	"Port": 9876
  }
}

```

### Server Game Settings

The *ServerGameSettings.json* file will let you configure the gameplay settings. Note, there is a known issue that after a server has been created, several settings cannot be updated, even after restarting the server. See: Ignored Game Settings After Creation for more details.

Stunlock has published a list of commands on their web-site: https://cdn.stunlock.com/blog/2022/05/25083113/Game-Server-Settings.pdf

Below are the known commands which will be updated frequently:

#### Example Configuration

Pre-made configurations can be found in the folder: VRisingServer\_Data\StreamingAssets\GameSettingPresets

### Admin List

Place a users Steam64 ID into the adminlist.txt settings file to give them admin rights. You will need to put one Steam64 ID per line, save the file, and restart the server for changes to take affect. Note, any user you give admin rights with the admin console will also appear on this list.

Example adminlist.txt:

```
76561197960287930
76561198026449175

```

### Ban List

Place a users Steam64 ID into the banlist.txt settings file to ban them from the server. You will need to put one Steam64 ID per line, save the file, and restart the server for changes to take affect. Note, any user you ban with the admin console will also appear on this list.

```
76561197960287920
76561198026440594

```

### Server VoIP Settings

Voice chat can be enabled if you have a key from the Vivox developer portal, which can take 1-2 days to receive approval after registering. After you receive approval, follow the instructions below:

1. Login to the Vivox Developer Portal
2. Click on `Create New Application`
3. In `Application or Game Name` set the name to something like `VRising_Server`
4. In the `Game Genres` put a check in `Action`
5. Click Continue
6. In `What engine are you building your app with? Vivox provides out-of-the-box solutions for the engines listed below - select Vivox Core if yours is not listed.`, select `Unity`
7. In `What platform(s) does your app support`, select `Windows`
8. Click `Continue`
9. Click `Create App`
10. Create a new file called `<GAME_SERVER_DIRECTORY>\VRisingServer_Data\StreamingAssets\Settings\ServerVoipSettings.json`
11. Add the following content to the file

```
{
    "VOIPEnabled": true,
    "VOIPIssuer": "",
    "VOIPSecret": "",
    "VOIPAppUserId": "",
    "VOIPAppUserPwd": "",
    "VOIPVivoxDomain": "",
    "VOIPAPIEndpoint": "",
    "VOIPConversationalDistance": 14,
    "VOIPAudibleDistance": 40,
    "VOIPFadeIntensity": 2.0
}

```

1. In the `ServerVoipSettings.json` set the `VOIPIssuer` to the value you see in Vivox portal under `Api Keys` called `Issuer`
2. In the `ServerVoipSettings.json` set the `VOIPSecret` to the value you see in the Vivox portal under `Api Keys` called `Secret Key`
3. In the `ServerVoipSettings.json` set the `VOIPAppUserId` to the value you see in the Vivox portal under `Api Keys` called `Admin User ID`
4. In the `ServerVoipSettings.json` set the `VOIPAppUserPwd` to the value you see in the Vivox portal under `Api Keys` called `Admin Password`
5. In the `ServerVoipSettings.json` set the `VOIPVivoxDomain` to the value you see in the Vivox portal under `Environment Details` called `Domain`
6. In the `ServerVoipSettings.json` set the `VOIPAPIEndpoint` to the value you see in the Vivox portal under `Environment Details` called `API End-Point`

## Console Commands

 Console commands for administering the server can be executed via the in-game console or via  RCON.

### Helpful Admin Tips

You can bind console commands to hotkeys for quick faster execution. Example, you can bind `changehealthofclosesttomouse` to Shft+F1 to quickly remove castle blockers on your server.

* `Console.Bind Shift+F1 changehealthofclosesttomouse -5000` `Console.`
* `Console.Bind Shift+F2 toggleobserve 2` `Console.`
* `Console.Bind Shift+F3 TeleporttoChunk 4,16` (my castle)

## RCON

You can connect to you server via RCON using a client such as rcon-cli. Ensure you have RCON enabled as explained in the Server Host Settings section and port forwarding set to pass TCP, and you will be able to log in.

## Additional Documentation

### Sandbox Mode

You need to add a file in the save-data/Settings directory and call it: *ServerDebugSettings.json* (assuming you are using the default server batch file)

Recommended sandbox configuration:

```
{
    "CooldownsDisabled":true,
    "BuildCostsDisabled":true,
    "PlayersInvulernabilityEnabled":true,
    "AllProgressionUnlocked":true,
    "BuildingAreaRestrictionDisabled": true,
    "BuildingPlacementRestrictionsDisabled":true,
    "FreeBuildingPlacementEnabled":true,
    "BuildingFloorTerritoryDisabled":true,
    "AllWaypointsUnlocked":true,
    "HighCastleRoofsEnabled":true,
    "LinnCastleRoofsEnabled":true,
    "CastleHeartBloodEssenceDisabled":true,
    "CastleLimitsDisabled":true
}

```

Additional settings:

```
DefaultPath
LocalPath
SunDamageDisabled
DurabilityDisabled
BloodDrainDisabled
CooldownsDisabled
BuildCostsDisabled
TutorialPopupsDisabled
AllProgressionUnlocked
PlayersInvulernabilityEnabled
DayNightCycleDisabled
NPCsDisabled
BuildingAreaRestrictionDisabled
BuildingPlacementRestrictionsDisabled
FreeBuildingPlacementEnabled
BuildingReplacementDisabled
BuildingFloorTerritoryDisabled
BuildingEnableDebugging
AllWaypointsUnlocked
AggroDisabled
DropsDisabled
Use3DHeight
TileCollisionDisabled
DynamicCollisionDisabled
DynamicCloudsDisabled
HitEffectsDisabled
HighCastleRoofsEnabled
LinnCastleRoofsEnabled
UseDeathSequencesInsteadOfRagdolls
FeedWoundedRequirementDisabled
SkipNetworkVersionCheck
UseSunblockerChecksForFly
CastleHeartBloodEssenceDisabled
CastleLimitsDisabled
RandomizeVBloodSpawnLocations
RandomizeVBloodAbilities
RandomizeVBloodTechs

```

### Ignored Game Settings After Creation

Changing certain settings after the world has already been created does not appear to take effect, even after a server restart. Problematic settings include:

* `CastleBloodEssenceDrainModifier`
* `CastleLimit`
* `DismantleResourceModifier`
* `RefinementCostModifier`
* `RefinementRateModifier`
* `RecipeCostModifier`
* `TeleportBoundItems`
* `RandomizeVBloodSpawnLocations`
* `RandomizeVBloodAbilities`
* `RandomizeVBloodTechs`

#### Workaround

The solution is not fully tested , but one user (pernahajder) reported if you create a new server with a custom `GameSettingsPreset` the settings will take hold. Unfortunately, this means you need to create a new server. To do this, you need to:

* go to \VRisingServer\_Data\StreamingAssets\GameSettingPresets\
* select a profile you want to use and make a copy of it
* rename the profile and add the settings you want
* edit your <ServerHostSettings.json> and set the `GameSettingsPreset` to the profilename you have created
* Launch the new server

### Server Not Showing Up on Masterlist

Ensure that ServerHostSettings.json contains the line: "ListOnMasterServer": true Note, after changing any configuration file, a restart is required.

You can also test to see if your server is reachable by entering this URL into your browser, and replacing you IP address at the end: https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=192.168.1.1

Example Output:

```
{"response":{"success":true,"servers":[{"addr":"47.225.26.25:9877","gmsindex":-1,"steamid":"90159454573187079","appid":1604030,"gamedir":"V Rising","region":-1,"secure":true,"lan":false,"gameport":9876,"specport":0}]}}

```

Some users reported that after changing to new ports and back again, the server began showing up on the list.

### Updating the Server

If running SteamCMD, you will need to shutdown your server, and launch SteamCMD with the following command: `steamcmd.exe +login anonymous +app_update 1829350 validate +quit`