Ships must be within Wormhole_radius lightyears from the endpoint's center to enter a wormhole.

Wormhole travel imposes some stress on the wormhole. The higher the stress, the higher the chance of a travel failure.

Wormhole_stress =
   0                 ...if Ship_mass < Wormhole_mass
   ((Ship_mass / Wormhole_mass) - 1)^2
                     ...otherwise

Travel_failure_odds =
   Wormhole_stress + Wormhole_instability
     + (Wormhole_stress*Wormhole_instability / 10)

Travel_failure_figure =
   Random(100)

Travel_fuel_usage =
   Fuel_usage(Equiv_distance, WrmTravelWarpSpeed)
   ...where Equiv_distance = Wormhole_distance / WrmTravelDistDivisor

► Note: Note that PHost up to version 4.0j/3.4l truncates the Travel_failure_odds value to an integral number. Later versions use the exact value.

Possible outcomes of wormhole travel:

Travel_fuel_usage > Fuel
   Travel fails:
      New_ship_X   = 1000 + Random(2001)
      New_ship_Y   = 1000 + Random(2001)
      Damage_taken = 25 + Random(75)
Travel_fuel_usage ≤ Fuel and Travel_failure_figure ≥ Travel_failure_odds
   Safe travel:
      New_ship_X   = Endpoint_X - 10 + Random(21)
      New_ship_Y   = Endpoint_Y - 10 + Random(21)
      Damage_taken = 0
Travel_fuel_usage ≤ Fuel and Travel_failure_figure < Travel_failure_odds
   Successful travel with damage taken:
      New_ship_X   = Endpoint_X - 10 + Random(21)
      New_ship_Y   = Endpoint_Y - 10 + Random(21)
      Damage_taken = (Travel_failure_odds - Travel_failure_figure) ^ 2

The wormhole instability provides a rating for the safety of this wormhole. It is summarized and reported to players using the following levels:

Wormhole_stability_rating =
   "very stable"     ...if Wormhole_instability ≤ 5
   "stable"          ...if Wormhole_instability ≤ 15
   "mostly stable"   ...if Wormhole_instability ≤ 30
   "unstable"        ...if Wormhole_instability ≤ 50
   "very unstable"   ...if Wormhole_instability ≤ 80
   "completely unstable"
                     ...otherwise