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
    Dear Community,

    I've upgraded my Victory BP plugin to 4.9! (And TK-Master did too!)

    Unfortunately in 4.9.0 there's a bug involved with editor plugins that I believe has to be fixed engine-side as it is affecting the new 4.9 plugin templates as well.

    So this version of my plugin does not include the Vertex Snap Editor.

    To avoid a crash on editor startup, please remember to remove these lines from your config file if you were using the vertex snap editor:

    this

    Code:
    [/Script/Engine.Engine]
    UnrealEdEngine=/Script/VictoryEdEngine.VictoryEdEngine
    becomes this

    Code:
    ;[/Script/Engine.Engine]
    ;UnrealEdEngine=/Script/VictoryEdEngine.VictoryEdEngine
    Full description:
    https://wiki.unrealengine.com/Rama%2...n#Installation

    ~~~

    4.9 Download

    ~~~

    Latest plugin download on the UE4 Wiki: (15 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 this link will not start a download instantly, it will just take you to the Media Fire file description.

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

    Enjoy!



    Rama
    Much happiness glows around me Java this semester, c++ next. And then the Unreal API for all its hugeness and oddness.
    Tek LLC a personal Candaian Company running BlenderTek & UnrealTek is currently looking for help to bring back submarine simulator gaming with a new genre of sub sims: Cold War! (1945-1991) Operation: Trident SubSim Dev Diary Thread - Donations

    Comment


      Seems the IsValidIndex node doesn't like 4.9.
      I'll get the fix to Rama shortly
      Rule#21: Be polite, be professional, but have a plan to kill everyone you meet.

      Comment


        Victory Ed Engine Plugin, Separate Plugin and Download Now

        Dear Community,

        As of 4.9.0, My Vertex Snap Editor Plugin is now a separate plugin, called VictoryEdEngine!

        Download Link (145kb)
        https://wiki.unrealengine.com/File:VictoryEdEngine.zip

        This is a plugin that does not package with your game as it is only designed to modify Unreal Engine 4 to add support for vertex snapping while in the Level Editor Viewport.

        More Details about my Vertex Snapping Editor Feature

        Installation Steps
        https://wiki.unrealengine.com/Rama%2...ertex_Snapping

        Enjoy!

        Rama
        Last edited by Rama; 09-02-2015, 05:07 AM.
        UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

        ♥ Rama

        Comment


          Hey Rama!

          Originally posted by Rama View Post
          Why Not Include All Variants?

          The reason I can't include all variants is because of a wiki file size limitation of 20mb
          Why not just upload the plugin here in the forums or just link in the wiki to a separate download location (like google drive)?

          Another question: Could you somehow integrate this into your plugin?

          https://forums.unrealengine.com/show...or-Win-and-Mac

          Epic seems to be quite slow with integrating custom hardware cursors into the engine, they don't say anything about it, no idea whether it will happen within the next 1 or 2 years So there is the code which just needs to get added to the source for making custom cursors work, but of course doing this manually after each new version and each hotfix and compile the engine is just a drawback regarding usability. But so many games need custom cursors! The default windows hand cursor is not really fitting for most games, and software cursors feel laggy, even at 60 fps.

          Could you integrate the code mentioned in the thread above into your plugin and make it work as a BP node or would it not work inside of a plugin?

          Thanks!
          Easy to use UMG Mini Map on the UE4 Marketplace.
          Forum thread: https://forums.unrealengine.com/show...-Plug-and-Play

          Comment


            Originally posted by Kris View Post
            Seems the IsValidIndex node doesn't like 4.9.
            I'll get the fix to Rama shortly
            Could you post a fix here? I'm currently stuck on this.

            -steve

            Comment


              IsValidIndex fix:

              Code:
                  DECLARE_FUNCTION(execArray_IsValidIndex)
                  {
                      Stack.MostRecentProperty = nullptr;
                      Stack.StepCompiledIn<UArrayProperty>(NULL);
                      void* ArrayAddr = Stack.MostRecentPropertyAddress;
                      UArrayProperty* ArrayProperty = Cast<UArrayProperty>(Stack.MostRecentProperty);
                      if (!ArrayProperty)
                      {
                          Stack.bArrayContextFailed = true;
                          return;
                      }
                      P_GET_PROPERTY(UIntProperty, Index);
                      P_FINISH;
              
                      bool WasValid = GenericArray_IsValidIndex(ArrayAddr, ArrayProperty, Index);
                      *(bool*)RESULT_PARAM = WasValid;
                  }
              Code:
              bool UVictoryBPFunctionLibrary::GenericArray_IsValidIndex(void* TargetArray, const UArrayProperty* ArrayProp, int32 Index)
              {
                  bool bResult = false;
              
                  if (TargetArray)
                  {
                      FScriptArrayHelper ArrayHelper(ArrayProp, TargetArray);
                      bResult = ArrayHelper.IsValidIndex(Index);
                  }
              
                  return bResult;
              }
              Rule#21: Be polite, be professional, but have a plan to kill everyone you meet.

              Comment


                Originally posted by Kris View Post
                IsValidIndex fix:

                Code:
                    DECLARE_FUNCTION(execArray_IsValidIndex)
                    {
                        Stack.MostRecentProperty = nullptr;
                        Stack.StepCompiledIn<UArrayProperty>(NULL);
                        void* ArrayAddr = Stack.MostRecentPropertyAddress;
                        UArrayProperty* ArrayProperty = Cast<UArrayProperty>(Stack.MostRecentProperty);
                        if (!ArrayProperty)
                        {
                            Stack.bArrayContextFailed = true;
                            return;
                        }
                        P_GET_PROPERTY(UIntProperty, Index);
                        P_FINISH;
                
                        bool WasValid = GenericArray_IsValidIndex(ArrayAddr, ArrayProperty, Index);
                        *(bool*)RESULT_PARAM = WasValid;
                    }
                Code:
                bool UVictoryBPFunctionLibrary::GenericArray_IsValidIndex(void* TargetArray, const UArrayProperty* ArrayProp, int32 Index)
                {
                    bool bResult = false;
                
                    if (TargetArray)
                    {
                        FScriptArrayHelper ArrayHelper(ArrayProp, TargetArray);
                        bResult = ArrayHelper.IsValidIndex(Index);
                    }
                
                    return bResult;
                }
                I'm still getting crashes.

                -steve

                Comment


                  Hey Kris, your LoadTexture2D_FromFileByExtension node isn't working correctly for me any more in 4.9, I'm getting a sort of hue shifted effect:

                  Click image for larger version

Name:	RIAK4bK.png
Views:	1
Size:	149.1 KB
ID:	1086930

                  How the colours should look:

                  Click image for larger version

Name:	G2k8WOa.png
Views:	1
Size:	233.1 KB
ID:	1086932

                  edit:
                  Changing
                  Texture = UTexture2D::CreateTransient(ImageWrapper->GetWidth(), ImageWrapper->GetHeight(), PF_B8G8R8A8);

                  to

                  Texture = UTexture2D::CreateTransient(ImageWrapper->GetWidth(), ImageWrapper->GetHeight(), PF_R8G8B8A8;

                  fixes it
                  Attached Files
                  Last edited by Mosel3y; 09-03-2015, 05:30 AM.

                  Comment


                    Error 1 error : declaration shadows a local variable [-Werror,-Wshadow] U:\Files\user\Documents\Unreal Projects\Random Mercurial Commit\Plugins\VictoryPlugin\Source\VictoryBPLibrary\Private\VictoryBPFunctionLibrary.cpp 2748 13 Random
                    Error 2 error : Failed to produce item: U:\Files\user\Documents\Unreal Projects\Random Mercurial Commit\Plugins\VictoryPlugin\Binaries\Linux\libRandom-VictoryBPLibrary.a U:\Files\user\Documents\Unreal Projects\Random Mercurial Commit\Intermediate\ProjectFiles\ERROR Random
                    Error 3 error MSB3073: The command "V:\UnrealEngine-4.8.3-release\Engine\Build\BatchFiles\Build.bat Random Linux Development "U:\Files\user\Documents\Unreal Projects\Random Mercurial Commit\Random.uproject"" exited with code -1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets 38 5 Random
                    MainFrameActions: Packaging (Linux): UnrealBuildTool: U:\Files\user\Documents\Unreal Projects\Random Mercurial Commit\Plugins\VictoryPlugin\Source\VictoryBPLibrary\Private\VictoryBPFunctionLibrary.cpp(2748,13) : error: declaration shadows a local variable [-Werror,-Wshadow]
                    MainFrameActions: Packaging (Linux): UnrealBuildTool: for (int32 Itr = 0; Itr < SocketNames.Num(); Itr++ )
                    MainFrameActions: Packaging (Linux): UnrealBuildTool: ^
                    MainFrameActions: Packaging (Linux): UnrealBuildTool: U:\Files\user\Documents\Unreal Projects\Random Mercurial Commit\Plugins\VictoryPlugin\Source\VictoryBPLibrary\Private\VictoryBPFunctionLibrary.cpp(2680,37) : note: previous declaration is here
                    MainFrameActions: Packaging (Linux): UnrealBuildTool: TObjectIterator<APlayerController> Itr;
                    MainFrameActions: Packaging (Linux): UnrealBuildTool: ^
                    MainFrameActions: Packaging (Linux): UnrealBuildTool: 1 error generated.
                    MainFrameActions: Packaging (Linux): UnrealBuildTool: -------- End Detailed Actions Stats -----------------------------------------------------------
                    MainFrameActions: Packaging (Linux): UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: U:\Files\user\Documents\Unreal Projects\Random Mercurial Commit\Plugins\VictoryPlugin\Binaries\Linux\libRandom-VictoryBPLibrary.a
                    MainFrameActions: Packaging (Linux): UnrealBuildTool: Total build time: 112.39 seconds
                    MainFrameActions: Packaging (Linux): CommandUtils.Run: Run: Took 112.626s to run UnrealBuildTool.exe, ExitCode=5
                    MainFrameActions: Packaging (Linux): ErrorReporter.Error: ERROR: AutomationTool error: Command failed (Result:5): V:\UnrealEngine-4.8.3-release\Engine\Binaries\DotNET\UnrealBuildTool.exe Random Linux Development "U:\Files\user\Documents\Unreal Projects\Random Mercurial Commit\Random.uproject
                    MainFrameActions: Packaging (Linux): " -noxge -NoHotReloadFromIDE -ignorejunk. See logfile for details: 'UnrealBuildTool.txt'
                    MainFrameActions: Packaging (Linux): BuildCommand.Execute: ERROR: BUILD FAILED

                    I have a problem with a linux build. I tried a version of the plugin from June and also a version from 08-26-15. The both had this error. Any ideas?

                    Thanks for your awesome plugin!

                    Edit: Fixed, see below
                    Last edited by Parvan; 09-04-2015, 01:12 AM.

                    Metahusk: A 501(c)(3) Creative Development Cooperative
                    Projects | Forums | Repositories | Nonprofit | Donate

                    Comment


                      Originally posted by Mosel3y View Post
                      Hey Kris, your LoadTexture2D_FromFileByExtension node isn't working correctly for me any more in 4.9, I'm getting a sort of hue shifted effect:
                      Changing
                      Texture = UTexture2D::CreateTransient(ImageWrapper->GetWidth(), ImageWrapper->GetHeight(), PF_B8G8R8A8);

                      to

                      Texture = UTexture2D::CreateTransient(ImageWrapper->GetWidth(), ImageWrapper->GetHeight(), PF_R8G8B8A8;

                      fixes it
                      Funny, that's what my version already has.
                      I must have updated it a while back without sending it to Rama.
                      My bad
                      Rule#21: Be polite, be professional, but have a plan to kill everyone you meet.

                      Comment


                        Originally posted by Stormwind View Post
                        Hi @Rama,

                        Thanks for the plugin!

                        I had to make a fix to get it building under Linux - the diff follows.

                        Have you considered putting your code on Github so people can send you pull requests for fixes/additions that you can easily decide to accept or not? If you are wlling, I offer to help set it up for you.

                        Code:
                        diff --git a/GameProject/Plugins/VictoryPlugin/Source/VictoryBPLibrary/Private/VictoryBPFunctionLibrary.cpp b/GameProject/Plugins/VictoryPlugin/Source/VictoryBPLibrary/Private/VictoryBPFunctionLibrary.cpp
                        index 014cab1..6fe8e0e 100644
                        --- a/GameProject/Plugins/VictoryPlugin/Source/VictoryBPLibrary/Private/VictoryBPFunctionLibrary.cpp
                        +++ b/GameProject/Plugins/VictoryPlugin/Source/VictoryBPLibrary/Private/VictoryBPFunctionLibrary.cpp
                        @@ -2711,13 +2711,13 @@ AActor* UVictoryBPFunctionLibrary::Traces__CharacterMeshTrace___ClosestSocket(
                        
                                //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                //Check All Bones Locations
                        -       for (int32 Itr = 0; Itr < SocketNames.Num(); Itr++ )
                        +       for (int32 SItr = 0; SItr < SocketNames.Num(); SItr++ )
                                {
                                        //Is this a Bone not a socket?
                        -               if(SocketNames[Itr].Type == EComponentSocketType::Bone) continue;
                        +               if(SocketNames[SItr].Type == EComponentSocketType::Bone) continue;
                                        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                        
                        -               CurLoc = AsCharacter->Mesh->GetSocketLocation(SocketNames[Itr].Name);
                        +               CurLoc = AsCharacter->Mesh->GetSocketLocation(SocketNames[SItr].Name);
                        
                                        //Dist
                                        CurDist = FVector::Dist(OutImpactPoint, CurLoc);
                        @@ -2725,7 +2725,7 @@ AActor* UVictoryBPFunctionLibrary::Traces__CharacterMeshTrace___ClosestSocket(
                                        //Min
                                        if (ClosestDistance < 0 || ClosestDistance >= CurDist)
                                        {
                        -                       ClosestVibe = Itr;
                        +                       ClosestVibe = SItr;
                                                ClosestDistance = CurDist;
                                        }
                                }
                        Now I need to see how to deal with the Dedicated Server build failing because VictoryBPLibrary depends on UElibPNG - the build error:

                        Code:
                        Building DescentServer...
                        Using clang version '3.5.0' (string), 3 (major), 5 (minor), 0 (patch)
                        Linux dedicated server is made to depend on UElibPNG. We want to avoid this, please correct module dependencies.
                        ERROR: Exception thrown while processing dependent modules of VictoryBPLibrary
                        Exception thrown while processing dependent modules of ImageWrapper
                        ERROR: Unable to instantiate instance of 'UElibPNG' object type from compiled assembly 'DescentServerModuleRules'.  Unreal Build Tool creates an instance of your module's 'Rules' object in order to find out about your module's requirements.  The CLR exception details may provide more information:  System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> ERROR: Linux dedicated server is made to depend on UElibPNG. We want to avoid this, please correct module dependencies.
                        Edit: I had to remove ImageWrapper as a dependency and ifdef out all code using it in the plugin to get DedicatedServer to build.

                        This fixed my problem as well. Thanks Stormwind!

                        Metahusk: A 501(c)(3) Creative Development Cooperative
                        Projects | Forums | Repositories | Nonprofit | Donate

                        Comment


                          I'm getting an error saying "VictoryPlugin could not be loaded because the module VictoryBPLibrary could not be found." I've looked in the plugin's Source folder and... well... it's right there. Not sure what the plugin is not seeing that I can.

                          Comment


                            Originally posted by Mosel3y View Post
                            Changing
                            Texture = UTexture2D::CreateTransient(ImageWrapper->GetWidth(), ImageWrapper->GetHeight(), PF_B8G8R8A8);

                            to

                            Texture = UTexture2D::CreateTransient(ImageWrapper->GetWidth(), ImageWrapper->GetHeight(), PF_R8G8B8A8;

                            fixes it
                            Dear Mosel3y,

                            I just checked and the current version of the function has this source code, which includes your fix, nice to hear from you!

                            This is the most recent Victory Plugin on mediafire and the wiki

                            Code:
                            UTexture2D* UVictoryBPFunctionLibrary::LoadTexture2D_FromFileByExtension(const FString& ImagePath, bool& IsValid, int32& OutWidth, int32& OutHeight)
                            {
                            	UTexture2D* Texture = nullptr;
                            	IsValid = false;
                            
                            	// To avoid log spam, make sure it exists before doing anything else.
                            	if (!FPlatformFileManager::Get().GetPlatformFile().FileExists(*ImagePath))
                            	{
                            		return nullptr;
                            	}
                            
                            	TArray<uint8> CompressedData;
                            	if (!FFileHelper::LoadFileToArray(CompressedData, *ImagePath))
                            	{
                            		return nullptr;
                            	}
                            	
                            	IImageWrapperPtr ImageWrapper = GetImageWrapperByExtention(ImagePath);
                            
                            	if (ImageWrapper.IsValid() && ImageWrapper->SetCompressed(CompressedData.GetData(), CompressedData.Num()))
                            	{ 
                            		const TArray<uint8>* UncompressedRGBA = nullptr;
                            		
                            		if (ImageWrapper->GetRaw(ERGBFormat::RGBA, 8, UncompressedRGBA))
                            		{
                            			Texture = UTexture2D::CreateTransient(ImageWrapper->GetWidth(), ImageWrapper->GetHeight(), PF_R8G8B8A8);
                            			
                            			if (Texture != nullptr)
                            			{
                            				IsValid = true;
                            				
                            				OutWidth = ImageWrapper->GetWidth();
                            				OutHeight = ImageWrapper->GetHeight();
                            
                            				void* TextureData = Texture->PlatformData->Mips[0].BulkData.Lock(LOCK_READ_WRITE);
                            				FMemory::Memcpy(TextureData, UncompressedRGBA->GetData(), UncompressedRGBA->Num());
                            				Texture->PlatformData->Mips[0].BulkData.Unlock();
                            				Texture->UpdateResource();
                            			}
                            		}
                            	}
                            
                            	return Texture;
                            }


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

                            ♥ Rama

                            Comment


                              Originally posted by Parvan View Post
                              Thanks for your awesome plugin!

                              Edit: Fixed, see below
                              You're welcome, and I am glad Stormwind's Linux packaging fix worked for you!



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

                              ♥ Rama

                              Comment


                                Yes, sorry about that guys, I've just realized I'd coppied in an older version that I had broken myself, not the latest

                                Comment

                                Working...
                                X