Best way to create classes

This is going to be more of a procedure-based question: how would you go about creating different abilities/classes, and then applying them to different players, without having a huge mess on your hands?

Example: 10 classes that have different abilities. How do you organize all of that?

  • One approach could be to have child
    blueprints for each class that
    augments the base
    character blueprint, then apply these
    on begin play based on assigned actor
    tags.
  • Another is to downright copy the base blueprint for the characters into 10 copies, modify each to suit the classes, and then organize the possessions based on a previous choice.

I’ve seen some interesting ideas in older threads, but I’m really curious if there’s any other or newer, clever solutions out there.

You could use a component based approach instead of inheritance or both.

First option is the best, 2nd wont give you ability to create common code for all them increasing work by 10x. Doing components won’t help here because you end up creating 10 actors with different component and it needlessly complicate communication between objects

As for abilitied, i classes (i assuming by “class” you mean class of character that player can have) share them you will need to do ability system, you make base ability class and then base character would have array of abilities. Ue4 got some ready gameplay ability system but i never explored it

Even if classes don’t share abilities you may want to make/use such system if you plan to do some more complex ability system

if abilities are equipments I would create them as different actors and let them do their own functionalities and I would spawn them and attach them to my character instead of using child actor components.

if abilities are things in my character’s DNA :slight_smile: it would be better for my character to be born with them so his children can inherit those abilities and also have their own abilities.

Sounds like you want to create a hotbar and a bunch of ability functions then, just create logic to fill the hotbar with specific abilities depending on the class.
I can help if you need: [Cheap Flat Rate] Need to program your Ability features? (Spells/Skills) We got you covered. - Looking For Work? - Unreal Engine Forums