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:
Startnode runsReturn Family: King's Familyis called β calls the method below- The returned
Familyis passed intoGet [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(Scheme scheme)
- The method must return a
Family - Must accept only a
Schemeparameter - Must be marked with the
[GetFamily]attribute
Demo Example:
[GetFamily("King's Family")]
private Family KingsFamily(Scheme scheme) {
if ( scheme.Schemer.Conspirator.Clan == null ) return null;
Actor king = scheme.Schemer.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 VariableSet Family VariableReturn ClanReturn Actor
Still unsure? Check the Demo_Schemes folder for working examples.