lets say that I want to have object rarity in my game. You know, for example you have Shotgun, and it can be in common rarity, uncommon, rare, epic etc… and the rarity will modify object stats, better the rarity, better the stats. For example damage, reload speed and so on. So far I have figured two possible ways to do it:
- First idea - lets talk about the shotgun. I can simply create one shotgun object for each rarity. One will be Common Shotgun, next one Uncommon Shogun etc each one with different stats according to its rarity. As far as this one looks like simple method for me, I dont like that idea, because If I have 5 rarity levels in my game, it will be 5 different objects for each kind. 5 objects for shotgun, smg, armor etc … and that do not sound very effective to me. Also sounds like alot of unnecessary work.
- Second idea - probably the better one. Simply one shotgun object, and then rarity will be applied on it and its stats will be modified and then saved. For example: rare rarity - damage x1.3, reload speed x0.8 etc. Sounds alot more effective to me, but Im not sure how to do it.
So is there anyone who can tell me some tips on how to do it? Some ideas? If I will pick the second idea, I need this: player will for example finnish game level or open a chest with loot, game will roll the loot he will receive, and then roll the quality. So if in the end, he receives a pistol and rarity epic, I need to somehow apply the epic stats modifier on that basic pistol, probably change its name, so its not a pistol, but Epic Pistol (or something like that so that player can tell it apart from other pistols in inventory), and then save the result in player inventory, so player can equip that Epic Pistol in customization menu.
Or if there is even better way of implementing this game mechanic, Im open to learn how to do it.
Thanks for any help