Syntax highlighting, linting and navigation for RECOIL and MechWarrior 3 .zad animation definitions, .zrd resources, .zan animation tracks, and .gs/.gw GameGen scripts. Resources use GameZ Script, tracks use GameZ Animation Script, and scripts use GameGen Script.
Install the Windows x64 VSIX with Extensions → … → Install from VSIX…, then open your reconstructed source project folder containing data/ and gamegen/. VS Code 1.140 or later is required. The extension includes its language server and .NET runtime; no zStudio installation is required. The extension has no network service or telemetry.
The editor provides comments, strings, numeric literals, keywords and bracket highlighting; contextual field and enum completion; hover descriptions; a document outline; and Go to Definition for recognized animation, sequence, file and resource references. Diagnostics update from unsaved buffers, including dependencies open in the same server. Mission-specific results identify their mission. Multiple matching definitions remain separate navigation targets.
Game rules are selected independently for each workspace folder. The status bar shows GameZ: MW3, GameZ: RECOIL or GameZ: Unknown for the active source file. Its tooltip identifies an explicit override or the evidence used by Auto, and explains when project detection is unavailable. Click the indicator, or run GameZ Script: Select Game, to choose Auto, MW3 or RECOIL for that folder. For files outside a workspace folder, the command opens the gamez.dialect setting.
The gamez.dialect setting defaults to auto, which reads native source-model identity in a trusted project and recognizes verified source markers. When the game is unresolved, Unknown retains shared syntax checks and structural navigation while deferring game-specific rules and suggestions. Select the game before running Validate Project in that state. Restricted Mode uses document-local evidence or your explicit selection without indexing the project. A shared SI animation header does not identify its game.
Diagnostics reused by both games use GAMEZ_ codes, including syntax, encoding, type and project-reference checks. Rules specific to an engine retain their RECOIL_ or MW3_ codes. A nested objective command such as node_state is not a spatial network declaration.
Native MW3 assistance covers extended AI paths and regions, mission actors, valves and targets, mech/equipment definitions, animation events and resource layouts. Campaigns and their authored mission readers keep separate reference contexts. Native weapon rows use MW3 rules; RECOIL's optional beam pause retains its own storage requirements.
ZAN assistance supports SI Animation Script, legacy OBJECT/FRAME keyframes, and sampled MW3 MOTION tracks. Hints distinguish position, scale, Euler XYZ and quaternion WXYZ values. Closed tracks are indexed lazily for navigation; Validate Project also checks closed and unreferenced animation files. Analysis retains source spelling and ordering, including authored repeated or reversed frames.
Hover and completion documentation explain the field's behavior, argument order, known units/defaults and relevant engine limitations. Meanings depend on context: weapon FIRE_RATE is shots per second, turret FIRE_RATE is a firing interval; vehicle rates is acceleration and maximum speed. Completion only offers fields in their recognized containers. Unused fields produce a warning explaining where the setting belongs and are omitted from normal suggestions. For example, common_mode/position directs you to aiv.zrd. Unknown positional structures remain inspectable.
Type errors have error severity (a red underline with the standard VS Code theme) and mark the incorrect value. For example, camera_ud_swing (5 2.5 1.2 1.2) marks 5 and suggests 5.0. Checks include nested vehicle weapon/camera/point rows, sound layouts, HUD coordinates and dialog font/color records. Fields whose numeric accessor accepts both kinds, such as effect SPEED and sound VOLUME, accept both 5 and 5.0. Unused fields have no invented numeric requirements; a setting the loader reads still gets checked even if gameplay does not use the resulting value.
CALLBACK sends VALUE as an integer event ID to the animation's registered engine/game handler. Known ID suggestions describe the game's Player::AsyncCommandCallback; other handlers can interpret them differently, and unknown IDs remain valid. Without a registered handler, nothing happens. Event-level START_TIME supports ANIMATION_OFFSET, SEQUENCE_OFFSET and EVENT_OFFSET, measured in seconds; earlier events and waits may postpone dispatch. A START_TIME directly on SEQUENCE_DEFINITION is ignored. The language service documents callbacks without executing gameplay code.
GameZ Script: Validate Project checks the project and assembles each mission's world/animation context in memory. It adds compiler and world-binding findings to Problems. It does not export game files, launch game tools, or change sources. Editing invalidates the previous project results; automatic checks are lighter than this explicit command. GameZ Script: Restart Language Server restarts analysis if needed.
The bundled parser checks parentheses, strings/escapes, integer and float syntax, raw float bits and Latin-1 representability. Resource rules cover evidence-backed fields in player, weapons, weather, objectives, sounds, effects, pickups, vehicles, navigation networks, HUD, fonts, dialogs, turrets and placement lists. Numeric storage matters: a field read as a float needs 10.0, not 10. Unknown resource structures receive syntax and structural navigation without invented semantic errors. Animation checks include known fields, required operands, enums, sequence/call references and mission search paths.
Vehicle weapon rows accept an optional tenth float, beam pause (s), for reRECOIL 1.0.7.3 AI beam weapons. Use a spelling such as 4.0; zero or omission uses the delay as the pause after the beam ends. Integer, negative, nonfinite and excess operands are rejected by validation and resource compilation. Player/non-beam uses warn without blocking compilation.
Vehicle camera hints distinguish chase offsets, the second stored vector and first-person local offsets. If the language server fails to start, GameZ Script: Restart Language Server retries without discarding unsaved text.
Inlay hints label verified argument roles beside values, including vehicle weapon rows, network nodes, coordinates, animation operands and supported resource layouts. Hover over a value or hint for its meaning and expected type; signature help shows argument order while typing. Animation definition NAME values are labelled as root nodes. Other NAME hints identify their role: sequence, animation, sound sample, effect template, light, camera or target node. Attachment, position-reference and recipient labels distinguish animation binding from placement. Labels that merely repeat their field names are hidden; hover and signature help remain available. Unverified slots remain unlabelled. Hints never change source text or encoding. VS Code's native editor.inlayHints.enabled setting controls visibility.
Network files named net_01.zrd through net_99.zrd offer field and unused node-name suggestions even when empty. Inside node_00 ( use completion to insert the node body or missing tuples. Link suggestions use nodes in the current unsaved buffer. The first node integer is unused; its actual index comes from its name. Pursuit hints follow the network's attack strategy.
Save non-ASCII sources as Western (ISO 8859-1) using Save with Encoding. Plain ASCII UTF-8 without a BOM is byte-compatible. UTF-8 BOM, UTF-16 and non-ASCII UTF-8 are diagnosed. The extension never changes a file's encoding automatically.
Project indexing requires a trusted, local workspace. Restricted Mode retains document-local analysis and highlighting. Open the project root or an ancestor: opening only data/ cannot establish the enclosing project. Compiled binary ZRD is outside this text language. Animation .zan files also participate in project validation. The extension does not format, rename or automatically fix sources. Incomplete files retain syntax errors; missing final parentheses can be recovered for navigation/completion only, never for compilation. Mission checks run in the background; Validate Project performs the exhaustive pass, including closed-file findings. A clean lint result does not prove engine compatibility.
Analysis is bounded: 16 MiB per document, 64 MiB total project text, two million project tokens, 250,000 tokens per document and 200 diagnostics or navigation/completion results per document/query. Inlay hints have a separate limit of 4,096 per requested range, applied after range filtering. An incomplete-analysis diagnostic or log explains a limit/failure. Other project files continue to use the bundled source-read safety limits.
For developers: from the repository root run ./tools/package.ps1. It restores locked dependencies, publishes the self-contained server, bundles the client, runs grammar/protocol tests and verifies the VSIX contents. npm run test:host in extension/ runs an isolated VS Code extension-host test; GAMEZ_VSCODE can select an installed VS Code executable. The standalone VSIX is the release artifact.
See development for architecture and release instructions.
GameGen .gs and .gw files use the GameGen Script mode. It shares the bundled server and project commands with GameZ Script, with separate syntax: # begins a comment even after a quote, commas can create empty operands, and quotes do not group arguments. Script numeric operands are text, so 2 and 2.0 do not have the different storage kinds they have in ZRD.
GameGen assistance includes command/operand hover, completion, signatures, argument labels, macro and include navigation, and model/node references in mission context. Command recognition preserves case-sensitive prefix dispatch and exact-only exceptions. Known commands with unverified operand meanings remain recognized without invented argument labels. Legacy or unsupported name-changing operations explain incomplete analysis instead of producing speculative missing-template errors.
Live mission checks follow mN.gs and its sourced scripts, model search paths, macro/conditional execution, and runtime companions. For example, ltank_01 in M1's aiv.zrd gets a red error underline when its ltank template is unavailable. Loading the existing model under the alias ltank in M1's vehicle support script clears the error, including when that script is an unsaved buffer. A model existing on disk or being loaded by another mission is insufficient. The diagnostic links to the mission entry; Go to Definition reaches known loads and declarations. Missing selected vehicle definitions, AI networks, pickup templates, effect/weapon models, and script textures receive their own findings. Common resource members take precedence over same-named mission members. Alternate AIV layouts are authored-preview contexts; their existence does not establish retail difficulty selection.
Local completion remains separate from cancellable mission analysis. World snapshots are reused only after rechecking their actual input files and missing search candidates. A broken mission reports incomplete context while other missions and document-local assistance continue. Analysis never creates directories, writes/deletes files, exports archives, or runs game executables. Renderer behavior, externally registered runtime variables, unsupported procedural authoring operations, and arbitrary gameplay are not simulated.