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

Great to hear from you @MOSF !

:rose: YES :rose:

I have changed to using int64,

:dolphin: though dolphins may still come to rule world, :dolphin:

:zap: int64 BP datatype is already here… :zap:

/* Blueprints does not support int64 so at some pt in future int32 will not be enough, probably by then dolphins will rule the world, or UE4 BP will support int64, or both!  <3*/
	UFUNCTION(BlueprintPure, Category = "Victory BP Library|System")
	static int64 GetUnixTimeStamp(const FDateTime& UTCTime)
	{
		//Please note it should really be int64 but that is not supported by BP yet
		return UTCTime.ToUnixTimestamp();
	} 
	/* Blueprints does not support int64 so at some pt in future int32 will not be enough, probably by then dolphins will rule the world, or UE4 BP will support int64, or both!  <3*/
	UFUNCTION(BlueprintPure, Category = "Victory BP Library|System")
	static void GetUTCFromUnixTimeStamp(int64 UnixTimeStamp, FDateTime& UTCTime)
	{
		//Please note it should really be int64 but that is not supported by BP yet
		UTCTime = FDateTime::FromUnixTimestamp( UnixTimeStamp );
	}

:heart:

PS: 4.27 link in Original Post updated!


Victory Plugin for UE5


:heart:

node will get the Saved folder of your game, wherever it maybe installed :slight_smile:

In fact, even if you MOVE your shipped game, after it is installed, my node will STILL find your Saved folder of your project, which is why I use ConvertRelativePathToFull.

Yes, for the times when a user’s packaged game moves aorund without consulting with you first… (it could happen)

:zap: :racehorse: :dash: :zap:

You are welcome, has been integrated into future versions?

2 Likes

I have a link now for people in the original post, but after I add a chunk of new features I would appreciate you recompiling, as I do not have a post-4.24 setup going yet

I might have a fun new update within 24-48 hours so please check back periodically, or I might pm you if you want to help advance our Victory on the platform.

:heart:

1 Like

:star2: Get Text From Any :racehorse: :dash: Running .EXE on Your Computer! :sparkling_heart:

URamaVictoryPluginCreateProcessPipe :zap: is Born! :zap:


:zap: Below is a picture of me capturing the output of a .exe on my computer, a video compression tool, HandBrake! :zap:

The output of STDOUT of the .exe is coming directly into UE4, :rose: using only Blueprints! :rose:

!

Again, :sparkling_heart: welcome to the UE forums :sparkling_heart: @richhelvey !

!

I’ve made a new version of the Victory Plugin ( 4.27 (win32, win64 only) in original post ) !

new version allows you to create a :rose: Very Special :rose: URamaVictoryPluginCreateProcessPipe to capture your Process output, if the Process is outputting to STDOUT (console window) or STDERR

  1. Construct the RamaVictoryPluginCreateProcessPipe

  2. Pass it into VictoryCreateProc

  3. Call ReadFromPipe on the periodically to get updates from your process

  4. When , please call ClosePipe on the , and null the reference to the (I call ClosePipe inside of BeginDestroy, but might as well :zap: take initiative :zap: yourself and close the actual OS pipe yourself immediately, rather than waiting for Garbage Collection)


Relevant UE4 C++ Code


.h

/** 
	Made With Love By for Use with @VictoryCreateProc
	So that you can receive feedback from your processes.
	
	♄
	
	
*/
UCLASS(Blueprintable,BlueprintType)
class URamaVictoryPluginCreateProcessPipe : public UObject
{
	GENERATED_BODY()
public:
	 
	UFUNCTION(BlueprintCallable, Category = "Joy Flow")
	bool CreatePipe();
	
	UFUNCTION(BlueprintCallable, Category = "Joy Flow")
	void ClosePipe();
	
	/** 
		 has exec pins because it is an expensive action and the output is saved/cached on the output pin, whereas a Pure node would repeat the action many times, each  node is accessed.
		
		@Return false if the pipes were not created yet
		
		♄ 
	*/
	UFUNCTION(BlueprintCallable, Category = "Joy Flow")
	bool ReadFromPipe(FString& PipeContents);
	
	UFUNCTION(BlueprintPure, Category = "Joy Flow")
	bool PipeIsValid();
	
public:
	void* ReadPipe = nullptr;
	void* WritePipe = nullptr;
	
	virtual void BeginDestroy() override;
};

.cpp

bool URamaVictoryPluginCreateProcessPipe::CreatePipe()
{
	if(PipeIsValid())
	{
		//Ignore repeat creates without a close inbetween <3
		return true;
	}
	return FPlatformProcess::CreatePipe( ReadPipe, WritePipe );
}
void URamaVictoryPluginCreateProcessPipe::ClosePipe()
{
	if(PipeIsValid())
	{
		FPlatformProcess::ClosePipe(ReadPipe, WritePipe);
		ReadPipe = nullptr;
		WritePipe = nullptr;
	}
}
bool URamaVictoryPluginCreateProcessPipe::ReadFromPipe(FString& PipeContents)
{
	PipeContents = "";
	
	if(!PipeIsValid()) 
	{
		return false;
	}
	PipeContents = FPlatformProcess::ReadPipe(ReadPipe);
	return true;
}
bool URamaVictoryPluginCreateProcessPipe::PipeIsValid()
{
	return ReadPipe != nullptr && WritePipe != nullptr;
}

