Registry / web-framework / bard-legends-framework

bard-legends-framework

JSON →
library1.4.0jsnpmunverified

Bard Legends Framework v1.4.0 enables rapid development of interactive text-based narratives with branching storylines and dynamic character management. Built on actions-lib ^3.2.1, helpers-lib ^2.1.1, and script-engine-lib ^1.1.1, it provides a plugin-based architecture for defining game actions, NPC behavior, and plot branching. Unlike generic game engines, it focuses on narrative-driven storytelling with minimal boilerplate.

npm install bard-legends-framework
INSTALL
IMPORT
SIG · BARD-LEGENDS-FRAME
B
bard-legends-framework
web-frameworkjavascriptv1.4.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BardLegends
import BardLegends from 'bard-legends-framework'
import { BardLegends } from 'bard-legends-framework'
Default export for the main framework class.
ActionPlugin
import { ActionPlugin } from 'bard-legends-framework/plugins'
import ActionPlugin from 'bard-legends-framework'
Named export from the plugins submodule since v1.3.0.
NarrativeEngine
import { NarrativeEngine } from 'bard-legends-framework'
import NarrativeEngine from 'bard-legends-framework/narrative'
Named export from the main package (deprecated submodule path in v1.4.0).

Initializes a Bard Legends game instance, registers a custom action plugin that greets the player, and starts the narrative engine.

import BardLegends from 'bard-legends-framework'; import { ActionPlugin } from 'bard-legends-framework/plugins'; const game = new BardLegends({ apiKey: process.env.LEGENDS_API_KEY ?? '' }); // Define a custom action plugin class GreetPlugin extends ActionPlugin { constructor() { super('greet'); } execute(context) { console.log(`Hello, ${context.player.name}!`); return context; } } game.registerPlugin(new GreetPlugin()); game.start();
Debug
Known issues
breakingThe import path for NarrativeEngine changed from 'bard-legends-framework/narrative' to 'bard-legends-framework' in v1.4.0.
fix
Update import to: import { NarrativeEngine } from 'bard-legends-framework';
affects: >=1.4.0
deprecatedLegacy plugin registration using `game.plugins.add(plugin)` is deprecated; use `game.registerPlugin(plugin)` instead.
fix
Replace .plugins.add() with .registerPlugin().
affects: >=1.3.0 <1.5.0
gotchaThe framework requires Node.js >= 16.0.0 due to ESM-only distribution.
fix
Upgrade Node.js to version 16 or later.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'bard-legends-framework/narrative'
The NarrativeEngine module path was removed in v1.4.0.
fix
Change import to: import { NarrativeEngine } from 'bard-legends-framework';
TypeError: game.plugins.add is not a function
The .plugins.add method was removed in v1.3.0 in favor of .registerPlugin().
fix
Use game.registerPlugin(plugin) instead of game.plugins.add(plugin).
SyntaxError: Unexpected token 'export'
The package is ESM-only; using require() or an older Node version (< 16) causes this.
fix
Use import syntax and ensure Node.js >= 16.
Upgrade
Version history
1.4.0latest on npm
Audit
Dependencies
actions-librequiredCore dependency for defining and handling game actions and events.
helpers-librequiredProvides utility functions for state management, data processing, and common game mechanics.
script-engine-librequiredScript engine for executing custom narrative logic and branching conditions.
Agent activity
11 hits · last 30 days
node
8
OpenAI (training)
1
Resources
bard-legends-framework — npm install bard-legends-framework · libregistry