Skip to content

About

Standalone GameZ Script language extension for RECOIL ZAD and ZRD source files

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

GameZ Script

Syntax highlighting, linting and navigation for RECOIL text .zad animation definitions and .zrd resources. Both extensions use the GameZ Script language in VS Code.

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.

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.

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. The language does not add editing support for .zan, .gs or .gw, and 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. World-dependent wildcard binding and engine-load checks require Validate Project. 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.

About

Standalone GameZ Script language extension for RECOIL ZAD and ZRD source files

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages