Let Ship_dist be the distance between the scanning ship and the center of the wormhole entry point (the X,Y from wormhole.txt).
Deterministic Scanning: A ship sees all wormholes for which Ship_dist <= WrmScanRange. A ship with the ScansAllWormholes function sees all wormholes for which Ship_dist <= 2 * WrmScanRange. These rules are only applied if WrmScanRange is not 0.
Probabilistic Scanning: The chance to see a wormhole depends on its mass.
Detection_radius = 10 * Wormhole_mass ^ (1/3) Detection_chance = 100% ...if Ship_dist ≤ Detection_radius (4 - (Ship_dist/Detection_radius)^2) * 33.3% ...if Detection_radius < Ship_dist ≤ 2*Detection_radius 0% ...if Ship_dist > 2*Detection_radius
For every wormhole, a dice is rolled.
- Ships with the ScansAllWormholes function will see all wormholes found this way.
- Other ships see only the closest wormhole found this way (which need not really be the closest wormhole; there might be one which is closer but which was not seen by chance).