(39) 's Extra Blueprint Nodes for You as a Plugin, No C++ Required!

44+ Extra BP Nodes For You!

No c++ required!

No compile required!

Download and plug in!

:slight_smile:

Featured Node

Trace for Closest Socket

Perform a trace against a mesh that will identify the closest socket to the trace hit location on the mesh!

8028a3610f7eacb2c5741fd27866b1d186fc6e6e.jpeg

Get Current Operating System

annnnd

Get Milliseconds/Seconds/Minutes/Hours Passed Since Previous Recorded!

These two nodes can be used to

  1. obtain the current local Operating System for your computer.

  2. obtain the amount of milliseconds/seconds/minutes/hours that have passed since the you recorded for the first node! You can stores as many times as you want! They are simply stored as a string!

You can use these two nodes to record down to the sub-millisecond the amount of passing between game events!

**The milliseconds portion is a float, so you can record far smaller than 1 millisecond!
**

In the attached picture I record the amount of real-world between two key presses :slight_smile:

Enjoy!

Taking Simple BP Node Requests

Anyone have a simple thing they’d like to have added to Blueprints that is not there already?

I am taking small scale requests at the moment, since I dont have any immediate BP node ideas of my own.

Has to be very simple :slight_smile:

Let me know!

Hello ,

I had to write a custom BP node for a project I am working on. I thought I would share it with the community. Since you already have a good package of BP nodes, perhaps you could integrate into yours.

Node: ExplodeString
Description: Splits a string based on given delimiter. Unlike the ParseIntoArray() function, the delimiter can be a multi-character string (eg ‘::’). There is also aan optional automatic trimming that will cleanup the returned substrings.

I am attaching the source here and if anyone is interested, have fun :). Please note that currently it is implemented as a BlueprintFunctionLibrary, you might want to change that to suit your needs.

UStringUtils.h


#pragma once

#include "StringUtils.generated.h"

/**
 * 
 */
UCLASS()
class UStringUtils : public UBlueprintFunctionLibrary
{
	GENERATED_UCLASS_BODY()

	/**
	* Split a string into an array of substrings based on the given delimitter.
	* Unlike ParseIntoArray() function which expects single character delimitters,  function can accept a delimitter that is also a string.
	*
	* @param InputString - The string that is to be exploded.
	* @param Separator - The delimitter that is used for splitting (multi character strings are allowed)
	* @param limit - If greater than zero, returns only the first x strings. Otherwsie returns  the substrings
	* @param bTrimElelements - If True, then each subsctring is processed and any leading or trailing whitespcaes are trimmed.
	*/
	UFUNCTION(BlueprintPure, meta = (FriendlyName = "Explode string", Keywords = "split explode string"), Category = String)
	static TArray<FString> ExplodeString(FString InputString, FString Separator = ",", int32 limit = 0, bool bTrimElements = false);
	
};

UStringUtils.cpp



#include "YourGame.h" //<-  Change  to match your-own header file
#include "StringUtils.h"


UStringUtils::UStringUtils(const class FPostConstructInitializeProperties& PCIP)
	: Super(PCIP)
{

}

