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

Load and Save Custom Game.ini Config File Variable Data!

’ 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!**

Example Usage

Here’s example usage!


**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:

That’s awesome thank you! Using last node would be possible for me to save and reload any character information on a text file too, like an easy to edit save file?
For example character inventory, points/money, objects on a “house” on a savegame.sav (or txt, of course the extension doesn’t matter).

Thank you again!

I’m a little bit late with but I just found out about 4.8’s procedural mesh component. I successfully imported and converted an obj file to an ingame mesh using your plugin but it took some to create the mesh. Is there any way a bp node could be added that saves the imported mesh for later use? Maybe as an .uasset file?

Edit: Nevermind, I tried the obj import again and there were more problems than achievements.

You’re welcome!

You could use the game.ini config file for purpose, if you do want people to be able to go in and edit the values!

You can’t save pointers though, only basic types, so you’d need to do a Switch on String based on house name to then give those objects back to the player after loading from file.

:slight_smile:

AI Navigation ~ Move To With Filter, Create Custom Pathing Using Nav Modifiers

Dear Community,

I’ve created a video and a sample BP-Only project (+ my Victory Plugin) that shows you how to use Nav Modifier Volumes and Navigation Query Filters to create custom pathing for your units!

=xwdVQQtQa8s


**Use Case: Electric Currents and 2 Types of Characters**

In my example, I have two types of units.

The **blue unit** is immune to electricity, and does not need to path around electric currents.

The **red unit** bids us  a fond farewell if it passes thruogh an electric current.

So in  case I can't just block of areas that have electric currents completely from the nav mesh, or else the blue unit cannot pass through freely as it should be able to, taking a shortcut as a result.

** is a case where Nav Modifiers and Query Filters really shine!**

I only want to **filter out** certain sections of the nav mesh for the red unit, while still allowing the blue unit to pass through those areas freely.

Custom BP Node

In order to actually be able to use query filters and nav modifiers in a BP only project effectively, I made a custom BP node, AI Move To With Filter.


node allows me to tell the unit to move to a certain location, while using a query filter, only in Blueprints!


**Changes Nav Behavior Filters  ~ Per Move ~  If You Want To!**

Using my Victory BP Library node, you can actually have a unit changes its navigation filter per move if you want to!

 enables you to have the AI respond to dynamic level conditions (like if the electricity in my example gets turned off), or if you just want the AI to confuse the player by randomly switching its pathing preferences!

Project Download Link

Visit my Community Content Thread for full details and updates:


**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:

Very useful! Thanks a lot for sharing, !

Hi,

is really awesome!!! Thank you so much for updated plugin. I can now propagate fire to skeletal meshes and characters.

I am gonna try incorporate into my current propagation script.

Cheers,
CatchPhyre

Hey ,

I noticed minor mistake while using your rotation/vector conversion nodes:
2015-08-09_15-07-33.png
The tooltips say opposite of what they do!

Edit: Also I just found out that there’s a node called RotationFromXVector that does the same thing, but yours is named a lot more clearly/easier to understand.

Yay! Great to hear from you !

Ahh thanks for pointing that out, I’ve fixed the comments in my local version, and it will be in my next update!

:slight_smile:

You’re welcome, I hope my animated vertices of skeletal meshes BP node takes your thesis research to the next level!

:slight_smile:

Get a Float as a String, With Precision and Optional Leading 0 !

Dear Community,

I’ve updated my Get Float As String With Precision node to

  1. Be pure (no exec chain)

  2. Utilize Epic’s FText C++ code to leverage of their hard work on float decimal precision.

  3. Add bool to make the leading 0 optional, so 0.5 could be shown as 0.5 or .5 depending on your preferences!

Yay!


**My C++ Code For You!**

Here's how it works in C++ !



```


void UVictoryBPFunctionLibrary::StringConversion__GetFloatAsStringWithPrecision(float TheFloat, FString & FloatString, uint8 Precision, bool IncludeLeadingZero)
{ 
	FNumberFormattingOptions NumberFormat;					//Text.h
	NumberFormat.MinimumIntegralDigits = **(IncludeLeadingZero) ? 1 : 0;**
	NumberFormat.MaximumIntegralDigits = 10000;
	NumberFormat.MinimumFractionalDigits = **Precision;**
	NumberFormat.MaximumFractionalDigits = **Precision; **
	FloatString = FText::AsNumber(**TheFloat**, &NumberFormat).ToString();
}


```



**Latest plugin download is here: (about 8 mb) **

Enjoy!

:slight_smile:

Ragarding the ability to save the Color Array to a Texture2D:

Have you get anything to work?

you have deleted the victory rebind key ? with the new plugin i have error about that*
btw awesome plugin
you are a saver

Hi ,

plugin is awesome! Very handy thank you.

I am having an with the Capture Component 2d Save Image node. It works well when I play in editor, however when it is packaged into an exe, the game crashes whenever I trigger the save image node. (See image attached)

Is a known?

ok, i figured out how do it.**

Key Rebinding During Runtime System

I have a 4.8 updated version of my Key Rebinding project here, which now includes axis bindings!

[Full Project] 's UMG Rebindable Key System, Rebind keys at Runtime! - Programming & Scripting - Epic Developer Community Forums!

My Victory BP Plugin has the new and updated nodes I use in the project

:slight_smile:

Capture Component 2D ~ Save Image ~ Crashing in Packaged Games

Yes is a known, I did not develop that particular node, I am forwarding your report and hopefully it will get resolved!

:slight_smile:

**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!

Enjoy!

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


**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;
}


```



**Latest plugin download on the UE4 Wiki: (8 mb) **


**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.

https://www.mediafire.com/?g6uf9kt5ueb2upj

Enjoy!

:)

Hey , what’s new about the node? You have already posted it here: (39) Rama's Extra Blueprint Nodes for You as a Plugin, No C++ Required! - Blueprint - Epic Developer Community Forums Your last post seems to be the exact same one, I’m just a bit confused :confused:

It’s not that there’s anything new, if there is I will tell you, I repost nodes periodically for newcomers and as reminders for people who’ve not tried certain nodes yet.

I also do to recenter the thread on its focus of being a whole bunch of extra BP nodes that I am giving to the Community to play with!

I hope you are having fun today!

:heart:

Sound Classes SFX/Music Separate Sliders

Thanks again for the “Victory Sound Volume Change” and “Victory Get Sound Volume” class blueprint, helped so much. Best part about it, I didn’t even have to create save files for the setting. It automatically saves the volume for you.

I even made a short tutorial on how to use it.
=2GAnri2fjQI

I thought was going to be more complicated but realized it was really easy to set up.

Isaac