Skip to content
DasSkelett edited this page May 17, 2026 · 1 revision

Build 0.29.1.x for KSP 1.12

34th BETA version of LMP

0.29.1 Release Candidate Changelist

0.29.1 is a stability-and-polish release: it fixes long-standing scenario corruption (duplicated finished contracts, ever-growing achievements crew list), eliminates several thread-safety hazards (chat, handshake, removed-vessels), reduces network overhead with batched sends and duplicate-flight-state suppression, fixes the throttle-lurch on control hand-off, adds new server tooling (backup / vessel info commands, .NET 6 install check, default-settings warnings), and lays groundwork for future cross-version compatibility by adding KSP version and body name to the handshake/position protocols (backwards-compatible).

Added

  • KSP version in the handshake. HandshakeRequestMsgData now carries the client's KspVersion; the server stores it on ClientStructure and logs it on connect. Deserialization is backwards-compatible with older clients (HandshakeMessageSender.cs, HandshakeRequestMsgData.cs, ClientStructure.cs, HandshakeSystem.cs, CompatibilityChecker.cs).
  • BodyName in VesselPositionMsgData. Vessel position updates now include the celestial body name on both client and server, with backwards-compatible deserialization (VesselPositionMessageSender.cs, VesselPositionUpdate.cs, VesselPositionMsgData.cs, VesselPositionDataUpdater.cs).
  • Cross-version compatibility framework. New IsCompatibleWithPeer logic in LmpVersioning so future versions (e.g. 0.30.0) can be explicitly whitelisted to co-mingle with 0.29.1 clients/servers (LmpVersioning.cs).
  • ConnectionTime field on ClientStructure so the server tracks when each client connected (ClientStructure.cs).
  • New server console commands (CommandHandler.cs, BackupCommand.cs, VesselCommand.cs, Vessel.cs):
    • backup — triggers an immediate backup of the universe.
    • vessel info <name|guid> — prints vessel ID, type, situation, orbiting body, part count, and current control-lock owner. Designed to be extended with more sub-commands later.
  • .NET 6 runtime check on server start. DotNetRuntimeChecker validates that .NET 6 is installed before the server boots and prints a clear, actionable message when it isn't (DotNetRuntimeChecker.cs, MainServer.cs).
  • Default-settings warning at server startup. New DefaultSettingsChecker warns the operator when ServerName, Description, WebsiteText, or Website are still on the built-in defaults (DefaultSettingsChecker.cs, MainServer.cs).
  • Scenario achievements crew dedupe. New ScenarioAchievementsCrewDedupe (with a full ScenarioAchievementsCrewDedupeTest suite) removes duplicate crew entries from the Achievements scenario that previously stacked on every save and progressively slowed servers down (ScenarioAchievementsCrewDedupe.cs, ScenarioAchievementsDataUpdater.cs, ScenarioStoreSystem.cs, ShareAchievementsMessageSender.cs).
  • Craft create/remove audit log on the server. New CraftCreationAndRemovalLog writes a dedicated logs/CraftCreationAndRemoval.txt file (truncated at each server start) recording every vessel registration and removal as [Timestamp UTC] Vessel <GUID> (<Name>) created/removed by player <Player> (<Reason>). Backed by new Reason fields on VesselProtoMsgData and VesselRemoveMsgData (written at the end of each payload so older clients/servers stay wire-compatible), and reasons are now threaded through every client-side send site — Flight ready / VAB Launch / SPH Launch, Revert to Launch / Revert to VAB / Revert to SPH, Recovered, Terminated, Coupled/Docked, Part decoupled / Part undocked / Parts coupled, Crew boarded, Kerbal EVA, Science transmitted / Science stored, Experiment reset, Asteroid/Comet spawned/tracked/untracked, Flag planted, EVA construction: part attached/detached, Corrupt vessel orbit (NaN), etc. Should make troubleshooting "where did my ship go?" reports dramatically easier (CraftCreationAndRemovalLog.cs, MainServer.cs, VesselMsgReader.cs, VesselProtoMsgData.cs, VesselRemoveMsgData.cs, plus reason-string updates across VesselProtoEvents.cs, VesselRemoveEvents.cs, VesselCrewEvents.cs, VesselCoupleEvents.cs, VesselEvaEditorEvents.cs, AsteroidCometEvents.cs, FlagPlantEvents.cs, OrbitDriver_UpdateFromParameters.cs, VesselProtoMessageSender.cs, VesselRemoveMessageSender.cs, VesselProtoSystem.cs).

