Heroic Lands Heroic Lands
Home Thalorna Blog
Projects
Song of Heroic Lands HârnMaster 3 Modules API Documentation KnowledgeBase
License
  • Preparing search index...
  • The search index is not available
Song of Heroic Lands API - v0.8.2
  • Song of Heroic Lands API
  • sohl
  • entity
  • action
  • attachScriptAction

Function attachScriptAction

  • attachScriptAction(
        doc: ActionAttachable,
        spec: ScriptActionSpec,
    ): Promise<sohl.entity.action.SohlAction.Data>
  • Build a SCRIPT action def from spec and persist it onto doc, writing the whole system.actionDefs array back (upsert by shortcode, never by index). Idempotent: re-attaching the same name replaces the entry.

    The caller must be an owner of doc, and — because SCRIPT entries are GM-authored — a GM (enforced at the document boundary and pre-checked by sohl.core.logic.SohlSystem.addScriptAction).

    Parameters

    • doc: ActionAttachable

      The document to attach the action to (an actor or item).

    • spec: ScriptActionSpec

      The Script Action spec.

    Returns Promise<sohl.entity.action.SohlAction.Data>

    The persisted action def.

    Throws

    If name or executor is blank.

    • Defined in src/entity/action/script-action-attach.ts:170

Settings

Member Visibility
Song of Heroic Lands API - v0.8.2
  • Loading...

Generated using TypeDoc with typedoc-github-theme

© 2020–2026 Tom Rodriguez. Content under The World of Thalorna and Song of Heroic Lands is licensed under CC BY-SA 4.0; all other content is © Tom Rodriguez, all rights reserved. See License.

CC BY-SA 4.0 Discord