TArray<FString> UStringUtils::ExplodeString(FString InputString, FString Separator, int32 limit, bool bTrimElements)
{
	TArray<FString> OutputStrings;

	if (InputString.Len() > 0 && Separator.Len() > 0) {
		int32 StringIndex = 0;
		int32 SeparatorIndex = 0;

		FString Section = "";
		FString Extra = "";

		int32 PartialMatchStart = -1;

		while (StringIndex < InputString.Len()) {

			if (InputString[StringIndex] == Separator[SeparatorIndex]) {
				if (SeparatorIndex == 0) {
					//A new partial match has started.
					PartialMatchStart = StringIndex;
				}
				Extra.AppendChar(InputString[StringIndex]);
				if (SeparatorIndex == (Separator.Len() - 1)) {
					//We have matched the entire separator.
					SeparatorIndex = 0;
					PartialMatchStart = -1;
					if (bTrimElements == true) {
						OutputStrings.Add(FString(Section).Trim().TrimTrailing());
					}
					else {
						OutputStrings.Add(FString(Section));
					}

					//if we have reached the limit, stop.
					if (limit > 0 && OutputStrings.Num() >= limit) {
						return OutputStrings;
					}

					Extra.Empty();
					Section.Empty();
				}
				else {
					++SeparatorIndex;
				}
			}
			else {
				//Not matched.
				//We should revert back to PartialMatchStart+1 (if there was a partial match) and clear away extra.
				if (PartialMatchStart >= 0) {
					StringIndex = PartialMatchStart;
					PartialMatchStart = -1;
					Extra.Empty();
					SeparatorIndex = 0;
				}
				Section.AppendChar(InputString[StringIndex]);
			}

			++StringIndex;
		}

		//If there is anything left in Section or Extra. They should be added as a new entry.
		if (bTrimElements == true) {
			OutputStrings.Add(FString(Section + Extra).Trim().TrimTrailing());
		}
		else {
			OutputStrings.Add(FString(Section + Extra));
		}

		Section.Empty();
		Extra.Empty();
	}

	return OutputStrings;
}




Usage and sample output:

Do we have a BP node that can rotate and Actor around a random Pivot? The Pivot should be given as a WorldSpace Location OR could be an Actor. It should also accept a Rotator which specify the rotation needed. What the node will do is Move and rotate the Actor around the given Pivot while keeping the original distance. Could be useful for settings up things that orbit other Actors. However I think there should an additonal parameters to specify Up Vector and Right vector (in world space) to make the rotation unambiguous)

So the general signature could be like :

RotateActorAroundPivot(Actor/Vector Pivot, Rotator rotation, Vector UP, Vector Right, bMaintainAngleToPivot = true) —> probably need polymorphic versions (one for Actor Pivot, and another for Vector.)
Pivot - The Actor or Location around which to rotate
Rotation - angles to rotate
Up - The Up vector (given in world space)
Right - The right vector (given in world space)
bMaintainAngleToPivot - If true, rotate the Actor to keep the same angle to Pivot as before the rotation.

We could implement in BP itself (I did actually), but I think if you can do it in C++, it would be faster.

As far as i know ParseIntoArray for blueprints does work with a multi-character string and i assume that would be the same for c++, but ofcourse i could be wrong.

I would really really like to see a MoveTo-Node for any Actor.

No, you are right. There are two version of ParseIntoArray, which I did not notice. I was working on C++ to break up strings, and I tried to use the wrong version. I thought the Bp version was similar. But looks like I was wrong and what I wanted was already there. Anyway I needed to set a limit and trim on the elements, so I guess it was not a complete waste of.

**New BP Node

Explode String!!!**

Node Description:



	/**
	*
	* Contributed by: Mindfane
	*
	* Split a string into an array of substrings based on the given delimitter.
	* Unlike ParseIntoArray() function which expects single character delimitters,  function can accept a delimitter that is also a string.
	*
	* @param InputString - The string that is to be exploded.
	* @param Separator - The delimitter that is used for splitting (multi character strings are allowed)
	* @param limit - If greater than zero, returns only the first x strings. Otherwsie returns  the substrings
	* @param bTrimElelements - If True, then each subsctring is processed and any leading or trailing whitespcaes are trimmed.
	*/


Dear MindFane,

Your BP offering is very nice!

Anyone find it funny that I was taking requests to make new nodes and ended up getting a node from Mindfane instead? Hee hee!

I modified the node a little to return the FString array by reference, an important optimization for larger amounts of data.

node is now live in my Victory BP Library plugin!

Latest version can be downloaded from my original post!

Or here!

https://wiki.unrealengine.com/File:VictoryPlugin.zip

is a great idea, but hard to do without a tick function, not something available to me in static BP library node context.

The incremental move BP nodes that are already available are your best bet at the moment :slight_smile:

Best I could do is an incremental move to location that you have to call every tick, I can check when unit has reached within radius of destination and stop moving it more.

But doing collision detection is bit of :slight_smile:

