DevkitServer.Server
0.0.13-server
See the version list below for details.
dotnet add package DevkitServer.Server --version 0.0.13-server
NuGet\Install-Package DevkitServer.Server -Version 0.0.13-server
<PackageReference Include="DevkitServer.Server" Version="0.0.13-server" />
paket add DevkitServer.Server --version 0.0.13-server
#r "nuget: DevkitServer.Server, 0.0.13-server"
// Install DevkitServer.Server as a Cake Addin #addin nuget:?package=DevkitServer.Server&version=0.0.13-server&prerelease // Install DevkitServer.Server as a Cake Tool #tool nuget:?package=DevkitServer.Server&version=0.0.13-server&prerelease
THIS PROJECT IS NOT YET STABLE, DO NOT USE FOR ANY REAL PROJECTS
Devkit Server
DevkitServer is a module/plug-in made for the game Unturned. It adds a multiplayer component to the in-game map editor. One of my goals for this project was to not rely on any outside programs or servers. I would say I partially achieved this, however port-forwarding a TCP server is recommended (but not required) to help with high-capacity data-transfer speed.
The server runs from U3DS (Unturned 3 Dedicated Server) as a normal Steam server. Upon connecting you will be put into the editor which is synced up with any other players on the server. The client must also install the module, but no further setup is required.
Installation (Launcher - recommended)
Download the latest release of the launcher module zip file from the Releases section.
Copy it to your Unturned\Modules
or U3DS\Modules
folder as DevkitServer.Launcher.zip
and click Extract Here.
Ensure the folder structure looks like this:
Modules\DevkitServer.Launcher\Bin\DevkitServer.Launcher.dll
Remember that for client-side, you must launch without BattlEye enabled for modules to run. Make sure you have an internet connection when launching, at least for the first time.
DevkitServer will be downloaded from the following three NuGet packages if it's missing or if it has an available update:
- DevkitServer.Resources - Both Platforms (< 5 MB)
- DevkitServer.Server - Dedicated Server (< 1 MB)
- DevkitServer.Client - Client (< 1 MB)
The launcher will keep DevkitServer up to date. It supports the following launch options.
-DontUpdateDevkitServer
- Will install DevkitServer if it's missing, but won't try to keep it updated.-ForceDevkitServerReinstall
- Reinstalls DevkitServer each launch. Good for fixing corrupted module files or forcing an update. You will not lose any savedata.-DontCheckForDevkitServerUpdates
- Stops the automatic checking for updates after startup. (checking does not mean restarting, it will just log a message)-AutoRestartDevkitServerUpdates
- Automatically restarts the server after an update is pushed. Yes this works for the client, although not really recommended.-DevkitServerCheckUpdateInterval <seconds>
- Amount of seconds between update checks. Default is 2 minutes-DevkitServerCheckUpdateShutdownDelay <seconds>
- Amount of seconds between when an update is found and when the shutdown occurs. Default is 2 minutes
Plugins can override the auto-restart behavior by referencing the Launcher and listening to the DevkitServerAutoUpdateComponent.OnUpdateReady
event.
This event will not be called if the DontCheckForDevkitServerUpdates
flag is present in the launch options.
Manual Installation (Without Launcher)
Download Module Zip
Download the latest release of the module from GitHub: DevkitServer.ManualInstallation.zip
.
Copy it to your Unturned\Modules
or U3DS\Modules
folder as DevkitServer.zip
and click Extract Here.
Ensure the folder structure looks like this:
Modules\DevkitServer\Bin\DevkitServer.dll
Remove the Dependencies
section from the Modules\DevkitServer\DevkitServer.module
file:
"Dependencies":
[
{
"Name": "DevkitServer.Launcher",
"Version": "1.0.0.0"
}
],
It's been installed. After first launch you can configure client-side settings at Unturned\DevkitServer\client_config.json
, or server-side settings at U3DS\Servers\<server id>\DevkitServer
.
Remember that for client-side, you must launch without BattlEye enabled for modules to run.
Server Setup
Create a normal vanilla server using U3DS and SteamCMD. There are numerous tutorials online for this.
Install DevkitServer with either the launcher or manually by following the steps above.
Add any necessary workshop items in the WorkshopDownloadConfig.json
file. Don't add a map into this for editing, instead download it by subscribing to it on Steam client and copying the map from the downloaded map folder (the named one) into U3DS\Maps
.
Set the map name in Commands.dat like a vanilla server (i.e. Map PEI
). If you are creating a new map, ensure its a unique name across everything in U3DS\Maps
and your selected Workshop Items.
Make sure you disable the BattlEye requirement in the config file.
Configure DevkitServer Settings
Create the folder U3DS\Servers\<server id>\DevkitServer
if it doesn't already exist.
Copy server_config.json
from U3DS\Modules\Defaults
into the new folder and open it with your favorite IDE (like Visual Studio Code).
(this will happen automatically after the first launch)
If available use JSONC
or Json with Comments as the file type.
Configure the new_level_info
section:
gamemode_type
: Survival (default), Horde, Arenastart_size
: Tiny, Small, Medium (default), Large, Insanemap_owner
: Steam ID of the owner of the map. This defaults to the first admin on the server if it's not defined.- This only sets the owner in the map metadata, which decides who can edit the map without a
.unlocker
file.
- This only sets the owner in the map metadata, which decides who can edit the map without a
Further Configuring New Map
After running the server at least once, navigate to U3DS\Maps\<Map Name>
to see the map template files.
Open up English.dat
to configure localized name, description, and tips. You can also add keys for locations here.
The template comes with one tip, which you'll probably want to change.
Next open Config.json
to configure map contributors (feel free to remove DevkitServer from the Thanks section).
This is also where you should set Tips
to the number of tips you have in English.dat
.
TCP Server Setup
If possible, it is highly recommended to set up the TCP (sometimes called high-speed) server port.
You will need access to port-forwarding on your server machine, and some hosts may not offer this. You can attempt to contact support but it's possible they won't agree to port-forward it for you.
In the server_config.json
file, the high_speed
section can be configured to enable a much faster data transfer protocol than possible with Steam servers.
This allows the map to be downloaded on join much quicker, which is much more noticeable with bigger maps.
To set it up, select a port and port-forward it with protocol set to TCP
. The default port will work fine for most setups (31905
).
Follow the information here to port-forward: https://unturned.fandom.com/wiki/Hosting_a_Dedicated_Server#Port_Forwarding.
Then set enable_high_speed_support
to true
in the server_config.json
file to enable the feature.
Compiling
Target
Ensure you have .NET Framework 4.8.1 installed.
Strong Naming
This assembly is strongly signed (when built in Release mode). The public key is located at ~\devkitserver.dll.publickey
.
To compile it, you will need to either build in debug mode, disable strong naming in the Build → Strong Naming settings, or generate your own key.
Generating a Strong Name Key/Pair
Create a .snk file. This file or its contents should not be shared.
Developer Powershell > cd "Location outside of repository"
Developer Powershell > sn -k devkitserver.dll.snk
Developer Powershell > sn -p devkitserver.dll.snk devkitserver.dll.publickey
Copy the public key to your fork and replace the existing one if you want.
Set the AssemblyOriginatorKeyFile
property to the path of the .snk file (or set it in the project settings).
Reference Assemblies
Expected installations:
Unturned Client - C:\Program Files (x86)\Steam\steamapps\common\Unturned
<br>
U3DS - C:\SteamCMD\steamapps\common\U3DS
Locations can be changed in ~\Unturned.targets
, which will apply to all 5 projects:
<PropertyGroup>
<ServerPath>C:\SteamCMD\steamapps\common\U3DS</ServerPath>
<ClientPath>C:\Program Files (x86)\Steam\steamapps\common\Unturned</ClientPath>
</PropertyGroup>
Build Output
The assemblies, symbol files, and documentation files will be copied to the following locations post-build:
ClientDebug, ClientRelease: C:\Program Files (x86)\Steam\steamapps\common\Unturned\Modules\DevkitServer\Bin\
<br>
ServerDebug, ServerRelease: C:\SteamCMD\steamapps\common\U3DS\Modules\DevkitServer\Bin\
<br>
These can be changed in the ~\Unturned.targets
the same way described above.
I suggest setting up Batch Build to build both ClientDebug and ServerDebug (or the release variants if desired).
Licensing Info
DevkitServer - Module for Unturned that enables multi-user map editing.
Copyright (C) 2023 Daniel Willett
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net481 is compatible. |
-
.NETFramework 4.8.1
- DanielWillett.StackCleaner (>= 1.4.1)
- Lib.Harmony (>= 2.2.2)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- System.Text.Json (>= 7.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
0.0.34-server | 74 | 10/19/2024 | |
0.0.33-server | 59 | 9/22/2024 | |
0.0.32-server | 67 | 7/17/2024 | |
0.0.31-server | 36 | 7/10/2024 | |
0.0.30-server | 57 | 7/10/2024 | |
0.0.29-server | 67 | 5/26/2024 | |
0.0.28-server | 71 | 5/25/2024 | |
0.0.27-server | 69 | 4/28/2024 | |
0.0.26-server | 53 | 4/28/2024 | |
0.0.25-server | 76 | 3/19/2024 | |
0.0.24-server | 90 | 2/4/2024 | |
0.0.23-server | 140 | 12/28/2023 | |
0.0.22-server | 106 | 12/12/2023 | |
0.0.21-server | 76 | 12/11/2023 | |
0.0.20-server | 86 | 12/10/2023 | |
0.0.19-server | 94 | 11/28/2023 | |
0.0.18-server | 79 | 11/27/2023 | |
0.0.17-server | 89 | 11/20/2023 | |
0.0.16-server | 66 | 11/20/2023 | |
0.0.15-server | 80 | 11/16/2023 | |
0.0.14-server | 82 | 11/5/2023 | |
0.0.13-server | 86 | 10/18/2023 | |
0.0.12-server | 72 | 10/12/2023 | |
0.0.11-server | 83 | 10/12/2023 | |
0.0.10-server | 105 | 10/5/2023 | |
0.0.9-server | 89 | 10/5/2023 | |
0.0.8-server | 94 | 10/4/2023 | |
0.0.7-server | 103 | 9/19/2023 |