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

Hi - should there be a March 3rd build on the end of that link? I can only see a Feb 25th one.

Cheers !

Hi there!

The wiki is having problems right now, system wide, on my screen it lists two Feb 25ths

Do you see two feb 2ths?

EDIT:

I uploaded a second and now I see A March 3rd and a March 4th

So I agree it was wonky before

but you should have two builds to choose from now, March 3rd or March 4th, either will have your new Victory Path nodes in them!

UE4 Wiki, Plugin Download Page
https://wiki.unrealengine.com/File:VictoryPlugin.zip


**Talking about these new nodes!**

**You can use these nodes to get the file path to your project directory in a editor or packaged game!**

![ca6e47c3de4ce0fc029accc855a97ab3b66c7f0f.jpeg|1260x774](upload://sSMIRl140vUkZisnTkYGaDdAz4X.jpeg)

Enjoy!

**Load Texture 2D From File!

JPG, PNG, BMP, ICO, EXR, and ICNS are Supported File Formats !**

With node you can load a Texture 2D from a file during runtime!

I output for you the width and height of the loaded image!

Now you can easily create Texture 2Dā€™s from image files in Blueprints, during runtime!


**Special Note!**

Sweeney [liked  node](https://forums.unrealengine.com/showthread.php?3851-(39)--s-Extra-Blueprint-Nodes-for-You-as-a-Plugin-No-C-Required!&p=211685&viewfull=1#post211685)!


Enjoy!



PS: Make sure to include the file extension when you use  node!

![LoadImageFromFile.jpg|1258x749](upload://b61tvOclPEhyGUPZVkijbrJA4U1.jpeg)

![5e04c4d83d602f944fb2cfd946e90787f3b20f70.jpeg|1280x960](upload://dpJ6aQvfin5pK2PdO2ZWdOau8Q8.jpeg)

C++ Code For You

Here is the core C++ function involved, entire source is in the download! I wrote my own Enum for the file formats.



UTexture2D* UVictoryBPFunctionLibrary::Victory_LoadTexture2D_FromFile(const FString& FullFilePath,EJoyImageFormats ImageFormat, bool& IsValid,int32& Width, int32& Height)
{
	IsValid = false;
	UTexture2D* LoadedT2D = NULL;
	
	IImageWrapperModule& ImageWrapperModule = FModuleManager::LoadModuleChecked<IImageWrapperModule>(FName("ImageWrapper"));
	
	IImageWrapperPtr ImageWrapper = ImageWrapperModule.CreateImageWrapper(GetJoyImageFormat(ImageFormat));
 
	//Load From File
	TArray<uint8> RawFileData;
	if (!FFileHelper::LoadFileToArray(RawFileData, * FullFilePath)) 
	{
		return NULL;
	}
	
	  
	//Create T2D!
	if (ImageWrapper.IsValid() && ImageWrapper->SetCompressed(RawFileData.GetData(), RawFileData.Num()))
	{ 
		const TArray<uint8>* UncompressedBGRA = NULL;
		if (ImageWrapper->GetRaw(ERGBFormat::BGRA, 8, UncompressedBGRA))
		{
			LoadedT2D = UTexture2D::CreateTransient(ImageWrapper->GetWidth(), ImageWrapper->GetHeight(), PF_B8G8R8A8);
			
			//Valid?
			if (!LoadedT2D) 
			{
				return NULL;
			}
			
			//Out!
			Width = ImageWrapper->GetWidth();
			Height = ImageWrapper->GetHeight();
			 
			//Copy!
			void* TextureData = LoadedT2D->PlatformData->Mips[0].BulkData.Lock(LOCK_READ_WRITE);
			FMemory::Memcpy(TextureData, UncompressedBGRA->GetData(), UncompressedBGRA->Num());
			LoadedT2D->PlatformData->Mips[0].BulkData.Unlock();

			//Update!
			LoadedT2D->UpdateResource();
		}
	}
	 
	// Success!
	IsValid = true;
	return LoadedT2D;
}



**Download Link (6.5mb)**

**UE4 Wiki, Plugin Download Page**
https://wiki.unrealengine.com/File:VictoryPlugin.zip

:)

Epic should employ you . Enough said.

Anyone else get the rag-doll system to work? Ivā€™e tried and tried but havenā€™t yet. I cant figure out what Iā€™m doing wrong.

If isnt too much to ask, could you possibly do a video tutorial of how the ragdoll system works? Including your Physical Asset properties, and the view-port of your character BP? Ivā€™e been trying for about an hour and a half now. Ive got a good ragdoll in my physical asset for my character, and everything seems like it should work, but I keep getting weird results no matter what I try.

Hey , I cant build under Linux, tried your latest build from yesterday, i get is:



Plugins/VictoryPlugin/Source/VictoryBPLibrary/Private/VictoryBPFunctionLibrary.cpp(1257,12) :  error: implicit conversion of NULL constant to 'bool' -Werror,-Wnull-conversion]
        IsValid = NULL;
                ~ ^~~~
                  false
Plugins/VictoryPlugin/Source/VictoryBPLibrary/Private/VictoryBPFunctionLibrary.cpp(1276,34) :  error: implicit conversion of NULL constant to 'uint32' (aka 'unsigned int') -Werror,-Wnull-conversion]
        SpawnInfo.bDeferConstruction    = NULL;
                                        ~ ^~~~
                                          0



The bug is tracked here: [4.7 Final] PhysX error isFinite - World Creation - Epic Developer Community Forums

Not sure if its a bug in unreal engine itself or Victory Bp Function library.

Off hand, Iā€™d say you might try simply deleting the physics volume it makes for the base node (should be between the feet). Having that there always causes ragdolls to act weird, and the automatic generation creates it, so you have to delete it every you make a new Physics Asset. Also size the volumes down to fit the mesh more, and overlap with other volumes less.

I already didā€¦There isnt a problem with the Physics Asset. The ragdoll works and looks good, but the problem is when I hook u the blueprint nodes as shown in the picture, it doesnt work like the video. The ragdoll does not behave like it does in the physics asset window, and it always spawns at the player start location. I can also never revert back to ana animated character, however my capsule collider always stays active whether the ragdoll is active or notā€¦

Hee hee!

:slight_smile:


**Victory BP Library Compile Fix for Linux**

Dear Community and 

I just uploaded a fix so that Victory BP Library will compile in Linux!

Let me know how it goes!

Any build starting on or after **March 5th 2015** will contain  fix!
https://wiki.unrealengine.com/File:VictoryPlugin.zip



PS: if you can't see the March 5th build at above link let me know!

PSS: got to get more work , will check out the ragdoll issues later when I get a  :)

