Copied from the build log kept by the development agent in the TC3 project (revision 13, 2026-11-21). The original doc is the reference; this page is a snapshot.
APThreat (Advanced Persistent Threat, short name apthreat) is an experiment, not a released game: a single-player stealth-tactical prototype built on The Dark Mod 2.15 engine (TDM, an idTech4 / Doom 3 derivative), using content converted from TrueCombat:Elite 0.49b (TCE, an ET mod). Multiplayer was dropped on 2026-11-21.
As of this log: 14 maps converted, the TCE soldier is the player model, 42 TCE soldier NPCs, 5 firearms, a TCE-style HUD, and the first engine changes (HUD values, sprint stamina, prone, iron sights).
| What | Where (project files) |
|---|---|
| Engine patch + Linux build | apthreat/engine/ |
| Asset pk4s (characters, weapons, HUD, test maps) | apthreat/assets/ |
| 14 converted maps (pk4 + .map, logs) | tdm-port/maps/ |
| Converter scripts | tdm-port/converter/ |
| Screenshots | tdm-port/screenshots/ |
| ET:Legacy + TCE reference run | etlegacy-tce-baseline/ |
Nothing has been published anywhere public. Each step below says what was done, why, the commands or scripts used, and what broke.
TCE 0.49b was run on ET:Legacy 2.86.2 first, to have a working original to compare against.
etlegacy-tce-baseline/ (headless-client-test.sh, tce-obj_village.png, etlegacy-oasis.png).The target engine went Quake3e, then plain dhewm3, then The Dark Mod 2.15. TDM was chosen because it is a maintained idTech4 engine with a full single-player stealth/AI game layer already working.
/home/user/stgatilov/darkmod_src, built with CMake in build/./opt/tdm. Each content set is a TDM “FM” (mission folder): fms/tce for the maps and menus, fms/tcedev for characters, weapons, HUD and test maps.All 14 maps convert and compile with no leaks. Only obj_downs and obj_nuclear_delta ship .map sources; the other 12 were decompiled from .bsp with q3map2.
| Map | Source |
|---|---|
| obj_downs | original .map (7,726 brushes, 771 patches, 471 lights) |
| obj_nuclear_delta | original .map |
| obj_snow, obj_railhouse, obj_northport, _overkilling, obj_alcatraz_b3, obj_bahamut_final, obj_chlite, obj_dedust_final, obj_frostbite_101, obj_nbn23_se_b1, obj_oldtowne_b4, obj_town_and_metro_final | decompiled .bsp |
How the converter (q3_to_tdm.py) builds a TDM map:
--force-sun --ambient 0.3, because their original lights are lost.HD textures: the uploaded f_*.pk3 files plus f_tcetest_zzz_hd_textures.pk3 (1,148 MB) from the TrueCombat-Platinum GitHub release v0.39.7-sandbox44.
Commands: rebuild_all.sh rebuilds all 14. Per map, finish_map.sh <map> takes a spawn screenshot, packs tdm-port/maps/tce_<map>.pk4 with pack_map.py, and copies the .map and the dmap/run logs to tdm-port/logs/. Gameplay entities (spawns, objectives) are saved to gameplay/*.json but not placed yet.
The TCE menu backgrounds and logo show in the TDM main menu (FM folder fms/tce). The TCE fonts ariblk and courbd were converted to TDM font format with convert_fonts.py (as tce_ariblk, tce_courbd); the HUD uses them too.
Black sky patches and opaque plants are fixed, and all 14 maps were rebuilt with the fixes.
textures/tce/<map>/.The player is the TCE soldier, converted from ET's skeletal formats to TDM md5, with a separate head entity.
mdm2md5.py reads the ET mesh (.mdm v3) and animation (.mdx v2) files and writes md5mesh / md5anim. Bones are rebuilt from ET's compressed angles and parent offsets; an origin joint is added and the model raised 24 units because ET feet sit at -24.build_character.py reads each TCE .char file and resolves skins and attachments the way ET does: head on tag_head, hat on the head's tag_mouth, belts and backpack on tag_bright, tag_bleft, tag_ubelt and tag_back. These md3 parts are baked into the mesh.tce:player_soldier inherits TDM's player; a map selects it with the worldspawn key player_classname. Ragdoll: af/tce_soldier.af, adapted from TDM's guard because ET's shoulders hang off the neck.There are 42 TCE soldier NPCs: 14 base characters plus snow, desert and commando series. All share the ET human animations and hold a gun.
| Series | Entity names | Count | Look |
|---|---|---|---|
| Base (skin s) | tce:ai_allied_<class>, tce:ai_axis_<class> | 14 | CT woodland, T stripes + woodland trousers |
| Snow (skin s2) | …_<class>_snow | 14 | CT white snow camo + snow helmet; T city top + Russian winter trousers |
| Desert (skin s1) | tce:ai_allied_<class>_desert | 7 | CT tan camo, boonie cap |
| Commando (skin s3) | tce:ai_allied_<class>_commando | 7 | CT black gear, masked helmet |
Classes: soldier, medic, engineer, fieldops, cvops, elite, vip. TCE has no desert or commando set for the terrorists.
tce:ai_ct_base (team 0, M4) and tce:ai_terrorist_base (team 1, AK-47), both inherit tce:ai_soldier_base (TDM humanoid AI).ranged_attack anim uses ET's machinegun firing loop; bullets leave the right hand with create_missile / launch_missile frame commands.build_character.py --variants snow desert commando. Test maps: tce_lineup, tce_lineup_snow, tce_lineup_camo._pXY sub-skins that swap top and trouser textures; not used yet.Five TCE guns are selectable and fire, each with TCE's own firing sounds, a magazine and reload.
| Gun | Weapon slot | Magazine | Start reserve | Fire |
|---|---|---|---|---|
| MP5 | 3 | 30 | 240 | auto |
| M4 | 4 | 30 | 240 | auto |
| AK-47 | 5 | 30 | 240 | auto |
| M3 Super 90 | 6 | 7 | 56 | semi, several pellets |
| Beretta | 7 | 15 | 90 | semi |
build_weapons.py builds each first-person model from the TCE hands md3 plus the gun parts placed on the hands' tags, and writes simple animations (raise, idle, lower, recoil, reload).zz_platinum_gunfire.pk3: tce_<gun>_fire for first person, tce_<gun>_fire_3p for NPCs.script/tce_weapon_firearm.script. Guns need ammo items (tce:ammo_<gun>), because TDM keeps weapons without ammo locked until bought in its shop.The TCE-style HUD replaces TDM's health bar and weapon display; the light gem stays at the bottom centre.
guis/tdm_hud.gui in the FM, using TCE images from gfx/2d and gfx/hud; packed as apthreat_hud.pk4.game/Player.cpp): each frame the player now sends the HUD WeaponClip, WeaponClipSize, WeaponReserve, PlayerStance and player_stamina.clipSize key, ammoInClip / addToClip in the script). R is bound to reload in the FM's autoexec.cfg.apthreat/engine/apthreat.patch (diff against upstream c82dbf9) and apthreat/engine/apthreat.x64.Walk, run, lean and crouch already exist in TDM. Sprint stamina, prone and iron sights are in the engine and were tested in game on tce_test (screenshots apthreat_ironsights.png, apthreat_prone_aim.png).
ironsight_offset key. The gun moves to the centre of the view over 0.18 s, the field of view narrows (default 55), weapon sway drops by 85%, and sprinting is blocked.apt_*.apthreat/engine/ now holds apthreat.patch (180 lines added in 5 files), apthreat-src.tar.gz (55 MB, full source) and apthreat.x64.| Problem | Cause | Fix |
|---|---|---|
| Reload played but magazine stayed empty | animDone() never reports true for the reload anim | Reload waits on a timer (reload_time, default 1.8 s) |
| R did nothing | TDM binds R to another action; reload is impulse 13 | FM autoexec.cfg binds R to reload |
| Game crashed when the TCE player spawned | Light gem code needs a head entity | Separate body mesh + head entity |
| “NULL model” fatal error with NPC guns | TDM's md3 model path is broken | World guns converted to OBJ |
| Guns not selectable | TDM locks weapons without ammo until its shop | Ammo items + start ammo per gun |
| White, giant first-person gun | Env-map stage used as texture; wrong model offset | Use last normal stage; offset ( -3 0 -1.5 ) |
| Missing helmet/mask textures | Backslashes in md3 shader paths | Paths normalized |
| Ragdoll errors | ET shoulders are children of the neck | Custom tce_soldier.af |
| Black sky, opaque plants | See step 5 | See step 5 |
| Third-person view in batch screenshots | Test setting saved into the shared config | Shots retaken with pm_thirdPerson 0 |
| Black test screenshots | A stale virtual display at 1024×768 | Fresh displays per run |
See also: APThreat project overview · Credits