If you really want any actor to follow nav mesh path, well that’s beyond scope of a BP node :slight_smile:



[QUOTE=mindfane;135909]
Do we have a BP node that can rotate and Actor around a random Pivot? The Pivot should be given as a WorldSpace Location OR could be an Actor. It should also accept a Rotator which specify the rotation needed. What the node will do is Move and rotate the Actor around the given Pivot while keeping the original distance. Could be useful for settings up things that orbit other Actors. However I think there should an additonal parameters to specify Up Vector and Right vector (in world space) to make the rotation unambiguous)

So the general signature could be like :

RotateActorAroundPivot(Actor/Vector Pivot, Rotator rotation, Vector UP, Vector Right, bMaintainAngleToPivot = true) ---&gt; probably need polymorphic versions (one for Actor Pivot, and another for Vector.)
Pivot - The Actor or Location around which to rotate
Rotation - angles to rotate
Up - The Up vector (given in world space)
Right - The right vector (given in world space)
bMaintainAngleToPivot - If true, rotate the Actor to keep the same angle to Pivot as before the rotation.

We could implement  in BP itself (I did actually), but I think if you can do it in C++, it would be faster.
[/QUOTE]


 is a great idea! will work on  when I get :)

meantime, see the just-higher post about your string node!!!

Get Screen Resolutions Now Works in Packaged Game

My Get Screen Resolution Nodes works in packaged games now!

In 4.3 the core function in C++ was not working in BP, but now it is! Epic fixed it!

Enjoy getting the screen resolutions of the end user’s hardware in your game now!

It is obtained from the user’s display adapter directly! No guessing or preset values!

:slight_smile:

Get OS Platform

Platforms you can check for:

**Windows
Mac
Linux

PS4
XBoxOne

iOS
Android

HTML5

WIN RT
WIN RT ARM**

Enjoy!

isn’t possible to just use the graph thingy in blueprints and just set actor location with some animation xd

As Mentioned in Hourence’s Twitch Stream Today!

is the same node you could see in the Epic twitch stream today!

I told Hourences I could give him the real system and he did wonders with it!

Get Current Operating System

annnnd

Get Milliseconds/Seconds/Minutes/Hours Passed Since Previous Recorded!

These two nodes can be used to

  1. obtain the current local Operating System for your computer.

  2. obtain the amount of milliseconds/seconds/minutes/hours that have passed since the you recorded for the first node! You can stores as many times as you want! They are simply stored as a string!

You can use these two nodes to record down to the sub-millisecond the amount of passing between game events!

**The milliseconds portion is a float, so you can record far smaller than 1 millisecond!
**

In the attached picture I record the amount of real-world between two key presses :slight_smile:

Enjoy!

Get Difference Between Any Two Times

node calculates the difference in Milliseconds/Seconds/Minutes/Hours between any two times that you record using my node above!

Again you can save as many nodes as you want for use with node, I record the times as strings!

Enjoy!

Hi ,

How simple would it be to create a function that lets you get the current screenmode. There are 3 screen modes that I believe exist 0 - 1 and 2. It would be nice to check the screen mode against a function grabbing the correct info, because the current fullscreen command seems to get lost and sometimes cycles through the 3 options. Maybe an enum so you can check against it and toggle to the next mode.

Isaac

@, do you happen to know if it’s possible to output a .uasset for a UTexture2D in a packaged game? If so, I think a node for that would be extremely nice. Combined with the Texture from Disk node, it’d be quite useful for loading mods and caching out the .uassets.

I already have a node that does that I made for the Solus options menu, I will work getting a version for my Victory Plugin soon as I can!

:slight_smile:

I’m pretty sure it is against the rules /illegal to do , as you would need access to editor code in the packaged game, which we are not allowed to use in a packaged game.

I was told info similar to when I asked about including the FBX importer/exporter in a packaged game :slight_smile:


**My Solution**

I save T2D to binary array and the load it back in!

That's how I created a screenshot-based save/load file browser for Solus!

My tutorial and code for binary save systems is in my signature!

Do you take requests?