LorelinePlugin

ceramic.LorelinePlugin (Class)

Plugin that integrates Loreline scripting language into Ceramic.

Loreline is a narrative scripting language designed for:

  • Dialogue trees and branching conversations
  • Interactive storytelling
  • Game narrative and quest systems
  • Conditional story flow

This plugin provides:

  • Asset loading for .lor and .loreline files
  • Script parsing with import resolution
  • Easy access to parsed scripts through the Assets API
  • Hot-reload support for iterative development

Usage:

// In ceramic.yml:
plugins:
  - loreline

// In your code:
assets.add('loreline:story/chapter1');
var script = assets.loreline('story/chapter1');
See: LorelineAsset, https://github.com/loreline/loreline for the Loreline language

Static Members

loreline
addLoreline(assets: Assets, name: String, ?variant: String, ?options: Null<AssetOptions>): Void

Adds a Loreline asset to the assets collection.

Name Type Default Description
assets Assets The assets collection to add to
name String The asset name (with or without 'loreline:' prefix)
variant String (optional) Optional variant identifier
options Null<AssetOptions> (optional) Optional asset loading options

loreline
ensureLoreline(assets: Assets, name: Either<String, Dynamic>, ?variant: String, ?options: Null<AssetOptions>, done: Function): Void

Ensures a Loreline asset is loaded before proceeding. Loads the asset if not already loaded, or returns the existing one.

Name Type Default Description
assets Assets The assets collection
name Either<String, Dynamic> The asset name or identifier
variant String (optional) Optional variant identifier
options Null<AssetOptions> (optional) Optional asset loading options
done Function Callback with the loaded LorelineAsset

loreline
loreline(assets: Assets, name: Either<String, Dynamic>, ?variant: String): loreline.Script

Gets a parsed Loreline script from the assets collection.

Name Type Default Description
assets Assets The assets collection
name Either<String, Dynamic> The asset name or identifier
variant String (optional) Optional variant identifier
Returns Description
loreline.Script The parsed Loreline script, or null if not found

loreline
lorelineAsset(assets: Assets, name: Either<String, Dynamic>, ?variant: String): LorelineAsset

Gets a LorelineAsset from the assets collection.

Name Type Default Description
assets Assets The assets collection
name Either<String, Dynamic> The asset name or identifier
variant String (optional) Optional variant identifier
Returns Description
LorelineAsset The LorelineAsset, or null if not found

Private Members

loreline
pluginInit(): Void

Plugin initialization entry point. Registers the 'loreline' asset kind with supported file extensions.

Metadata

Name Parameters
:hxGen -
:access ceramic.App