Download

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

You should never be using the Pawn class!

You are not getting what you paid for in UE4 if you do that!

There is a positively huuuge amount of code that is specific to characters, especially in regards to networking!

:slight_smile:

Rama

New Sound Node For you

Keep in mind you can now set the volume of any sound class to any value you want, anywhere in BP, any time!

:slight_smile:

You’re probably right, and just changing my class solved the problem. I really thought they should behave the same when it came to collisions as the character class seemed to just add additional code for movement, and since my movement has got nothing to do with an actual character (jumping around etc) I was under the impression I should use pawn. Guess that recommendation came from using less code… not sure.

But anyway, I have some reworking to do now which is great! :slight_smile: All my pawn motions seem to work just fine, the overlaps don’t work now although I’m sure I’ll figure that out soonish. :slight_smile: Thanks for kicking me down the right path!!

Awesomes.

Thanks again.

Rama’s BP Multiplayer Game Mode Solution

**Rama’s Multiplayer Game Mode Solution

Find Player Start

Choose Player Start

Can Player Restart

These core Multiplayer functions are now fully implementable/overridable in Blueprints!**

I have found a solution for the issue of implementing FindPlayerStart, ChoosePlayerStart, and CanPlayerRestart in Blueprints!

And I’ve tested it as working!

**You can now implement core network coding of choosing player starts entirely in Blueprints!
**


**How To Use**

In my picture below I show how to use my Game Mode overrides!

