Custom Item Usage Replication

Hi everyone,

So right now for our project I’m in the midst of finishing up an inventory system. Right now I’m working on implementing the ability to use items. To get a general framework down, and to keep things relatively simple, I’m working on a MedKit item.

My problem right now is figuring out how to balance out communication between the Client and the Server. I want the client to handle most of the items usage (such as animations and viewmodels), which is fine, but I’m stuck on how I want the server to handle the replication aspects (healing the character.) I don’t think I want one giant script for all the items, because that would be messy with the potential hundreds of items we might eventually have, but I also don’t want a script for each individual item either.

Does anyone have any helpful tips on how I might go about organizing this?

ModuleScripts. Divide and conquer. You don’t want a giant script but you don’t want individual scripts either. Use ModuleScripts then. Make one for each type of effect and make sure they’re capable of accepting arbitrary data to configure the effect against the player, then apply accordingly with an equipped item. A handler can determine the configuration values to be passed along.

Yep. I’ve decided I’m going to figure out how to implement classes that handle item commonalities with sub classes for item specifics.

Just wanted some verification that this was the right way to go. Thanks!