Hey all,
Developing a big RPG style inventory system. Currently it’s organized with class hierarchy:
Inventory (contains items, hotbar for quickselect, etc)
Item
->Weapon
->MeleeWeapon
->RangedWeapon
->Pistol
->Shotgun
etc…
So here’s what’s on my mind-grapes:
If a weapon can be upgraded (ex. purchase silencer for Beretta 9mm) through purchase of upgrades, and also ‘upgraded’ through player skill trees (ex. ‘+10% accuracy with pistols’), I was thinking that it might be best, on creation of the item, to poll the player for their skills and adjust the attributes accordingly and then to have an instance reference of a ‘WeaponUpgrade’ class which holds the internal (and importantly, specific to that instance of that weapon) upgrades, also adjusting the attributes.
Thoughts on this design implementation?