6d3b26e2fc
This is an ugly hack that allows both exporting additional functions (incl. methods via static function + void* userArg) to Game DLLs and setting callback functions from the Game DLL that the Engine will call, without breaking the Game API (again after this change). This is mostly meant for replacing ugly hacks with SourceHook and similar and mods (yes, this is still an ugly hack, but less ugly). See the huge comment in Common.h for more information. Right now the only thing implemented is a Callback for when images are reloaded (via reloadImages or vid_restart) - Ruiner needs that. Also increased GAME_API_VERSION to 9, because this breaks the A[PB]I (hopefully after the next release it won't be broken in the foreseeable future) |
||
---|---|---|
cm | ||
d3xp | ||
framework | ||
game | ||
idlib | ||
MayaImport | ||
renderer | ||
sound | ||
sys | ||
tools/compilers/aas | ||
ui | ||
.gitignore | ||
CMakeLists.txt | ||
config.h.in | ||
COPYING.txt | ||
README.md |
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.
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 and Denton's Enhanced Doom3 and HardQore2
How to build
(I should eventually expand this, especially for Windows)
On Linux and similar the following should work (if you have cmake, make and GCC/g++ installed):
- Clone the dhewm3-sdk git repo
- switch to your git clone's directory:
cd dhewm3-sdk
- (optional: switch to an existing mods branch:
git checkout dentonmod
) - create a build directory:
mkdir build
- switch to build directory:
cd build
- create Makefile with CMake:
cmake ..
- compile the mod .so:
make -j4
- 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 - 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/.dll, for example dentonmod/ for dentonmod.so)
On Windows it should be kinda similar, but you have to tell CMake to create a Visual Studio solution for the VS version you're using, or Makefiles for MinGW-w64 or whatever.
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.