Relationship Contagion System
Emotions spread through NPC friendship networks.
Overview
RelationshipGraph
A ScriptableObject that stores friendship relationships between NPCs.
Create: Right-click in Project panel → Create → NPC Mentality → Relationship Graph
API
RelationshipContagion
Static helper class. Propagates attitude changes through the friend network.
Propagate
Propagation Calculation
Example: attitudeChange = -10, decay = 0.5
- Direct friends:
-5 - Friends of friends:
-2.5
Example
Tips
- Lower
decayto0.3or less for rumors that fade quickly. - Increase
depthto3or more to affect the entire village. - Combine with the Rumor System to spread both rumor content and emotion simultaneously.