Same problem as Holty007
Announcement
Collapse
No announcement yet.
(39) Rama's Extra Blueprint Nodes for You as a Plugin, No C++ Required!
Collapse
X
-
Originally posted by Rama View PostGet Your IP Address From Witin UE4
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!
[ATTACH=CONFIG]19413[/ATTACH]
~~~
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
I really need it, but I will not C++.
Comment
-
Hi Rama, I was wondering if there was a solution within this plugin for my issue. I need to be able to convert from FUniqueNetIdRepl to string and then from string back to FUniqueNetIdRepl inside of Blueprints. Is this possible? Maybe there's a node for this that I'm not aware of.
Thank you and thanks for everything you make
EDIT: hey nvm, looks like I figured out a solution.Last edited by pzea; 09-20-2018, 01:31 AM.
Comment
-
Originally posted by Rama View PostNew Node: 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!
Enjoy!
Rama
PS: Make sure to include the file extension when you use this node!
[ATTACH=CONFIG]23283[/ATTACH]
[ATTACH=CONFIG]23284[/ATTACH]
~~~
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
Im not able to load any textures beside only some PNGs. For example rendertargets captured as JPG and JPEG cant be loaded for some reason
Attributes of the JPEGS and JPGS are N, while the PNG has A, if that matters.
Is valid is returned as True
Pixel ratio on height and width is returned as 0
return value is empty
file extension included
Worked: 1 PNG straight from unreal worked, JPG and JPEG not working.
Is there a solution for this?Last edited by milkman penta; 10-24-2018, 02:02 PM.
Comment
-
Originally posted by Hermyth View PostHi, its a great plugin.
The "load texture 2d from file by extension" is work on android too?
Works great on windows, but i don't know how add file path on android.
Thanks
♥
RamaUE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin
♥ Rama
- 1 like
Comment
-
Originally posted by Modeus Games View PostWhere do go for Rama Save Game marketplace plugin support?
https://www.unrealengine.com/marketp...ma-save-system
RamaUE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin
♥ Rama
Comment
-
Originally posted by Alunnite View PostFor 4.20.1 where should all the files by placed. I'm not too familiar with anything outside of the editor. Should everything go into the "Plugins" folder? Does "Build" in the "Intermediate" just go into the project's Intermediate folder? Where should the Binaries, resources, Source, and VictoryBPLibaray.uplugin go?
♥
RamaUE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin
♥ Rama
Comment
-
Originally posted by Humberto View PostRama, can you put a BP for "get project version"? 0:
RamaUE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin
♥ Rama
Comment
-
Originally posted by preston_sony View PostHi Rama,
the first post in this thread (top of page 1) lists "4.19 Build" (in bold text) as the latest, but then links to a download for 4.20. You should update your text "4.19 Build" to say "4.20 Build".
Fixed!
♥
Rama
UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin
♥ Rama
Comment
-
Hey, thanks for this super useful plugin Rama. I got a question about packaging the project. I'm trying to package a win64 development build. But I keep getting errors.
I've tried hard to solve this by reading the forum, and to some success. I seem to have figured out that I needed to put the plugin folders inside the respective folder in the UE_4.20 engine folder instead of having it inside the project folder itself. Hope that is correct. But after getting rid of those errors I seem to be hitting a wall when trying to package.
This is the error that got me perplexed:
ERROR: Unable to determine module type for F:\Program Files\Epic Games\UE_4.20\Engine\Source\VictoryBPLibrary\VictoryBPLibrary.Build.cs
UATHelper: Packaging (Windows (64-bit)): (referenced via DTH.uproject -> VictoryBPLibrary.uplugin)
I attached the full output log in the post.
Would greatly appreciate any assistance on this.
P.S. It's a UE 4.20.3 blueprint project and I'm only using the node "Victory load texture 2D from file" if that is of any importance.
Thanks!
UPDATE: I was able to solve this issue by packaging the project as a "shipping build" instead of a "development build". Hope this can be of help for someone else!Attached FilesLast edited by lalleba; 11-06-2018, 06:22 PM.
Comment
Comment