Download

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

That’s a neat idea!

But what specific issue are you having with the current random generator?

Also, if you give me the whole code,** tested in the current version of my Victory BP Library**, then I can review it and add it to Victory Master Branch (hee hee!)

Great to hear from you SaxonRah!

Rama

Monte Carlo, personally. but also it seems that anytime i see someone use rand() they almost always use the modulo operator on it, which does horrible horrible things. since rand generates from 0 to RAND_MAX and all it need to be is in-between them, rand()'s quality is never check, ie it can always return the same number, which conforms to rand()'s implementation. The quality of rand’s distribution is so poorly implemented that low order bits cycle in very short amounts. Also rand() in general is a terrible psudo-random number generator because if its seed is know, prediction is inevitable…

When people use rand() most of the time it’s psudo-ness is fine in most applications, but in games, if we don’t want a loaded dice roll we must use something other than rand().

I’ll get working on the integration Rama!

hehe, good to see you aswell!

As soon as it is ready and tested in packaged game as not having any weird dependencies that prevent packaging, I will be happy to add it to Victory Master Branch and give you credit !

:slight_smile:

Rama

yeah for Rama and his RSUMG! :slight_smile:

Let’s see if anyone can guess what the S stands for :wink:

Rama

Rama Sutra? :slight_smile:

Hee hee, close!

To give a better hint,

RUMG, the R stands for “Rama’s”

UMG is just UMG

so

the S is the only part left to figure out :slight_smile:

Rama

Hey Rama! Awesome plugin! I’ve been using it in my project and it has so much extra nodes that are incredibly helpful! Thanks for that! I’ve run into a bit of a problem though, when I try to package the game for testing on multiple computers I get this error message:
1b5ae56d0cffa9917cfa515cbc113b917959b96f.png

I’m guessing I need to put the plugin somewhere in the packaged game folders, I’ve tried putting it in Projectname/Plugins as well as Engine/Plugins, but still that error message appears so I figured I would ask!

Are you using the current available plugin ? ( Newest ). Are you using UE4.6 and not an older version ? This is supposed to be in :
ProjectName\Plugins
This is a path for one of the files :
ProjectName\Plugins\VictoryPlugin\Source\VictoryBPLibrary\Classes\VictoryBPFunctionLibrary.h
Check if you are not missing anything in that path.

New Node Contributed by Sahkan!

In the most recent version of my Victory BP Library Plugin is a node contributed by Sahkan!

This node lets you switch the player HUD during runtime!

Thanks Sahkan!

Rama

2a371719c9b9ad758d0e522a026e7a55ab9a8bd5.jpeg

Thats easy, the S stands for Super. :smiley:

-Zhi

Hee ehee!

Actually it stand for Sexy!

Rama’s Sexy UMG!

Hee hee!

But I like super too

Maybe RSSUMG ?

:slight_smile:

Rama

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


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

2902549c08d489d31bb43f8a7049793370d4801e.jpeg


**C++ Source Code For You**

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



```


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

You sir, are a god of men.

![eiMyGaRinSmall.png|300x302](upload://6MxFrWe1wueWWksLOWXxNEfCeaO.png)

So I’ve fleshed out two different paths for the new rand functions, basically you don’t have to do anything but either use the construct rand ONCE like in begin play somewhere, or seed rand somewhere like construct rand and use the functions, if you use construct rand, it will determine if you have access to a random device, (entropy chip) if not it will default to a default random engine, it will use this number from either the random device or use “std::chrono::system_clock::now().time_since_epoch().count();” to seed a pseudo random number generator then you can use the random functions i’ve included. You can also construct rand for some generations, then seed with others, it’s pretty awesome! im working on a ton of other engines and distributions exposed but for now there is; rand bool - Bernoulli distribution, rand int uniform 0-1 distribution, rand double uniform 0-1 distribution, rand int - min to max uniform distribution, rand double - min to max uniform distribution, but first i was just wondering, what kind of packaging testing i should do, atm i only have access to the windows 32 path. I packaged it into shipping and it seems to work. Anyone up for some testing on other systems ? Currently the only dependencies are <random> and <chrono> which are both c++ 11 headers

p.s. the picture has an error (not error, but random float has the min and max variables as ints and i guess they should be floats not ints.)

Yeah, I’ve tried both 4.5 and 4.6 using the appropriate plugin, still doesn’t work… And just to be sure we’re on the same page, the plugin itself works just fine, it’s just that when I build the game and try to run the built game I get this error, have you been able to build a game with a plugin? Anything else I need doing for it to work? My project is blueprint only, maybe I need to have a code project?

My project is blueprint only, maybe I need to have a code project?

Yes you do need code based project for now, this issue of plugins not working for BP-only projects is going to be resolved soon by Epic.

This is great Saxon Rah!

If you send me the code or send me my latest plugin version with your code integrated I can add it to Victory Master Branch

:slight_smile:

Rama

Hee Hee!

Have fun with your Get My IP node!

:heart:

Rama