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 }
The string with all resolvable tokens replaced by their values
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.