mirror of
https://github.com/TeamLumi/vscode-bdsp-ev.git
synced 2026-03-30 10:15:46 -07:00
master
Features: - Syntax highlighting for .ev files - Autocomplete for 500+ commands with snippets - Hover documentation - Go-to-definition for labels - Diagnostics for invalid commands, arguments, and labels
BDSP Event Script
VSCode extension providing language support for Pokemon Brilliant Diamond & Shining Pearl event scripts (.ev files).
Features
Syntax Highlighting
- Labels - Script labels like
ev_start: - Commands - 500+ commands like
_TALKMSG(),_JUMP() - Work Variables -
@LOCALWORK0,@SCWK_ANSWER - Flags -
#FH_01,#FLAG_NAME - System Flags -
$SYS_FLAG_GAME_CLEAR - Strings -
"label_name",'text' - Comments -
; commentor// comment - Comparators -
EQ,NE,LT,LE,GT,GE
IntelliSense
- Autocomplete - Command suggestions with parameter snippets
- Signature Help - Shows argument names and types as you type
- Context-Aware Suggestions - Suggests @work, #flag, $sysflag based on expected argument type
Navigation
- Go to Definition -
Ctrl+Clickon a label reference to jump to its definition - Find All References - Right-click a label and select "Find All References"
- Document Outline - View all labels in the Outline panel
Diagnostics
- Unknown command names
- Invalid argument count
- Invalid argument types
- Undefined label references
- Invalid comparators in
_IFVAL_JUMP/_IFVAL_CALL
Installation
From Source
cd G:\Lumi\vscode-bdsp-ev
npm install
npm run compile
Then either:
- Press
F5in VSCode to launch Extension Development Host - Or run
npx vsce packageand install the generated.vsixfile
Install VSIX
Ctrl+Shift+Pin VSCode- Type "Extensions: Install from VSIX"
- Select the
.vsixfile
Usage
Open any .ev file and the extension activates automatically.
Example Script
; Sample event script
ev_start:
_TALKMSG("ss_rival%greeting")
_TIME_WAIT(30, @LOCALWORK0)
_IF_FLAGON_JUMP(#FH_01, "ev_has_flag")
_JUMP("ev_no_flag")
ev_has_flag:
_TALKMSG("ss_rival%has_flag_message")
_END()
ev_no_flag:
_IFVAL_JUMP(@LOCALWORK1, EQ, 5, "ev_special")
_TALKMSG("ss_rival%no_flag_message")
_END()
ev_special:
_FLAG_SET($SYS_FLAG_GAME_CLEAR)
_END()
Data Files
The extension uses JSON data files in the data/ folder:
commands.json- Command definitions with arguments and descriptionswork.json- Work variable namesflags.json- Flag namessys_flags.json- System flag names
These are sourced from RelumiScript.
Development
# Install dependencies
npm install
# Compile
npm run compile
# Watch mode
npm run watch
# Package
npx vsce package
License
MIT
Description
Languages
TypeScript
100%