Relationship System

v1.1.0

GC2 Integration

Complete reference for all visual scripting Instructions, Conditions, and Events.

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.

InstructionCategoryDescription
Modify RelationshipRelationshipsChange a relationship by a delta. Optionally scoped to one definition dimension.
Set RelationshipRelationshipsSet the value between two entities directly.
Lock RelationshipRelationshipsPrevent a relationship from being modified.
Unlock RelationshipRelationshipsAllow it to be modified again.
Set OpinionRelationshipsSet what Entity A thinks about Entity B (directional, for asymmetric definitions).
Modify OpinionRelationshipsChange what Entity A thinks about Entity B by a delta.
Add to FactionFactionsAdd a character to a faction.
Remove from FactionFactionsRemove a character from a faction.
Declare WarFactionsSet two factions hostile; optionally also every member pair.
Make AllianceFactionsSet two factions friendly; optionally also every member pair.
Broadcast Relationship ChangeFactionsChange every faction member's relationship with one target at once.
Set Faction Inheritance RateFactionsChange how much a faction inherits from its parent (0–1).
Create Runtime FactionFactionsCreate a faction at runtime (player guilds, dynamic alliances).
Dissolve Runtime FactionFactionsDissolve a runtime faction and release its members.
Set Faction ParentFactionsRe-parent a runtime faction in the hierarchy.
Set Diplomacy StateDiplomacyForce-set the state between two factions, bypassing transition rules.
Transition Diplomacy StateDiplomacyAttempt a transition, validated against the allowed transitions.
Set CapCapsApply a cap from a Cap Definition.
Remove CapCapsRemove a cap by Definition or custom ID.
Remove All CapsCapsRemove every cap from a relationship, or globally.
Add ModifierModifiersApply a modifier (buff/debuff) from a Modifier Definition.
Remove ModifierModifiersRemove by Definition or custom ID, optionally filtered by target.
Remove All ModifiersModifiersRemove every active modifier, with optional filters.
Clear Relationship HistoryHistoryClear all recorded change history.
Apply Gift (Item Id)NEWGiftsLook up an item id in a Gift Preference asset and apply its relationship delta between giver and receiver.
Spread RumourNEWGossipChange 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 ViewUIShow or hide a Relationship View.
Refresh ViewUIForce a Relationship View to redraw.
Set View EntitiesUIAssign the two entities a view displays, at runtime.
Open Relationship JournalNEWUIShow 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.

ConditionCategoryDescription
Relationship ValueRelationshipsA comparison against the relationship value.
Relationship Value (Scoped)RelationshipsThe same, inside one definition dimension.
Relationship At LevelRelationshipsWhether the relationship sits at a named level.
Opinion ComparisonRelationshipsWhat Entity A thinks about Entity B (directional).
Is MemberFactionsWhether a character belongs to a faction.
Faction RelationshipFactionsThe aggregated (Average / Min / Max) relationship of a faction's members with a target.
Faction to Faction RelationshipFactionsThe value between two factions.
Is Runtime FactionFactionsWhether a faction was created at runtime.
Is Diplomacy StateDiplomacyWhether two factions are in a given state.
Can Transition DiplomacyDiplomacyWhether a transition to the target state is allowed.
Is Cap ActiveCapsWhether a specific cap is active on a relationship.
Is Relationship CappedCapsWhether a relationship has any active cap.
Is Value At CapCapsWhether the value sits exactly at its cap limit.
Is Value Within CapCapsWhether the value is inside the cap range.
Compare Value To CapCapsThe value relative to the cap boundaries.
Is Modifier ActiveModifiersWhether a specific modifier is active, optionally for one target.
Has Any ModifierModifiersWhether any modifier is active, optionally filtered by target and type.
Has HistoryHistoryWhether 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.

EventCategoryDescription
On Relationship ChangedRelationshipsA relationship value changes. Entity filters optional.
On Relationship Level ChangedRelationshipsA relationship crosses into a different named level.
On Faction Member AddedFactionsA character joins a faction.
On Faction Member RemovedFactionsA character leaves a faction.
On Gift ReceivedNEWGifts"Apply Gift (Item Id)" successfully modifies a relationship.
On Rumour SpreadNEWGossip"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..."