Runtime

The diagram above illustrates how GraphObjects are executed at runtime using GraphInstances.
At runtime, GraphObjects themselves are not executed directly. Instead, the system follows this flow:
1. Graph Matching & Caching
All GraphObjects are stored in a runtime shared static dictionary.
When a GraphInstance system (such as CombatDamage or OverTimeEffectInstance) requests execution:
- The matching GraphObject is located.
This allows multiple entities and systems to share the same graph definition efficiently.
2. Runtime Data Injection
Each GraphInstance contains a runtime data array, which contains:
-
Entity references (Dealer, Target, etc.)
-
Temporary execution data
This data array represents the execution context of the graph.
3. Node Execution
The runtime data flows through the graph nodes:
-
Condition Nodes evaluate logic
-
Math Nodes and Variable Nodes transform data
-
Action Nodes generate action commands
The graph itself remains immutable; only the runtime data changes.
4. Action Commands & Effects
Action Nodes emit action commands, which are handled by:
-
Behavior systems
-
Database update systems
These commands can:
-
Modify Entity AttributeData
-
Apply behaviors (damage, buffs, effects)
-
Trigger gameplay reactions
5. Results Applied to Gameplay
Finally:
-
The database is updated
-
Behaviors are executed
-
Entities reflect the results in gameplay and visuals
The GraphInstance then waits for the next execution or is recycled.
Key Takeaways
-
GraphObject = design-time blueprint
-
GraphInstance = runtime executor
-
Runtime data is isolated per execution
-
Graph logic is reusable, safe, and scalable