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 RumbleMonk View Post
    but a non-physics pawn class for some reason doesn't function the same as a non-physics character class when hitting non-physics actors.
    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!



    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


      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!



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



        Rama
        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! 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. Thanks for kicking me down the right path!!

        Awesomes.

        Thanks again.

        Comment


          Rama's BP Multiplayer Game Mode Solution

          Click image for larger version

Name:	FindPlayerStart.jpg
Views:	3
Size:	285.1 KB
ID:	1060930

          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)
          Click image for larger version

Name:	VictoryGameMode.jpg
Views:	1
Size:	290.1 KB
ID:	1060933

          ~~~

          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
          Code:
          //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
          Code:
          //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("\n\n"));
          		UE_LOG(VictoryGameModeLog, Log, TEXT("FindPlayerStart: CPP override found in %s and used instead of C++ implementation"), *GetName());
          		UE_LOG(VictoryGameModeLog, Log, TEXT("\n\n"));
          
          		return CPPOverrideVar_FindPlayerStart;
          	} 
          	 
          	//Default C++ Implementation
          	return Super::FindPlayerStart(Player,IncomingName);
          }
          ~~~

          Enjoy!

          Rama
          Last edited by Rama; 11-12-2014, 04:55 AM.
          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


            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



            ~~~

            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->Input

            ~~~

            Download (8mb)

            Here's the full project for you!

            It was made in UE4 Version 4.5!


            Wiki Link to Download Page
            https://wiki.unrealengine.com/File:ReBindableKeys.zip



            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:	SoundSetClassVolume.jpg
Views:	8
Size:	91.1 KB
ID:	1060971

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


                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

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

                Click image for larger version

Name:	GetAllWidgetsOfClass.jpg
Views:	4
Size:	291.4 KB
ID:	1060992

                Click image for larger version

Name:	GetAllWidgetsOfClass2.jpg
Views:	2
Size:	136.9 KB
ID:	1060994



                Rama
                Last edited by Rama; 11-13-2014, 08:19 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


                  New Node

                  Get Static Mesh Vertex Locations!


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

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

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

                  ~~~

                  Pictures

                  Click image for larger version

Name:	VertexPositions.jpg
Views:	15
Size:	176.5 KB
ID:	1061001

                  Click image for larger version

Name:	VertexPositions2.jpg
Views:	5
Size:	262.2 KB
ID:	1061002

                  Enjoy!

                  Rama
                  Attached Files
                  Last edited by Rama; 11-14-2014, 05:08 AM.
                  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:	SoundGetSoundVolume.jpg
Views:	6
Size:	98.1 KB
ID:	1061016

                    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!
                    https://forums.unrealengine.com/show...l=1#post178702

                    ~~~

                    C++ Code

                    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;
                    }
                    Last edited by Rama; 11-14-2014, 08:51 AM.
                    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


                      You should make a Pull request for this Rama Nice work.
                      W3 Studios

                      Comment


                        Click image for larger version

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

                        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:	1061055
                        Last edited by Rama; 11-15-2014, 09:55 AM.
                        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
                          New Release!

                          Rama' Suite of Custom Config Section BP Nodes!
                          As always, thank you Rama! Very useful stuff.
                          FREE VR Drum Kit Project
                          FREE Color LUT Collection
                          FREE Physics Driven Spacecraft Project
                          FREE GTA Style Vehicle Interaction
                          Dynamic DoF(Depth of Field)
                          Camera Crossfade

                          Comment


                            Originally posted by Jacky View Post
                            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!



                            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


                              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

                              Greetz,
                              Dakraid

                              Comment


                                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,

                                Comment

                                Working...
                                X