Visual Studio Code extension providing syntax highlighting and language support for KRPG (Kotazzz RPG) - a domain-specific language for creating text-based RPG games.
Features
Syntax Highlighting: Full syntax highlighting for KRPG language constructs
Comment Support: Line comments with #
Bracket Matching: Auto-completion and matching for {}, [], ()
String Support: Double-quoted strings with escape sequences
Keyword Recognition: Highlights KRPG-specific keywords and commands
Supported Language Elements
Sections
init - Game initialization
scenarios - Story scenarios
items - Item definitions
npcs - Non-player character definitions
locations - Game world locations
quests - Quest definitions
Control Flow
if, while, for - Conditional and loop constructs
return, goto, stop, wait - Flow control
require, multiple, option - Special flow controls
Declarations
action, stage - Action and stage definitions
item, npc, location - Entity declarations
link, lock, unlock - Location management
start, end, goal - Quest mechanics
complete, evolve, quest - Game state changes
Variables and Constants
Variables starting with _ (e.g., _random, _time)
UPPERCASE constants (e.g., WEAPON, ARMOR)
Numbers and quoted strings
Example
# Game initialization
init {
say "Welcome to the adventure!"
quest main_story
}
# Define items
items {
sword "Iron Sword" "A sturdy iron blade" {
slot_type WEAPON
}
}
# Define NPCs
npcs {
guard "Village Guard" "A friendly guard" {
stage {
action talk "Talk to guard" {
say guard "Hello, traveler!"
say you "Good day!"
}
}
}
}
# Define locations
locations {
village "Village Square" "The heart of the village" {
npc guard
item sword
}
start village
}
About KRPG
KRPG is a domain-specific language created by kotazzz for building text-based RPG games. The language provides a declarative syntax for defining game worlds, characters, items, quests, and interactive storylines.