Create statistique system

I started to learn Ue4 recently and i dont speak english very well, so all guide i saw was simple.
I started to create experimental project to test and understand how communication between blueprint work.
Well i try to create a system like diablo 1 and after saw lot of people develop with blueprint i have few questions.
First one is, what is the blueprint i use to create all function to calculate the variable(stat of the character):
in a Bp actor, character or game info instance? I saw different people use the one of them but they didn’t explain why one and not other.
I started by doing like they all did, create an enumeration and a structure. But after i don’t what is better to stock the calculations.
After this i have an other questions, i saw lot of blueprint interface, but i don’t how to use them efficiently.
I have the impression i can just create a custom event + cast to and it’s the same effect no? Maybe i miss an important subtlety?
I hope i was understandable and thank you for your help.

Hi Motherwill,

The two main reasons, you see a large variety of methods in tutorials is:

  1. You can do it any way you want

  2. They don’t know what they’re doing.

There are some very highly watched tutorials on YouTube, which are basically wrong.

So, having said all that, you can do it any way you see fit. If you are dealing with player stats, then inside the player is probably a good idea. You’ll know if you adopt the wrong approach, because the programming won’t work out. You won’t have access to the variables you want or there will be a lot of casting etc.

On the matter of BP interfaces, you might well ask, ‘why not use custom events’? Well…

The main point of BPIs, is that they are called on an ACTOR, not a specific type of blueprint. So, you’re not making any assumptions about what KIND of thing you’re talking to.

This has a lot of benefits. Two main ones being:

  1. Decoupling. I’m not going to try and describe the whole thing here, but basically take a look in the reference viewer at some of your variable and actor types. Everything will be connected to everything else. In other words, everything ‘knows’ about everything else. That’s not a good thing. I had a project ( released as an actual game ) that was crashing all the time. Eventually I traced it down to a massive loop running through the blueprint definitions.

  2. No casting. Sooner or later, you’ll get sick of casting. With BPIs, you don’t have to cast, because you don’t care what kind of object you’re talking to. The object MIGHT understand the call, and it might not, but that doesn’t matter.

I hope this answers some of your questions.