void URamaVictoryPluginCreateProcessPipe::BeginDestroy()
{
	Super::BeginDestroy();
	//~~~~~~~~~~~~~~~~~~~~
	
	//Close pipe if it was still open! ♄ 
	ClosePipe();
}

:heart:

4 Likes

Please add ā€˜Array Sort’ node to the UE5 version, I need the node that sorts structs by a variable name ā€˜Array Sort’.

Was Array sort actually working for you in UE4.27 ? The contributor to the Victory plugin who made that node would be able to help, Mr Redbeard, but I thought the node had been non-functional for a while, and I don’t recall why.

Victory to You @Tbjbu1 !

:heart:

It was working for me in 4.26, not sure about 4.27 - never used that version.

I’m looking for a manual too~

Good to know thank you, I will investigate!

Do you have a specific question, what sort of manual did you have in mind?

:heart:

Hi, I have question regarding the SaveArrayToFile, is there an example of how to format it as row and column for csv file?

@Looks like my UE5 release prediction was pretty spot on :smiley:

I’m trying to get a copy of our project working in UE5 Preview. So far I’ve gotten most of the levels to open fine, but if I try opening any blueprints (or even create a new blueprint > actor from scratch) I get crash immediately:

Assertion failed: NewOperatorInputA [File:D:\build\++UE5\Sync\Engine\Source\Editor\BlueprintGraph\Private\K2Node_CommutativeAssociativeBinaryOperator.cpp] [Line: 281] (the line is: check(NewOperatorInputA);

I searched online for ā€œK2Node_CommutativeAssociativeBinaryOperator.cppā€ and saw a few references to the Victory plugin, hence why I’m posting it here (I realize it’s an engine file, but from my search results of other people having an error with cpp file, they mentioned the victory plugin)

I know UE5 Preview literally JUST came out today, so I’m not expecting an immediate update, just thought I’d post here in case it’s useful :slight_smile:

UPDATE: Fixed it!! It was the ā€œAppend Multipleā€ node that I found was added to one of our widgets that was causing the crash in the UE5 Preview project :slight_smile: (now replaced with the regular append node).

3 Likes

Hi. I started using the Victory plugin for getting RGB data from a texture.
I downloaded and installed the ā€œLemur_hotelā€ version, which is the only compiled version I could find, because www. is dead and github does not
I’m using UE4.27 on Win64
I tried the node GetPixelFromT2D to get pixels from a texture, but it returns only zero RGBA and the deprecation message " function will not work until I figure out how to update it to 4.25, if you need it urgently, please post in my ue4 forum thread for plugin"
Is there a fix for 4.27?

In fact T2D functions either don’t work or crash ue4.27
I need to get the pixels coming from a video input texture, so loading from a file (the only thing that works) is not an option…

is the crash report I get when calling VictoryGetPixelsArrayFromT2D blueprint with a 1024x1024 texture in VectorDisplacementMap mode
The plugin is installed in the project plugin folder, not in the engine plugins.

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000002

UE4Editor_VictoryBPLibrary!UVictoryBPFunctionLibrary::Victory_GetPixelsArrayFromT2D() [X:\Workspaces\V360_Services\Framework\Plugins\VictoryPlugin27\Source\VictoryBPLibrary\Private\VictoryBPFunctionLibrary.cpp:4622]
UE4Editor_VictoryBPLibrary!UVictoryBPFunctionLibrary::execVictory_GetPixelsArrayFromT2D() [X:\Workspaces\V360_Services\Framework\Plugins\VictoryPlugin27\Intermediate\Build\Win64\UE4Editor\Inc\VictoryBPLibrary\VictoryBPFunctionLibrary.gen.cpp:1270]

Hi there! @anonymous_user_ebb8f4eb welcome to the UE4 Forums!

The solution to your is here:

Same logic applies to the UE4 version (you don’t have to upgrade to UE5, just set your T2Ds to no mip maps and use vectordisplacement, results in no compression of your texture, so you have a 1 to 1 pixel ratio between your original file and the UE4 file, annnnnd, no crash :heart:

:heart:

Each array line = 1 row
Each comma = 1 column

so if your csv file looks like

Name, Favorite Flower, Favorite Color

Name,Favorite Flower,Favorite Color
You,Tulip,Yellow
Me,Rose,HotPink
Sjoerd,StrawberryFlower,Red

then each of your String array entries should have 2 commas, and each array entry represents 1 row, you should include Column labels as your array 0 entry.

Don’t add line terminators in your UE4 string array, I add the line terminator in the C++ for you!

FString FinalStr = "";
for(FString& Each : SaveText)
{
	FinalStr += Each;
	FinalStr += LINE_TERMINATOR;
}

:heart:

I try to use Victory create proc on UE4.7 but the input argument line is not written to the command line windows and the process hold the empty command line window
could anybody give me some instruction

image

Removing victoryBP nodes from my project and disabling the plugin corrupts a bunch of my blueprint files…

Enabling the plugin again fixes it.

I can’t package my project because of an error with the plugin, that i’m not even using, which if disabled and removed, breaks my project…

Do I just need to start a new project and start over?

2 Likes

Hey, first thanks for , Amazing Plugin!, 2, i try to Load Textfiles, and looks like , Ƅ,Ɩ,Ü are replaced by ā€œ?ā€, but on the node is " it supports Unicode characters" ?