
Security News
vlt 1.5.0 Adds Agent Skills Management
vlt 1.5.0 links skills from JavaScript dependencies to coding agents, with lockfile versioning and Socket data to filter out known malicious packages.
cs2-c4-damage
Advanced tools
CS2 C4 damage prediction for custom HUDs and broadcast overlays — bundled data for 10 maps, GSI adapters, and zero runtime npm dependencies.
Drop-in CS2 C4 damage prediction for custom HUDs — no CS2 installation, extraction or runtime network access required.
简体中文 · Documentation · Changelog
Estimate damage, post-explosion HP and lethality for HUDs and broadcast overlays, assuming a standing player.
npm install cs2-c4-damage
Node.js 22+ is required for automatic resource loading. The core and GSI adapter are pure TypeScript/JavaScript, with ESM/CJS exports, types and zero runtime npm dependencies.
import { createBundledGsiPredictor } from 'cs2-c4-damage/node';
import { decodeGsiSnapshot } from 'cs2-c4-damage/gsi';
const c4 = createBundledGsiPredictor();
export async function handleGsi(payload: unknown, steamId?: string) {
const result = await c4.predict(decodeGsiSnapshot(payload, steamId));
if (result.status === 'predicted') {
console.log(result.damage); // one standing-damage value for the HUD
console.log(result.hpAfter, result.lethal);
}
return result; // hide the prediction when status is 'unavailable'
}
// On round end, disconnect or source restart:
export function resetC4() {
c4.reset();
}
steamId selects allplayers[steamId]; omit it to use player. Supply GSI map name,
planted/defusing bomb position, player position, forward and health. Your application
owns the GSI receiver and HUD display. A short tooltip such as “Standing estimate” is
sufficient to identify the displayed value.
The service selects the map, loads its bundled field and reuses the compiled predictor
on subsequent updates. It caches up to two maps by default, drops stale in-flight results
on map changes/reset, and returns unavailable for missing inputs or unsupported maps.
No local CS2 installation, extraction tool, manual resource download or network request
is needed at runtime.
The HUD value is a standing estimate. Missing collision/posture state and game updates can cause differences from actual damage; the model does not promise exact live-game simulation.
Ancient, Anubis, Cache, Dust II, Inferno, Mirage, Nuke, Overpass, Train and Vertigo.
Canonical names such as de_cache and short names such as cache are accepted by the
bundled loader. Compressed numerical tables total about 9.4 MiB and ship with the package.
Each map is loaded on demand; importing the core does not load map files.
The package pairs its map data with its model revision internally. Updates to bundled resources are delivered through library releases. The resource guide documents the manifest and maintainer regeneration process.
For applications with a Companion/Core split, load the field on the Node side and create the predictor in the calculation owner:
import { loadBundledMap } from 'cs2-c4-damage/node';
import { createStandingGsiPredictor } from 'cs2-c4-damage/gsi';
const field = await loadBundledMap('de_cache');
const predict = createStandingGsiPredictor(field);
// Reuse for each player's decoded snapshot; recreate when changing maps.
const result = predict(snapshot);
createStandingC4Predictor(field) from the root entry accepts direct bomb/player
positions, forward and health. These standing APIs return:
| Status | Fields |
|---|---|
predicted | Numeric damage, hpAfter, boolean lethal, stance: 'standing', model identity and assumptions. |
unavailable | reason; the HUD can hide the value. |
The existing createC4Predictor and createGsiC4Predictor APIs remain available for
multi-scenario calculations. Advanced callers can provide native sampling/collision
state or inspect stage traces; see the
model/API guide.
cs2-c4-damage/maps exports bundledMapManifest, packMapField and unpackMapField for
resource-aware applications. loadBundledMap checks the compressed file hash, metadata
and normalized field identity before returning it.
The CLI retains extract, inspect, predict, compare-traces and qualify for custom
resources and research. Extraction is a maintainer/advanced workflow; ordinary HUD
integration uses the included maps.
pnpm install --frozen-lockfile
pnpm lint
pnpm typecheck
pnpm test
pnpm build
pnpm test:package
Documentation · Changelog · Contributing · Releasing
Authored code is Apache-2.0. Original research is credited to unicbm. Bundled numerical map tables are derived from CS2; rights in source game materials remain with their owners. See credits and NOTICE.
FAQs
CS2 C4 damage prediction for custom HUDs and broadcast overlays — bundled data for 10 maps, GSI adapters, and zero runtime npm dependencies.
We found that cs2-c4-damage demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
vlt 1.5.0 links skills from JavaScript dependencies to coding agents, with lockfile versioning and Socket data to filter out known malicious packages.

Security News
Rust 1.100 will add opt-in dependency cooldowns to Cargo, giving security scanners and maintainers time to catch malicious crate releases.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.