Going again through the code, I see the number of chunks is less than I previous stated. If the
fragment_chance
is true for a ship, the ship first generates fragments with role "wreckage" with the number of n_alloys. This wreckage is only short living (< 1.25 seconds) and has the size of the ship itself. This "wreckage uses up the alloys, so when the "wreckage" is generated, the n_alloys variable is lowered according:
Code: Select all
n_alloys = ranrot_rand() % n_alloys;
As a test I exploded some traders, while logging the n_alloys variable based on mass and the value that Oolite is actually trying to add.
Code: Select all
20:23:08.614 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 2 original.
20:23:08.659 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:23:20.563 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 2 original.
20:23:32.319 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:23:40.413 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:23:49.274 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:24:00.457 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 2 original.
20:24:00.457 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 0. dropping 1, metal platings of 1 original.
20:24:00.497 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:24:21.938 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:24:52.568 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:24:59.346 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:25:19.129 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:25:28.760 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:25:36.623 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:25:45.922 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:25:45.923 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 0. dropping 1, metal platings of 1 original.
20:26:17.979 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:26:20.081 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:26:26.676 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:26:53.825 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 2 original.
20:27:18.847 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:27:21.856 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:27:27.244 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:28:30.860 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 0. dropping 1, metal platings of 1 original.
20:28:31.605 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:28:42.885 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:28:53.151 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:29:05.061 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:29:05.065 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:29:14.249 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 2 original.
20:29:17.216 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:29:31.494 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:29:42.491 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:29:42.794 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:29:55.413 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 1, metal platings of 2 original.
20:30:15.354 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:30:32.194 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:30:41.458 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:30:51.129 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:31:05.806 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:31:06.585 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
20:31:15.863 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 1, metal platings of 9 original.
20:31:18.219 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 0. dropping 1, metal platings of 1 original.
20:31:29.122 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 1, metal platings of 2 original.
20:31:54.149 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 0. dropping 1, metal platings of 1 original.
20:32:07.942 [ship.metalplating] ShipEntity.m:8569: fragment_chance: 1. dropping 0, metal platings of 1 original.
It smells like the seed is reset to the same value every time this part of the code is entered.