Making a Mod

File system ==
[[Vavoom]] is now using a filesystem similar to the one of Quake.

The “game directory” is the first tree on the search path and directory
that all generated files (savegames, screenshots, demos, config files) will
be saved to. This can be overridden with the “-game” or “-devgame” command
line parameter. “-devgame” option is used to put [[Vavoom]] into game development mode. This means that for some wad lumps [[Vavoom]] first tries to load them from files. In current version they are:

”levels” ”progs” ”scripts” ”textures”

– maps/<level-name>.wad – progs/<name>.dat

– scripts/<name>.txt
– textures/walls <- Hi-Res Textures for walls

textures/flats <- Hi-Res Textures for flats
textures/skies <- Skybox Textures
textures/pics <- Hi-Res Textures for patches (menus, fonts, HUD, etc.)

For each game directory [[Vavoom]] searches for ”’base.txt”’ script file. It is used to setup the game directory on which this game is based on. It consists of a list of entries with the following format:

game <gamedir>

[iwad <iwad-file>]

[param <option>]



”gamedir” – game directory of this game.
”iwad-file” – main wad file needed for this game.
”option” – when multiple iwad files are present this command line option

can be used to force selection this game. The entries are procesed in backwards order.

If the “-game” and “-devgame” options are not used, the ”’basev/games.txt”’ script is used instead to detect the game. The format is the same as the ”’base.txt”’ script.

The game directory can never be changed while [[Vavoom]] is being executed. This is a precaution against having a malicious server instructing the clients to write files
over areas they shouldn’t.

WAD files are added in the following order:
* main wad file;
* for each game directory all the wad files in form ”wad0.wad”, ”wad1.wad” … until one is missing;* files specified with “-file” option.

== Scripts ==

Vavoom uses all the Hexen scripts, extends them and adds some new ones. * [[MAPINFO]]

== Progs ==


”VavoomC” – this is the scripting language used for making progs.

”progs” – the code writen in [[VavoomC]] sripting language, which is
compiled inside virtual machine files that are executed by [[Vavoom]].

===Getting the sources.===
The Progs sources are included in the following archives: – This archive contains both the progs sources and the compiler binaries. MOD makers working in DOS or Windows most likely will choose this package. – Full [[Vavoom]] source code with progs as part of it. In LINUX progs are compiled as a part of the build process.

The latest prog sources can be found in [[Vavoom]] SVN repository.

===Compiling PROGS.===

Progs are compiled with vcc ([[VavoomC]] Compiler). It’s located in ”utils/bin”. vcc must be available on path. Add a directory called ”utils/bin” to the path or put vcc in any other directory which is included in path or put it in the directory, where you will use it (it possibly will not work in Linux).

For each PROGS there is a Makefile. Simply run make.

Since version 1.29, [[Vavoom]] engine can compile progs inside the game, so compiling progs isn’t required now, you can place the progs source inside a PK3 file in the ‘progs’ subfolder.

== Making a MOD. ==

Follow these steps:

1) Create a subdirectory in the [[Vavoom]] directory. This will be your gamedirectory. For example:

mkdir mygame

2) From the ”basev” directory copy ”’games.txt”’ into your game directory and rename it to ”’base.txt”’. For example:

cp basev/games.txt mygame/base.txt

3) Edit ”’base.txt”’ and remove the detection of the games with which your mod will not work.

4) In your game directory create a progs directory. For example: mkdir mygame/progs

5) For all the games but Doom2 copy the sources of that game’s progs into this directory. For example:

cp -r progs/heretic/* mygame/progs

For Doom2 copy the sources of the Doom progs, then edit ”’”’ and at the top of the file add the following line:

#define DOOM2
You also need to copy the contents of the ”’common”’ directory into ”<gamedir>/progs”:

cp -r progs/common/* mygame/progs