**Improved Get Vertex Locations of Static Mesh

Now works in Packaged Games**

I have re-written my Get Vertex Positions BP node so that it works in packaged games!


**My C++ Code For You**

See my PhysX wiki for the basic build.cs setup:
https://wiki.unrealengine.com/PhysX,_Integrating_PhysX_Code_into_Your_Project

Here is the code I wrote to get  of the transformed vertex positions using the Body Instance and PhysX code!

I am doing many safety checks to ensure the Body Instance data is valid before utilizing it, and the result is that now you can get accurate vertex locations in packaged games!



```


//~~~ PhysX ~~~
#include "PhysXIncludes.h"
#include "PhysicsPublic.h"		//For the ptou conversions
//~~~~~~~~~~~

//Get Transformed Vertex positions of any static mesh! -
bool UVictoryBPFunctionLibrary::GetStaticMeshVertexLocations(UStaticMeshComponent* Comp, TArray<FVector>& VertexPositions)
{
	
	if(!Comp || !Comp->IsValidLowLevel()) 
	{
		return false;
	}
	//~~~~~~~~~~~~~~~~~~~~~~~
	
	//Component Transform
	FTransform RV_Transform = Comp->GetComponentTransform(); 
	
	//Body Setup valid?
	UBodySetup* BodySetup = Comp->GetBodySetup();
	
	if(!BodySetup || !BodySetup->IsValidLowLevel())
	{
		return false;
	}  
	
	//Get the Px Mesh!
	PxTriangleMesh* TriMesh = BodySetup->TriMesh;
	 
	if(!TriMesh) 
	{
		return false;
	}
	//~~~~~~~~~~~~~~~~
	
	//Number of vertices
	PxU32 VertexCount 			= TriMesh->getNbVertices();
	
	//Vertex array
	const PxVec3* Vertices 	= TriMesh->getVertices();
	
	//For each vertex, transform the position to match the component Transform 
	for(PxU32 v = 0; v < VertexCount; v++)
	{ 
		VertexPositions.Add(RV_Transform.TransformPosition(P2UVector(Vertices[v])));
	}
	
	return true;
} 


```





