Announcement

Collapse
No announcement yet.

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by Rama View Post
    Yea! Epic has been telling me that getting plugins working in BP only packaged games is very high priority for them
    But it will not be possible in 4.7, right?
    Easy to use UMG Mini Map on the UE4 Marketplace.
    Forum thread: https://forums.unrealengine.com/show...-Plug-and-Play

    Comment


      Hi there Rama,

      first of all, thank you very much for all content to provide us with.

      I have a question referring your Rebindable Key.

      I tried to figure out from where you used this OnKeyDown Event, which seems to be a reply to any Key Event occuring.
      I looked through the Engine and couldnt find any Function which describe that behaviour. How did you do that?

      best regards
      Wallhalla
      Live long and prosper.

      Comment


        Rama, thank you for another excellent Unreal Engine 4 contribution!

        Comment


          Originally posted by Wallhalla View Post
          Hi there Rama,

          first of all, thank you very much for all content to provide us with.

          I have a question referring your Rebindable Key.

          I tried to figure out from where you used this OnKeyDown Event, which seems to be a reply to any Key Event occuring.
          I looked through the Engine and couldnt find any Function which describe that behaviour. How did you do that?

          best regards
          Wallhalla
          I just found out that the function i need is implemented in UserWidget.h.

          But how is the intention of getting this inside an UMG widget, is this event automatically consumed within widgets parent, when the child is in focus?
          Live long and prosper.

          Comment


            Hi Rama,

            Its been a while since I posted on this forum. Took a break from my thesis.

            I am facing some limitations with your current vertex manipulation blueprints. One of that is I have a class called Interactive_Actor. This actor class holds all the thermodynamic properties of a static mesh. It also has a component called Default Mesh which gets changed to a user set static mesh through a Set Static Mesh node in the constructor. However, when I drag out the blueprint into the scene, there are no vertices highlighted. It seems the codes only work directly on static meshes dropped into the scene. Is there a way to make it work also on custom blueprint actors (static meshes with custom properties)?

            Cheers!!!!

            Comment


              Originally posted by Wallhalla View Post
              I just found out that the function i need is implemented in UserWidget.h.

              But how is the intention of getting this inside an UMG widget, is this event automatically consumed within widgets parent, when the child is in focus?
              omg... sorry for the disturbance i missed the "show inherit variables"...
              Live long and prosper.

              Comment


                Originally posted by Tim Sweeney View Post
                Rama, thank you for another excellent Unreal Engine 4 contribution!
                You're welcome Tim!

                Thank you so much for UE4!

                I am having fun with UE4 every day!



                Rama
                100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

                UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

                Comment


                  Originally posted by CatchPhyre View Post
                  It also has a component called Default Mesh which gets changed to a user set static mesh through a Set Static Mesh node in the constructor. However, when I drag out the blueprint into the scene, there are no vertices highlighted. It seems the codes only work directly on static meshes dropped into the scene. Is there a way to make it work also on custom blueprint actors (static meshes with custom properties)?

                  Cheers!!!!
                  You should use StaticMeshActor as your base class for your BP, hopefully then it will work right!

                  Replace all uses of your custom static mesh component with StaticMeshComponent ref.

                  Try it as a test and see how it goes!

                  Good luck!

                  Rama
                  100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

                  UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                  Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

                  Comment


                    BP Node to Get Your Computer's IP Address!

                    Dear Community,

                    I've finally succeeded at implementing a node that many have been trying to implement since the Beta!

                    This is a BP node that gets the IP address of your computer!

                    My node relies on http://api.ipify.org, a free and easy way to get your current IP address.

                    Because this node involves an HTTP request I can't make it a static library node, so I instead made a VictoryPC class that contains only this functionality.

                    You can easily re-parent your current player controller blueprint to use my plugin VictoryPC class!

                    File->Reparent

                    and if you are not using a PC already, make sure to go to World Settings and use my VictoryPC as your player controller!

                    As long as my Victory BP Library is an active plugin for you, then this VictoryPC class will show up!

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

                    ~~~

                    Celebration!

                    Yay!

                    Now we can all get the IP address of the local computer for use with multiplayer games or webserver activities!

                    Enjoy!

                    Rama

                    ~~~

                    Pic

                    Here's the setup you should create in your Blueprinted version of my VictoryPC!

                    Click image for larger version

