Return Family Rule Node

From Intrigues Wiki

πŸ“˜ Return Family Node

Return Family Node

The Return Family node allows you to dynamically fetch a Family object through a method defined in your C# code and pass that family into the next node in the execution chain.


🧠 What it does

When this node is executed, it calls the C# method you specified via the dropdown (auto-populated from methods marked with the [GetFamily] attribute returning Family).

If a valid family is returned, it will be passed forward to the connected nodes using the [Family] port.


πŸ“Œ Example Use Case

Check if the King's Family honor is below 50:

Execution Flow:

  • Start node runs
  • Return Family: King's Family is called β†’ calls the method below
  • The returned Family is passed into Get [Family] Variable
  • If the value is below 50, a log is triggered

βš™οΈ Method Signature

To appear in the dropdown, your method must:

[GetFamily("Your Custom Name")] 
private Family YourMethodName(Actor conspirator, Actor target)
  • The method must return a Family
  • Must accept only Actor,Actor parameters
  • Must be marked with the [GetFamily] attribute

Demo Example:

[GetFamily("King's Family")]
private Family KingsFamily(Actor conspirator, Actor target) {
    if ( conspirator.Clan == null ) return null;
            
    Actor king = conspirator.Clan.GetMember("Leader");
    if(king == null) return null;

    return king.Family;
}

This example can be found in the Demo_Methods.cs file.


βœ… Output

  • [Family] β†’ Passes the returned family to the next node
  • [Null] β†’ Triggered if method returns null

πŸ”Ž Tips

  • This node is useful when you want to inspect, compare, or manipulate specific families that aren't directly linked to the current actor.
  • Use together with Get Family Variable or Set Family Variable nodes for rich logic.

πŸ”— Related Nodes

  • Get Family Variable
  • Set Family Variable
  • Return Clan
  • Return Actor

Still unsure? Check the Demo_Schemes folder for working examples.