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

Old code :slight_smile:
Fix incoming soon’ish.
New code is directly from released versions of Ground Branch, which has been packaged into an exe multiple times.
Stay tuned :slight_smile:

**Improved Get Vertex Locations of Static Mesh

Now works in Packaged Games**

My C++ Code For You

See my PhysX wiki for the basic build.cs setup:

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

Enjoy!

:slight_smile:

Can someone tell me how “Create Texture Render Target 2D” works correctly? I try to use it to create icons of meshes that have up to three different, user-chosen colors (so I can’t use simple textures and tint them). I do it in front of a pink (255,0,255) screen and set up the clear color to match the color of the screen but the output looks like :

123.jpg&stc=1&d=1439973522

The greenish color is the button behind the image.

It’s supposed to look like :

456.jpg&stc=1&d=1439973525

Minus the pink color.

Hello ,

I am trying to convert a group of spawned static meshes into an Instanced Static Mesh, and then Spawn multiple copies of that ISM, using blueprints. the “Victory ISM Convert to Victory ISM Actors” Node works great, but I can’t for the life of me figure out the 2nd part which is spawning multiple copy’s of that created ISMActor into the level. Can someone please give me some tips on blueprint setup? Which nodes do I need to use to Spawn that Victory ISMActor properly?

An update for is on the way - contact me about it the other day :slight_smile:
New version swaps the red / blue channels and sets the alpha based on the clear colour RGB values.

New and Improved Save Texture Render Target 2D Image To Disk

Dear Community,

Community Member has updated the “CaptureComponent2D_SaveImage” BP node in my Victory BP Library!

latest version has been tested in packaged games and has been packaged and tested many times for 's UE4 game Ground Branch.


**Capture Component 2D ~ Save Image To Disk**

