RPGScript Language Support

RPGScript is the official Visual Studio Code extension for developing TTRPG systems compatible with the RPG Companion App. Documentation for the language can be found here
It provides robust syntax highlighting and tooling for RPGScript (.rpgs), making it easier to define Stats, Mechanics, Effects, and Resources for your custom tabletop systems.
✨ Features
🎨 Rich Syntax Highlighting
Write .rpgs files with confidence. The extension provides distinct colorization for:
- Primitive Types:
integer, decimal, string, boolean, resource.
- Complex Nested Types: recursive support for generics like
list<string> or list<resource<background>>.
- Type Parameters: Distinguishes between the container type (e.g.,
list) and the inner parameter types for better readability.
- Arrays: Clear definitions for array structures
[].
🚀 Upcoming Features (Roadmap)
We are actively working on a full Language Server Protocol (LSP) implementation to bring you:
- [ ] IntelliSense: Auto-completion for keywords, variables, and known resource types.
- [ ] Go to Definition: Jump instantly to where a resource or stat is defined.
- [ ] Error Reporting: Catch type mismatches and syntax errors before you build.
- [ ] Hover Information: See documentation and details by hovering over types.
- [ ] Auto Formatting: Keep your code neat and clean with the help of the IDE.
📝 Code Example
Enjoy clean, readable code for your system definitions:
// Here goes a comment!
base string subrace_id(name = "Subrace ID") = null;
calc resource<feat>[] racial_traits(name = "Racial traits") =
sortBy(
filter(
flatAppend([race.traits, (race.selected_subrace?.traits ?? [])]),
filter = ($filterValue) => ($filterValue.min_level <= level),
),
order = "asc",
sort_by_selector = $sortByValue.min_level,
);