**UE4 Wiki, Plugin Download Page**
https://wiki.unrealengine.com/File:VictoryPlugin.zip

Enjoy!

:)

, you have to rename the latest version on the wiki to ā€œ5 marchā€. You named it 3 March, but I see that the fix about linux is present.

Thatā€™s actually the wiki being confused at the moment, started happening after recent wiki changes

Everyone, please just always get the topmost download from page, regardless of the date :slight_smile:

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

ā€™ Suite of Custom Config Section BP Nodes!

Using my new suite of BP nodes, you can create as many of your own custom config file sections as you want!

You can both create and retrieve ini variables with any name and fundamental type that you want!


**Supported Types:**

Bool
Int
Float
Rotator
Vector
Color
String

Why Use a Config Var?

Config vars have several benefits

  1. Persistent data storage without using a SaveGame struct or GameInstance, store simple quantities of data and player customization way! Data is stored between level loads and even after the current instance of the game is shut down.

So in way config vars have greater persistence than the GameInstance class!

  1. Player-Driven Customization, Players of your game can tweak the config vars that you make available for them on their hard disk, by editing the .ini file directly, just like AAA games! is the most significant advantage of using config files, and their real core purpose. :slight_smile:

  2. Simplicity, simpler to use than the BP SaveSystem (which is quite wonderful by the way), but not quite as powerful in that you can only store basic data types, not UObjects and Actors.

  3. **Organization, **you can create as many config header sections as you want using my nodes, organizing your custom settings way!


**Game.ini**

 of your custom created config vars and sections are stored in:

**Saved/Config/Windows/Game.ini**

Players can navigate to  location on their harddrive to edit your ini files just like any AAA game would allow!

Here's what my **Game.ini** file looks like after running some tests!



```


[DebugWindows]
ConsoleWidth=160
ConsoleHeight=4000
ConsoleX=-32000
ConsoleY=-32000

[/Script/UnrealEd.ProjectPackagingSettings]
BuildConfiguration=PPBC_Development
StagingDirectory=(Path="E:/MYPROJECT_DELETE")
FullRebuild=True
ForDistribution=False
UsePakFile=True
UseOBB_InAPK=False
CulturesToStage=en

[Victory]
BoolVar=True
VectorVar=X=1.000 Y=2.000 Z=9000.123
StrVar=Yay For Custom Config Vars!!!
FloatVar=234.000000


```



**Now you have fully featured ability to use config variables entirely in BP!**



PS: Here's example usage!

![Usage.jpg|1280x960](upload://vJ8VyiQCZXj6G59JXlBNDrMdZow.jpeg)

So when is Epic going to start incorporating some of these NEEDED nodes into new releases so they are just ā€˜thereā€™ and no special building is needed to use 's plugin?

Community Feedback Requested

Which of My Nodes Do You Want To See In-Engine?

Iā€™d like to gather so feedback on which nodes you think should be added to the engine!

I can submit pull requests to Epic, but I canā€™t request every node, so which nodes are the most important for you to have added to the engine?

is a question to everyone :slight_smile:

, do you have a simple list of of them? :wink:

I know I have seen the on the fly key assignment stuff, that should be stock. The saving variables to the configs and reading them back, should be stock. I think you had the getting resolutions oneā€¦ should be stock. I know there are others, but I simply can not keep track of of themā€¦

Why not? :> :stuck_out_tongue:

Iā€™d definitely love to see the .ini work put into the engine as a standardized ; I think a lot of people could benefit from that. People have to remember that not every user of Unreal Engine 4 comes to the forums and so gold dust like the work you do isnā€™t been used by absolutely everything when it really should be!

Heckle Epic and get your work in UE4!

I suggest the viewport functions, to me they seem like they shouldā€™ve been in blueprints from the start.

https://answers.unrealengine.com/questions/168703/-request-blueprint-node-to-set-the-mouse-po.html

Thanks for your work .