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

    New Node

    Save String Array To File


    The previous String File IO could only save a single line of text, even if you put "\n" into your string

    So I've made a new node that lets you save multiple lines of text to file.

    Each FString of the array is on its own line in the file!

    See pic!

    Enjoy!

    Rama

    Click image for larger version

Name:	SaveStringArrayToFile.jpg
Views:	3
Size:	188.3 KB
ID:	1066242

    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


      Rama!

      Are these compat with the preview 5 4.7? :>
      KITATUS
      "Information shouldn't be behind a paywall, It should be free for all!"

      Comment


        Originally posted by KitatusStudios View Post
        Rama!

        Are these compat with the preview 5 4.7? :>
        I dont do Victory BP library upgrades until the official release, but Peter explained how you can upgrade to 4.7 early if you want to!

        Originally posted by pwsnow View Post
        FYI if anyone is using 4.7.0 here are the steps you need to take in order to get the plugin to work. Latest version above:

        1) In VictoryEdAlignMode.cpp (Line 602) change RV_TraceParams.IgnoreActors.Empty(); to RV_TraceParams.IgnoreComponents.Empty();

        2) Comment out (temp measure) lines 220 & 883 in VictoryBPFunctionLibrary.cpp

        3) In VictoryEdEngine.Build.cs add "Slatecore" (inc quotes) after "Slate"

        Works perfectly!

        Peter


        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


          Click image for larger version

