Return Clan Node
π Return Clan Node
The Return Clan node allows you to dynamically fetch a Clan
object through a method defined in your C# code and pass that clan 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 [GetClan]
attribute returning Clan
).
If a valid clan is returned, it will be passed forward to the connected nodes using the [Clan] port.
π Example Use Case
Check if the Clan's honor is below 50:
Execution Flow:
Start
node runsReturn Clan: Spouse's clan
is called β calls the method below- The returned
Clan
is passed intoAdd Policy Node
βοΈ Method Signature
To appear in the dropdown, your method must:
[GetClan("Your Custom Name")]
private Clan YourMethodName(Scheme scheme)
- The method must return a
Clan
- Must accept only a
Scheme
parameter - Must be marked with the
[GetClan]
attribute
Demo Example:
[GetClan("Get Spouse Clan")]
private Clan GetSpouseClan(Scheme scheme) {
if (!scheme.Conspirator.HasSpouse) return null;
return scheme.Conspirator.Spouses().First().Clan;
}
This example can be found in the Demo_Methods.cs
file.
β Output
- [Clan] β Passes the returned clan to the next node
- [Null] β Triggered if method returns null
π Tips
- This node is useful when you want to inspect, compare, or manipulate specific clans that aren't directly linked to the current actor.
- Use together with Get Clan Variable or Set Clan Variable nodes for rich logic.
π Related Nodes
Get Clan Variable
Set Clan Variable
Return Clan
Return Actor
Still unsure? Check the Demo_Schemes
folder for working examples.