Skip to main content

Rpg Engine

@matthewbonig_pe3w/rpg-enginev2026.07.26.1· 5d agoMODELS
01README

Text-adventure RPG engine — swamp holds the world, the rules, and the save game; your agent narrates.

02Models1
@matthewbonig_pe3w/rpg-enginev2026.07.26.1rpg_engine.ts

Global Arguments

ArgumentTypeDescription
titlestringName of the adventure
introstringOpening text read at game start
startingLocationstringLocation id the player wakes up in
startingHpnumber
locationsarray
itemsarray
npcsarray
fn start(playerName: string, restart: boolean)
Begin a new game (or restart an existing one)
ArgumentTypeDescription
playerNamestring
restartbooleanDiscard an existing save and begin again
fn look()
Re-describe the current location without spending a turn
fn move(direction: string)
Walk through an exit to an adjacent location
ArgumentTypeDescription
directionstringAn exit direction, e.g. north
fn talk(npc: string, topic?: string)
Speak with an NPC in the current location
ArgumentTypeDescription
npcstringNPC id or name present in the current location
topic?stringOptional subject to steer the reply
fn take(item: string)
Pick up an item lying in the current location
ArgumentTypeDescription
itemstringItem id or name lying in the current location

Resources

state(infinite)— The save game: position, inventory, flags, history
scene(infinite)— What the player perceives after the latest action
03Stats
A
100 / 100
Downloads
0
Archive size
17.6 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
04Platforms
05Labels