MetaHookSv

repository·main·Indexed 42 days ago

https://github.com/hzqst/metahooksv

A client-side modding framework for SvEngine (Sven Co-op) and other GoldSrc-based games. It enables advanced plugin-based modifications for gameplay, graphics, and UI, featuring a GUI installer and support for plugins like CaptionMod, Renderer.dll, and SCModelDownloader.

Tokens
140.3K
Snippets
241
Records
567
Agent score
53%

What's inside MetaHookSv

  1. Overview of CaptionMod

    main

    CaptionMod is a MetaHook plugin designed for GoldSrc and SvEngine games. It provides a VGUI2-based subtitle system, HUD text translation, support for multi-byte text rendering, and a Source 2007-style chat dialog.

    It functions by intercepting engine and client events (such as sound playback, HUD messages, and netmessages) and converting them into translated subtitles or HUD output using a dictionary-based lookup system.

  2. Overview of the SteamScreenshots plugin

    main

    The SteamScreenshots plugin is a specialized screenshot-bridging tool designed exclusively for Sven Co-op.

    Its primary function is to intercept the engine's snapshot command, capture the current OpenGL framebuffer, and automatically upload the resulting image to the Steam screenshot manager using the Steamworks ISteamScreenshots interface. This allows in-game screenshots to be managed and shared through the standard Steam ecosystem.

  3. Overview of MetaHookSv Plugins

    main

    MetaHookSv provides a variety of plugins to enhance the GoldSrc and Sven Co-op experience. Key plugins include:

    • CaptionMod: Displays subtitles, translates HUD messages, and adds VGUI text/high-DPI support. Fixes Chinese character rendering in Sven Co-op.
    • BulletPhysics: Adds ragdoll support for player deaths and specific entity interactions.
    • MetaRenderer: Replaces the original graphics engine to improve rendering performance and visual quality.
    • StudioEvents: Prevents repetitive model sound effects from spamming.
    • SteamScreenshots (Sven Co-op only): Redirects snapshot commands to Steam's screenshot system.
    • ResourceReplacer: Dynamically replaces models and sounds without modifying disk files (similar to gmr/gsr).
    • ThreadGuard: Manages thread creation for hw.dll, GameUI.dll, and ServerBrowser.dll to prevent crashes during exit or hot-restarts.
    • CommunicationDemo (Sven Co-op only): Provides an interface for bidirectional client-server communication.
    • SCCameraFix (Sven Co-op only): Fixes camera jitter in observer mode.
    • ABCEnchance (Sven Co-op only): Adds CSGO-style HUD, weapon menus, damage indicators, and more.
    • HUDColor (Sven Co-op only): Allows modification of HUD colors.
  4. Overview of the BulletPhysics Plugin

    main
    The BulletPhysics plugin for MetaHookSv provides client-side physics object and ragdoll simulation for GoldSrc and SvEngine-based games using the Bullet3 physics engine. It integrates via the MetaHookSv plugin interface and hooks into engine/client rendering and animation flows to enable physics-driven behaviors and debug visualization.
  5. Overview of BulletPhysics Plugin

    main

    BulletPhysics is the client-side physics plugin for MetaHookSv. It maps GoldSrc/SvEngine entities, Studio models, and the BSP world into a Bullet3 physics world.

    Key capabilities include:

    • Construction & Updates: Creating and updating static objects, dynamic objects, and ragdolls.
    • Synchronization: Bidirectional synchronization between animated bones and Bullet rigid bodies.
    • Simulation: Managing the Bullet dynamics world, including gravity, collision filtering, fixed-timestep simulation, and ray testing.
    • Debugging: Providing debug drawing, a VGUI2Extension debug window, and object/component inspection/selection.
    • Configuration: Editing physics configurations via console commands or a GUI.
  6. Overview of SCModelDownloader

    main

    The Plugins/SCModelDownloader is an automatic player-model download plugin for the Sven Co-op client. It automates the process of detecting player model changes, downloading new assets asynchronously, validating them, and hot-reloading the models in-game.

    Key Features

    • Automatic Downloads: Triggers when a player's model changes, controlled by the scmodel_autodownload cvar.
    • Asset Management: Maintains models.json (available models) and versions.json (version mappings).
    • Integrity Validation: Ensures downloaded .mdl, .T|t.mdl, and .bmp files are valid before writing to the destination.
    • User Interface: Provides VGUI2-based GameUI settings and a task-list page to monitor download progress.
    • Model Switching: Prompts players to switch to newer versions of their current model and allows skipping updates via skippedmodels.txt.
  7. Overview of rdc-cli Frame Capture

    main

    rdc-cli is a scriptable CLI wrapper around RenderDoc that converts .rdc captures into Unix text streams (TSV by default, or --json / --jsonl on request). It allows for inspecting shaders, UBO contents, draw state, and render targets directly from the command line using tools like grep, awk, or jq. It is the terminal-based counterpart to the RenderDoc GUI, using the same capture and replay engine.

    Key Constraints:

    • rdc capture uses launch-time injection (ExecuteAndInject). It cannot attach to an already-running game; the target must be started by rdc.
    • For MetaHook games, metahook.exe loads engine DLLs in-process, so the capture target is metahook.exe itself. You do not need --hook-children for standard MetaHook targets.
    rdc capture -o frame.rdc -- "D:\Path\to\metahook.exe" -insecure -game cstrike
  8. Overview of the Renderer Plugin Architecture

    main

    The Renderer plugin is the core graphics-enhancement component for MetaHookSv. It provides a modern OpenGL rendering pipeline for GoldSrc engine games, enabling advanced visual effects that are not natively supported by the engine.

    Core Rendering Features

    • Modern OpenGL Pipeline: A complete system for advanced graphics.
    • Lighting: Deferred lighting for efficient multi-light rendering and real-time shadows.
    • Ambient Occlusion: HBAO (Screen-space ambient occlusion).
    • HDR: High Dynamic Range rendering with tone mapping.
    • Environment & Effects: Water rendering (refraction), portal rendering, and post-processing (FXAA, gamma correction).

    Supported Model Types

    • Studio Models: .mdl format (characters/weapons).
    • Sprites: .spr format.
    • World Surfaces: .bsp format terrain.
  9. Overview of MetahookInstaller

    main
    MetahookInstaller is a Windows-based GUI tool built with Avalonia and ReactiveUI (.NET 8) designed to manage the MetaHook runtime. It automates the deployment of MetaHook files from the repository's Build/ directory to GoldSrc or Sven Co-op game directories and provides a visual interface for managing plugins.
  10. Use UtilHTTPClient_libcurl for HTTP requests

    main

    The UtilHTTPClient_libcurl library is an HTTP client implementation based on libcurl (multi/easy). It provides the IUtilHTTPClient and IUtilHTTPClientFactory interfaces via a DLL.

    Key features include:

    • Frame-based driving: Network requests are processed once per frame via IUtilHTTPClient::RunFrame(), which should be called from the main engine/plugin loop.
    • Request types: Supports synchronous, asynchronous, and streaming (chunked) requests.
    • Cookie sharing: Optional support for a shared Cookie container across multiple requests.
    • Lifecycle management: Uses a request pool to manage request IDs and automatic destruction.