Best way to implement perks?

For my game, I want to have a perk system which players can pick from. However, thinking about it, I’m not sure what the best way to implement this is. Say a player has a list of perks {“Health”, “Speed”, “Damage”}. When the player load in to the match, Health and Speed could be easily implemented by increasing it in their humanoid. But what about damage? How will I make each tool have more damage? I don’t want to have to manually script it into each tool each time, and I don’t want to have to modify each tool each time I add a new perk. I don’t want to use things like values either, as I’d have to have each tool check for relative values too.

Please help me with this issue. Thank you.

You should make an int value in the player and have the tool use that value for the damage.

Well I know I could do that. But what if I want something like both a damage boost and a damage multiplier? What if I want a fraction of a multiplier? I already said I don’t want to have to add a value each time I want a new perk.

Personally, if I were to have something like this in my game I would feed it straight through into the actual weapons module or script in your case. However, if you don’t have immediate access to the wonders of a good framework and modules, you can make a getDamage function which returns the weapons normal damage, multiplied by enemy armour decrease, increased damage, etc.

You could loop through each perk within the table and return an overall damage multiplier, and simply times that by the weapons base damage.

Hmm although a getDamage function isn’t what I’m looking for, I guess I could make a module to calculate the specific stat through the perk “filter” into it’s new value.