Surfix

Fixes 0.5–1 m building module misalignment and Kerbal Konstructs editor camera judder on RSS-scale planets.

License: MIT

Game Version: 1.12.5

Source code: Vannadin/SurFix

Downloads: 11

Author: VaNnadin

Followers: 0

NOTICE: This mod is developed using Claude Code (Fable 5.1 model)

If your RSS space center has always looked subtly wrong, nothing in the configs is misplaced. The numbers are being rounded on the way to the screen.

SurFix repairs the half-metre misalignment that RSS-scale planets inflict on every surface object KSP builds out of parts.

Everything parented under a planet's PQS transform carries planet-radius magnitudes (±R) through a float32 world-matrix chain. Each transform in that chain rounds independently, so adjacent building modules land up to ~2×ULP(R) away from the offsets their configs actually asked for. At Kerbin's 600 km the ULP is 0.0625 m and nobody has ever noticed. At Earth's 6371 km it is 0.5 m, and the space center quietly comes apart.

Body radius float ULP Visible effect
Kerbin, 600 km 0.0625 m invisible
Earth (RSS), 6371 km 0.5 m modules visibly offset 0.5–1 m

Measured on KSP 1.12.5 + RSS: 100% of the KSC hierarchy's world coordinates sit on an exact 0.25 m grid. The launch pad's fuel-pump housing renders a full metre vertically away from where it was authored relative to the pump. Any camera that pivots on one of those transforms inherits the same grid, so the Kerbal Konstructs editor can only move in 0.25 m steps and judders the whole view.

SurFix detaches each qualifying PQSCity from its planet-center parent after scene setup and drives it every frame in double precision, from the same planet transform the terrain already uses. With no planet-scale float left anywhere in the subtree, the building modules below it compose at full precision. Kerbal Konstructs group centers are PQSCity instances, so they get driven too — that is what makes KK statics sit still and the KK editor camera move smoothly.

The mod changes parenting and per-frame pose only. It never rewrites a config, never touches your save, and restores the stock hierarchy exactly on scene teardown. Bodies under 2²¹ m (~2,097 km) radius are skipped before anything happens, so a stock-scale install runs unmodified.

Requirements

None. Kerbal Konstructs is optional and detected at runtime by reflection — there is no hard dependency and no assembly reference.

Install

Unzip into your KSP folder so that GameData/SurFix/ sits alongside GameData/Squad/. There is nothing to configure.

Known scope limits

  • PQSCity2 scenery sites (Making History pads, set-dressing huts) are left stock. Their positioning machine re-runs mid-scene without firing an event, writes world values while detached, and can retarget the floating origin from localPosition. Not safely detachable, so their misalignment is unchanged from stock.
  • The KK Group editor reads planet-relative positions back off the transform, so it needs stock parenting. The group in an open GroupEditor window returns to the stock hierarchy for as long as the window is open and rejoins the drive when it closes.

Status

v1.0.1: the fix is measured and verified in-game on KSP 1.12.5 + RSS, with and without Kerbal Konstructs. The lifecycle rules are grounded in the KSP 1.12.5 decompile rather than guessed at — a driven city watches PQS's cached mod array and re-scans through a rebuild so it never loses its LOD callbacks, and detach/reattach is deferred while an unpacked vessel is within 10 km, since either step moves the whole subtree by up to one ULP in a single frame. Reports on the GitHub issue tracker are very welcome.

Source, changelog, and the full mechanism write-up: https://github.com/Vannadin/SurFix License: MIT — planet packs and distributions are welcome to bundle it.

Loading changelog...

Stats for Surfix

Downloads over time

Downloads per version

New followers per day

Top Referrers

  1. spacedock.info
  2. sd-prod-live.52k.de
  3. www.google.com
  4. sd1b.52k.de
  5. xlebnayajaba.shop
  6. sd1a.52k.de

Export Raw Stats

Export Downloads

Export Followers

Export Referrals

Raw stats are from the beginning of time until now. Each follower and download entry represents one hour of data. Uneventful hours are omitted.