Random engine parts missingSolved

Just started using the plugin and on checking the spawned vehicles some have engine parts missing rendering them undrivable. Maybe a spark plug or valve. Generally where 2 items are required by a particular category.

My config

{
  "EngineParts": {
    "Tier1Chance": 90,
    "Tier2Chance": 10,
    "Tier3Chance": 0,
    "MinConditionPercent": 100.0,
    "MaxConditionPercent": 100.0
  },
  "MinFuelAmount": 30,
  "MaxFuelAmount": 50,
  "MinHealthPercent": 15.0,
  "MaxHealthPercent": 50.0,
  "ModulePresets": {
    "2Sockets": {
      "UseVanillaPresets": true,
      "CustomPresets": []
    },
    "3Sockets": {
      "UseVanillaPresets": true,
      "CustomPresets": []
    },
    "4Sockets": {
      "UseVanillaPresets": true,
      "CustomPresets": []
    }
  }
}

Thanks for posting the config. The reason is that the chances are not applied how you think. It applies a 10% roll to get a tier 2 part, then a 90% roll to get a tier 1 part if the tier 2 part roll failed. This does not mean there is a 100% chance. I believe what you want is to set tier 1 chance to 100%.

The docs state the following.

  • Tier*Chance (0 - 100) -- These three options control the chance that an engine part slot will be filled with a part of the corresponding quality. For example, setting Tier1Chance to 100 will guarantee that each engine part slot is filled with at least a low quality engine part. Additionally setting Tier2Chance to 50 would grant a 50% chance that each slot will receive a medium quality part instead of a low quality part. Each tier gets a separate roll, so the total part chance is multiplicative with dimishing returns. Formula: OverallChance = 100 - 100 * (1 - 0.01 * T3) * (1 - 0.01 * T2) * (1 - 0.01 * T1).

According to this, your settings only grant a 91% chance for an engine part in each slot.

LOL you may as well be talking chinese... but ive now set "Tier1Chance": 100, lets see how it rolls ..thanks fella ....

Merged post

100 % Resolved thanks you Sir

Locked automatically