Start modding World of Padman

This tutorial will show you where to get required files and how to create a basic mod for World of Padman. This is a very basic tutorial and should also only give you a first orientation regarding the source code and its concept.

Preface

Before you consider starting a mod, you need a few things. A solid understanding of C, as that’s what World of Padman is written in. This is quite cumbersome and you are furthermore limited by the ioquake3 engine, unless you want to create a stand alone game. Basically all tutorials for Quake 3 Arena mods also apply to WoP. A few filenames might have changed, some functions have been removed, renamed or edited. WoP’s source code is licensed under the GPL, so if you plan on releasing your mod to the public, you have to include its source code as well.

Like Quake 3, WoP is separated into the engine (e.g. wop.exe) and the game code (e.g. qagame.qvm). The engine provides basic functionality like network and file access as well as drawing the graphics on a client. The game code is usually created in the Quake Virtual Machine (QVM) format, which can be loaded on any platform (Windows, Linux, macOS) which the engine supports. The game code itself is separated into the user interface q3_ui, the client game code cgame, and the server game code qagame.
You can create server side only mods if you only edit qagame.

Getting the files

Earlier releases of WoP had separated downloads for engine and game code, but are now released as a bundle. You can download the latest version of the source code of World of Padman at SourceForge or ModDB. The code is also always included in the official installations under XTRAS/editing files/.

Compiling

After extracting the downloaded source code you should create a file called Makefile.local in the same folder as Makefile.

BUILD_GAME_QVM = 1
BUILD_GAME_SO = 0
BUILD_MISSIONPACK = 0

BUILD_SERVER = 0
BUILD_CLIENT = 0
BUILD_CLIENT_SMP = 0

This way running make will only build the game code QVMs and no shared libs or even the client and dedicated server engine. On an *nix system it should be sufficient to just run make now. The resulting QVMs will be created in e.g. build/release-linux-i386/baseq3/vm/.

Windows users can either use MinGW or use the provided batch files (e.g. code\game\game.bat). misc\recompile_win.bat is a batch file that creates all three QVM files in one go. When using batch files, the compiled QVMs will be stored inside wop\vm\ on the drive where you extracted the source code (e.g. C:\World of Padman\wop\vm\).

Testing

You should copy the new created QVM files into a folder for your mod inside your home path, e.g. ~/.padman/mymod/vm/ on Linux or C:\Users\MyUserName\AppData\Roaming\Padman\wop\mymod\vm\ on Windows. To test your mod in game, run WoP with these additional commands:

wop +set fs_game "mymod" +set sv_pure "0"

Where “mymod” is the folder where you copied your mod. Running the game “unpure” causes the engine to load your QVM files even though they are not packed as a PK3 file.

Releasing

If you want to release your mod, you will at least need to pack vm/*.qvm into a ZIP archive, then change its extension to “.pk3” instead of “.zip”. You should also include a readme file as well as your modified source code, maybe as a separate download or diff.