[quote=“Kevin Granade, post:43, topic:5477”]I think I covered customization in my use case one, a system where every gun is defined by being a collection of individual parts that each contribute to its performance. if that’s not what you mean, I’m all ears.
by the way, I don’t think clutter would be an issue, by the simple expident of not having the individual parts spawn on their own, at least not with any frequency. that way people who don’t disassemble guns would never see them, and people who do disassemble guns would be swimming in them.
what I DO have a problem with is making individual gun definitions even more complicated. they’re already the most complex items in the game, and you’re proposing making them much more so for little functional gain.[/quote]Er, no, actually there is no further complication in their definitions. They keep exactly as they are now, the only thing that changes is that they get a disassembly recipe embedded - which all items will, if we go that route. Their re-assembly recipes can be autogenerated from the disassembly ones as well. The gun definitions themselves will remain normal, what will be added is the system wherein crafting a weapon out of parts will produce different weapons based on parts used and the skill of the user.
That’s the hardest thing to get right here, given the template parts - the system needs to know the baseline stats for items that it uses, which are derived from items that the parts are used in - i.e. an “AK47 receiver” should have stats that, combined with the other parts that go into an AK47, would produce something like an AK47 performance-wise. This could probably involve pulling information from the weapon itself, as well as the item definitions for the other components the weapon disassembles into - essentially using the “custom weapon” system in reverse. That would only need to be done once for every weapon being disassembled though, as only the receiver is truly dependent on the weapon. The other parts have their own stats, only with flags attached for material or caliber.
I.e. what I mean is: to get the stats for the receiver, the system would take the stats for the weapon, and then gradually “strip” it of non-receiver parts, subtracting stats for every part removed according to the custom weapon crafting system, until only the receiver is left.
Though I guess that means I have to amend my earlier statement - the guns will probably need something to specify what item is “left” after the gun’s disassembled ,since the receiver won’t always be called the same as the gun (i.e. the M16 having an AR15 receiver). This could probably be handled by using some kind of flag variable in the embedded disassembly recipe, or adding a line in the weapon’s .json along the lines of
“primary_part” : “template_receiver_rifle”,
, so that the system knows to embed the weapon’s stats in the templated receiver part upon disassembly.