An SDK to create Mods for dhewm3
Find a file
2019-01-05 02:17:03 +01:00
cm Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
d3xp Make game dll names and compiler defines for mods configurable 2018-08-26 04:47:00 +02:00
framework Add first element (FT_IsDemo) to enum idCommon::FunctionType 2019-01-04 20:29:38 +01:00
game Make game dll names and compiler defines for mods configurable 2018-08-26 04:47:00 +02:00
idlib Fix pot. Crash in idWinding2D::ExpandForAxialBox() 2018-12-09 04:23:41 +01:00
MayaImport Make it build as SDK 2018-08-26 01:43:10 +02:00
renderer Fix dedicated server for Windows 2018-08-20 01:46:37 +02:00
sound Make it build as SDK 2018-08-26 01:43:10 +02:00
sys It builds with VS 2017 now 2018-09-02 01:25:23 +02:00
tools/compilers/aas Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
ui Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
.gitignore Make it build as SDK 2018-08-26 01:43:10 +02:00
CMakeLists.txt CMake 2.8 is sufficient 2018-12-15 05:35:12 +01:00
config.h.in Make it build as SDK 2018-08-26 01:43:10 +02:00
COPYING.txt Add GPLv3 COPYING.txt 2018-08-20 01:46:20 +02:00
README.md README: Howto build on Windows 2019-01-05 02:17:03 +01:00

dhewm3 Mod SDK

This repository contains an SDK that can be used to create modifications ("mods") for (or port Doom3 mods to) dhewm3.

It contains (mostly) the same source files as the original Doom3 SDK, but these are taken from dhewm3 and are licensed under GPLv3, not the SDK license.
Another small difference is that this is built using CMake instead of SCons + VS Project files.
This means that you need CMake to build it, but don't worry, on Windows it can create a Visual Studio Solution for you so you can program and compile with Visual Studio like you might be used to.

Some ports of existing Mods

This repository also contains ports of existing mods whichs authors released the source under GPL; you can find these in their own branches: Classic Doom 3, Denton's Enhanced Doom3, Fitz Packerton HardQore2 and Scarlet Rivensin: The Ruiner

You can find Win32 DLLs of those mods that work with dhewm3 1.5.0 at https://github.com/dhewm/dhewm3/releases/download/1.5.0/dhewm3-mods_1.5.0_win32.zip
The equivalent Linux amd64 (x86_64) libs can be downloaded at https://github.com/dhewm/dhewm3/releases/download/1.5.0/dhewm3-mods_1.5.0_Linux_amd64.tar.gz

How to build

On Windows

You need CMake either Visual Studio (2010 and newer have been tested) or MinGW-w64

  1. Clone the dhewm3-sdk git repo
  2. (optional: switch to an existing mods branch: git checkout dentonmod)
  3. create a build directory in your dhewm3-sdk/ directory (build/ or build-dentonmod/ or whatever)
  4. Start the CMake GUI
  5. Select your dhewm3-sdk/ folder for "Where is the source code" and your
    build directory from step 3 for "Where to build the binaries".
  6. Click [Configure], select what you want to build with, e.g. "Visual Studio 15 2017", click [Finish], wait for CMake to do its thing
    • If you're using MinGW you'll have to select your build type now, e.g. Debug (not optimized but debuggable) or Release (optimized and thus faster, but can't be debugged that well).
    • (For Visual Studio you don't have to select a build type now, you can do it in in Visual Studio)
  7. Click [Generate]
  8. Building:
    • If you're using Visual Studio, you should be able to just click [Open Project] to open the generated Project in Visual Studio. You can now compile the SDK in Visual Studio (and of course make your changes to the code).
    • (Untested:) For MinGW, open your MinGW or MSys shell, switch to your build directory and execute make -j4 to build the game DLL
  9. Now it's time to copy the DLL (e.g. dentonmod.dll) to your dhewm3 install, where base.dll and d3xp.dll are
    • For Visual Studio the DLL should be in a subdirectory of your build directory, depending on the build type you selected in build/Debug/ or build/Release/ or similar
    • For MinGW the DLL should be directly in your build directory.
  10. start the game with that mod, like dhewm3 +set fs_game dentonmod

(Make sure to actually have the mods game data in the right directory as well; the directory name should be the same as the game lib name, but without .dll, for example dentonmod/ for dentonmod.dll)

On Linux and other Unix-likes

On Linux and similar the following should work (if you have cmake, make and GCC/g++ installed):

  1. Clone the dhewm3-sdk git repo
  2. switch to your git clone's directory: cd dhewm3-sdk
  3. (optional: switch to an existing mods branch: git checkout dentonmod)
  4. create a build directory: mkdir build
  5. switch to build directory: cd build
  6. create Makefile with CMake: cmake ..
  7. compile the mod .so: make -j4
  8. it (e.g. dentonmod.so) should now be in the build/ directory, copy it to your dhewm3 install, where base.so and d3xp.so are
  9. start the game with that mod, like dhewm3 +set fs_game dentonmod

(Make sure to actually have the mods game data in the right directory as well; the directory name should be the same as the game lib name, but without .so/.dylib, for example dentonmod/ for dentonmod.so)

How to port a Mod to dhewm3

The usual (easiest) way to port a mod is to make a diff between the mod's source and the Doom3 SDK and apply the resulting patch to the vanilla game source (from the master branch).
Afterwards usually some manual work must be done to resolve patching conflicts and get the mod to compile.
Also, the CMakeLists.txt file must be adjusted (see the dentonmod branch for examples).

Please note that currently I only accept mods that are released under the GPL license - the one used by Open Source Doom3 (i.e. not only the Doom3 SDK license) - because neither the GPL nor the SDK license allow merging code from both licenses.
So please get permission from the mod authors first.

Yes, this unfortunately means that unless you manage to contact Sikkpin and get his permission, there will be no Sikkmod for dhewm3 (and neither other mods that use Sikkmod code) :-(
(If you are Sikkpin, please get in touch!)

Getting in touch

If you are a mod author and want to release your mod's sourcecode under GPL, but don't want to port it yourself (or don't have time or are unsure how) please contact me, I can probably help you :-)

The easiest way to contact me is by creating an issue in this Github repository, or by sending a DM to caedes in the id Tech Forums or by pinging caedes in the #iodoom3 IRC channel on FreeNode.
If you prefer E-Mail, you can find my address in the git commits.