Body, Mind & Soul — API Reference
    Preparing search index...

    Function resolveVariableTokens

    • Resolve variable tokens (single-brace syntax) in a string, including actor attributes, vector values, and a context object. Supports {mh}/{oh}, {numStacks}, {dot.path}, etc.

      The context object (if supplied) takes precedence over actor resolution for its keys. Use this for tokens like {numStacks} that don't come from an actor.

      Parameters

      • str: string

        The input string with tokens like {str}, {numStacks}

      • Optionalactor: any = null

        Source actor for attribute/vector resolution

      • Optionalcontext: object | null = null

        Optional context object with token values (e.g. { numStacks: 3 })

      • Optional_subs: object[] | null = null

        Optional array to push substitution records into

      • OptionalnamedActors: object | null = null

        Optional map of namespace → actor, e.g. { self, target, attacker }

      Returns string

      The string with all resolvable tokens replaced by their values