![731a51f10583d865d90efd269acfc1bb44ce318d.jpeg|979x270](upload://gqfizKaSrfxrtxPGfEqh3g8MTPn.jpeg)

![CaptureComponentPictureByKris2.jpg|1266x758](upload://efn34WDbN2KB796l4527vMfvgyf.jpeg)

Overview

node let’s you save a snapshot from your Capture Component 2D as an image file on your hard disk!

If your scene capture component is not set to update every tick, make sure to use 's method of moving the component to force an update.

Supply the filename of your choosing, making sure to supply an absolute path (“C:/YourDir/NewImage.png” for example).

You can check out my Victory BP File Path Nodes to assist in process.

Thank you for contributing such a valueable node to my Victory Plugin!

:slight_smile:


**Latest plugin download on the UE4 Wiki: (8 mb) **
https://wiki.unrealengine.com/File:VictoryPlugin.zip

Victory Plugin on Media Fire

If your browser is not updating the Wiki download page to the most recent version, you can use my alternative Media Fire download link!

Please note clicking link will not start a download instantly, it will just take you to the Media Fire file description.

Enjoy!

:slight_smile:

Hi,

I have a slightly stupid question. Is there are some sort of a list of these extra blueprint nodes? I thought you keep them in the first post but it doesn’t look to be up-to-date. Right now it becomes a bit difficult to locate a discussion or description on specific node if one forgot it’s name :smiley:

doesn’t work with packaged builds in 4.8, it’s a great plugin but only for prototyping in the editor until fixes the plugin for 4.8

I too, am very interested in the “Texture2D to LinearColor Array” node that would allow us to use “Get Pixel” with an existing Texture2D.

Also I wondered what platforms the “Load Texture 2D from File Pixels” and “Save Pixels” nodes work on currently? I am guessing just PC? If so, that would be another request - to allow it to work on platforms (maybe check the "Create Save Game " node? I think that works on any platform).

Amazing work on these things, you must be a machine :slight_smile:

What would your use case be for that? I’m working on displaying some pixel data from an external source (that isn’t an image from disk or an asset) using 's work as an example, so I might be able to help.

I second that…I have been tempted to DL plugin for a few months, but haven’t because there isn’t enough documentation of what these nodes do exactly. It might be great for those well-versed in C++ and know how to use them properly, but some of us aren’t that savvy just yet;)

Even so, I am sure there would be plenty of intermediate/semi-advanced BP users that could/would benefit from and proper/current documentation in a central location would be fantastic.

Hey, have you ever considered contributing your “Set Mouse Position in Viewport” node to UE4 on github? :slight_smile:

Make sure you download my latest version, and try the mediafire link if the wiki is not showing you at least the 8/20 build.

I have multiple reports of packaging working successfully in 4.8, just make sure you have file in the Plugins/VictoryBPLibrary/Win64/Binaries directory:

UE4-VictoryBPLibrary.lib

Also make sure you are including the plugin at the project level, not in the UE4 Engine plugins directory

Enjoy!

That’s a great idea John! I am writing it down and going to get to it soon as I can, thanks for asking! :slight_smile:

Victory Documentation Project

Oh my! Yes that is great idea but I simply dont have the write now to create such a document outside of the plugin.

**I document every single BP node inside the plugin itself, in the comments for that node!

So any node you look at in-engine that is from my Victory BP Libray is well-documented there.**

Unless someone wants to help me with Victory Documentation project it is not something I can do myself without any funding, seeing as the plugin is entirely free.


**Source Code Documentation**

Also the source code for the plugin is included, and  the node descriptoins are in VictoryBPLibrary.h

I am including the latest version here for your convenience:



```


UCLASS()
class VICTORYBPLIBRARY_API UVictoryBPFunctionLibrary : public UBlueprintFunctionLibrary
{
	GENERATED_UCLASS_BODY()
	
	//~~~~~~~~~~
	// 	AI
	//~~~~~~~~~~
	/** Move to Location with optional Query Filter! 
	*
	* 1. Create Custon Nav Area Classes. 
	*
	* 2. Use Nav Modifier Volumes to apply custom area class data within the level, then
	*
	* 3. Create Query Filters which alter/exclude those custom nav areas. 
	*
	* 4. Can then choose to use the filters per character or even per Move To using  node. 
	*
	*  <3 
	*
	* @param FilterClass - Allows different types of units to path in different ways  the, or path differently per Move To using  node!
	* @param bProjectDestinationToNavigation - Whether to attempt to find a nearby point on the nav mesh below/above/close to the supplied point. Uses the Agent's Nav Extent for the projection
	* @param bStopOnOverlap - Add pawn's radius to AcceptanceRadius
	* @param bCanStrafe - Set focus related flag: bAllowStrafe
	* @return Whether the Pawn's AI Controller is valid and goal can be pathed to
	*/ 
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|AI Move To")
	static EPathFollowingRequestResult::Type Victory_AI_MoveToWithFilter(
		APawn* Pawn, 
		const FVector& Dest, 
		TSubclassOf<UNavigationQueryFilter> FilterClass = NULL,
		float AcceptanceRadius = 0,  
		bool bProjectDestinationToNavigation = false,
		bool bStopOnOverlap = false,
		bool bCanStrafe = false
	);
	 
	
	//~~~~~~~~~~
	// 	Physics
	//~~~~~~~~~~
	
	/** Update the Angular Damping during runtime! Make sure the component is simulating physics before calling ! Returns false if the new value could not be set. */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Physics")
	static bool VictoryPhysics_UpdateAngularDamping(UPrimitiveComponent* CompToUpdate, float NewAngularDamping);
	
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Physics", meta=(Keywords="Closest Surface"))
	static float GetDistanceToCollision(UPrimitiveComponent* CollisionComponent, const FVector& Point, FVector& ClosestPointOnCollision);
	
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Physics", meta=(Keywords="Closest Surface"))
	static float GetDistanceBetweenComponentSurfaces(UPrimitiveComponent* CollisionComponent1, UPrimitiveComponent* CollisionComponent2, FVector& PointOnSurface1, FVector& PointOnSurface2);
	
	//~~~~~~~~~~
	// 	Joy ISM
	//~~~~~~~~~~
	
	/** Retrieve an array of  of the Victory Instanced Static Mesh Actors that have been created during runtime! */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Victory Instanced Static Mesh",meta=(WorldContext="WorldContextObject"))
	static void VictoryISM_GetAllVictoryISMActors(UObject* WorldContextObject, TArray<AVictoryISM*>& Out);
	 
	/** Finds  instances of a specified Blueprint or class, and  subclasses of  class, and converts them into a single Instanced Static Mesh Actor! Returns the created Victory ISM actors. Please note  actors of subclasses are found as well, so use a very specific blueprint / class if you only want to generate Victory ISM actors for specific classes! Ignores actor classes that dont have a static mesh component. Please note that instanced static mesh actors can only be created for actors sharing the same static mesh asset. Different Instanced Static Mesh Actors are created for each unique static mesh asset found in the whole group of actors! */ 
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Victory Instanced Static Mesh",meta=(WorldContext="WorldContextObject"))
	static void VictoryISM_ConvertToVictoryISMActors(UObject* WorldContextObject, TSubclassOf<AActor> ActorClass, TArray<AVictoryISM*>& CreatedISMActors, bool DestroyOriginalActors=true, int32 MinCountToCreateISM=2);
	 
	//~~~~~~~~~~
	// 	File I/O
	//~~~~~~~~~~
	
	/** Obtain  files in a provided directory, with optional extension filter.  files are returned if Ext is left blank. Returns false if operation could not occur. */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|File IO")
	static bool JoyFileIO_GetFiles(TArray<FString>& Files, FString RootFolderFullPath, FString Ext);
	
	/** Obtain  files in a provided root directory, including  subdirectories, with optional extension filter.  files are returned if Ext is left blank. The full file path is returned because the file could be in any subdirectory. Returns false if operation could not occur. */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|File IO")
	static bool JoyFileIO_GetFilesInRootAndAllSubFolders(TArray<FString>& Files, FString RootFolderFullPath, FString Ext);
	
	/** Obtain a listing of  SaveGame file names that were saved using the Blueprint Save Game system. */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|File IO")
	static void SaveGameObject_GetAllSaveSlotFileNames(TArray<FString>& FileNames);
	
	/** Returns false if the new file could not be created. The folder path must be absolute, such as C:\Users\Self\Documents\YourProject\MyPics. You can use my other Paths nodes to easily get absolute paths related to your project! <3  */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Screenshots", meta=(Keywords="High resolution"))
	static bool ScreenShots_Rename_Move_Most_Recent(FString& OriginalFileName, FString NewName, FString NewAbsoluteFolderPath, bool HighResolution=true);
	
	//~~~~ Key Re Binding ! ~~~~

	//	Axis Mapping
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Key Rebinding")
	static FVictoryInputAxis VictoryGetVictoryInputAxis(const FKeyEvent& KeyEvent);
	
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Key Rebinding")
	static void VictoryGetAllAxisKeyBindings(TArray<FVictoryInputAxis>& Bindings);
		 
	/** You can leave the AsString field blank :) Returns false if the key could not be found as an existing mapping!  Enjoy! <3   */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Key Rebinding")
	static bool VictoryReBindAxisKey(FVictoryInputAxis Original, FVictoryInputAxis NewBinding);
		
	static FORCEINLINE void UpdateAxisMapping(FInputAxisKeyMapping& Destination, const FVictoryInputAxis& VictoryInputBind)
	{ 
		Destination.Key = VictoryInputBind.Key;
		Destination.Scale = VictoryInputBind.Scale;
	}
	
	
	//	Action Mapping
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Key Rebinding")
	static FVictoryInput VictoryGetVictoryInput(const FKeyEvent& KeyEvent);
 
	static FORCEINLINE void UpdateActionMapping(FInputActionKeyMapping& Destination, const FVictoryInput& VictoryInputBind)
	{
		Destination.Key = VictoryInputBind.Key;
		Destination.bShift = VictoryInputBind.bShift;
		Destination.bCtrl = VictoryInputBind.bCtrl;
		Destination.bAlt = VictoryInputBind.bAlt;
		Destination.bCmd = VictoryInputBind.bCmd;
	}

	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Key Rebinding")
		static void VictoryGetAllActionKeyBindings(TArray<FVictoryInput>& Bindings);

	/** You can leave the AsString field blank :) Returns false if the key could not be found as an existing mapping!  Enjoy! <3   */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Key Rebinding")
	static bool VictoryReBindActionKey(FVictoryInput Original, FVictoryInput NewBinding);

	//~~~~~~~~~~~~~~~~~~~~

	/** Change volume of Sound class of your choosing, sets the volume instantly! Returns false if the sound class was not found and volume was not set. */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Sound")
	static bool VictorySoundVolumeChange(USoundClass* SoundClassObject, float NewVolume);

	/** Get Current Sound Volume! Returns -1 if sound class was not found*/
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Sound")
	static float VictoryGetSoundVolume(USoundClass* SoundClassObject);

	//~~~~~~~~~~~~~~~~~~~~

	
	/**
	 * Tries to reach Target based on distance from Current position, giving a nice smooth feeling when tracking a position.
	 *
	 * @param		Current			Actual position
	 * @param		Target			Target position
	 * @param		DeltaTime		 since last tick
	 * @param		InterpSpeed		Interpolation speed
	 * @return		New interpolated position
	 */
	//UFUNCTION(BlueprintPure, Category="Math|Interpolation", meta=(Keywords="position"))
	UFUNCTION(BlueprintPure, Category="VictoryBPLibrary|Interpolation", meta=(Keywords="position"))
	static FVector2D Vector2DInterpTo(FVector2D Current, FVector2D Target, float DeltaTime, float InterpSpeed);
	
	/**
	 * Tries to reach Target at a constant rate.
	 *
	 * @param		Current			Actual position
	 * @param		Target			Target position
	 * @param		DeltaTime		 since last tick
	 * @param		InterpSpeed		Interpolation speed
	 * @return		New interpolated position
	 */
	//UFUNCTION(BlueprintPure, Category="Math|Interpolation", meta=(Keywords="position"))
	UFUNCTION(BlueprintPure, Category="VictoryBPLibrary|Math", meta=(Keywords="position"))
	static FVector2D Vector2DInterpTo_Constant(FVector2D Current, FVector2D Target, float DeltaTime, float InterpSpeed);
	
	/** Returns Value mapped from one range into another where the value is clamped to the output range.  (e.g. 0.5 normalized from the range 0->1 to 0->50 would result in 25) */
	UFUNCTION(BlueprintPure, Category="VictoryBPLibrary|Math", meta=(Keywords = "get mapped value clamped"))
	static float MapRangeClamped(float Value, float InRangeA, float InRangeB, float OutRangeA, float OutRangeB);

	/** Server Travel!  is an async load level process which allows you to put up a UMG widget while the level loading occurs! */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary",meta=(WorldContext="WorldContextObject"))
	static void ServerTravel(UObject* WorldContextObject,FString MapName, bool bNotifyPlayers=true);
	
	/** Get a Player Start by Name! */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary",meta=(WorldContext="WorldContextObject"))
	static APlayerStart* GetPlayerStart(UObject* WorldContextObject,FString PlayerStartName);
	

	/** Get Custom Config Var! These are stored in Saved/Config/Windows/Game.ini */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Custom Config Vars!")
	static bool VictoryGetCustomConfigVar_Bool(FString SectionName, FString VariableName);

	/** Get Custom Config Var! These are stored in Saved/Config/Windows/Game.ini */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Custom Config Vars!")
	static int32 VictoryGetCustomConfigVar_Int(FString SectionName, FString VariableName);

	/** Get Custom Config Var! These are stored in Saved/Config/Windows/Game.ini */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Custom Config Vars!")
	static float VictoryGetCustomConfigVar_Float(FString SectionName, FString VariableName);

	/** Get Custom Config Var! These are stored in Saved/Config/Windows/Game.ini */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Custom Config Vars!")
	static FVector VictoryGetCustomConfigVar_Vector(FString SectionName, FString VariableName);

	/** Get Custom Config Var! These are stored in Saved/Config/Windows/Game.ini */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Custom Config Vars!")
	static FRotator VictoryGetCustomConfigVar_Rotator(FString SectionName, FString VariableName);

	/** Get Custom Config Var! These are stored in Saved/Config/Windows/Game.ini */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Custom Config Vars!")
	static FLinearColor VictoryGetCustomConfigVar_Color(FString SectionName, FString VariableName);

	/** Get Custom Config Var! These are stored in Saved/Config/Windows/Game.ini */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Custom Config Vars!")
	static FString VictoryGetCustomConfigVar_String(FString SectionName, FString VariableName);

	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Custom Config Vars!")
	static FVector2D VictoryGetCustomConfigVar_Vector2D(FString SectionName, FString VariableName);
 
	//~~~~~~~~~~~~~~~~~~~~

	/** Set Custom Config Var! These are stored in Saved/Config/Windows/Game.ini */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Custom Config Vars!")
	static void VictorySetCustomConfigVar_Vector2D(FString SectionName, FString VariableName, FVector2D Value);
		
	/** Set Custom Config Var! These are stored in Saved/Config/Windows/Game.ini */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Custom Config Vars!")
	static void VictorySetCustomConfigVar_Bool(FString SectionName, FString VariableName, bool Value);

	/** Set Custom Config Var! These are stored in Saved/Config/Windows/Game.ini */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Custom Config Vars!")
	static void VictorySetCustomConfigVar_Int(FString SectionName, FString VariableName, int32 Value);

	/** Set Custom Config Var! These are stored in Saved/Config/Windows/Game.ini */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Custom Config Vars!")
		static void VictorySetCustomConfigVar_Float(FString SectionName, FString VariableName, float Value);

	/** Set Custom Config Var! These are stored in Saved/Config/Windows/Game.ini */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Custom Config Vars!")
	static void VictorySetCustomConfigVar_Vector(FString SectionName, FString VariableName, FVector Value);

	/** Set Custom Config Var! These are stored in Saved/Config/Windows/Game.ini */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Custom Config Vars!")
	static void VictorySetCustomConfigVar_Rotator(FString SectionName, FString VariableName, FRotator Value);

	/** Set Custom Config Var! These are stored in Saved/Config/Windows/Game.ini */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Custom Config Vars!")
	static void VictorySetCustomConfigVar_Color(FString SectionName, FString VariableName, FLinearColor Value);


	/** Set Custom Config Var! These are stored in Saved/Config/Windows/Game.ini */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Custom Config Vars!")
	static void VictorySetCustomConfigVar_String(FString SectionName, FString VariableName, FString Value);

 
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Transform")
	FRotator TransformVectorToActorSpaceAngle(AActor* Actor, const FVector& InVector);
	
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Transform")
	FVector TransformVectorToActorSpace(AActor* Actor, const FVector& InVector);





	/** The FName that is expected is the exact same format as when you right click on asset -> Copy Reference! You can directly paste copied references into  node! IsValid lets you know if the path was correct or not and I was able to load the . MAKE SURE TO SAVE THE RETURNED  AS A VARIABLE. Otherwise your shiny new asset will get garbage collected. I recommend you cast the return value to the appropriate  and then promote it to a variable :)  - */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
	static UObject* LoadObjectFromAssetPath(TSubclassOf<UObject> ObjectClass, FName Path, bool& IsValid);

	/** Uses the same format as I use for LoadObjectFromAssetPath! Use  node to get the asset path of objects in the world! - */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary")
	static FName GetObjectPath(UObject* Obj);


	/** Find  widgets of a certain class! Top level only means only widgets that are directly added to the viewport will be found */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|UMG", meta = (HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject"))
	static void GetAllWidgetsOfClass(UObject* WorldContextObject, TSubclassOf<UUserWidget> WidgetClass, TArray<UUserWidget*>& FoundWidgets, bool TopLevelOnly = true);

	/** Remove  widgets of a certain class from viewport! */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|UMG", meta = (HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject"))
	static void RemoveAllWidgetsOfClass(UObject* WorldContextObject, TSubclassOf<UUserWidget> WidgetClass);

	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|UMG", meta = (HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject"))
		static bool IsWidgetOfClassInViewport(UObject* WorldContextObject, TSubclassOf<UUserWidget> WidgetClass);


	/** Retrieves the unique net ID for the local player as a number! The number itself will vary based on what Online Subsystem is being used, but you are guaranteed that  number is unique per player! */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary")
	static int32 GetPlayerUniqueNetID();

	/** Call  periodically in a huge loop you are intentionally using to reset the BP runaway loop system. Caution, if you have an infinite loop  will permanently hang your system until you turn your computer off. Use very very carefully! When constructing a new loop and you are not sure if it is totally stable, do NOT use  node! Always test new loops normally to ensure you dont truly have a runaway loop that would hang your computer forever. */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
	static void Loops_ResetBPRunawayCounter();

	/** Set the  Frame Rate. Min value is 10. */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Graphics Settings")
	static void GraphicsSettings__SetFrameRateCap(float NewValue);

	/** Only hardware dependent, no smoothing */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Graphics Settings")
	static void GraphicsSettings__SetFrameRateToBeUnbound();

	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
	static FVector2D ProjectWorldToScreenPosition(const FVector& WorldLocation);

	/** Make sure to save off the return value as a global variable in one of your BPs or else it will get garbage collected! */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary", meta = (HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject"))
	static UObject* CreateObject(UObject* WorldContextObject, UClass* TheObjectClass);

	/** Make sure to save off the return value as a global variable in one of your BPs or else it will get garbage collected! */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary", meta = (HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject"))
	static UPrimitiveComponent* CreatePrimitiveComponent(UObject* WorldContextObject, TSubclassOf<UPrimitiveComponent> CompClass, FName Name, FVector Location, FRotator Rotation);



	/** Spawn an Actor and choose which level you want them to spawn into! */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary", meta = (HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject"))
	static AActor* SpawnActorIntoLevel(UObject* WorldContextObject, TSubclassOf<AActor> ActorClass, FName Level = NAME_None, FVector Location = FVector::ZeroVector, FRotator Rotation = FRotator::ZeroRotator, bool SpawnEvenIfColliding = true);

	/** Get the names of  currently loaded and visible levels! */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary", meta = (HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject"))
	static void GetNamesOfLoadedLevels(UObject* WorldContextObject, TArray<FString>& NamesOfLoadedLevels);




	/** Obtain the scaled,rotated, and translated vertex positions for any static mesh! Returns false if operation could not occur because the comp or static mesh asset was invalid. <3  */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary")
	static bool GetStaticMeshVertexLocations(UStaticMeshComponent* Comp, TArray<FVector>& VertexPositions);

	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
	static void AddToActorRotation(AActor* TheActor, FRotator AddRot);

	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary", meta = (HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject"))
		static void DrawCircle(
		UObject* WorldContextObject,
		FVector Center,
		float Radius,
		int32 NumPoints = 32,
		float Thickness = 7,
		FLinearColor LineColor = FLinearColor::Red,
		FVector YAxis = FVector(0, 1, 0),
		FVector ZAxis = FVector(0, 0, 1),
		float Duration = 0,
		bool PersistentLines = false
		);

	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|AI",meta=(WorldContext="WorldContextObject"))
		static AActor* GetClosestActorOfClassInRadiusOfLocation(UObject* WorldContextObject, TSubclassOf<AActor> ActorClass, FVector Center, float Radius, bool& IsValid);
	 
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|AI",meta=(WorldContext="WorldContextObject"))
		static AActor* GetClosestActorOfClassInRadiusOfActor(UObject* WorldContextObject, TSubclassOf<AActor> ActorClass, AActor* ActorCenter, float Radius, bool& IsValid);
	 
		
	/** Implementation of a Selection Marquee / Selection Box as a BP Node. AnchorPoint is the first clicked point, which user then drags from to make the box. Class filter is optional way to narrow the scope of actors that can be selected by the selection box! -*/
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary", meta = (HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject"))
		static void Selection_SelectionBox(UObject* WorldContextObject, TArray<AActor*>& SelectedActors, FVector2D AnchorPoint, FVector2D DraggedPoint, TSubclassOf<AActor> ClassFilter);


	/** Get the Controller ID for a supplied Player Controller <3 . Returns false if operation could not occur.  */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
		static bool PlayerController_GetControllerID(APlayerController* ThePC, int32& ControllerID);

	/** Get the Unique PlayerID from the PlayerState for a supplied Player Controller <3 . Returns false if operation could not occur. */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
		static bool PlayerState_GetPlayerID(APlayerController* ThePC, int32& PlayerID);


	/** Launches the specified URL in the OS default web browser :) <3  */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
		static void Open_URL_In_Web_Browser(FString TheURL);



	/** Returns which platform the game code is running in.*/
	UFUNCTION(BlueprintCallable, BlueprintPure, Category = "VictoryBPLibrary")
		static void OperatingSystem__GetCurrentPlatform(
		bool& Windows_,
		bool& Mac,
		bool& Linux,
		bool& iOS,
		bool& Android,
		bool& PS4,
		bool& XBoxOne,
		bool& HTML5,
		bool& WinRT_Arm,
		bool& WinRT
		);

	//~~~

	/** Retrieves the OS system Date and as a string at the instant  BP node runs. Use my other RealWorldTime node to get the passed since the return value of  node! You can use  to record milliseconds/seconds/minutes/hours between events in game logic! */
	UFUNCTION(BlueprintCallable, BlueprintPure, Category = "VictoryBPLibrary")
		static FString RealWorldTime__GetCurrentOSTime(
		int32& MilliSeconds,
		int32& Seconds,
		int32& Minutes,
		int32& Hours12,
		int32& Hours24,
		int32& Day,
		int32& Month,
		int32& Year
		);

	/** Get the amount of seconds/minutes/hours since the the supplied DateTime string! You can use  to record milliseconds/seconds/minutes/hours between events in game logic! */
	UFUNCTION(BlueprintCallable, BlueprintPure, Category = "VictoryBPLibrary")
		static void RealWorldTime__GetTimePassedSincePreviousTime(
		const FString& PreviousTime,
		float& Milliseconds,
		float& Seconds,
		float& Minutes,
		float& Hours
		);

	/** Get the difference between two recorded times! You can use  to record milliseconds/seconds/minutes/hours between events in game logic! */
	UFUNCTION(BlueprintCallable, BlueprintPure, Category = "VictoryBPLibrary")
		static void RealWorldTime__GetDifferenceBetweenTimes(
		const FString& PreviousTime1,
		const FString& PreviousTime2,
		float& Milliseconds,
		float& Seconds,
		float& Minutes,
		float& Hours
		);

	//~~~

	/** Loads a text file from hard disk and parses it into a String array, where each entry in the string array is 1 line from the text file. Option to exclude lines that are only whitespace characters or '
'. Returns the size of the final String Array that was created. Returns false if the file could be loaded from hard disk. */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary")
		static bool LoadStringArrayFromFile(TArray<FString>& StringArray, int32& ArraySize, FString FullFilePath = "Enter Full File Path", bool ExcludeEmptyLines = false);

	//~~~

	/**  of  array entries. Returns -1 if the supplied array is empty. Returns the index of the  value as well as the value itself. */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary")
		static void MaxOfFloatArray(const TArray<float>& FloatArray, int32& IndexOfMaxValue, float& MaxValue);

	/**  of  array entries. Returns -1 if the supplied array is empty. Returns the index of the  value as well as the value itself. */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary")
		static void MaxOfIntArray(const TArray<int32>& IntArray, int32& IndexOfMaxValue, int32& MaxValue);

	/** Min of  array entries. Returns -1 if the supplied array is empty. Returns the index of the min value as well as the value itself. */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary")
		static void MinOfFloatArray(const TArray<float>& FloatArray, int32& IndexOfMinValue, float& MinValue);

	/** Min of  array entries. Returns -1 if the supplied array is empty. Returns the index of the min value as well as the value itself. */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary")
		static void MinOfIntArray(const TArray<int32>& IntArray, int32& IndexOfMinValue, int32& MinValue);

	//~~~

	/** Set  Move Speed. Supply the Character whose Character Movement to change! Returns false if operation could not occur due to invalid Character or MovementComponent could not be obtained.*/
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary", meta = (DefaultToSelf = "TheCharacter"))
		static bool CharacterMovement__SetMaxMoveSpeed(ACharacter* TheCharacter, float NewMaxMoveSpeed);

	//~~~

	/** Converts a float to a rounded Integer, examples: 1.4 becomes 1,   1.6 becomes 2 */
	UFUNCTION(BlueprintCallable, BlueprintPure, Category = "VictoryBPLibrary")
		static int32 Conversion__FloatToRoundedInteger(float IN_Float);

		
		
	/**
	 * Returns whether or not the SearchIn string contains the supplied Substring.  
	 * 	Ex: "cat" is a contained within "concatenation" as a substring.
	 * @param SearchIn The string to search within
	 * @param Substring The string to look for in the SearchIn string
	 * @param bUseCase Whether or not to be case-sensitive
	 * @param bSearchFromEnd Whether or not to start the search from the end of the string instead of the beginning
	 */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|String")
	static bool HasSubstring(const FString& SearchIn, const FString& Substring, ESearchCase::Type SearchCase = ESearchCase::IgnoreCase, ESearchDir::Type SearchDir = ESearchDir::FromStart);

	/** Combines two strings together! The Separator and the Labels are optional*/
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|String")
	static FString String__CombineStrings(FString StringFirst, FString StringSecond, FString Separator = "", FString StringFirstLabel = "", FString StringSecondLabel = "");
  
	/** Separator is always a space */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|String", meta=( Keywords = "concatenate append", CommutativeAssociativeBinaryOperator = "true"))
	static FString String__CombineStrings_Multi(FString A, FString B);
	  
	/** Returns three arrays containing  of the resolutions and refresh rates for the current computer's current display adapter. You can loop over just 1 of the arrays and use the current index for the other two arrays, as  3 arrays will always have the same length. Returns false if operation could not occur. */
	UFUNCTION(BlueprintCallable, BlueprintPure, Category = "VictoryBPLibrary", meta = (Keywords = "screen resolutions display adapter"))
		static bool OptionsMenu__GetDisplayAdapterScreenResolutions(TArray<int32>& Widths, TArray<int32>& Heights, TArray<int32>& RefreshRates, bool IncludeRefreshRates = false);

	/** Clones an actor by obtaining its class and creating a copy. Returns the created Actor. The cloned actor is set to have the rotation and location of the initial actor. You can optionally specify location / rotation offsets for the new clone from original actor. Use IsValid to know if the actor was able to be cloned. */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary", meta = (HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject"))
		static AStaticMeshActor* Clone__StaticMeshActor(UObject* WorldContextObject, bool&IsValid, AStaticMeshActor* ToClone, FVector LocationOffset = FVector(0, 0, 0), FRotator RotationOffset = FRotator(0, 0, 0));


	/** Teleport Actor To Actor. Moves an actor instantly to the position and rotation of another actor. Useful for player starts, notes, triggers, and any other destination actors who dont have collision. Returns false if the operation could not occur. */
	UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Actor|VictoryBPLibrary")
		static bool Actor__TeleportToActor(AActor* ActorToTeleport, AActor* DestinationActor);

	/** Is  game logic running in the Editor world? */
	UFUNCTION(BlueprintCallable, BlueprintPure, Category = "VictoryBPLibrary", meta = (HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject"))
		static bool WorldType__InEditorWorld(UObject* WorldContextObject);

	/** Is  game logic running in the PIE world? */
	UFUNCTION(BlueprintCallable, BlueprintPure, Category = "VictoryBPLibrary", meta = (HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject"))
		static bool WorldType__InPIEWorld(UObject* WorldContextObject);

	/** Is  game logic running in an actual independent game instance? */
	UFUNCTION(BlueprintCallable, BlueprintPure, Category = "VictoryBPLibrary", meta = (HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject"))
		static bool WorldType__InGameInstanceWorld(UObject* WorldContextObject);

	/** Cause a supplied Character (casted from Actor internally) to enter Ragdoll physics. A check will be done to see if the character has a physics asset. */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
		static bool Physics__EnterRagDoll(AActor* TheCharacter);

	/** Cause a supplied Character (casted from Actor internally) to exit Ragdoll physics. HeightAboveRBMesh is how far above the RB Mesh the Actor Capsule should be moved to upon exiting. Pass in the InitLocation and InitRotation from InitializeVictoryRagdoll */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
		static bool Physics__LeaveRagDoll(AActor* TheCharacter, float HeightAboveRBMesh = 64, const FVector& InitLocation = FVector(0, 0, 0), const FRotator& InitRotation = FRotator(0, 0, 0));

	/** Returns whether or not a supplied Character is in Ragdoll Physics. Cast from Actor done internally for your convenience. */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
		static bool Physics__IsRagDoll(AActor* TheCharacter);

	/** Get the Ragdoll Position of the supplied actor, casted to Character internally. Returns false if operation could not occur. */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
		static bool Physics__GetLocationofRagDoll(AActor* TheCharacter, FVector& RagdollLocation);

	/** Initialize Victory Ragdoll Mode, by Obtaining the Default Relative Rotation and Location for  Character's Mesh. The Output Location and Rotation must be saved for use with LeaveRagdoll. Returns false if operation could not occur */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
		static bool Physics__InitializeVictoryRagDoll(AActor* TheCharacter, FVector&InitLocation, FRotator&InitRotation);

	/** Update the TheCharacter's Capsule Location and Camera to the Current Location of the Ragdoll. InterpSpeed is how fast the camera keeps up with the moving ragdoll! HeightOffset is the height above the ragdoll that the camera should stay. Returns false if operation could not occur or if Mesh was not in ragdoll */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
		static bool Physics__UpdateCharacterCameraToRagdollLocation(AActor* TheCharacter, float HeightOffset = 128, float InterpSpeed = 3);

		
		
		
		
	/** Get Name as String*/
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary")
		static FString Accessor__GetNameAsString(const UObject* TheObject);

	/** Get Socket Local Transform. Returns false if operation could not occur.*/
	//UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
	//static bool Accessor__GetSocketLocalTransform(const USkeletalMeshComponent* Mesh, FTransform& LocalTransform, FName SocketName=FName("SocketName"));

	/** Get Player Character's Player Controller. Requires: The Passed in Actor must be a character and it must be a player controlled character. IsValid will tell you if the return value is valid, make sure to do a Branch to confirm ! */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary")
		static APlayerController* Accessor__GetPlayerController(AActor* TheCharacter, bool&IsValid);

		
	/** SET the Mouse Position! Returns false if the operation could not occur */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
		static bool Viewport__SetMousePosition(const APlayerController* ThePC, const float& PosX, const float& PosY);

	/** Get the Cursor Position within the Player's Viewport.  will return a result consistent with SET Mouse Position Returns false if the operation could not occur */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary")
		static bool Viewport__GetMousePosition(const APlayerController* ThePC, float& PosX, float& PosY);

		 
	/** Get the coordinates of the center of the player's screen / viewport. Returns false if the operation could not occur */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary")
		static bool Viewport__GetCenterOfViewport(const APlayerController* ThePC, float& PosX, float& PosY);

	
	/** Convert Vector to Rotator*/
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary")
		static FRotator Conversions__VectorToRotator(const FVector& TheVector);
 
	/** Convert Rotator to Vector */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary")
		static FVector Conversions__RotatorToVector(const FRotator& TheRotator);

	/** Input Actor is expected to be a ACharacter, conversion done internally for your convenience */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary")
		static FRotator Character__GetControllerRotation(AActor * TheCharacter);

		
		
	/** Draw 3D Line of Chosen Thickness From Socket on Character's Mesh to Destination, conversion of AActor to ACharacter done internally for your convenience. Duration is in Seconds */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
		static void Draw__Thick3DLineFromCharacterSocket(AActor* TheCharacter, const FVector& EndPoint, FName Socket = FName("SocketName"), FLinearColor LineColor = FLinearColor(1, 0, 0, 1), float Thickness = 7, float Duration = -1.f);
	/** Draw 3D Line of Chosen Thickness From Mesh Socket to Destination. Duration is in Seconds */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
		static void Draw__Thick3DLineFromSocket(USkeletalMeshComponent* Mesh, const FVector& EndPoint, FName Socket = FName("SocketName"), FLinearColor LineColor = FLinearColor(0, 1, 0, 1), float Thickness = 7, float Duration = -1.f);
	/** Draw 3D Line of Chosen Thickness Between Two Actors. Duration is in Seconds */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
		static void Draw__Thick3DLineBetweenActors(AActor* StartActor, AActor* EndActor, FLinearColor LineColor = FLinearColor(0, 0, 1, 1), float Thickness = 7, float Duration = -1.f);

	/** AnimBPOwner - Must be a Character, Conversion Internally For Convenience.

Retrieves the Aim Offsets Pitch & Yaw Based On the Rotation of the Controller of The Character Owning The Anim Instance.

The Pitch and Yaw are meant to be used with a Blend Space going from -90,-90 to 90,90.
   Returns true if function filled the pitch and yaw vars successfully */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
		static bool Animation__GetAimOffsets(AActor* AnimBPOwner, float& Pitch, float& Yaw);

	/** AnimBPOwner - Must be a Character, Conversion Internally For Convenience.

Retrieves the Aim Offsets Pitch & Yaw for the AnimBPOwner Based On the supplied Rotation.

The Pitch and Yaw are meant to be used with a Blend Space going from -90,-90 to 90,90.
    Returns true if function filled the pitch and yaw vars successfully */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
		static bool Animation__GetAimOffsetsFromRotation(AActor * AnimBPOwner, const FRotator & TheRotation, float & Pitch, float & Yaw);

	/** Saves text to filename of your choosing, make sure include whichever file extension you want in the filename, ex: SelfNotes.txt . Make sure to include the entire file path in the save directory, ex: C:\MyGameDir\BPSavedTextFiles */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
	static bool FileIO__SaveStringTextToFile(FString SaveDirectory, FString JoyfulFileName, FString SaveText, bool AllowOverWriting = false);

	/** Saves multiple Strings to filename of your choosing, with each string on its own line! Make sure include whichever file extension you want in the filename, ex: SelfNotes.txt . Make sure to include the entire file path in the save directory, ex: C:\MyGameDir\BPSavedTextFiles */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
	static bool FileIO__SaveStringArrayToFile(FString SaveDirectory, FString JoyfulFileName, TArray<FString> SaveText, bool AllowOverWriting = false);

	
	/** Obtain an Array of Actors Rendered Recently. You can specifiy what qualifies as "Recent" in seconds. */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary", meta=(WorldContext="WorldContextObject"))
		static void Visibility__GetRenderedActors(UObject* WorldContextObject, TArray<AActor*>& CurrentlyRenderedActors, float MinRecentTime = 0.01);

	/** Obtain an Array of Actors NOT Rendered Recently! You can specifiy what qualifies as "Recent" in seconds. */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary", meta=(WorldContext="WorldContextObject"))
		static void Visibility__GetNotRenderedActors(UObject* WorldContextObject, TArray<AActor*>& CurrentlyNotRenderedActors, float MinRecentTime = 0.01);

	/** Is the Current Game Window the Foreground window in the OS, or in the Editor?  will be accurate in standalone running of the game as well as in the editor PIE */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
		static bool ClientWindow__GameWindowIsForeGroundInOS();

	/** Freeze Game Render, Does Not Stop Game Logic, Just Rendering.  is not like Pausing. Mainly useful for freezing render when window is not in the foreground */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
		static void Rendering__FreezeGameRendering();

	/** Unfreeze Game Render.  is not an unpause function, it's just for actual screen rendering */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
	static void Rendering__UnFreezeGameRendering();

	/** Compare Source Vector against Array of Vectors. Returns: Returns the Closest Vector to Source and what that closest Distance is, or -1 if there was an error such as array being empty. Ignores: Ignores Source if source is in the array */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
	static float Calcs__ClosestPointToSourcePoint(const FVector & Source, const TArray<FVector>& OtherPoints, FVector& ClosestPoint);

	/** Takes in an actor (for convenience) and tries to cast it to Character and return an array of Vectors of  of the current bone locations of the character's Mesh. Locations are in World Space. Returns: false if the operation could not occur. Requires: Character Mesh Component must be valid */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
	static bool Data__GetCharacterBoneLocations(AActor * TheCharacter, TArray<FVector>& BoneLocations);

	/** Retrieves the "Mesh" component of a Character. IsValid lets you know if the data is valid, make sure to check if it is! Requires: the passed in Actor must be a Character */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
	static USkeletalMeshComponent* Accessor__GetCharacterSkeletalMesh(AActor* TheCharacter, bool& IsValid);

	 
	/** 
	 * Get  Bone Names Below Bone, requires a physics asset, by 
	 *
	 * @param StartingBoneName The name of the bone to find  bones below.
	 *
	 * @param BoneNames ,  of the bone names below the starting bone.
	 *
	 * @return total number of bones found
	 */
	UFUNCTION(BlueprintCallable, Category="VictoryBPLibrary|Components|SkinnedMesh")
	static int32 GetAllBoneNamesBelowBone(USkeletalMeshComponent* SkeletalMeshComp, FName StartingBoneName,  TArray<FName>& BoneNames );
 
	/** Does Not Do A Trace, But Obtains the Start and End for doing a Trace:

Takes in an actor (for convenience) and tries to cast it to Character. Takes in a socket name to find on the Character's Mesh component, the socket location will be the start of the trace.

Also takes in the Angle / Rotator and the length of the trace you want to do. Option to draw the trace with variable thickness as it occurs.

Returns what the Trace Start and End should be so you can plug these into any existing trace node you want.

Requires: Character Mesh Component must be valid. Returns False if trace could not be done */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Traces")
	static bool TraceData__GetTraceDataFromCharacterSocket(FVector& TraceStart, FVector& TraceEnd, AActor * TheCharacter, const FRotator& TraceRotation, float TraceLength = 10240, FName Socket = "SocketName", bool DrawTraceData = true, FLinearColor TraceDataColor = FLinearColor(1, 0, 0, 1), float TraceDataThickness = 7);

	/** Does Not Do A Trace, But Obtains the Start and End for doing a Trace:

Takes in a Skeletal Mesh Component and a socket name to trace from. Also takes in the Angle / Rotator and the length of the trace you want to do.

Option to draw the trace as a variable thickness line

Returns what the Trace Start and End should be so you can plug these into any existing trace node you want.

 Requires: Mesh must be valid. Returns False if trace could not be done */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Traces")
		static bool TraceData__GetTraceDataFromSkeletalMeshSocket(FVector& TraceStart, FVector& TraceEnd, USkeletalMeshComponent* Mesh, const FRotator& TraceRotation, float TraceLength = 10240, FName Socket = "SocketName", bool DrawTraceData = true, FLinearColor TraceDataColor = FLinearColor(1, 0, 0, 1), float TraceDataThickness = 7);

	/** Does a simple line trace given Trace Start and End, and if a Character is hit by the trace, then a component trace is performed on that character's mesh. Trace Owner is ignored when doing the trace.

Returns the Character that was hit, as an Actor, as well as the name of the bone that was closest to the impact point of the trace. Also returns the impact point itself as well as the impact normal.

Using component trace ensures accuracy for testing against bones and sockets.

IsValid: Will be true only if the component trace also hit someting. But the Returned Actor will contain an actor if any actor at  was hit by the simple trace. */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Traces")
		static AActor* Traces__CharacterMeshTrace___ClosestBone(AActor* TraceOwner, const FVector& TraceStart, const FVector& TraceEnd, FVector& OutImpactPoint, FVector& OutImpactNormal, FName& ClosestBoneName, FVector & ClosestBoneLocation, bool&IsValid);

	/** Does a simple line trace given Trace Start and End, and if a Character is hit by the trace, then a component trace is performed on that character's mesh. Returns the name of the socket that was closest to the impact point of the trace. Also returns the impact point itself as well as the impact normal. Also returns the Socket Location. Using component trace ensures accuracy for testing against bones and sockets.*/
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Traces")
		static AActor* Traces__CharacterMeshTrace___ClosestSocket(const AActor * TraceOwner, const FVector& TraceStart, const FVector& TraceEnd, FVector& OutImpactPoint, FVector& OutImpactNormal, FName& ClosestSocketName, FVector & SocketLocation, bool&IsValid);

	/** Returns the float as a String with Precision, Precision 0 = no decimal value. Precison 1 = 1 decimal place. The re-precisioned result is rounded appropriately. */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary")
	static void StringConversion__GetFloatAsStringWithPrecision(float TheFloat, FString & TheString, int32 Precision = 2, bool IncludeLeadingZero=true);
  
	/** Rotator out value is the degrees of difference between the player camera and the direction of player to light source. Returns false if the operation could not occur. */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
		static bool LensFlare__GetLensFlareOffsets(APlayerController* PlayerController, AActor* LightSource, float& PitchOffset, float& YawOffset, float& RollOffset);

	//~~~~~~~~~~~~~

	/** Returns false if the operation could not occur. PawnVelocityCorrection is used only if the Mesh belongs to a Pawn/Character. */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
	static bool AnimatedVertex__GetAnimatedVertexLocations(USkeletalMeshComponent* Mesh, TArray<FVector>& Locations, bool PerformPawnVelocityCorrection=true );

	/** Returns false if the operation could not occur. */
	//UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
	//static bool AnimatedVertex__GetAnimatedVertexLocationsAndNormals(USkeletalMeshComponent* Mesh, TArray<FVector>& Locations, TArray<FVector>& Normals );

	/** 0 never skip, 0.5 = 50%  to skip, 1 = skip . Returns false if the operation could not occur. */
	//UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary", meta=(HidePin="WorldContextObject", DefaultToSelf="WorldContextObject" ))
	//static bool AnimatedVertex__DrawAnimatedVertexLocations(UObject* WorldContextObject, USkeletalMeshComponent* Mesh, float ChanceToSkipAVertex=0.777, bool DrawNormals=false);

	//~~~~~~~~~~~~~

	/** Returns false if the operation could not occur. */
	//UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary", meta=(DefaultToSelf="TheCharacter"))
	//static bool AnimatedVertex__GetCharacterAnimatedVertexLocations(AActor* TheCharacter, TArray<FVector>& Locations );

	/** Returns false if the operation could not occur. */
	//UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary", meta=(DefaultToSelf="TheCharacter"))
	//static bool AnimatedVertex__GetCharacterAnimatedVertexLocationsAndNormals(AActor* TheCharacter, TArray<FVector>& Locations, TArray<FVector>& Normals );

	/** 0 never skip, 0.5 = 50%  to skip, 1 = skip .. Returns false if the operation could not occur. */
	//UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
	//static bool AnimatedVertex__DrawCharacterAnimatedVertexLocations(AActor* TheCharacter, float ChanceToSkipAVertex=0.777, bool DrawNormals=false);

	/** Retrieve Distance of given point to any Surface point on a Static Mesh Actor. Returns the distance as well as the exact closest point on the mesh surface to the given point. Returns -1 if an error occurred*/
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
		static float DistanceToSurface__DistaceOfPointToMeshSurface(AStaticMeshActor* TheSMA, const FVector& TestPoint, FVector& ClosestSurfacePoint);

	/** Change the Mobility of a Static Mesh Component, can be used in Constructor Script or in Event Graph! Returns false if operation could not occur.*/
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
		static bool Mobility__SetSceneCompMobility(USceneComponent* SceneComp, EComponentMobility::Type NewMobility);

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~
	//~~~~~~~~~~~~~~~~~~~~~~~~~~~
	//~~~~~~~~~~~~~~~~~~~~~~~~~~~
	//			  			Paths

	/** InstallDir/GameName/Binaries/Win64 */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Paths")
	static FString VictoryPaths__Win64Dir_BinaryLocation();

	/** InstallDir/WindowsNoEditor/ */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Paths")
	static FString VictoryPaths__WindowsNoEditorDir();
	
	/** InstallDir/GameName */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Paths")
	static FString VictoryPaths__GameRootDirectory();
	
	/** InstallDir/GameName/Saved */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Paths")
	static FString VictoryPaths__SavedDir();
	
	/** InstallDir/GameName/Saved/Screenshots/Windows */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Paths")
	static FString VictoryPaths__ScreenShotsDir();
	
	/** InstallDir/GameName/Saved/Logs */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Paths")
	static FString VictoryPaths__LogsDir();
	
	//~~~~~~~~~~~~~~~~~~~~~~~~~~~
	//~~~~~~~~~~~~~~~~~~~~~~~~~~~
	//~~~~~~~~~~~~~~~~~~~~~~~~~~~
	//			  Graphics Settings Sample

	//~~~~~~~~~~~~~~~~~~
	//		FullScreen
	//~~~~~~~~~~~~~~~~~~

	/** Get Full Screen Type */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Graphics Settings")
	static TEnumAsByte<EJoyGraphicsFullScreen::Type> JoyGraphicsSettings__FullScreen_Get();

	/** Set Full Screen Type */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Graphics Settings")
		static void JoyGraphicsSettings__FullScreen_Set(TEnumAsByte<EJoyGraphicsFullScreen::Type> NewSetting);



	//~~~~~~~~~~~~~~~~~~~~~~~~~~~
	//~~~~~~~~~~~~~~~~~~~~~~~~~~~
	//~~~~~~~~~~~~~~~~~~~~~~~~~~~
	//			  CPP FUNCTION LIBRARY

	static FORCEINLINE void JoyCC(const FString& Str, const int32 Value)
	{
		TObjectIterator<APlayerController> PC;
		if (!PC) return;
		//~~~~~~

		PC->ConsoleCommand(Str + " " + FString::FromInt(Value));
	}
	static FORCEINLINE void JoyGraphics_FullScreen_SetFullScreenType(int32 Value)
	{
		JoyCC("r.FullScreenMode", Value);
	}
	static FORCEINLINE int32 JoyGraphics_FullScreen_GetFullScreenType()
	{
		static const auto CVar = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT("r.FullScreenMode"));
		return CVar->GetValueOnGameThread();
	}
	static FORCEINLINE void JoyGraphics_SetFullScreen_NonWindowed()
	{
		/*"r.FullScreenMode"),
			2,
			TEXT("Defines how we do full screen when requested (e.g. command line option -fullscreen or in ini [SystemSettings] fullscreen=true)
")
			*/
		JoyCC("r.FullScreenMode", 0);
	}
	static FORCEINLINE void JoyGraphics_SetFullScreen_Windowed()
	{
		//TEXT(" 2: windowed full screen, specified resolution (like 1 but no unintuitive performance cliff, can be blurry, default)
")
		JoyCC("r.FullScreenMode", 2);
	}
	static FORCEINLINE void JoyGraphics_SetFullScreen_WindowedHighestQuality()
	{
		//TEXT(" 1: windowed full screen, desktop resolution (quick switch between applications and window mode, full quality)
")
		JoyCC("r.FullScreenMode", 1);
	}



	//Min and  of Array
	static FORCEINLINE float Min(const TArray<float>& Values, int32* MinIndex = NULL)
	{
		if (MinIndex)
		{
			*MinIndex = 0;
		}

		if (Values.Num() <= 0)
		{
			return -1;
		}

		float CurMin = Values[0];
		for (const float EachValue : Values)
		{
			CurMin = FMath::Min(CurMin, EachValue);
		}

		if (MinIndex)
		{
			*MinIndex = Values.Find(CurMin);
		}
		return CurMin;
	}
	static FORCEINLINE float (const TArray<float>& Values, int32* MaxIndex = NULL)
	{
		if (MaxIndex)
		{
			*MaxIndex = 0;
		}

		if (Values.Num() <= 0)
		{
			return -1;
		}

		float CurMax = Values[0];
		for (const float EachValue : Values)
		{
			CurMax = FMath::(CurMax, EachValue);
		}

		if (MaxIndex)
		{
			*MaxIndex = Values.Find(CurMax);
		}
		return CurMax;
	}

	static FORCEINLINE int32 Min(const TArray<int32>& Values, int32* MinIndex = NULL)
	{
		if (MinIndex)
		{
			*MinIndex = 0;
		}

		if (Values.Num() <= 0)
		{
			return -1;
		}

		int32 CurMin = Values[0];
		for (const int32 EachValue : Values)
		{
			CurMin = FMath::Min(CurMin, EachValue);
		}

		if (MinIndex)
		{
			*MinIndex = Values.Find(CurMin);
		}
		return CurMin;
	}
	static FORCEINLINE int32 (const TArray<int32>& Values, int32* MaxIndex = NULL)
	{
		if (MaxIndex)
		{
			*MaxIndex = 0;
		}

		if (Values.Num() <= 0)
		{
			return -1;
		}

		int32 CurMax = Values[0];
		for (const int32 EachValue : Values)
		{
			CurMax = FMath::(CurMax, EachValue);
		}

		if (MaxIndex)
		{
			*MaxIndex = Values.Find(CurMax);
		}
		return CurMax;
	}

	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	//~~~~~~~~~~~~~~~~~~~~~~~~~~~
	//~~~~~~~~~~~~~~~~~~~~~~~~~~~
	//~~~~~~~~~~~~~~~~~~~~~~~~~~~
	//			  Contributed by Others
	
	/**
	*
	* 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.
	*/
	UFUNCTION(BlueprintPure, meta = (DisplayName = "Explode string", Keywords = "split explode string"), Category = String)
	static void String__ExplodeString(TArray<FString>& OutputStrings, FString InputString, FString Separator = ",", int32 limit = 0, bool bTrimElements = false);
	

	//NOT QUITE WORKING, REQUIRES INVESTIGATION
	/** Load a Texture 2D from a DDS file! Contributed by UE4 forum member ! */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Load Texture From File",meta=(Keywords="image DDS"))
	static UTexture2D* LoadTexture2D_FromDDSFile(const FString& FullFilePath);
	
	/** Load a Texture2D from a JPG,PNG,BMP,ICO,EXR,ICNS file! IsValid tells you if file path was valid or not. Enjoy! - */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Load Texture From File",meta=(Keywords="image png jpg jpeg bmp bitmap ico icon exr icns"))
	static UTexture2D* Victory_LoadTexture2D_FromFile(const FString& FullFilePath,EJoyImageFormats ImageFormat,bool& IsValid, int32& Width, int32& Height);
	
	/** Load a Texture2D from a JPG,PNG,BMP,ICO,EXR,ICNS file! IsValid tells you if file path was valid or not. Enjoy! - */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Load Texture From File",meta=(Keywords="image png jpg jpeg bmp bitmap ico icon exr icns"))
	static UTexture2D* Victory_LoadTexture2D_FromFile_Pixels(const FString& FullFilePath,EJoyImageFormats ImageFormat,bool& IsValid, int32& Width, int32& Height, TArray<FLinearColor>& OutPixels);
	 
	/** Retrieve a pixel color value given the pixel array, the image height, and the coordinates. Returns false if the coordinates were not valid. Pixel coordinates start from upper left corner as 0,0. X= horizontal, Y = vertical */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Load Texture From File",meta=(Keywords="image coordinate index map value"))
	static bool Victory_Get_Pixel(const TArray<FLinearColor>& Pixels, int32 ImageHeight, int32 x, int32 y, FLinearColor& FoundColor);
	
	/** Save an array of pixels to disk as a PNG! It is very important that you supply the curret width and height of the image! Returns false if Width * Height != Array length or file could not be saved to the location specified. I return an ErrorString to clarify what the exact was. - */
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Load Texture From File",meta=(Keywords="create image png jpg jpeg bmp bitmap ico icon exr icns"))
	static bool Victory_SavePixels(const FString& FullFilePath,int32 Width, int32 Height, const TArray<FLinearColor>& ImagePixels, FString& ErrorString);
	 
	
	 
	/** Contributed by UE4 forum member ! Plays a .ogg sound from file, attached to and following the specified component.  is a fire and forget sound. Replication is also not handled at  point.
	* @param FilePath - Path to sound file to play
	* @param AttachComponent - Component to attach to.
	* @param AttachPointName - Optional named point within the AttachComponent to play the sound at
	* @param Location - Depending on the value of Location Type  is either a relative offset from the attach component/point or an absolute world position that will be translated to a relative offset
	* @param LocationType - Specifies whether Location is a relative offset or an absolute world position
	* @param bStopWhenAttachedToDestroyed - Specifies whether the sound should stop playing when the owner of the attach to component is destroyed.
	* @param VolumeMultiplier - Volume multiplier
	* @param PitchMultiplier - PitchMultiplier
	* @param AttenuationSettings - Override attenuation settings package to play sound with
	*/ 
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary", meta = (VolumeMultiplier = "1.0", PitchMultiplier = "1.0", AdvancedDisplay = "2", UnsafeDuringActorConstruction = "true"))
	static class UAudioComponent* PlaySoundAttachedFromFile(const FString& FilePath, class USceneComponent* AttachToComponent, FName AttachPointName = NAME_None, FVector Location = FVector(ForceInit), EAttachLocation::Type LocationType = EAttachLocation::SnapToTarget, bool bStopWhenAttachedToDestroyed = false, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, class USoundAttenuation* AttenuationSettings = NULL);
	 
	/** Contributed by UE4 forum member ! Plays a .ogg sound at the given location.  is a fire and forget sound and does not travel with any actor. Replication is also not handled at  point.
	* @param FilePath - Path to sound file to play
	* @param Location - World position to play sound at
	* @param World - The World in which the sound is to be played
	* @param VolumeMultiplier - Volume multiplier
	* @param PitchMultiplier - PitchMultiplier
	* @param AttenuationSettings - Override attenuation settings package to play sound with
	*/
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary", meta = (HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject", VolumeMultiplier = "1.0", PitchMultiplier = "1.0", AdvancedDisplay = "3", UnsafeDuringActorConstruction = "true"))
	static void PlaySoundAtLocationFromFile(UObject* WorldContextObject, const FString& FilePath, FVector Location, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, class USoundAttenuation* AttenuationSettings = NULL);
	
	/** Contributed by UE4 forum member ! Creates a USoundWave* from file path.
	* Read .ogg header file and refresh USoundWave metadata.
	* @param FilePath		path to file to create sound wave from
	*/
	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
	static class USoundWave* GetSoundWaveFromFile(const FString& FilePath);

private:
	// Thanks to @keru for the base code for loading an Ogg into a USoundWave: 
	// https://forums.unrealengine.com/showthread.php?7936-Custom-Music-Player&p=97659&viewfull=1#post97659

	     /**
        * Read .ogg header file and refresh USoundWave metadata.
        * @param sw             wave to put metadata
        * @param rawFile        pointer to src file in memory
        * @return 0     if everything is ok
        *                 1 if couldn't read metadata.
        */
        static int32 fillSoundWaveInfo(USoundWave* sw, TArray<uint8>* rawFile);



        /**
        * Tries to find out FSoundSource  associated to the USoundWave.
        * @param sw     wave, search key
        * @return 0 if wave found and correctly set
        *        -1 if error: sound device not set
        *        -2 if error: sound wave not found
        */
		static int32 findSource(class USoundWave* sw, class FSoundSource* out_audioSource);



		/**
		* Contributed by: SaxonRah
		* Better random numbers. Seeded with a random device. if the random device's entropy is 0; defaults to current for seed.
		* can override with seed functions;
		*/
//----------------------------------------------------------------------------------------------BeginRANDOM
public: 
		/** Construct a random device, returns either a random device or the default random engine; system dependant;
		*/
		UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Random")
			static void constructRand();

		/** Seed Rand with value passed
		* @param seed - value to pass to the prng as the seed
		*/
		UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Random")
			static void seedRand(int32 seed);

		/** Seed Rand with current
		*/
		UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Random")
			static void seedRandWithTime();

		/** Seed Rand with entropy
		* @param seed - value to pass to the prng as the seed
		*/
		UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Random")
			static void seedRandWithEntropy();

		/** Random Bool - Bernoulli distribution
		* @param fBias - Bias of Bernoulli distribution
		* @return uniformly distributed bool based on bias parameter
		*/
		UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Random")
			static bool RandBool_Bernoulli(float fBias);

		/** Random Integer - Zero to One Uniform distribution
		* @return int32 - uniform distribution from 0 to 1
		*/
		UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Random")
			static int32 RandInt_uniDis();

		/** Random Integer - MIN to  Uniform distribution
		* @param iMin - Minimum value of uniform distribution
		* @param iMax - Maximum value of uniform distribution
		* @return int32 - uniform distribution from iMin to iMax parameters
		*/
		UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Random")
			static int32 RandInt_MINMAX_uniDis(int32 iMin, int32 iMax);

		/** Random Double - Zero to One Uniform distribution
		* @return double - uniform distribution from 0 to 1
		*/
		UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Random")
			static float RandFloat_uniDis();

		/** Random Double - Uniform distribution based on MIN to  parameters
		* @param iMin - Minimum value of uniform distribution
		* @param iMax - Maximum value of uniform distribution
		* @return double - uniform distribution from iMin to iMax parameters
		*/
		UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Random")
			static float RandFloat_MINMAX_uniDis(float iMin, float iMax);
		
		/** Random Bool - Bernoulli distribution - Mersenne Twister
		* @param fBias - Bias of Bernoulli distribution
		* @return uniformly distributed bool based on bias parameter
		*/
		UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Random")
			static bool RandBool_Bernoulli_MT(float fBias);

		/** Random Integer - Zero to One Uniform distribution - Mersenne Twister
		* @return int32 - uniform distribution from 0 to 1
		*/
		UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Random")
			static int32 RandInt_uniDis_MT();

		/** Random Integer - MIN to  Uniform distribution - Mersenne Twister
		* @param iMin - Minimum value of uniform distribution
		* @param iMax - Maximum value of uniform distribution
		* @return int32 - uniform distribution from iMin to iMax parameters
		*/
		UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Random")
			static int32 RandInt_MINMAX_uniDis_MT(int32 iMin, int32 iMax);

		/** Random Float - Zero to One Uniform distribution -  Mersenne Twister
		* @return float - uniform distribution from 0 to 1
		*/
		UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Random")
			static float RandFloat_uniDis_MT();

		/** Random Float - Uniform distribution based on MIN to  parameters - Mersenne Twister
		* @param iMin - Minimum value of uniform distribution
		* @param iMax - Maximum value of uniform distribution
		* @return float - uniform distribution from iMin to iMax parameters
		*/
		UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Random")
			static float RandFloat_MINMAX_uniDis_MT(float iMin, float iMax);
//----------------------------------------------------------------------------------------------ENDRANDOM

/** Inspired by ! */
UFUNCTION(BlueprintPure, Category = "Actor|Get Immediate Attached Actors")
static void Actor__GetAttachedActors(AActor* ParentActor,TArray<AActor*>& ActorsArray);
	
/** Modify the bloom intensity of a post process volume, by Community Member  */
UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary|Post Process")
static void SetBloomIntensity(APostProcessVolume* PostProcessVolume,float Intensity);
  
  


//~~~  ~~~

/* 
 *See if index is a valid index for  array
 *    
 *@param    TargetArray        The array to perform the operation on
 *@param    Index            The index to check.
 *@return    Bool if integer is valid index for  array
*/
UFUNCTION(Category="VictoryBPLibrary|Utilities|Array", BlueprintPure, CustomThunk, meta=(DisplayName = "Valid Index", CompactNodeTitle = "VALID INDEX", ArrayParm = "TargetArray|ArrayProperty"))
static bool Array_IsValidIndex(const TArray<int32>& TargetArray, const UArrayProperty* ArrayProperty, int32 Index);

static bool GenericArray_IsValidIndex(void* TargetArray, const UArrayProperty* ArrayProp, int32 Index);
 
DECLARE_FUNCTION(execArray_IsValidIndex)
{
	Stack.StepCompiledIn<UArrayProperty>(NULL);
	void* ArrayAddr = Stack.MostRecentPropertyAddress;

	P_GET_OBJECT(UArrayProperty, ArrayProperty);
	P_GET_PROPERTY(UIntProperty, Index);
	P_FINISH;
  
	*(bool*)RESULT_PARAM = GenericArray_IsValidIndex(ArrayAddr, ArrayProperty, Index);
}

/** Get the target actor was created. */
UFUNCTION(Category = "VictoryBPLibrary|Actor", BlueprintPure, Meta = (DefaultToSelf = "Target"))
static float GetCreationTime(const AActor* Target);

/** Get the target actor has been alive. */
UFUNCTION(Category = "VictoryBPLibrary|Actor", BlueprintPure, Meta = (DefaultToSelf = "Target"))
static float GetTimeAlive(const AActor* Target);
	
/** Contributed by Community Member ! */
UFUNCTION(Category = "VictoryBPLibrary|SceneCapture", BlueprintPure)
static bool CaptureComponent2D_Project(class USceneCaptureComponent2D* Target, FVector Location, FVector2D& OutPixelLocation);
  
/** Contributed by Community Member ! */
UFUNCTION(Category = "VictoryBPLibrary|SceneCapture", BlueprintPure, Meta = (DefaultToSelf = "Target"))
static bool Capture2D_Project(class ASceneCapture2D* Target, FVector Location, FVector2D& OutPixelLocation);
    
/** Contributed by Community Member ! */
UFUNCTION(Category = "VictoryBPLibrary|Texture", BlueprintCallable)
static class UTextureRenderTarget2D* CreateTextureRenderTarget2D(int32 InSizeX = 256, int32 InSizeY = 256, FLinearColor ClearColor = FLinearColor::Transparent);
 
	/** Make sure to include the appropriate image extension in your file path! Recommended: .bmp, .jpg, .png. Contributed by Community Member ! */
	UFUNCTION(Category = "VictoryBPLibrary|SceneCapture", BlueprintCallable)
	static bool CaptureComponent2D_SaveImage(class USceneCaptureComponent2D* Target, const FString ImagePath, const FLinearColor ClearColour);

	/** Make sure to include the appropriate image extension in your file path! Recommended: .bmp, .jpg, .png. Contributed by Community Member ! */
	UFUNCTION(Category = "VictoryBPLibrary|SceneCapture", BlueprintCallable, Meta = (DefaultToSelf = "Target"))
	static bool Capture2D_SaveImage(class ASceneCapture2D* Target, const FString ImagePath, const FLinearColor ClearColour);
          
	/** Make sure your image path has a valid extension! Supported types can be seen in the BP node Victory_LoadTexture2D_FromFile. Contributed by Community Member ! */
	UFUNCTION(Category = "VictoryBPLibrary|Load Texture From File", BlueprintCallable)
	static UTexture2D*  LoadTexture2D_FromFileByExtension(const FString& ImagePath, bool& IsValid, int32& OutWidth, int32& OutHeight);
	
//~~~~~~~~~

//~~~ KeyToTruth ~~~

//.h  
/* Addition of strings (A + B) with pins. Contributed by KeyToTruth */
UFUNCTION(BlueprintPure, meta = (DisplayName = "Append Multiple", Keywords = "concatenate combine append strings", CommutativeAssociativeBinaryOperator = "true"), Category = "VictoryBPLibrary|String")
static FString AppendMultiple(FString A, FString B);
 
//~~~ Mhousse ~~~

}; 


```



Documentation for the Math Library by :



```



UCLASS()
class VICTORYBPLIBRARY_API UTKMathFunctionLibrary : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()

public:
	
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Console")
	static float GetConsoleVariableFloat(FString VariableName);
	
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary|Console")
	static int32 GetConsoleVariableInt(FString VariableName);
	 
	//Reverses the sign (- or +) of a float.
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Float")
	static float NegateFloat(float A);

	//Reverses the sign (- or +) of an integer.
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Integer")
	static int32 NegateInt(int32 A);

	//Reverses the sign (- or +) of a Vector2D.
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Vector2D")
	static FVector2D NegateVector2D(FVector2D A);

	//Changes the size (length) of a Vector to the given size (normalized vector * size).
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Vector")
	static FVector SetVectorLength(FVector A, float size);

	//Converts radians to degrees.
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Vector")
	static FVector VectorRadiansToDegrees(FVector RadVector);

	//Converts degrees to radians.
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Vector")
	static FVector VectorDegreesToRadians(FVector DegVector);

	/**
	* Rounds an integer to the lower multiple of the given number.
	* If Skip Self is set to True it will skip to the previous multiple if the integer rounds to itself.
	* @param Multiple - The multiple number to round to.
	* @param skipSelf - Skip to the previous multiple if the integer rounds to itself.
	*/
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Integer")
	static int32 RoundToLowerMultiple(int32 A, int32 Multiple = 32, bool skipSelf = false);

	/**
	* Rounds an integer to the upper multiple of the given number.
	* If Skip Self is set to True it will skip to the next multiple if the integer rounds to itself.
	* @param Multiple - The multiple number to round to.
	* @param skipSelf - Skip to the next multiple if the integer rounds to itself.
	*/
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Integer")
	static int32 RoundToUpperMultiple(int32 A, int32 Multiple = 32, bool skipSelf = false);

	/** Rounds an integer to the nearest multiple of the given number. */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Integer")
	static int32 RoundToNearestMultiple(int32 A, int32 Multiple = 32);

	/** Returns true if the integer is a power of two number. */
	UFUNCTION(BlueprintPure, meta = (CompactNodeTitle = "PwrOf2"), Category = "VictoryBPLibrary| Math|Integer")
	static bool IsPowerOfTwo(int32 x);

	/** Returns true if the integer is a multiple of the given number. */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Integer")
	static bool IsMultipleOf(int32 A, int32 Multiple);

	/** Returns true if the number is even (false if it's odd). */
	UFUNCTION(BlueprintPure, meta = (CompactNodeTitle = "isEven"), Category = "VictoryBPLibrary| Math|Float")
	static bool IsEvenNumber(float A);

	/**
	* Find closest point on a Sphere to a Line.
	* When line intersects Sphere, then closest point to LineOrigin is returned.
	* @param SphereOrigin		Origin of Sphere
	* @param SphereRadius		Radius of Sphere
	* @param LineOrigin		Origin of line
	* @param LineDir			Direction of line.
	* @return Closest point on sphere to given line.
	*/ 
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Vector")
	static FVector ClosestPointOnSphereToLine(FVector SphereOrigin, float SphereRadius, FVector LineOrigin, FVector LineDir);

	/** Find the point on line segment from LineStart to LineEnd which is closest to Point. */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Vector")
	static FVector ClosestPointOnLineSeqment(FVector Point, FVector LineStart, FVector LineEnd);

	/** Returns true if the given Point vector is within a box (defined by BoxOrigin and BoxExtent). */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Vector|Intersection")
	static bool IsPointInsideBox(FVector Point, FVector BoxOrigin, FVector BoxExtent);

	/** Determines whether a line intersects a sphere. */
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Vector|Intersection")
	static bool IsLineInsideSphere(FVector LineStart, FVector LineDir, float LineLength, FVector SphereOrigin, float SphereRadius);

	/**
	* Swept-Box vs Box test.
	* Sweps a box defined by Extend from Start to End points and returns whether it hit a box or not plus the hit location and hit normal if successful.
	*/
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Vector|Intersection")
	static bool LineExtentBoxIntersection(FBox inBox, FVector Start, FVector End, FVector Extent, FVector& HitLocation, FVector& HitNormal, float& HitTime);

	/**
	* Get the shortest distance between a point and a plane.
	* The output is signed so it holds information as to which side of the plane normal the point is.
	*/
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Vector")
	static float SignedDistancePlanePoint(FVector planeNormal, FVector planePoint, FVector point);

	/**
	* Returns a vector point which is a projection from a point to a line (defined by the vector couple LineOrigin, LineDirection).
	* The line is infinite (in both directions).
	*/
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Vector")
	static FVector ProjectPointOnLine(FVector LineOrigin, FVector LineDirection, FVector Point);

	/**
	* Performs a sphere vs box intersection test.
	* @param SphereOrigin the center of the sphere being tested against the box.
	* @param SphereRadius the size of the sphere being tested.
	* @param BoxOrigin the box origin being tested against.
	* @param BoxExtent the box extend (width, depth, height).
	* @return Whether the sphere/box intersect or not.
	*/
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Vector|Intersection")
	static bool SphereBoxIntersection(FVector SphereOrigin, float SphereRadius, FVector BoxOrigin, FVector BoxExtent);

	/**
	* Find closest points between 2 line segments.
	* @param	(Line1Start, Line1End)	defines the first line segment.
	* @param	(Line2Start, Line2End)	defines the second line segment.
	* @param	LinePoint1		Closest point on segment 1 to segment 2.
	* @param	LinePoint2		Closest point on segment 2 to segment 1.
	*/
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Vector|Intersection")
	static void ClosestPointsOfLineSegments(FVector Line1Start, FVector Line1End, FVector Line2Start, FVector Line2End, FVector& LinePoint1, FVector& LinePoint2);

	/**
	* Calculate the intersection point of two infinitely long lines. Returns true if lines intersect, otherwise false.
	* Note that in 3d, two lines do not intersect most of the.
	* So if the two lines are not in the same plane, use Closest Points On Two Lines instead.
	* @param IntersectionPoint The intersection point of the lines. Returns zero if the lines do not intersect or the operation fails.
	* @param LinePoint1 Line point of the first line.
	* @param LineDir1 Line direction (normal) of the first line. Should be a normalized vector.
	* @param LinePoint2 Line point of the second line.
	* @param LineDir2 Line direction (normal) of the second line. Should be a normalized vector.
	* @return true if lines intersect, otherwise false.
	*/
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Vector|Intersection")
	static bool LineToLineIntersection(FVector& IntersectionPoint, FVector LinePoint1, FVector LineDir1, FVector LinePoint2, FVector LineDir2);

	/*
	* Calculate the closest points between two infinitely long lines.
	* If lines are intersecting (not parallel) it will return false! Use Line To Line Intersection instead.
	* @param closestPointLine1 The closest point of line1 to line2. Returns zero if the lines intersect.
	* @param closestPointLine2 The closest point of line2 to line1. Returns zero if the lines intersect.
	* @param linePoint1 Line point of the first line.
	* @param lineVec1 Line direction (normal) of the first line. Should be a normalized vector.
	* @param linePoint2 Line point of the second line.
	* @param lineVec2 Line direction (normal) of the second line. Should be a normalized vector.
	* @return true if lines are parallel, false otherwise.
	*/
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Vector")
	static bool ClosestPointsOnTwoLines(FVector& closestPointLine1, FVector& closestPointLine2, FVector linePoint1, FVector lineVec1, FVector linePoint2, FVector lineVec2);

	/*
	* Returns 0 if point is on the line segment.
	* Returns 1 if point is not on the line segment and it is on the side of linePoint1.
	* Returns 2 if point is not on the line segment and it is on the side of linePoint2.
	*/
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Vector")
	static int32 PointOnWhichSideOfLineSegment(FVector linePoint1, FVector linePoint2, FVector point);

	/*
	* Returns true if the two line segments are intersecting and not parallel.
	* If you need the intersection point, use Closest Points On Two Lines.
	*/
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Vector|Intersection")
	static bool AreLineSegmentsCrossing(FVector pointA1, FVector pointA2, FVector pointB1, FVector pointB2);

	/*Snaps vector to nearest grid multiple.*/
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Vector")
	static FVector GridSnap(FVector A, float Grid);

	/*Converts UMG layout offsets to another anchor.*/
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Anchor", meta = (HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject"))
	static void ConvertAnchorToAnchor(UObject* WorldContextObject, FAnchors CurrentAnchor, FMargin Offsets, FAnchors TargetAnchor, FMargin& ConvertedOffsets);

	/*Converts Physics Linear Velocity to a more useful speed unit.*/
	UFUNCTION(BlueprintPure, Category = "VictoryBPLibrary| Math|Vector")
	static float ConvertPhysicsLinearVelocity(FVector Velocity, TEnumAsByte<enum ESpeedUnit> SpeedUnit);

	//------------------------------------------------------------
	//Physics functions! (why aren't these exposed by Epic yet?!)

	/**
	* Get the current world velocity of a point on a physics-enabled component.
	* @param Point - Point in world space.
	* @param DrawDebugInfo - Draw debug point & string.
	* @param BoneName - If a SkeletalMeshComponent, name of body to get velocity of. 'None' indicates root body.
	* @return The velocity of the point in world space.
	*/
	UFUNCTION(BlueprintCallable, Category = "Physics")
	static FVector GetVelocityAtPoint(UPrimitiveComponent* Target, FVector Point, FName BoneName = NAME_None, bool DrawDebugInfo = false);

	/*
	* Set the physx center of mass offset.
	* Note:  offsets the physx-calculated center of mass (it is not an offset from the pivot point).
	*/
	UFUNCTION(BlueprintCallable, Category = "Physics")
	static void SetCenterOfMassOffset(UPrimitiveComponent* Target, FVector Offset, FName BoneName = NAME_None);

};



```

Anyone knows why the plugin isnt working after packaging a file?
Added an empty c++ class, so it gets a c++ project.
Compiled it as Developer Editor, Packaged the project out of the editor.

It’s starting without an error now, but it’s still not working?

e/ Okay it’s working with tutorial:

Did’nt pack the plugin in the projects folder.

For adding damage why not make it a collider event?

I often use a setup like for certain events: (see attachments).

I always have to create the whole thing for each iteration since the break-nodes can’t be dynamic in blueprints. I wonder if you could add a node that does the same. What it does is summarize the values from array a in the empty array b by following these steps:

  • take two arrays of the same custom structs, each with value a (identifier) and value b (value)
  • see if value a from array a is available in array b
  • if available, add value b from array a to value b from array b
  • if not available, add array content a to array b as first content

It would be a huge-saver for me!

Hey !

First of , thank you so much for your great contributions to the community. Your blueprint library, as well as tutorial and general help you give to the members here are invaluable to so many of us. So once again, thank you.

I do have a node request for you if you are still up for requests. Admittedly not being too acquainted with the coding aspects of the engine, I am hoping that it shouldn’t be too complicated a job. The short story, I need to load a material (or material instance) from an asset path, so I can set the material of a Material Billboard. I was looking into the “Load from Asset Path” node that you have already created. Unfortunately, it only outputs an Reference, whilst the Set Material node that it I need to plug it into requires a Material Interface Reference. So in end-user terms, the same as “Load from Asset” but being able to output a Material Interface Reference.

Here’s an example of what I am trying to achieve:

If you are interested, here’s a little more background (if you are not interested, feel free to skip unimportant part part :stuck_out_tongue: ):

[HR][/HR]
As a learning process, I am trying to recreate a few levels (complete with objects and behaviour) from an older game. I am trying to do while avoiding having to edit source material any more than necessary. means I have to challenge myself to think a bit outside the box to replicate behaviour which is may have been common back then, but which is not seen often anymore.

In specific case; if you are familiar with how the classic Doom/Heretic/Hexen engine does things, you may know that it doesn’t use sprite sheets, but rather has each sprite frame as a separate image file. Simplified: the name of each sprite is what determines when it is shown. Each sprites name consists of a four letter identifier (i.e. PTN1 for a Crystal Vial pickup, IMPX for a flying Imp creature), then a letter indicating what frame of the animation it is in (for the Crystal Vial it has three frames - A, B & C - which make it look like it has bubbles in the vial), and lastly a number indicating which of the 8 possible angles (in terms of camera vs. position) frame should be shown for, using 0 if it should show the same frame regardless of angle.

In my project, means I have (if memory serves me correctly) 792 sprite images.
[HR][/HR]

I did try to get Visual Studio 2013 Express installed so I could perhaps learn to get some of myself… alas, installation fails and from my googling it seems I’m out of luck. The only solution would be to wait until the next I reinstall Windows. :\ That said, it may be a somewhat rare case when node is needed, but whilst I don’t have any links on hand right now, I have seen requested at least on AnswerHub before. For me at least it is a make or break for the project.

You can’t cast the to a Material Interface?

@Spoondog: I have not found any way to convert neither a straight name path, nor an reference into something else through blueprints, like in case, material reference. If it is possible, would you be able to show me how to do so?


Assuming it can be , is it complicated enough that it still warrants the request for a node to simplify it?