Name:	IPGetMyIP.jpg
Views:	11
Size:	177.0 KB
ID:	1065740

                    ~~~

                    C++ Source Code For You

                    Here is the C++ source code I wrote just earlier today!

                    Code:
                    bool AVictoryPC::VictoryPC_GetMyIP_SendRequest()
                    {
                    	FHttpModule* Http = &FHttpModule::Get();
                    	
                    	if(!Http)
                    	{
                    		return false;
                    	}
                    	 
                    	if(!Http->IsHttpEnabled()) 
                    	{
                    		return false;
                    	} 
                    	//~~~~~~~~~~~~~~~~~~~
                    	
                    	FString TargetHost = "http://api.ipify.org";
                    	TSharedRef < IHttpRequest > Request = Http->CreateRequest(); 
                    	Request->SetVerb("GET");
                    	Request->SetURL(TargetHost);
                    	Request->SetHeader("User-Agent", "VictoryBPLibrary/1.0");
                    	Request->SetHeader("Content-Type" ,"text/html");
                     
                    	Request->OnProcessRequestComplete().BindUObject(this, &AVictoryPC::HTTPOnResponseReceived);
                    	if (!Request->ProcessRequest())
                    	{
                    		return false;
                    	}
                    	  
                    	return true;
                    }
                    	
                    void AVictoryPC::HTTPOnResponseReceived(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)
                    {
                    	this->VictoryPC_GetMyIP_DataReceived(Response->GetContentAsString());
                    }


                    Rama
                    100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

                    UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                    Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

                    Comment


                      I was stuck with dynamic generated arrays in BP... and then I found a way to load image sequences with your plugin. You saved my life! ;D
                      I used the LoadObjectFromAssetPath node, but I'm gonna try the LoadImage node soon as well!
                      I'm eagerly waiting for 4.7 and see if I can deploy to Android apk directly...
                      Thx again dude!
                      Virtew - Virtual Reality Productions
                      ---
                      https://www.facebook.com/virtew/
                      ---
                      https://www.facebook.com/RunOfMydan/

                      Comment


                        Hi rama!

                        What about a Bp that enables/disables subtitles during runtime? Can this be posible?

                        In fact, could be posible to change the culture (cultures are the game's languages people) during runtime?

                        With this two features, your already done graphics, custom ini's settings and key rebinding we could have an entire game menu 100% functional without game launcher working ingame in any plataform!

                        Anyways, thank you for the already well done work! Porting Mind: Path to Thalamus to Vr and UE4 is being soo much easier thanks to your nodes

                        Comment


                          Originally posted by CarlosCoronado View Post
                          Anyways, thank you for the already well done work! Porting Mind: Path to Thalamus to Vr and UE4 is being soo much easier thanks to your nodes
                          Hi! Oh you're welcome, yay! Glad my Victory BP Library helped you out!

                          I know there's a command to change localization at runtime, if you can find it via Epic's tutorials or answerhub then I can work with it as a BP node

                          Rama
                          100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

                          UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                          Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

                          Comment


                            Hi rama thanks for your answer!

                            Well the point is I haven't found anything about that command. If it ever existed with a simple "Execute console command" node would have been more than enough to change the game's culture but I can't seem to find it. What I have found (and tested and yes, it is working) is that you can pass "-culture=fr" on the commandline when launching the game and that works (I set this in a shortcut). I have found this in the answer HUB https://answers.unrealengine.com/que...-commands.html but the console command "-culture=fr" doesn't work for me in the console(not recognized with and without the quotes).

                            Btw, I found something really usefull in terms of localization: when you use the gather text commandlet now it also gathers the soundwaves and the soundcues! The guys from Solus were having problems but it seems Epic Games fixed it (just posting this here so people who end here getting info on the subject can read it )

                            Rama, setting the subtitles on and off in runntime should be super easy in C++ because in the project settings menu there is indeed and option to set the subtitles on and off and well, if you have managed to do blueprints to rebind keys during runntimes subtitles should be really easy.

                            Keep on the good workk!! I can't wait to show you guys what I am doing

                            Comment


                              Originally posted by CarlosCoronado View Post
                              Hi rama thanks for your answer!

                              Well the point is I haven't found anything about that command. If it ever existed with a simple "Execute console command" node would have been more than enough to change the game's culture but I can't seem to find it. What I have found (and tested and yes, it is working) is that you can pass "-culture=fr" on the commandline when launching the game and that works (I set this in a shortcut). I have found this in the answer HUB https://answers.unrealengine.com/que...-commands.html but the console command "-culture=fr" doesn't work for me in the console(not recognized with and without the quotes).

                              Btw, I found something really usefull in terms of localization: when you use the gather text commandlet now it also gathers the soundwaves and the soundcues! The guys from Solus were having problems but it seems Epic Games fixed it (just posting this here so people who end here getting info on the subject can read it )
                              Hee hee yup I know, I am the C++ programmer for Solus, and I worked with Epic directly to resolve 3-4 substantial bugs with the Localization system to get the commandlets working better.

                              I think you should ask on the answerhub if there is a way to change the culture of the game without having to restart the game! Then let me know know what response you get, and if you send link I can post there too.

                              ~~~

                              Subtitles

                              I am trying to meet a deadline but something like this should work

                              Code:
                              void SetSubtitlesActive(bool MakeActive)
                              {
                              	GEngine->bSubtitlesEnabled = MakeActive;
                              	
                              	//Clear any existing if setting subtitles off!
                              	if(!MakeActive)
                              	{
                              		FSubtitleManager * SM = FSubtitleManager::GetSubtitleManager();
                              		if (SM)
                              		{
                              			SM->KillAllSubtitles();
                              		}
                              	}
                              }
                              What do you think?

                              Let me know if you think there's a more elegant way to do it than talking to GEngine directly.

                              Rama
                              100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

                              UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                              Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

                              Comment


                                Load Texture 2D From File!

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


                                With this 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!

                                Tim Sweeney liked this node!


                                Enjoy!

                                Rama

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

                                Click image for larger version

Name:	LoadImageFromFile.jpg
Views:	8
Size:	238.0 KB
ID:	1065541

                                Click image for larger version

Name:	LoadImageFromFile2.jpg
Views:	8
Size:	201.0 KB
ID:	1065542

                                ~~~

                                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.

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

                                Download Link (6.5mb)

                                UE4 Wiki, Plugin Download Page
                                https://wiki.unrealengine.com/File:VictoryPlugin.zip
                                100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

                                UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                                Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

                                Comment

                                Working...
                                X