Planet lost: If a planet was lost in combat, it changes ownership. If the planet had a starbase, that one is destroyed.

Defense_after_combat =
   0
Colonists_after_combat =
   Trunc(Colonists * ColonistCombatSurvivalRate / 100)
Colonist_happiness_change =
   -Trunc(ColonistCombatSurvivalRate / 2)
Experience_points_after_combat =
   Trunc(Experience_points * ColonistCombatSurvivalRate / 100)
Natives_after_combat =
   Trunc(Natives * NativeCombatSurvivalRate / 100)
Native_happiness_change =
   -20
This is a testing version.
It may be incomplete, and have more bugs (or features) than the public live version at planetscentral.com.