formula
# Formula System
Define formulas as ScriptableObject strings so designers can tune skill damage, experience, rewards, and balance numbers without changing code.
Overview
Quick Start
1. Create a FormulaAsset
Create -> AchUtils/Formula/Formula Asset
Enter an expression in the inspector:
2. Evaluate at Runtime
Supported Syntax
Operators
Built-In Functions
Examples
API
FormulaContext
FormulaAsset
FormulaEvaluator
Error Handling
Missing variables or invalid syntax throw System.Exception.
Thread safety
FormulaEvaluator stores parser state in instance fields. Do not use the same evaluator instance concurrently from multiple threads. FormulaAsset caches one evaluator internally.