Custom K2Nodes
Overview
The module provides custom K2Nodes that appear in the Blueprint graph editor under Cdryx|Quest|CCreateQuest. These nodes replace standard function calls with a richer interface supporting dynamic pin addition and removal for quest steps.
All nodes inherit from UCAbstractCreateQuest, which extends UK2Node and implements IK2Node_AddPinInterface. During compilation, the node expands into intermediate nodes (UK2Node_CallFunction, UK2Node_MakeMap, UK2Node_MakeStruct) that call the corresponding UCQuestBPLibrary functions.
Classes
| Name | Description |
|---|---|
| UCAbstractCreateQuest | Abstract base class for quest creation nodes. Handles dynamic pin management, context menu actions, and node expansion. |
| UCCreateActorQuest | Concrete node for creating actor-triggered quests. Calls createActorQuest_customNodeOnly and uses FCNTriggerByActorStruct. |
| UCCreateRoomQuest | Concrete node for creating room-triggered quests. Calls createRoomQuest_customNodeOnly and uses FCNTriggerByRoomStruct. |
UCAbstractCreateQuest
Base class providing the core logic shared by all quest creation nodes.
Input Pins
| Pin | Type | Description |
|---|---|---|
| InputExec | exec | Execution input |
| QuestId | FName | Unique identifier for the quest |
| QuestCondition | delegate (FCBP_questCondition) |
Delegate evaluated to determine if the quest can proceed |
| QuestStepId N | FName | Identifier for quest step N (dynamic, one per step) |
| TriggeredByMainTag N | FName | Tag identifying the trigger source for step N (dynamic) |
| QuestStepAction N | delegate | Action delegate executed when step N triggers (dynamic) |
Output Pins
| Pin | Type | Description |
|---|---|---|
| OutputExec | exec | Execution output |
Key Functions
| Name | Description |
|---|---|
| AllocateDefaultPins | Creates the initial set of pins (exec, QuestId, QuestCondition, one step group, output exec). |
| AddInputPin | Adds a new quest step group (QuestStepId, TriggeredByMainTag, QuestStepAction). |
| removeInputPin | Removes a quest step group via context menu and re-indexes remaining groups. |
| ExpandNode | Compiles the node into intermediate nodes: spawns a UK2Node_CallFunction, a UK2Node_MakeMap, and one UK2Node_MakeStruct per step. |
| GetNodeContextMenuActions | Adds a “Remove quest” context menu entry for each step pin group. |
UCCreateActorQuest
Quest creation node for actor-based triggers. Appears with a green title bar and magenta body in the Blueprint graph.
- Category:
Cdryx|Quest|CCreateQuest - Calls:
UCQuestBPLibrary::createActorQuest_customNodeOnly - Struct type:
FCNTriggerByActorStruct(containstriggeredBy_propertiesFName +action_propertiesFCBP_questStepActorAction) - Step action delegate:
FCBP_questStepActorAction
UCCreateRoomQuest
Quest creation node for room-based triggers. Appears with a blue title bar and yellow body in the Blueprint graph.
- Category:
Cdryx|Quest|CCreateQuest - Calls:
UCQuestBPLibrary::createRoomQuest_customNodeOnly - Struct type:
FCNTriggerByRoomStruct(containstriggeredBy_propertiesFName +action_propertiesFCBP_questStepRoomAction) - Step action delegate:
FCBP_questStepRoomAction