Overview
The Relationship System integrates fully with Game Creator 2 visual scripting. Use Instructions to modify state, Conditions to check state, and Events to react to changes.
30
Instructions
18
Conditions
6
Events
All components are found under
Relationship System/ in GC2 menus. Items marked with NEW were added in v1.1.0.Instructions
Instructions modify relationship state. Use them in Triggers, Actions, and other GC2 components.
| Instruction | Category | Description |
|---|---|---|
| Modify Relationship | Relationships | Change a relationship by a delta. Optionally scoped to one definition dimension. |
| Set Relationship | Relationships | Set the value between two entities directly. |
| Lock Relationship | Relationships | Prevent a relationship from being modified. |
| Unlock Relationship | Relationships | Allow it to be modified again. |
| Set Opinion | Relationships | Set what Entity A thinks about Entity B (directional, for asymmetric definitions). |
| Modify Opinion | Relationships | Change what Entity A thinks about Entity B by a delta. |
| Add to Faction | Factions | Add a character to a faction. |
| Remove from Faction | Factions | Remove a character from a faction. |
| Declare War | Factions | Set two factions hostile; optionally also every member pair. |
| Make Alliance | Factions | Set two factions friendly; optionally also every member pair. |
| Broadcast Relationship Change | Factions | Change every faction member's relationship with one target at once. |
| Set Faction Inheritance Rate | Factions | Change how much a faction inherits from its parent (0–1). |
| Create Runtime Faction | Factions | Create a faction at runtime (player guilds, dynamic alliances). |
| Dissolve Runtime Faction | Factions | Dissolve a runtime faction and release its members. |
| Set Faction Parent | Factions | Re-parent a runtime faction in the hierarchy. |
| Set Diplomacy State | Diplomacy | Force-set the state between two factions, bypassing transition rules. |
| Transition Diplomacy State | Diplomacy | Attempt a transition, validated against the allowed transitions. |
| Set Cap | Caps | Apply a cap from a Cap Definition. |
| Remove Cap | Caps | Remove a cap by Definition or custom ID. |
| Remove All Caps | Caps | Remove every cap from a relationship, or globally. |
| Add Modifier | Modifiers | Apply a modifier (buff/debuff) from a Modifier Definition. |
| Remove Modifier | Modifiers | Remove by Definition or custom ID, optionally filtered by target. |
| Remove All Modifiers | Modifiers | Remove every active modifier, with optional filters. |
| Clear Relationship History | History | Clear all recorded change history. |
| Apply Gift (Item Id)NEW | Gifts | Look up an item id in a Gift Preference asset and apply its relationship delta between giver and receiver. |
| Spread RumourNEW | Gossip | Change every member of a target faction's relationship with a source entity, by a base delta reduced with per-member falloff. Respects caps. |
| Toggle Relationship View | UI | Show or hide a Relationship View. |
| Refresh View | UI | Force a Relationship View to redraw. |
| Set View Entities | UI | Assign the two entities a view displays, at runtime. |
| Open Relationship JournalNEW | UI | Show a Relationship Journal View, point it at two entities, apply the two quick filters and refresh it. |
New in v1.1.0
Gift preferences, gossip broadcast, and the Relationship Journal:
// Apply Gift (Item Id) instruction parameters:
// - Giver: Player
// - Receiver: Merchant
// - Gift Preference: (GiftPreference asset)
// - Item Id: "flower_01"
// -> looks up the delta/reaction and calls ModifyRelationship, caps apply as usual
// Spread Rumour instruction parameters:
// - Source: Player
// - Target Faction: Merchant Guild
// - Base Delta: -20
// - Falloff: 0.25
// - Max Members: 10
// -> each further member gets baseDelta * (1 - falloff)^hop
// Open Relationship Journal instruction parameters:
// - Journal GameObject: (Relationship Journal View)
// - Entity A / Entity B
// - Only Level Changes: (bool)
// - Source Filter: (string)Conditions
Conditions check relationship state. Use them in Triggers, Branches, and prerequisite checks.
| Condition | Category | Description |
|---|---|---|
| Relationship Value | Relationships | A comparison against the relationship value. |
| Relationship Value (Scoped) | Relationships | The same, inside one definition dimension. |
| Relationship At Level | Relationships | Whether the relationship sits at a named level. |
| Opinion Comparison | Relationships | What Entity A thinks about Entity B (directional). |
| Is Member | Factions | Whether a character belongs to a faction. |
| Faction Relationship | Factions | The aggregated (Average / Min / Max) relationship of a faction's members with a target. |
| Faction to Faction Relationship | Factions | The value between two factions. |
| Is Runtime Faction | Factions | Whether a faction was created at runtime. |
| Is Diplomacy State | Diplomacy | Whether two factions are in a given state. |
| Can Transition Diplomacy | Diplomacy | Whether a transition to the target state is allowed. |
| Is Cap Active | Caps | Whether a specific cap is active on a relationship. |
| Is Relationship Capped | Caps | Whether a relationship has any active cap. |
| Is Value At Cap | Caps | Whether the value sits exactly at its cap limit. |
| Is Value Within Cap | Caps | Whether the value is inside the cap range. |
| Compare Value To Cap | Caps | The value relative to the cap boundaries. |
| Is Modifier Active | Modifiers | Whether a specific modifier is active, optionally for one target. |
| Has Any Modifier | Modifiers | Whether any modifier is active, optionally filtered by target and type. |
| Has History | History | Whether a relationship has recorded changes. |
Example: Cap Conditions
Use cap conditions to check if players have hit progression gates:
// Example: Show hint when player hits cap
Trigger: On Relationship Changed
├─ Condition: Is Value At Cap
│ ├─ Entity A: Player
│ ├─ Entity B: Merchant Guild
│ └─ Returns: true when at the cap limit
└─ Actions:
└─ Show Dialogue: "Join the Guild to improve relations further!"Events
Events trigger when relationship state changes. Attach them to Triggers for reactive gameplay.
| Event | Category | Description |
|---|---|---|
| On Relationship Changed | Relationships | A relationship value changes. Entity filters optional. |
| On Relationship Level Changed | Relationships | A relationship crosses into a different named level. |
| On Faction Member Added | Factions | A character joins a faction. |
| On Faction Member Removed | Factions | A character leaves a faction. |
| On Gift ReceivedNEW | Gifts | "Apply Gift (Item Id)" successfully modifies a relationship. |
| On Rumour SpreadNEW | Gossip | "Spread Rumour" applies at least one relationship change. |
On Gift Received / On Rumour Spread (v1.1.0)
React to the new gift and gossip systems:
// Example: Reaction line + VFX on a received gift
Trigger: On Gift Received
├─ Filter: Receiver = "Merchant"
└─ Actions:
├─ Show Dialogue: (the matched Reaction Text, if any)
└─ Spawn VFX: Heart particles
// Example: Faction-wide reaction to a spread rumour
Trigger: On Rumour Spread
├─ Filter: Target Faction = "Town Guards"
└─ Actions:
└─ Show UI: "Word is spreading..."