lngk
New vMember
Posts: 5
|
Post by lngk on Apr 12, 2021 19:03:38 GMT
Hi all!
New to the forums so if this has been discussed before, I apologize... I did a cursory search but couldn’t find anything.
Has anyone tackled allowing the player to modify and upgrade weapons? I’m doing a top-down shooter and want the player to be able to mod weapons with attachments, and also upgrade them (increase damage for instance). From what I can tell the inventory creates a clone of the item from the master item list, so unless I’m mistaken, any system that modifies the “stats” of the weapon would update the master item and change it for any spawned loot instances going forward... correct? The same for adding weapon attachments.
Is there a clever way around this, built-in or otherwise? I thought about having two “sets” of guns - one set for enemies to use and the other for the player to loot/use - but I don’t think that would address the issue due to the potential of having multiple of the same item but needing different stats, plus that they’re clones so you would still have to update the master item (I assume).
Any thoughts or advice would be appreciated. Thank you!
|
|
|
Post by kingceryn on Apr 15, 2021 2:32:42 GMT
Hey there! I'm actually finalizing something similiar to this,
and unfortunately right now it means having a TON of variant items and prefabs. I.E. craftable upgrades, and "enchantable" weapons. I've tried doing a lot of custom code work to make this easier, like assigning "styles" to an integer value, and using that to basically "swap" the prefab when it spawns, but thats super awkward and prone to all sorts of errors. Best way is unfortunately the long way lol, just a bunch of custom items and prefabs for lots of variations.
|
|
lngk
New vMember
Posts: 5
|
Post by lngk on Apr 16, 2021 21:32:51 GMT
Hey there! I'm actually finalizing something similiar to this, and unfortunately right now it means having a TON of variant items and prefabs. I.E. craftable upgrades, and "enchantable" weapons. I've tried doing a lot of custom code work to make this easier, like assigning "styles" to an integer value, and using that to basically "swap" the prefab when it spawns, but thats super awkward and prone to all sorts of errors. Best way is unfortunately the long way lol, just a bunch of custom items and prefabs for lots of variations. That's what I was afraid of... with around 15 or so different guns, and then a craftable "scrap" variant for each, having a different item for each variation combination of upgraded stat and mod would be an absolute beating lol. And then there's the melee weapons...
|
|
|
Post by kingceryn on Apr 18, 2021 4:07:31 GMT
Hey there! I'm actually finalizing something similiar to this, and unfortunately right now it means having a TON of variant items and prefabs. I.E. craftable upgrades, and "enchantable" weapons. I've tried doing a lot of custom code work to make this easier, like assigning "styles" to an integer value, and using that to basically "swap" the prefab when it spawns, but thats super awkward and prone to all sorts of errors. Best way is unfortunately the long way lol, just a bunch of custom items and prefabs for lots of variations. That's what I was afraid of... with around 15 or so different guns, and then a craftable "scrap" variant for each, having a different item for each variation combination of upgraded stat and mod would be an absolute beating lol. And then there's the melee weapons... Excel spreadsheets is super helpful lol. Just gotta stay organized!
|
|
lngk
New vMember
Posts: 5
|
Post by lngk on Apr 19, 2021 5:21:19 GMT
Lol! That was exactly my first thought. Just a big spreadsheet detailing the different item IDs and info for each. Appreciate the suggestions!
|
|