@gmvjs/xray-v1
v0.1.1
Published
gmv: X-Ray Engine 1.x
Maintainers
Readme
@gmvjs/xray-v1 — X-Ray Engine 1.x
X-Ray Engine 1.x (S.T.A.L.K.E.R.: 1.0 Shadow of Chernobyl, 1.5 Clear Sky, 1.6 Call of Pripyat; the parser tells the versions apart itself): OGF v4 models with skeletons and animations (embedded and external .omf, body parts), .db/.xdb archives (including Shadow of Chernobyl's encrypted gamedata.db*), compiled levels with grass from level.details, .dm details, SDK sources (.object, .skl/.skls, .level scenes) and export to X-Ray SDK 0.7.
An engine plugin for @gmvjs/core: formats, archives and game presets. Heavy parsers are loaded on demand (import() inside load), so adding the package costs almost nothing until a file of this engine is opened.
Installation
npm i @gmvjs/core @gmvjs/xray-v1 @gmvjs/codecsUsage
The whole engine (all games):
import { createRegistry, ViewerSession } from '@gmvjs/core';
import { xrayV1Engine } from '@gmvjs/xray-v1';
const session = new ViewerSession(createRegistry([xrayV1Engine]));One game: a package subpath (the game preset and an engine limited to that game):
import { createRegistry, ViewerSession } from '@gmvjs/core';
import soc from '@gmvjs/xray-v1/soc';
const session = new ViewerSession(createRegistry([soc.engine]), soc.preset.id);Games (subpaths)
| Import | Preset | Game | Status | Only for this game |
|---|---|---|---|---|
| @gmvjs/xray-v1/soc | stalker-soc | S.T.A.L.K.E.R.: Shadow of Chernobyl | 🟡 beta | soc-key.ts; the gamedata.db* file table key is looked up in the user's bin/XR_3DA.exe; the package contains no keys |
| @gmvjs/xray-v1/cs | stalker-cs | S.T.A.L.K.E.R.: Clear Sky | 🟡 beta | — |
| @gmvjs/xray-v1/cop | stalker-cop | S.T.A.L.K.E.R.: Call of Pripyat | 🟡 beta | — |
| @gmvjs/xray-v1/sdk | — | export to X-Ray SDK 0.7 (ExporterPlugin xray-sdk): .object, .level + scene_object.part, DDS + .thm; also used for Metro maps | — | export.ts, write-object.ts, write-scene.ts |
Formats
| id | What | Files | Status |
|---|---|---|---|
| xray-ogf | X-Ray OGF | .ogf + .omf, .skl, .skls animations | 🟡 beta |
| xray-object | X-Ray SDK .object | .object + .omf, .skl, .skls animations | 🟡 beta |
| xray-level | X-Ray: compiled level (level + level.geom) | by path /(^|\/)levels\/[^/]+\/level$/ | 🟡 beta |
| xray-dm | X-Ray: detail (.dm: grass, bushes) | .dm | 🟡 beta |
| xray-scene | X-Ray SDK: level (.level + scene_object.part) | .level | 🟡 beta |
Archives
xray-db— X-Ray .db / .xdb (Clear Sky, Call of Pripyat) (.db,.xdb,.db0,.xdb0,.db1,.xdb1,.db2,.xdb2…)
Export
xray-sdk— S.T.A.L.K.E.R.: X-Ray SDK 0.7 sources (subpath@gmvjs/xray-v1/sdk)
Dependencies
@gmvjs/core— plugin API, types, ZIP/folder archives, zlib, DDS/BC, geometry@gmvjs/codecs— LZO
Not done yet
- OGF older than v4 and binary
.levelfiles of old SDKs (no samples) - SDK: checking in LevelEditor, mapping materials to shaders/gamemtl, writing OGF/OMF
License
MIT
If this project helps you, consider supporting its development on Patreon ❤️

