Design advice spaceship object/container BP

Hi all, looking for some advice on the best/right way to go about this. Apologies in advance for possibly using the wrong terminology to describe what I’m doing/looking for.

Right now, with my Character BP having all the movement settings, weapon settings, a spaceship mesh, etc,. I’m forced to configure directly, variables and settings that should be decided by the ‘model’ of spaceship the player is flying.

What I’d like to do is have a variable on the CharacterBP that represents the equipped spaceship and applies things like the skeletal mesh, speed, rotation speed, etc,. to the CharacterBP based on it.

How would you handle it?

  1. A SpaceshipBP where all of the characteristics of a particular ship are directly configurable in the class creating child BPs for each unique spaceship model?

  2. A SpaceshipBP where particular ship characteristics are loaded as needed in the form of a ‘config file’ (Struct?) to generate the spaceship object as needed? -I’m partial to something like this where I can use an excel like file (or something easily edited/created outside UE), with potentially dozens of ships to build being able to easily create large variable sets would be huge.

  3. Just Make child BPs from the CharacterBP for each ship type?

  4. Something else?

A few considerations:

  • Ships will have user configurable equipment slots.

  • Spaceships objects created/equipped to player character should be treated as unique containers (containing equipped components) so they can function like an equipped weapon in an FPS.

  • A specific instance of a spaceship object should be configured/generated based on these data sets: hull characteritics (weapon slots, top speed, mass, etc.,), default equipment slot contents, currently equipped equipment slot contents (if any).

Appreciate any advice!

Thanks for reading.

Not sure the CMC is a good look for spaceships. It has no real physics for starters. If the game ever becomes multiplayer, you will fight the CMC in so many different ways from Collision to Rollback. For simpler games its acceptable. :wink: As for the rest… DataTables can help with different ship specs (structs are optional). Child BP’s allow inheriting abilities from parent ships.

I’m not using the CMC for spaceship movement.

The code is all in a CharacterBP with spaceship mesh???

So how are you doing movement? The CharacterBP class that has all the spaceship code is Character class? If not what does it inherit from? The CMC is automatically inherited from any class that inherits from Character. So, even if the way the movement is applied is different (interpolated or physics), there may be side-affects of inheriting / having the CMC around. :wink:

I’ve got a custom class that inherits from character. The CMC is turned off when the character isn’t on foot and a different movement component is turned on for space travel.

My movement is working exactly how I want it, maybe that will break later and if it does I’ll deal with it then.

These questions are specific to understanding the best way to store and reference vehicle details as an equipable object.