Fixed

  • Added protection against contracts duplicating or disappearing. ScenarioContractsDataUpdater was overhauled and a new ScenarioContractsMigration runs against the contracts scenario so finished contracts move cleanly from ACTIVE to ARCHIVED instead of being duplicated in Active or lost from Archived.
  • Click-Through-Blocker no longer pops up on every reconnect. Reworked Harmony patching in HarmonyPatcher.cs so the patch is only applied once per game session.
  • Craft library shows one entry per ship. .craft upload listing no longer double-counts each ship because of the accompanying .loadmeta file (CraftLibrarySystem.cs on both client and server).
  • NREs when loading craft around non-existent bodies are now handled gracefully (ProtoVesselExtension.cs, VesselProtoSystem.cs, VesselLoader.cs).
  • VesselUpdateMsgData.InternalGetMessageSize now correctly accounts for the Com[3] float values, fixing a buffer-sizing mismatch.
  • No more "Received unhandled library message" spam from Lidgren web-crawler Ping/Pong and NatPunchMessage traffic — these are now silently ignored where appropriate (NetPeer.Internal.cs, NetConnection.cs).
  • Zero-throttle on control-lock acquisition. When you take control of a vessel you were spectating, mainThrottle and wheelThrottle are now zeroed on the spectated vessel's ctrlState before StopSpectating() so the new pilot doesn't inherit the previous pilot's throttle and lurch forward (VesselLockEvents.cs).
  • Position update on control acquisition. A position event now fires the moment a vessel is controlled, and the orbit's body name is updated server-side, eliminating stale position/body data right after a hand-off (PositionEvents.cs, VesselPositionSystem.cs, VesselPositionDataUpdater.cs).
  • No more in-game exception popups from incoming contracts that reference missing parts/mods. When a peer shares a ContractSystem scenario containing contracts that reference parts this client doesn't have installed (typical when peers run different mod sets), KSP's stock loader hands the raw ConfigNode to ContractConfigurator's PartValidation parameter loader, which throws ArgumentException and surfaces the in-game exception popup once per offending contract. New ContractsScenarioSanitizer (driven by ContractPartReferenceChecker) strips those CONTRACT / CONTRACT_FINISHED children from the incoming scenario in ScenarioSystem.LoadScenarioDataIntoGame before ProtoScenarioModule ever sees them. ShareContractsMessageHandler.ConvertByteArrayToContract performs the same check on individual incoming contract messages, and additionally skips contracts whose C# type isn't registered in the local install (mod missing on this client) instead of NREing inside Activator.CreateInstance. Safe because ContractSystem is in IgnoredScenarios.IgnoreSend (clients never echo it back to the server) and live contract changes flow through ShareContractsSystem (ContractPartReferenceChecker.cs, ContractsScenarioSanitizer.cs, ScenarioSystem.cs, ShareContractsMessageHandler.cs, LmpClient.csproj).
  • Revert-to-editor now refunds the exact launch cost. The previous logic estimated the refund from ShipConstruction.GetShipCosts, which could differ by small amounts from what KSP actually debited at rollout. ShareFunds now observes OnFundsChanged with TransactionReasons.VesselRollout and snapshots the exact delta KSP took, so revert returns the player to the precise funds value they had before launch. Also re-seeds the tracker on scene loads and protects the pending refund across the intermediate VesselSwitching event fired during revert-to-launch (ShareFundsEvents.cs, ShareFundsSystem.cs).

Stability / Thread-safety

  • Chat handler race condition fix. Reworked ChatMessageHandler to remove the locking pattern that could disconnect or throw when several chat messages arrived in quick succession.
  • Handshake reason refactor. Replaced the shared mutable reason string in HandshakeSystem / HandshakeSystemValidator with per-call out string reasons, removing a race between concurrent handshakes.
  • RemovedVessels collection is now thread-safe. Switched from List<Guid> to a concurrent set, dropping membership checks from O(n) to O(1) and fixing intermittent corruption (VesselContext.cs plus all Vessel*DataUpdater.cs, VesselMsgReader.cs).
  • Deferred destruction. Vessels queued for removal are now deactivated immediately so their components can't keep running between queueing and actual destruction (VesselRemoveSystem.cs, VesselLoader.cs).
  • Better socket-error reporting. Lidgren now surfaces socket errors with descriptive output instead of bare exceptions (NetPeer.Internal.cs, NetPeer.LatencySimulation.cs).
  • Vessel-remove vs. async insert race fix. VesselDataUpdater.RawConfigNodeInsertOrUpdate schedules its store write on Task.Run, so a concurrent VesselRemove (e.g. from a revert-to-editor) could execute between the queued insert's dispatch and its store write, causing a just-removed vessel to be resurrected moments later. VesselMsgReader.HandleVesselRemove now publishes to RemovedVessels before clearing the store entry, and the async insert re-checks the kill list both on entry and again under the per-vessel lock so delayed inserts safely abort (VesselMsgReader.cs, VesselDataUpdater.cs).

Performance

  • Batched network sends. NetworkSender now drains up to 128 messages per loop iteration and flushes once at the end, instead of flushing after every individual message.
  • Suppress redundant flight-state messages. VesselFlightStateMessageSender tracks the last-sent state per vessel and skips sends when all axes/buttons are unchanged (within 0.001 tolerance), with a forced resync every 500 ms or on vessel switch. Eliminates ~50 redundant messages/sec for parked vessels.
  • Coalesced vessel-sync save/update. A deferred update/save is now scheduled after vessel sync so a burst of 100 vessels produces 1 save instead of 100 (KerbalSystem.cs, KerbalEvents.cs).
  • Less debug-log churn for missing flags. Reduced from one debug message per part to one per ship (ProtoVesselExtension.cs).
  • More descriptive banned-resource log. Banned resource console messages now include the part name (ProtoVesselExtension.cs).

Tests / Build

  • Modernized ServerTest.csproj and a much larger server test suite during dotnet test, including new HandshakeSystemValidatorTest, LockSystemTest, LunaMathTest, and VesselStoreSystemTest.
  • Test parallelization fixes in LmpCommonTest (SerializationTests, TimeTests, AssemblyInfo.cs, solution updates).

https://github.com/LunaMultiplayer/LunaMultiplayer/compare/0.29.0...0.29.1

Clone this wiki locally