its just simple as this when the formula is mass times gravity times height. Distance is the height the more height the more potential energy. If you change the gravity the potential energy will change. The more mass more potential energy. Hope this helps