Disassembly - recovered components exchanging values on generation

Issue #633 new
Former user created an issue

Game version 1.5.2 Probably a result of faulty code in Item_parts.script Save file attached.

As shown in attached screenshots:

Leather jacket has three components - Cloth Sheets at 1% (really 0%) - Cloth Sheets (synthetic) at 81% - Durable Textiles at 1% (really 0%)

When disassembled, if only Cloth Sheets (synthetic) is recovered, it is generated at 81%. Same if Cloth Sheets and Cloth Sheets (synthetic) is recovered (where cloth sheets is recovered at 0%). But this latter situation is only correct by circumstance, because Cloth Sheets (synthetic) happens to be sorted after Cloth Sheets in the inventory.

But if Durable Textiles is recovered along with Cloth Sheets (synthetic) (doesn't matter in this case if Cloth Sheets is recovered), the 81% transfers to Durable Textiles, generating Cloth Sheets (synthetic) at 0%.

If, instead of Cloth Sheets (synthetic), the first one Cloth Sheets was at 81% and the other two at 1%, then if either Cloth Sheets (synthetic) or Durable Textiles generate, it would take the 81%, with Durable Textiles taking priority over Cloth Sheets (synthetic) because it is last in the inventory list. In this case, you could only get the correct component if none of the other components are generated.

Furthermore, the current code in this script generates unreasonable results anyway. Parts should be recovered based on the part condition + the base % (40 is default). As it is, the part condition makes no difference. Because the code checks per part, but based on the entire item condition + the base %. That's not reasonable. You could have two 100% parts and a 0% and get the zero and neither of the 100s because they're all equally weighted by the code since individual part condition is ignored and they all use the same value: the overall item condition.

Comments (0)

  1. Log in to comment