Make A Mod

From Trepidation
Jump to: navigation, search


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


Like Quake 3, Trepidation is separated into the engine (e.g. trepidation.*.exe) and gamecode (e.g. qagame.qvm). The engine provides basic functionality like network and file access as well as drawing the graphics on a client. The gamecode is usually created in the Quake Virtual Machine (QVM) format, which can be loaded on any platform (Windows, Linux, Mac) which the engine supports.

The gamecode itself is separated into the user interface (q3_ui), the client game code (cgame) and the server game code (qagame).

You can create serverside only mods if you only edit qagame.

Getting the files

You can download the latest version of the sourcecode for Trepidation from Github.


After extracting the downladed sourcecode you should create a file called Makefile.local in the same folder as Makefile.



This way running make will only build the gamecode 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). When using batch files, the compiled QVMs will be stored inside \quake3\baseq3\vm\ on the drive where you extracted the sourcecode.


You should copy the QVM files into a folder for your mod inside your homepath, e.g. ~/.trepidation/mymod/vm/ on Linux. To test your mod in game, run trepidation with these additional commands +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.


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 sourcecode (maybe as a separate download or diff).