
UnrealScript Language Server for VS Code
Language support for UnrealScript (Unreal Engine 3 / UDK): a fast native language server
with workspace-wide diagnostics, navigation, completion and refactorings, a crash-report viewer,
and a built-in MCP server that gives chat agents (VS Code agent mode, Claude, Cursor, ...) the
same understanding of your code.
It is built for large trees: a 7,000-file game indexes in about a second, and every check runs on
the whole workspace in the background.
Installation
Install UnrealScript (publisher RvdW) from the Extensions view, or run
code --install-extension RvdW.unrealscript
The language server and the MCP server are native binaries. The extension carries builds for
every supported platform and starts the one for your system:
| Platform |
Builds |
| Windows |
x64, arm64 |
| Linux |
x64, arm64 |
| macOS |
Intel (x64), Apple silicon (arm64) |
Nothing else needs installing: no runtime, no SDK, no UDK installation for the editor features.
VS Code 1.101 or newer is required (it is the first version with extension-provided MCP servers).
Getting started
- Open the folder that holds your packages:
Development/Src, or the UDK root above it. Each
package is a folder with a Classes subfolder (MyGame/Classes/MyPawn.uc).
- Open any
.uc file. Open files work at once; the rest of the workspace indexes in the
background (a progress indicator shows it) and its diagnostics fill the Problems panel.
- If your sources live somewhere else, or in several places, list them in
unrealscript.sourceRoots.
The Config and Localization folders next to Src are read too: hovers show the values a
config or localized variable really gets, and the ini/int checks find stale keys.
The engine packages (Core, Engine, GameFramework, UDKBase, UTGame, ...) are indexed for navigation
and types, but lint rules only run on your own packages
(unrealscript.diagnostics.lintStockPackages turns them on there too).
Features
Reading code
- Hover with the declaration, docs, inheritance chain and overrides; go to definition, find
references, go to implementations (overrides and subclasses), type hierarchy and call hierarchy
(calls that dispatch through overridden functions included).
- Code lens: subclasses, "overrides X", "overridden in N classes", reference counts.
- Semantic colouring for members, locals, states and enums; outline, workspace symbols, folding.
- Inlay hints with parameter names before literal arguments.
- Show replication of this class: every replicated variable by condition and declaring class
up the parent chain, RepNotify variables and RPCs.
- Show attack surface: every
server function a client can call, with the parameters the body
never checks.
- Macros: hover and go to definition on
`name, completion after a backtick, and `if
branches that a plain make does not compile shown faded.
Writing code
- Completion for members, scope, classes after
class' and extends, parent functions to override
(with signature and Super call), enum values, delegates, and defaultproperties keys and values.
- Context completion inside names: timer functions in
SetTimer, states in GotoState, labels,
classes in IsA, RepNotify variables, exec commands, and the values other code already passes.
- Signature help, snippets (
class, function, state, replication, repnotify,
defaultproperties, foreach, switch, ...), and formatting that only touches indentation and
trailing whitespace, so the compiled result stays identical.
- Rename for locals, members and whole override families.
Refactorings and quick fixes
- Override function..., Extract local, Extract function, Move X up to Parent,
Fold base class into this class, Remove redundant override.
- Replicate X to clients (optionally with RepNotify), Add server RPC / Add client RPC.
- Quick fixes that create a missing function, state, local, member or class, add a None check,
fix a typo, add
break or a Super call. Rules with a fix also offer Fix all in this file.
Diagnostics
- Syntax errors and unknown names, and the errors UCC would give at the next build: type
mismatches, wrong argument counts, overrides that differ from their parent, statements with no
effect, non-bool conditions.
- More than 100 lint rules that find real bugs UCC accepts: None dereferences on some paths,
replication mistakes, timers and states that don't exist, runaway loops, array index errors,
per-frame cost, config and localization drift, copied code that drifted. See the
rule list.
Build and crashes
- The UnrealScript: make and make -full tasks (Terminal > Run Task, or Ctrl+Shift+B) run the
compiler and put its errors in the Problems panel. They look for
Binaries/Win64/UDK.com above the
workspace; set unrealscript.build.command to use another compiler, or on Linux and macOS a
command such as wine /path/to/UDK.com.
- Crash reports: drop a player's crash dump (
.dmp) or Launch log into VS Code, or run
UnrealScript: Open crash report. See Crash reports.
MCP server for chat agents
The extension registers its bundled MCP server with VS Code, so UnrealScript shows up under MCP
servers in chat and agent mode with no mcp.json to write. An agent can then look things up the
way you would in the editor: find symbols, read a class outline, list callers and overrides, see
replication, run the diagnostics on a file, lint a snippet before proposing it, or triage a crash
dump. Every tool only reads; nothing writes to your files.
It indexes unrealscript.sourceRoots, or each workspace folder's Src (or Development/Src).
unrealscript.mcp.enabled: turn it off.
unrealscript.mcp.conventions: a text or Markdown file with your project's own rules (which
packages new code goes into, which files may change). Agents read it as uc://conventions.
unrealscript.mcp.path: use another build of uc-mcp.
Other MCP clients (Claude Desktop, Claude Code, Cursor, ...) can run the same binary. It is in
the extension's folder under server/<platform>-<arch>, for example
~/.vscode/extensions/rvdw.unrealscript-<version>/server/win32-x64/uc-mcp.exe or
.../server/darwin-arm64/uc-mcp, or build it from this repository. A typical entry:
{
"mcpServers": {
"unrealscript": {
"command": "C:\\Tools\\uc-mcp.exe",
"args": ["--src", "C:\\UDK\\Development\\Src"]
}
}
}
The tools, resources and prompts are listed in crates/uc-mcp/README.md.
Crash reports
Open a crash dump (unreal-v*.dmp from UDKGame/Logs), its Launch log, or both. The report says
whether UnrealScript was likely involved and why, then lists:
- the exception (type, address as
UDK.exe+offset, the address that was read or written);
- the script call stack, if the engine printed one;
- the script warnings from the last 30 seconds, grouped, each linked to its
.uc line (for
Accessed None 'X', the line that dereferences X);
- the native stack, with repeating addresses marked;
- the critical error section and the last log lines.
The log that belongs to a dump is found automatically when it sits next to it. A minidump holds
thread stacks but no heap, so object and function names come from the log: collect both.
Discord user names, Steam ids and IP addresses in the quoted log lines are replaced with placeholders, so a report can be shared.
Lint rules
Change a rule's severity or turn it off in unrealscript.diagnostics.rules, for example
{"fallthrough": "off", "float-equality": "hint"}. Silence one place with // uc-ignore <rule> on
the line above (the light bulb offers it), or a whole file with // uc-ignore-file <rule>. Every
diagnostic links to its explanation, with an example and the fix, in
docs/lint-rules.md.
| Rule |
Default |
Catches |
unknown-timer |
warning |
SetTimer/ClearTimer/IsTimerActive name a function that does not exist |
timer-params |
info |
timer function takes parameters; the timer passes zero/None for them |
unknown-state |
warning |
GotoState/PushState/IsInState name a state that does not exist |
unknown-label |
warning |
GotoState label does not exist in the target state |
unknown-repnotify |
warning |
ReplicatedEvent checks a variable name that does not exist or is not repnotify |
repnotify-unhandled |
info |
repnotify variable never handled in ReplicatedEvent |
unknown-default |
warning |
defaultproperties key that is not a property; UCC ignores the line |
duplicate-default |
warning |
same defaultproperties key set twice; the last one wins |
near-miss-override |
warning |
function name is one typo away from an inherited function |
override-params |
error |
override has different parameters than the function it overrides |
dropped-simulated |
warning |
override drops simulated, so it no longer runs on clients |
missing-super |
warning |
lifecycle event override never calls Super |
actor-setter |
warning |
direct write to an engine-managed Actor field instead of its setter |
arg-count |
error |
wrong number of arguments |
latent-call |
error |
latent function called outside state code |
static-instance |
error |
instance member used in a static function |
default-write |
info |
class default changed at runtime; affects every later instance |
runaway-loop |
error |
loop with no latent call, break or exit: the script aborts as a runaway loop |
infinite-recursion |
error |
function always calls itself |
struct-temp |
warning |
assigning to a field of a temporary struct copy has no effect |
foreach-copy |
warning |
foreach over a struct array gives copies; changes are lost |
remove-in-loop |
warning |
array element removed while counting up; the next element is skipped |
index-out-of-range |
error |
array index is always out of range |
client-none |
warning |
server-only object used in a simulated function without a Role or NetMode check |
fallthrough |
warning |
switch case falls through into the next case |
unchecked-cast |
info |
cast result used without a None check |
unchecked-spawn |
warning |
Spawn result used without a None check; Spawn can fail |
after-destroy |
info |
code runs after Destroy() on a destroyed actor |
state-recursion |
warning |
GotoState in EndState, or Destroy in Destroyed |
int-division |
warning |
integer division assigned to a float truncates |
enum-mismatch |
warning |
comparing values of two different enum types |
float-equality |
off |
exact equality on floats is rarely true |
unassigned-local |
warning |
object local is read but never assigned; it is always None |
unused-local |
hint |
local variable is never used |
shadowing |
hint |
local or parameter hides a class variable |
unreachable |
hint |
code after return, break or goto never runs |
missing-return |
hint |
function can reach its end without returning a value |
rpc-return |
warning |
the result of a replicated function is used on the other machine, where it is never filled in |
config-class |
warning |
config variable in a class without config(...) |
spawn-abstract |
error |
Spawn of an abstract class always fails |
new-actor |
error |
actors must be created with Spawn, not new |
obsolete-ref |
warning |
reference to a class in an X- (excluded) folder |
unused-private |
hint |
private member is never used |
hot-allactors |
warning |
AllActors/DynamicActors in a per-frame function |
hot-reliable |
warning |
reliable replicated function called every frame |
client-write |
hint |
replicated variable written in simulated code without a Role check; the next update overwrites it on clients |
client-controller |
warning |
a pawn's Controller used in simulated code without a None check; it is None for pawns other players own |
simulated-call |
hint |
simulated function calls a non-simulated one, which does nothing on clients |
never-cleared |
warning |
delegate added to, or looping timer set on, another object and never cleared |
hot-replicated-write |
info |
replicated variable written every frame |
hot-expensive |
warning |
expensive call (object lookup, config save, console command) every frame |
hot-spawn |
info |
Spawn every frame |
delegate-signature |
warning |
function assigned to a delegate has different parameters or return type |
bad-default-value |
warning |
defaultproperties value does not fit the property's type, or a static array index is out of range |
byte-overflow |
warning |
value outside 0..255 stored in a byte |
unused-var |
hint |
class variable no code in the workspace uses |
unused-function |
hint |
function nothing in the workspace calls |
server-trust |
info |
server function stores a client-chosen number without a range check |
hot-quadratic |
info |
array Find inside a loop in a per-frame function |
hot-log |
info |
logging in a per-frame function |
out-arg |
error |
out parameter given something that is not a variable |
arg-type |
error |
literal argument of the wrong kind (a string for an object, None for a number) |
assign-const |
error |
assignment to a const, a const variable or a function result |
deprecated-ref |
warning |
code uses a variable marked deprecated |
unused-param |
hint |
parameter the function never uses |
unused-state |
hint |
state nothing in the workspace enters |
unchecked-load |
warning |
DynamicLoadObject or FindObject result used without a None check |
magic-number |
off |
number literal equal to a const that is already declared |
none-deref |
warning |
object is None on every path that reaches this access |
none-path |
warning |
object can be None here: an earlier None check or assignment lets the None case through |
check-after-use |
info |
None check of an object that was already used without one |
redundant-none-check |
hint |
None check whose outcome is already known on every path |
dead-store |
hint |
value assigned to a local is never read |
repl-unread |
info |
replicated variable that no code reads |
repl-constant |
hint |
replicated variable that no code changes |
repnotify-none |
warning |
replicated reference used in its RepNotify without a None check; the actor may not have arrived yet |
early-replicated-read |
info |
simulated PostBeginPlay/PreBeginPlay reads a replicated variable that clients have not received yet |
unchecked-return |
info |
result of a function that can return None is used without a check |
hot-complexity |
warning |
per-frame function reaches a walk over every actor through its calls |
nested-iteration |
info |
walk over every actor inside another: O(n\u{b2}) per call |
ini-unknown-key |
info |
ini key in the class's section that no config variable reads |
loc-unknown-key |
hint |
int key in the class's section that no localized variable or Localize call uses |
loc-missing |
warning |
Localize call for a key the package's .int file does not have |
loc-empty |
info |
localized variable the code reads with no text in the .int file and no default |
duplicate-code |
hint |
function body identical to one in an unrelated class (renamed identifiers included) |
drifted-copy |
info |
same-named function in an unrelated class that is mostly the same code: a copy that drifted |
impossible-cast |
warning |
cast between unrelated classes: always None |
redundant-cast |
hint |
cast to a class the value already is |
impossible-isa |
warning |
IsA test between unrelated classes: always false |
type-mismatch |
error |
object of a class that does not fit where it is stored, passed or returned (UCC: Type mismatch) |
condition-type |
error |
if/while condition that is a number, object or string instead of a bool |
return-value |
error |
return with a value in a function that returns nothing |
no-effect |
error |
statement that computes a value and drops it (UCC: Expression has no effect) |
override-specifiers |
error |
override differs from the parent in static, latent or iterator (UCC rejects it) |
string-switch-element |
warning |
switch on an element of a string array: the engine compares memory, so no case matches |
index-range |
warning |
array index (constant or loop counter) past the end of the array |
divide-by-zero |
warning |
division by a literal zero |
zero-divisor |
info |
divisor that can be 0: an array Length or a counter that may never count |
none-arg |
warning |
None passed for a parameter the called function uses as an object without a test |
client-taint |
warning |
value sent by the client reaches an array index, loop bound, Spawn or command without a check |
state-timer |
warning |
looping timer started in BeginState that the state never clears |
push-without-pop |
info |
PushState with no PopState anywhere in the class family |
array-only-grows |
info |
dynamic array that code adds to after start-up but nothing shrinks |
write-only-var |
hint |
member variable that is assigned but never read |
duplicate-condition |
warning |
else-if branch tests the same condition as an earlier branch |
identical-branches |
hint |
if and else branches do the same thing |
same-operands |
warning |
both operands of a comparison or logic operator are the same expression |
repeated-chain |
info |
long member chain evaluated many times in per-frame code |
struct-copy |
hint |
large struct passed by value |
empty-body |
warning |
; right after if/while makes the body empty |
Settings
| Setting |
What it does |
unrealscript.sourceRoots |
Folders to index. Empty: the workspace folders. |
unrealscript.workspaceDiagnostics |
Report problems for the whole workspace, not only open files. |
unrealscript.diagnostics.rules |
Severity per rule (off, error, warning, info, hint). |
unrealscript.diagnostics.lintStockPackages |
Also lint the engine packages. |
unrealscript.defines |
Macros your build defines on the command line (e.g. debug), for `if regions. |
unrealscript.build.command |
Compiler for the make tasks. |
unrealscript.server.path |
Use another build of the language server. |
unrealscript.mcp.enabled / .conventions / .path |
The MCP server, see above. |
Building from source
You need Rust (stable) and Node.js 22 or newer.
cargo build --release -p uc-lsp -p uc-mcp
mkdir server && cp target/release/uc-lsp target/release/uc-mcp server/ # .exe on Windows
# (a local build may sit directly in server/; the published package has server/<platform>-<arch>/)
npm ci
npx vsce package
code --install-extension unrealscript-*.vsix
cargo test runs the parser, analysis and language server tests. The command-line checkers
uc-sema-check <Src> (every diagnostic for a tree) and uc-crash <file> (a crash report in the
terminal) are built along with them.
License
MIT
| |