egametang/ET · error · Exception
condition node params field not found: {node.GetType().FullN
Error message
condition node params field not found: {node.GetType().FullName}.Params What it means
Thrown by SetParamsField when a condition expression used the parameter-call syntax `NodeName(Param1, Param2)` (the dedicated condition node form) but the selected node type has no public instance field named `Params`. Per AGENTS.md, only nodes that declare `public string[] Params` may use parenthesized parameters.
Source
Thrown at Packages/cn.etetet.conditionexpr/Scripts/Model/Share/ConditionExprParser.cs:302
if (fieldInfo == null)
{
throw new Exception($"condition node owner key field not found: {node.GetType().FullName}.{nameof(BTNumericCompare.OwnerKey)}");
}
if (fieldInfo.FieldType != typeof(string))
{
throw new Exception($"condition node owner key field must be string: {node.GetType().FullName}.{nameof(BTNumericCompare.OwnerKey)}");
}
fieldInfo.SetValue(node, ownerKey);
}
private void SetParamsField(BTCondition node, string[] paramValues)
{
FieldInfo fieldInfo = node.GetType().GetField("Params", BindingFlags.Instance | BindingFlags.Public);
if (fieldInfo == null)
{
throw new Exception($"condition node params field not found: {node.GetType().FullName}.Params");
}
if (fieldInfo.FieldType != typeof(string[]))
{
throw new Exception($"condition node params field must be string[]: {node.GetType().FullName}.Params");
}
fieldInfo.SetValue(node, paramValues);
}
private void AddSequenceChild(BTSequence sequence, BTNode child)
{
if (child is BTSequence childSequence)
{
sequence.Children.AddRange(childSequence.Children);
return;
}
View on GitHub (pinned to 5cab01f7a8)
Solutions
- Add `public string[] Params;` to the node class if it is meant to accept parameters.
- If the node is not parameterized, remove the parenthesized arguments from the expression and reference it in the bare form.
Example fix
// before
[ConditionVariable("Distance")]
public class DistanceNode : BTCondition { /* no Params */ }
// used as: Distance(Friend1) > 0
// after
[ConditionVariable("Distance")]
public class DistanceNode : BTCondition
{
public string[] Params;
} Defensive patterns
Strategy: type-guard
Type guard
static bool HasParamsField(Type t) =>
t.GetField("Params", BindingFlags.Instance | BindingFlags.Public) != null; Prevention
- Only use `NodeName(args)` syntax with nodes that declare `public string[] Params;`.
- Lint expressions to verify parameter syntax is only used on Params-capable nodes.
- Document per node whether it is parameterized.
When it happens
Trigger: Writing `HP(Friend1) > 0` against a node that has no Params field; registering a dedicated condition node and forgetting the Params field; renaming it to `Args`.
Common situations: Designer assumes any node accepts parameters and writes `NodeName(target)`; a custom node author copies a numeric-compare node template that lacks Params.
Related errors
- condition node field not found: {node.GetType().FullName}.{f
- condition node owner key field not found: {node.GetType().Fu
- condition node owner key field must be string: {node.GetType
- condition node params field must be string[]: {node.GetType(
- condition variable node create error: {nodeType.FullName}
AI-assisted analysis of egametang/ET@5cab01f7a8 (2026-08-13).
Data as JSON: /api/errors/c21db09744a86126.
Report an issue: GitHub.