Is it possible to create a c++ custom node that dynamically creates input pins

I was coming up with ideas for new plugins I could create but one of them requires something I swear I’ve seen a default node do, though I can’t remember which one.

I was curious if it is possible to make a custom blueprint node which would, based on the text inputted in its initial pin, expand the amount of pins available to allow for input, allowing the use of a single dynamic node rather than an Append followed by the node.

Basically, an input such as: Hello {PlayerName}, Welcome to {TownName}.
would change the node to not only contain the initial input string.
but also a pin called PlayerName, and a pin called TownName.
(this is of course just an example)

To do that you have to extend from K2 nodes;
They are actually much more complicated to work with then common UFUNCTION() pattern.

You’re looking at “Format Text” Blueprint node.

As to nodes that can expand parameter list, they are way more complicated than regular ones. You’ll need a separate class that inherits from UK2Node (e.g. UK2Node_FormatText in Engine\Source\Editor\BlueprintGraph\Classes\K2Node_FormatText.h).

However, creating such functions is rather complicated and isn’t documented.

Thank you for the reply, i’ll have a look into extending from K2 nodes

Thank you for the rather detailed answer on how one would create such a node