7
6
Fork
You've already forked Unvanquished
1
4 hostmod
bmorel edited this page 2026年03月27日 19:46:39 +01:00

Creating and Hosting a mod

This page tries to summarize the most important and general information to create and host a game modification or a map.

building a dpk

Dpk files have a specific folder hierarchy, which depends wether the file will contain a map, or a mod (modifications of resources, models, gameplay...).

In practice, a dpk could contain both maps and mods mixed, i.e. a mod could be done for a single map but this would likely waste space and likely increases risk of troubles for maintenance.

A .dpk is a file that is a simple zip archive (i.e. 7z -tzip -mx=9 a mod-example-0.56.0_1.dpk . from inside the source directory, and which is usually named as in mod-example-0.56.0.dpkdir. The engine will recognize all dpkdir in either the -homepath or one of the -pakpath options provided to launch it (see hosting section).

The VFS

Those directoties will contain a specific file hierarchy, which (usually) depends on wether it is a map, or a modification. All of those are optional (an empty mod would simply do nothing, but should work?).

They can also contain a file name DEPS at their root, which defines wich other dpk will be loaded in the virtual file system.

List of current folders:

  • about
  • gfx
  • bots
  • configs
  • default
  • emoticons
  • fonts
  • icons
  • lights
  • lua
  • models
  • presets
  • scripts
  • sound
  • translation
  • textures
  • ui
  • maps
  • meta (for maps)

daemon server

To launch the dedicated server, you need to summon the program daemonded with some arguments. Here is a list of some (very incomplete) important arguments:

  • -pakpath: defines where to find additional dpk files. Cumulative.
  • -homepath: defines where to find various configuration files. Can contain a dpk dir. Unique.
  • -fs_extrapak: defines which specific mod to load. If not set, your server will run unvanquished. Unique.
  • -set vm.sgame.type: this allows to select which kind of binary the server will load for gamelogic:
  • 0: cgame.nexe from a .dpk file;
  • 1: cgame.nexe from the working directory;
  • 2: (name?) the native exe from the working directory;
  • 3: sgame-dll.so for linux (or sgame-dll.dll on windows, presumably) from the working directory;

nacl-exe mode

native-exe mode

dll-mode

Those who want coredumps need to pass the option -nocrashhandler to the engine, as well as to enable them in the OS, i.e. on linux you need to run ulimit -c unlimited before launching the engine.

Handling log to avoid Denial of Service

daemonded will store logs in several places, that you probably want to clean regularly to avoid filling your disk with gigabytes or garbage that will never be used, located in the homedir. Some may be configurable by cvars, as well:

  • daemon.log
  • games.log
  • stats

third party servers

You will need an http server (aka httpd) to allow users to download your mod. Any will do, but current modders use are:

  • darkhttpd (on deadbeef);
  • apache2 (official) probably;

Maps and other dpk files you want to distribute must have a file named "PAKSERVER" in a parent folder (may be several folders deep) containing the following string: ALLOW_UNRESTRICTED_DOWNLOAD so that the client engine can use it.

Some other servers may be used to provide more services to players, such as highscores or stats. TODO: add info on this?

troubleshooting

FAQ