Name:	ConfigMain.jpg
Views:	9
Size:	283.6 KB
ID:	1066288

          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!

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

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

          4. 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!

          Code:
          [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!

          Click image for larger version

Name:	Usage.jpg
Views:	9
Size:	247.3 KB
ID:	1066289
          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


            Click image for larger version

Name:	UMGRamaNodes.jpg
Views:	5
Size:	162.4 KB
ID:	1066356

            Rama's Suite of Powerful UMG Nodes

            Here are the 3 core BP nodes that I've been using to make all of my complicated interacting UMG menus, including an in-game file browser and a menu that allows you to change the materials on any skeletal mesh, while in-game!

            These nodes are available to you now!

            ~~~

            Get All Widgets of Class

            Allows you to not have to store references everywhere to your widgets, making it easy to interact with the Player Controller and My Character blueprints

            Also makes it easy to remove a loading screen after a level transition, without storing refs in Game Instance class

            ~~~

            Remove All Widgets Of Class

            You can find and remove any widget any time this way, no matter where you are in BP! (here I am in the Level BP)

            Rama Tip:
            If you make a general superclass for all your widgets (Reparent to a blank UserWidget of your own making), you can clear your entire UI system from the viewport with a single call to RemoveAllWidgetsOfClass, supplying the class that is your super class for all your user widgets!

            So lets say you have 3 user widgets that you made, make a 4th that is blank, reparent your existing 3 to your new empty 4th widget ("WidgetMaster" for example).

            Now you can just call RemoveAllWidgetsOfClass on your new 4th widget, WidgetMaster, and all 3 of your existing widgets will be removed automatically from the viewport!

            ~~~

            Is Widget Of Class In Viewport

            Take action based on the dynamic lookup of whether a certain widget is currently visible!

            No need to store refs or bools anywhere, just do a dynamic look up that is lightning fast!



            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 Rama View Post
              Hi there! Nice colors in your post!

              You shouldn't be setting the mass directly, what I can do easily is give you a node to set the mass scale of any primitive component / static mesh / skeletal mesh.

              By playing with the mass scale on a per-object basis you can get the object to have the effective movement/physics that you want in game.

              If you are doing some kind of 3d weight scale game and you actually need 1 kg every time, it will require much more effort on my part

              Mass scale is easy and universally useful!


              ~~~

              Mass to Power 0 = 1



              If you raise anything to the power of 0, the value is 1!

              Conceptual proof:

              This is because power implies Self-Multiplication, (x^2 = x * x), and the only thing you can multiply any number by and get itself is 1. So 1 is this Eternal Constant when it comes to exponential math, anything to 0 power is the same, constant, unchanged Origin of all exponential math. All numbers to the 0 power trace back to the same single point, the number 1, so this is Origin. And 0 represent the concept of Origin!


              Conventional Proof:
              Code:
                               X^y
               x^0 = x^(y-y) = --- = 1
                               x^y

              So um, is that all you need then? A phys mat with power to 0?


              Mass scale as a BP node would be much more useful to more people and gives you fine tuned control on a per-object basis, and does not require phys-mats to be set anywhere


              Rama
              Hi Rama,
              Thank you for your answer ! sorry I took my time to respond and i did a lot of tests.
              I understand all your explication about power, but English is not my native language, and i will try to explain better what i want

              In fact, I have updated my blueprint from v4.6.1 to current version and I discover a wonderful parameter in the Physics category : the "Override Mass" parameter.
              It's exactly what I want !!!! but is it possible for you to create a blueprint node to be able to :
              - modify the "Mass in Kg" value
              and optionnaly :
              - set true/false for "Override Mass"
              - be able to modify others parameters like "Center of Mass offset"

              I hope it's a better explication !
              Let me know if it's possible
              Thanks a lot !

              Comment


                Originally posted by Rama View Post
                Load String Array From Text File

                This node is a compliment to the node that saves string to text file!

                1. Loads a String Array from a Text File, where each entry in the array is one line from the file!

                2. Option to specify that white space lines should be ignored, tested and working! (only checks spaces and newlines at moment)

                3. Returns the size of the String array that was created!

                4. Returns false if the file could not be opened


                Picture:
                [ATTACH=CONFIG]9709[/ATTACH]

                Enjoy!

                Rama

                PS: re-download the plugin from the link in first post to get this update!



                Node created as per this request:

                https://forums.unrealengine.com/show...l=1#post121696

                Does anyone know if this would work for an iOS game? I'm trying to find a way to use large string arrays with out having to add code to the project.

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

                  Click image for larger version

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

                  ~~~

                  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


                    Hi again Rama! I asked what you told me in the answer hub. Here it is: https://answers.unrealengine.com/que...ime-witho.html

                    I hope someone solves this because well... I've been messing around with your binding Bps and ohh boy! They work soo good! Here is a picture of my Menu. But I have one question. What if a input have 2 or more bindings asigned? For Example. SHOOT; Left Mouse Button and Gamepad Left Trigger. Next week I'm going to buy a compatible gamepad with ue4 and try it out but I would like to know your point about it.

                    About my experience with the bindings bp: The menu you see below is not a widget hud menu. They are indeed static meshes and the mouse is not a mouse, but another static mesh projected on a plane. Why? Because VR, that's why. In short, I had to cheat all the menu functionality. What does that means? well, I used the bindings with UE4 savegames for the strings and had no problem with them and also the info from the bindings BPs can be easily used anywhere.

                    In the other hand, I hope Epic Games will put more time working on the localization management. I don't remember where, but they said this is not their main area because big companies use their own localization systems and they haven't asked them to work on that but... what about the indies? I know a lot of developers don't pay too much atention to localization but in a sales perspective... it is HUUUUGE.

                    Anyways, thanks for the awesome work Rama

                    Click image for larger version

Name:	bindingsMenu.jpg
Views:	1
Size:	339.2 KB
ID:	1066420

                    Comment


                      Click image for larger version

Name:	CreateObject.jpg
Views:	7
Size:	264.5 KB
ID:	1066424

                      ~~

                      2 Two Nodes For You

                      Create UObject

                      Create Primitive Component, Added to Scene at Location!


                      These two nodes let you create UObjects at runtime!


                      I recently needed to create UObjects in Blueprints for a special inventory system! Please note you can use my node to create UObjects that you make Blueprintable via C++ !


                      Please note you absolutely must save off the return value to a variable or UE4 will Garbage Collect your new UObject within a short time!


                      Please especially note that if you create a Primitive Component, I actually add it to the world for you so it is visible and has collision!

                      ~~~

                      C++ Code For You

                      Here's the code!

                      Code:
                      UObject* UVictoryBPFunctionLibrary::CreateObject(UObject* WorldContextObject,UClass* TheObjectClass, FName Name)
                      {
                      	if(!TheObjectClass) return NULL;
                      	//~~~~~~~~~~~~~~~~~
                      	
                      	//using a context object to get the world!
                          UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject);
                      	if(!World) return NULL;
                      	//~~~~~~~~~~~
                      	 
                      	return StaticConstructObject( TheObjectClass, World, Name);
                      }
                      Code:
                      UPrimitiveComponent* UVictoryBPFunctionLibrary::CreatePrimitiveComponent(
                      	UObject* WorldContextObject, 
                      	TSubclassOf<UPrimitiveComponent> CompClass, 
                      	FName Name,
                      	FVector Location, 
                      	FRotator Rotation
                      ){
                      	if(!CompClass) return NULL;
                      	//~~~~~~~~~~~~~~~~~
                      	
                      	//using a context object to get the world!
                          UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject);
                      	if(!World) return NULL;
                      	//~~~~~~~~~~~
                      	 
                      	UPrimitiveComponent* NewComp = ConstructObject<UPrimitiveComponent>( CompClass, World, Name);
                      	if(!NewComp) return NULL;
                      	//~~~~~~~~~~~~~
                      	 
                      	NewComp->SetWorldLocation(Location);
                      	NewComp->SetWorldRotation(Rotation);
                      	NewComp->RegisterComponentWithWorld(World);
                      	
                      	return NewComp;
                      }


                      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


                        any one getting a error of missing Dll files?

                        Comment


                          Originally posted by Tea-Rexx View Post
                          any one getting a error of missing Dll files?
                          Until 4.8 or so you need to include even just an empty C++ class, to get the plugin to compile in a packaged game.

                          If you are having missing dll errors in editor build, make sure you are using 4.6.1 with my plugin. I will release 4.7 version when 4.7 is released. The current 4.7 in the launcher is for testing only, not commercial development.



                          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


                            Click image for larger version

