It’s pretty stright forward, you just make function like normally do in C++ and just mark it with UFUNCTION before it’s decleration in with specific specifiers and UHT and reflections system will do the rest. Arguments of function will be inputs of node, arguments with refrence type (for example FString&) will be turned in to output, return value will also be output, if function is not static it will have “Target” input which you plug object on which you call the function on. UHT will add spaces to function and argument names before uppercase letters.
So for example:
UCLASS()
class EDIFY_API UMyNodes : public UObject
{
GENERATED_UCLASS_BODY()
UFUNCTION(BlueprintCallable, Category="My Nodes")
static int32 SomeIntReturningFunction(FString Text, int32 Number, FString& TextOut);
};
Will create node named “Some Int Returning Function” node in category “My Nodes” (btw you can create subcategories with | symbol) which will have input for text and integer and text output as well as integer return output. Static will remoce “Target” input considering you making class for your nodes i assume you dont need that, or else you making nodes ofr perticilar class, then you need to place in to that class. You can use BlueprintPure insted BlueprintCallable so it will create passive node without action input output, you can also create events. here docs about this
Lot of specifiers are not documented, you can explore wiki which has some examples, also i recommend you to explore engine source code to see how default nodes are declered, because they declered the same way, you can also find how they are declered in API refrence, here example Int + Int math which specially stylized math node and you already probably seen it in blueprints:
Look of nodes made specially for blueprints are coded in UGamepleyStatics and UKismetMathLibrary, but practicly most gameplay classes has atleast few functions declered as nodes, they are marked with blue file icon in API refrece
You can expose C++ varables blueprint too with UPROPERTY(BlueprintReadWrite)