For a Gear System, should I use Actors or Components?

anonymous_user_c4a7aed6
Sun, 28 Feb 2021 23:43:31 +0000
Editor Scripting

For a gear system similar to World of Warcraft or other rpgs, what would be the best practice for actually equipping an item and updating player’s stats/appearance? Right now I see two possible paths being updating pre-existing components/variables on the player vs spawning and attaching an actor to the player.

For the first method I feel like I would just pull from a data table and update a pre-existing static mesh on the player character and add/subtract things like health/armor/damage done? But then it seems difficult to add any special effects a piece of gear might have, and I also feel that might be putting too much functionality into one actor. Alternatively would it be better to just spawn an actor that is a child of some base class, attach it to the player and let it change the player’s stats, (spawning “Iron Mask” from “Helmet” class for example) and if did this would there be a point to storing anything but the class of the item as all the stats would be stored in class defaults?

I see a few pros an cons with each but am conflicted on what would be best, especially in terms of performance, iteration, and flexibility.

Any help is appreciated!

1 post - 1 participant