Name:	AppendMultiple.jpg
Views:	1
Size:	187.2 KB
ID:	1066500

                            New Nodes

                            Combine Multiple Strings & Append Multiple Strings



                            With these latest nodes you can combine as many strings as you want!

                            Note the "Add Pin" option!


                            Combine Strings Multi = I put a space between each string for you!

                            Append Multiple = Strings are combined without any additional formatting.

                            ~~~

                            Special Thanks

                            Special thanks to Key To Truth for contributing the Append Multiple node!

                            I was inspired by Key To Truth's offering to make Combine Strings Multi

                            ~~~

                            Download Link (6.5mb)

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

                            Enjoy!



                            Rama
                            Last edited by Rama; 02-15-2015, 05:03 PM.
                            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


                              Two New AI Nodes

                              Get Closest Actor Of Class In Radius of Location

                              Get Closest Actor of Class In Radius of Actor



                              These nodes are great for use with AI calculations!


                              Click image for larger version

Name:	GetClosestActorClassInRadius1.jpg
Views:	3
Size:	216.9 KB
ID:	1066498

                              Click image for larger version

Name:	GetClosestActorClassInRadius2.jpg
Views:	3
Size:	169.1 KB
ID:	1066499

                              ~~~

                              C++ Code For You

                              Here's my c++ code for Get Closest Actor of Class In Radius of Actor!

                              Code:
                              AActor* UVictoryBPFunctionLibrary::GetClosestActorOfClassInRadiusOfActor(
                              	UObject* WorldContextObject, 
                              	TSubclassOf<AActor> ActorClass, 
                              	AActor* ActorCenter, 
                              	float Radius, 
                              	bool& IsValid
                              ){ 
                              	IsValid = false;
                              	  
                              	if(!ActorCenter)
                              	{
                              		return nullptr;
                              	}
                              	
                              	const FVector Center = ActorCenter->GetActorLocation();
                              	
                              	//using a context object to get the world!
                                  UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject);
                              	if(!World) return nullptr;
                              	//~~~~~~~~~~~
                              	
                              	AActor* ClosestActor 		= nullptr;
                              	float MinDistanceSq 		= Radius*Radius;	//Max Radius
                              	
                              	for (TActorIterator<AActor> Itr(World, ActorClass); Itr; ++Itr)
                              	{
                              		//Skip ActorCenter!
                              		if(*Itr == ActorCenter) continue;
                              		//~~~~~~~~~~~~~~~~~
                              		
                              		const float DistanceSquared = FVector::DistSquared(Center, Itr->GetActorLocation());
                              
                              		//Is this the closest possible actor within the max radius?
                              		if (DistanceSquared < MinDistanceSq)
                              		{
                              			ClosestActor = *Itr;					//New Output!
                              			MinDistanceSq = DistanceSquared;		//New Min!
                              		}
                              	}
                              
                                 IsValid = true;
                                 return ClosestActor;
                              }
                              ~~~

                              Download Link (6.5mb)

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

                              Enjoy!



                              Rama
                              Last edited by Rama; 02-15-2015, 05:08 PM.
                              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


                                Click image for larger version

Name:	2DInterpolation.jpg
Views:	2
Size:	163.9 KB
ID:	1066550

                                Using these nodes in my plugin you can now easily make your own translation animations for 2D games and UMG!

                                I realized the need for these animations while trying to manually animate UMG widgets in BP.

                                I am in process of submitting this as a pull request for the main engine.

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

                                Enjoy!

                                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

                                Working...
                                X