1. **First make a new BP and select my VictoryGameMode class** which comes with my Victory BP Library (make sure you have the latest download https://wiki.unrealengine.com/File:VictoryPlugin.zip)

If you already have a Game Mode BP, choose File -> Reparent and use my Victory Game Mode BP


2. Make sure you are using my Victory Game Mode in your **World Settings**!

3. Setup the Victory Game Mode BP the same as my picture below!

4. Celebrate! You can now implement core multiplayer logic in Blueprints!

*(right click -> new tab to see larger pic)*
![VictoryGameMode.jpg|1280x960](upload://1psgB0eeaCt9i59C4zf1sNwPmLm.jpeg)

CPP Override and CPP Override Var

Please note the notation I am using, any variable that has CPPOverride Var in its name is used only with the corresponding event. This is how I enable you to implement core multiplayer coding logic in Blueprints!


**Simple Data Types**

Please note that for the function that is designed to return a boolean value, CanPlayerRestart, you must pass the boolean and also a special variable, **CPPOverride SelfReference**, this is how you tell the CPP that you are implementing the Game Mode function in BP!

Non Destructive Solution

My solution is entirely optional and if you do not implement the event in Blueprints, and your programmer does it in C++, my solution will not interfere at all with your existing code base!


**Log Message**

If you do implement my solution in BP, I am printing log information to indicate this, so you/your programmer knows you are using a BP override and any C++ code will not be run.

C++ Code

Here is my C++ code for FindPlayerStart which shows how I worked around the issue of overriding FindPlayerStart via Blueprints!

Again I’ve tested this as entirely working in PIE and commandline games!

.h



//Find Player Start
public:
	/** Use this var inside the body of CPP Override ~ Find Player Start event to override the C++ functionality! */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Victory Game Mode")
	AActor* CPPOverrideVar_FindPlayerStart;
	
	/** 
	 * Use CPPOverrideVar_FindPlayerStart inside of this event to implement FindPlayerStart in BP ! <3 Rama
	 *
	 * Return the 'best' player start for this player to start from.
	 * @param Player - is the AController for whom we are choosing a playerstart
	 * @param IncomingName - specifies the tag of a Playerstart to use
	 * @returns Actor chosen as player start (usually a PlayerStart)
	 */
	UFUNCTION(BlueprintImplementableEvent, meta=(FriendlyName = "CPP Override ~ Find Player Start"))
	virtual void CPPOverride_FindPlayerStart();

	virtual class AActor* FindPlayerStart( AController* Player, const FString& IncomingName = TEXT("") ) override;


.cpp



//Find
AActor* AVictoryGameMode::FindPlayerStart( AController* Player, const FString& IncomingName )
{
	//Clear any previous to indicate whether BP did an override
	CPPOverrideVar_FindPlayerStart = NULL;
	
	//=======================
	//BP Hook by Rama
	this->CPPOverride_FindPlayerStart();
	//=======================
	
	if(CPPOverrideVar_FindPlayerStart) //Did BP programmer set the var?
	{ 
		//Indicate that the BP override was found and is being used.
		UE_LOG(VictoryGameModeLog, Log, TEXT("

"));
		UE_LOG(VictoryGameModeLog, Log, TEXT("FindPlayerStart: CPP override found in %s and used instead of C++ implementation"), *GetName());
		UE_LOG(VictoryGameModeLog, Log, TEXT("

"));

		return CPPOverrideVar_FindPlayerStart;
	} 
	 
	//Default C++ Implementation
	return Super::FindPlayerStart(Player,IncomingName);
}



**Enjoy!**

Rama

**Full Sample Project For You

Dynamically Re-Bindable Key Menu in UMG!**

Dear Community,

I am giving you a full sample project as a download (8mb) where I’ve created a fully functional UMG Key Rebinding System!

You can click on the name of any key and then simply enter a new one on the keyboard/gamepad (just pressing the button itself that you want to be the new binding!

And I do track ctrl,alt,shift, and command!

And the list is scrollable too!


**Rebind Actions During Runtime**

And best of all, because of my Victory BP Library nodes, the changes you make in the Key Rebinding Menu instantly update the ingame character input component!

So if you rebind Jump from spacebar to page up, it takes effect instantly!

I could not have done this without some new nodes I made after many hours of C++ research! These nodes are now part of my Victory BP Library!

Why Am I Giving This For Free?

Because its really important feature for any game and I just finished figuring out how to do it for Solus.

I figured you would enjoy it as well, since it was honestly not that easy to do, and I had to really think about how to do both the UMG and the actual C++ code to dynamically update action mappings during runtime

:heart:


**How To Use My Menu**

Go in game and press the K key!

Click on the black and red buttons to rebind the jump button!

Add new actions any time using **Project Settings-&gt;Input**

Download (8mb)

Here’s the full project for you!

It was made in UE4 Version 4.5!

Wiki Link to Download Page

:slight_smile:

Rama

2d16db46320c67967ee1942b4e35742031880893.jpeg

**Set Volume of Any Sound Class

Any Time From Anywhere!**

This is a node that Hourences requested I make!

You can use this node to set the volume of any sound class, any time, from anywhere!

I am aware of the option of using a sound mixer, however it is not as dynamic because you have to use fixed sound increments.

**My node allows you to offer people an audio slider that is a continuous float value range based only on the slider increments.
**
Enjoy!

Rama

Wiki Download Page

**UMG, Get All Widgets Of Class

Updated!**

This node will be in a near future engine release! Epic accepted my github pull request!

You can start playing with it now though, as part of my plugin!

Now you have an optional bool filter to only return widgets that are at the top level, see Nick Darnell’s comment for more information


**My C++ Code For this Node**



```


void UVictoryBPFunctionLibrary::GetAllWidgetsOfClass(UObject* WorldContextObject, TSubclassOf<UUserWidget> WidgetClass, TArray<UUserWidget*>& FoundWidgets,bool TopLevelOnly)
{
	//Prevent possibility of an ever-growing array if user uses this in a loop
	FoundWidgets.Empty();
	//~~~~~~~~~~~~
	 
	if(!WidgetClass) return;
	if(!WorldContextObject) return;
	 
	UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject);
	if(!World) return;
	//~~~~~~~~~~~
	
	for(TObjectIterator<UUserWidget> Itr; Itr; ++Itr)
	{
		if(Itr->GetWorld() != World) continue;
		//~~~~~~~~~~~~~~~~~~~~~
		
		if( ! Itr->IsA(WidgetClass)) continue;
		//~~~~~~~~~~~~~~~~~~~
		 
		//Top Level?
		if(TopLevelOnly)
		{
			//only add top level widgets
			if(Itr->GetIsVisible())			//IsInViewport in 4.6
			{
				FoundWidgets.Add(*Itr);
			}
		}
		else
		{
			//add all internal widgets
			FoundWidgets.Add(*Itr);
		}
	}
}


```



Pic

71009bd806383a480cc409a36e116fe857cc7fd1.jpeg

:heart:

Rama

**New Node

Get Static Mesh Vertex Locations!**

This node is live in the current most recent plugin version!

Please refer carefully to my picture of how to set up this node correctly!


**Pictures**

![560b4f2b24fb116ffc5c2ddfd4f04754501ad6c2.jpeg|967x742](upload://chbi83K9r7yN6RpDf900WV9lpJM.jpeg)

![75e2b513ac387b6a626ff0e14fe5743f8f3e6a2b.jpeg|1280x960](upload://gORA6cRKTZxgajgGapD8D7bjC2v.jpeg)

Enjoy!

Rama

59b3e199554c243882d759c4b789ea97621f9174.jpeg

**New Globally Accessible Sound Node

Get Sound Volume of any Sound Class**

This node completes the set!

Now you can set and get the volume of any sound class using my Victory BP Library!

Here’s forum link to my Set Volume Node!


**C++ Code**



```


float UVictoryBPFunctionLibrary::VictoryGetSoundVolume(USoundClass* SoundClassObject)
{
	FAudioDevice* Device = GEngine->GetAudioDevice();
	if (!Device || !SoundClassObject)
	{
		return -1;
	}
	    
	FSoundClassProperties* Props = Device->GetSoundClassCurrentProperties(SoundClassObject);
	if(!Props) return -1;
	return Props->Volume;
}


```

You should make a Pull request for this Rama :wink: Nice work.

**New Release!

Rama’ 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 this way! Data is stored between level loads and even after the current instance of the game is shut down.

So in this 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! This 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 all your custom settings this way!


**Game.ini**

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

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

Players can navigate to this 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!**

Rama

PS: Here's example usage!

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

As always, thank you Rama! Very useful stuff.

You’re welcome Jacky!

Let me know how your save system goes!

@Everyone

Have fun with my fully feature Config File BP node system!

Let me know how you use it!

:slight_smile:

Rama

Thank you Rama -
Your plugin is making my and (I assume) the lives of many here easier with every release!
You really deserve a medal for your contributions :smiley:

Greetz,
Dakraid

Rename Save file

Your plugin is awesome, its helping a lot with our projects.
Right now we are trying to rename a saved file through FPlatformFileManager and going through your tutorial on File Management, we can’t figure out how to rename a saved file. Can you please guide us how to do that?

Thanks,

I’d like to ask here, what do you need to do to have a packaged content only project work correctly when using this Victory plugin?
When I try to run my compiled project it crashes, telling me “Plugin ‘VictoryPlugin’ failed to load because module ‘VictoryBPLibrary’ could not be found”.
I’ve looked through the wikipage and searched answerhub/this thread but haven’t found anything telling me why this is occurring?
To use the VictoryPlugin are you required to compile with C++ or something? I’d really appreciate some help with this.

EDIT:
Forgot to mention I noticed there are VictoryBP binaries found in the .zip, however they are only for 64 bit. Are these files you need to place somewhere, and if so does that mean the VictoryBP plugin won’t work on a 32bit system?

Really Easy Way To Package Victory Plugin

Until 4.7, you do need to add code to your project, you can add an empty class of your choosing using File -> Add Code To Project.

I have a tutorial on this here!


**4.7**

Once 4.7 rolls around we should no longer have to do this conversion to C++ for packaging plugins, [according to Epic Ben Marsh](https://forums.unrealengine.com/showthread.php?25009-Plugins-Are-Only-Working-For-People-in-a-Package-Game-if-they-have-C-Project&p=179085&viewfull=1#post179085).

Enjoy!

Rama

PS: You will need Visual Studio 2013 for Windows Desktop, see my wiki mentioned above

You’re welcome Dakraid!

Great to hear from you!

:slight_smile:

When you say save file, you mean the .sav files generated by Epic using the BP Save System?

I presume you’d like a BP node to rename save file, you are not talking about using C++ right?

Rename All Files

This is what I am trying to do, I am rendering out different buffer Visualization passes in an Sequence PNG files using Matinee Movie Option and it works fine but the only problem is, it always name it “MovieFrame#####” and I want to change that to like “RoughnessPass##”, “AmbientOcclusionPass##” so after outputting those files, I want to write a function where it iterates through all those files and rename it.

Thanks,

First off, great plugin. It seems like it’s really helping out.

My issue is that if I run my game as a server, it crashes immediately, saying “Cast of NULL to blueprint failed.” This doesn’t happen if I remove the plugin. Any ideas? :confused: