Skip to content

ozy24/q2re-nightmare-mod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Nightmare Mod for Quake 2 Rerelease

Breezed through the main campaign on the hardest difficulty? Finished Call of the Machhine without breaking a sweat? Then this is the mod for you! This extension mod for Quake 2 Rerelease that adds additional skill levels inspired by Doom's Nightmare mode.

  • Skill 4: Nightmare Fast - Nightmare difficulty with fast monsters enabled
  • Skill 5: Nightmare Respawn - Nightmare difficulty with respawning monsters enabled
  • Skill 6: Ultra Nightmare - Nightmare difficulty with both fast monsters and respawning monsters enabled

Features

🏃 Fast Monsters (nm_fast_monsters)

  • 2x Movement Speed: Monsters move twice as fast, making combat more intense
  • 2x Attack Speed: Monsters attack twice as frequently (attack cooldowns are halved)
  • Replicates the fast monster behavior from Doom's Nightmare mode

🔄 Monster Respawn (nm_respawn_monsters)

  • Automatic Respawn: Monsters respawn after a configurable delay (default: 8 seconds)
  • Smart Respawn: Monsters respawn at their original death location
  • Alert State Preservation: Monsters respawn with their previous alert status (if they had an enemy, they'll immediately resume hunting)
  • Gib Support: Works even when monsters are gibbed
  • Corpse Cleanup: Uses the same revive system as the medic commander, automatically cleaning up corpses

Note, the default setting of 8 seconds matches the respawn time in Doom/Doom2 but is VERY difficult. This can be adjusted to suit with the cvar nm_respawn_time .

Installation

  1. Build the mod (see Building section below)
  2. Navigate to your Quake 2 Rerelease installation directory:
    • Default Steam path: C:\Program Files (x86)\Steam\steamapps\common\Quake 2\rerelease\
  3. Backup the original DLL first:
    • Rename game_x64.dll to game_x64.dll.backup (or any other backup name)
  4. Copy /game_x64.dll from the mod zip to replace:
    • C:\Program Files (x86)\Steam\steamapps\common\Quake 2\rerelease\game_x64.dll
  5. Launch the game and use the CVARs to enable features

Note: If you need to restore the original game, simply delete the modded game_x64.dll and rename your backup file back to game_x64.dll.

CVARs

All CVARs are prefixed with nm_ (Nightmare Mod) and can be set via console or config files.

nm_fast_monsters (default: 0)

Enables fast monsters mode (2x movement and attack speed).

Usage:

set nm_fast_monsters 1

Note: Automatically enabled when skill level is set to 4 or 6.

nm_respawn_monsters (default: 0)

Enables automatic monster respawning.

Usage:

set nm_respawn_monsters 1

Note: Monsters respawn after a configurable delay (default: 8 seconds, see nm_respawn_time). If the spawn location is blocked, the respawn will be retried for up to 1 second before giving up. Automatically enabled when skill level is set to 5 or 6.

nm_respawn_time (default: 8)

Configures the respawn delay in seconds for monsters when respawning is enabled.

Usage:

set nm_respawn_time 20   # Default: 8 seconds (matches Doom's Nightmare mode)

Note: This cvar only takes effect when nm_respawn_monsters is enabled. The default value of 8 seconds matches Doom's Nightmare mode timing for authentic difficulty.

nm_respawn_effect (default: 1) [CURRENTLY BROKEN]

Enables the visual effect (red shell) when monsters respawn, matching the medic commander's revive effect.

Usage:

set nm_respawn_effect 1  # Enable respawn visual effect (default)
set nm_respawn_effect 0  # Disable respawn visual effect

Note: When enabled, respawning monsters will display a red shell effect during respawn, making it easier to see when monsters are being revived. This matches the visual effect used by the medic commander when reviving monsters.

Architecture

  • Minimal Core Changes: Core game files are modified as little as possible
  • Dedicated Extension Layer: All new functionality lives in src/nm/ (Nightmare Mod)
  • Clear Separation: Extension code is clearly marked with [NM] comments
  • Easy Identification: All changes can be found by searching for [NM] markers

Code Organization

src/
├── nm/                    # Extension layer
│   ├── nm_monsters.h      # Public API declarations
│   └── nm_monsters.cpp    # Implementation
├── g_main.cpp             # Core: CVAR declarations & initialization hooks
├── g_ai.cpp               # Core: Fast monsters attack speed hooks
├── g_monster.cpp          # Core: Respawn scheduling hook
└── g_spawn.cpp            # Core: Level change cleanup hook

Core Changes Summary

  • g_main.cpp: CVAR declarations and initialization (~10 lines)
  • g_ai.cpp: Fast monsters attack speed hooks (~3 lines)
  • g_monster.cpp: Respawn scheduling hook (~2 lines)
  • g_spawn.cpp: Level change cleanup hook (~2 lines)

All complex logic lives in the extension layer (src/nm/).

Building

Prerequisites

  • Visual Studio 2019 or later
  • Windows SDK
  • vcpkg (included in repository)

Build Steps

  1. Open src/game.sln in Visual Studio
  2. Select the desired configuration (Debug/Release) and platform (x64)
  3. Build the solution (F7 or Build > Build Solution)
  4. The compiled DLL will be in dist/game_x64.dll

Alternatively, use the provided batch script:

cd src
build.bat

Technical Details

Fast Monsters Implementation

  • Movement speed is multiplied by 2.0 in ai_walk(), ai_run(), and ai_charge() functions
  • Attack cooldowns are halved in the core AI attack logic
  • Applied via hooks in the extension layer to minimize core changes

Monster Respawn Implementation

  • Uses the same revive system as the medic commander
  • Monsters are revived (not recreated), preserving entity references
  • Respawn queue supports up to 256 pending respawns
  • Original death location and alert state are preserved
  • Works with both normal deaths and gibs

Compatibility

  • Compatible with Quake 2 Rerelease
  • Designed to be easily mergeable with upstream updates
  • All extension code is clearly marked and can be easily removed if needed

Future Enhancements

Potential future features (not yet implemented):

  • Separate CVARs for movement speed and attack speed
  • Nightmare mode ammo reduction (half ammo pickups)
  • Nightmare mode accuracy improvements (perfect hitscanner accuracy)

Credits

  • Quake 2 Rerelease: Base game by id Software / ZeniMax Media Inc.
  • Doom Nightmare Mode: Inspiration for fast monsters and respawn mechanics
  • Thin Vanilla Architecture: Design pattern for clean extension development

Localization

See LOCALIZATION.md for required localization strings that must be added to your game's localization files.

License

This mod is licensed under the GNU General Public License 2.0, matching the Quake 2 Rerelease source code license.

Contributing

When contributing, please follow the Thin Vanilla principles:

  • Keep core changes minimal (config + hooks only)
  • Put all logic in the extension layer (src/nm/)
  • Mark all changes with [NM] comments
  • Reuse core infrastructure when possible

See docs/THIN_VANILLA_PRINCIPLES.md for detailed guidelines.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages