  This paper derives an upper limit on the density $\rho_{\scriptstyle\Lambda}$
of dark energy based on the requirement that cosmological structure forms
before being frozen out by the eventual acceleration of the universe. By
allowing for variations in both the cosmological parameters and the strength of
gravity, the resulting constraint is a generalization of previous limits. The
specific parameters under consideration include the amplitude $Q$ of the
primordial density fluctuations, the Planck mass $M_{\rm pl}$, the
baryon-to-photon ratio $\eta$, and the density ratio $\Omega_M/\Omega_b$. In
addition to structure formation, we use considerations from stellar structure
and Big Bang Nucleosynthesis (BBN) to constrain these quantities. The resulting
upper limit on the dimensionless density of dark energy becomes
$\rho_{\scriptstyle\Lambda}/M_{\rm pl}^4<10^{-90}$, which is $\sim30$ orders of
magnitude larger than the value in our universe
$\rho_{\scriptstyle\Lambda}/M_{\rm pl}^4\sim10^{-120}$. This new limit is much
less restrictive than previous constraints because additional parameters are
allowed to vary. With these generalizations, a much wider range of universes
can develop cosmic structure and support observers. To constrain the
constituent parameters, new BBN calculations are carried out in the regime
where $\eta$ and $G=M_{\rm pl}^{-2}$ are much larger than in our universe. If
the BBN epoch were to process all of the protons into heavier elements, no
hydrogen would be left behind to make water, and the universe would not be
viable. However, our results show that some hydrogen is always left over, even
under conditions of extremely large $\eta$ and $G$, so that a wide range of
alternate universes are potentially habitable.
