VS Code extension for Carbon Games' Heat scripting language. Provides language support for .txt, .mtl, .lvl, and .mmt files, editing tools for MenuObject scripts, and a workspace search tool with persistent results.
Source of truth: tools/vscodeExtentions/vscode-languageserver-heat in the game git repository. Never edit the compiled out/ or server/server.js; see the README one directory up for how to build, package and publish.
Features
Language Support
- Syntax highlighting - keywords, strings, comments, numbers, class/material/state names;
HeatScriptandQuarkScriptdeclaration lines are coloured alike - Tab completion - console commands, menu scripts, states, materials, world objects, menu objects, particle emitters, textures, and engine module properties
- Go to definition - jump to the definition of any script, state, material, or world/menu object
- Hover info - shows the description comment above a definition (precede any definition with
//@to add one) - Template properties - completions for
add-based template objects including WorldObjects, MenuObjects, and ParticleEmitters - Enum values - properties declared
type enum/type bitmaskingameScripts/rdb_*.txtoffer their valueMap choices; press Ctrl+Space on an existing value to swap it - Colours -
Color,ColorFocused,RenderCB_RGBColor*(0xrrggbb) andParticleColor*(0xrrggbbaa) get an inline swatch; hover it for VS Code's colour picker. Legacy"r g b"float values are recognised and migrate to hex when picked
Texture Coord Picker
With the cursor inside a MenuObject run Heat: Pick Texture Coords (Ctrl+Alt+C, the editor context menu, or Ctrl+click the "Pick Coords" button at the end of a set Coords line). The block's Texture (following initFrom templates) is decoded from data/obj (DDS BC1/BC2/BC3 and uncompressed) and shown in a panel where you drag-pick the rect; Apply writes "x y w h" back into the script. The panel also switches between Coords/CoordsFocused/CoordsPressed etc. in the same block.
Console Command Suggestions
Reads .hcd files from your workspace to provide argument completions for console commands, including sub-commands and typed arguments.
Heat Search
A workspace search tool that writes results to a dedicated document, so you can keep multiple searches open at once.
- Exact string match across all workspace files
- Skips binary files automatically
- Results are clickable - click any match to jump to that file and line
- Shows 3 lines of context around each match
To use: Open the Command Palette (Ctrl+Shift+P) and run Heat Search.
Extension Settings
| Setting | Default | Description |
|---|---|---|
heat.coordPicker.inlineButton |
true |
Show the Ctrl+click "Pick Coords" button at the end of set Coords lines |
heat.coordPicker.textureRoot |
(empty) | Explicit obj directory for textures; otherwise found by walking up from the script |
heatsearch.includes |
**/*.* |
Glob pattern for files to search |
heatsearch.excludes |
{**/*.exe,**/*.lib,**/*.journal} |
Glob pattern for files to skip |
heatsearch.maxfilesize |
4000000 |
Files larger than this (in bytes) are skipped |
heatsearch.logErrors |
false |
Show files that could not be searched in results |
Commands
| Command | Description |
|---|---|
Heat: Pick Texture Coords |
Open the texture coord picker for the MenuObject under the cursor |
Heat Search |
Search workspace files with results in a persistent document |
Heat: Process Cpp |
Extract console command definitions from C++ source files into .hcd files |
Heat: Debug |
Dump the current state of the language server's parsed databases to the output log |
Adding Descriptions to Definitions
Precede any definition with a //@ comment and it will appear in tab completion and hover:
//@ The main menu background state
State MainMenu {
Changelog
See changelog.md.