Changelog#
v0.8.0#
Core#
Protocol
Breaking Carry each client on one connection, as protocol version 2, where every message is a
Message. Clients from earlier releases cannot connect (#1219)Add an id to each request, which the server copies onto its response (#1219)
End a connection with a
Disconnectmessage giving the reason, and refuse one the player denies with the statusDENIED(#1219)Start a new session on a
ConnectionRequestsent during a session, on every transport (#1219)Breaking Encode a stream or an event as the
uint64id of its stream, and remove theStreamandEventmessages (#1266)Add
internalto theProceduremessage, set for the stream, event and server side function procedures of theKRPCservice (#1269)Breaking Rename
namein theErrormessage toexception, and addservice_idandexception_id(#1324)Report the .NET exception each kRPC exception stands for, as
mapped_typeinKRPC.Exception(#1172)
Procedure and type ids
Breaking Derive each procedure id from a hash of its name, which changes every id (#1265)
Give each class, enumeration, structure and exception an id, a hash of its name (#1324)
Add
idto theService,Procedure,Class,Enumeration,StructandExceptionmessages, andservice_idandidto theTypemessage (#1265, #1324)
Calls and arguments
Breaking Reject an argument with bytes left over, an unknown field, a 32-bit number out of range, a tuple with the wrong number of items, an undeclared enum value, or a bool other than 0 or 1 (#1280)
Breaking Fail a call with an argument position past the procedure’s last parameter, or with two arguments at one position (#1290)
Fail only the call whose argument the server cannot decode, and run the other calls in the request (#1280)
Connections and performance
Wait for a client’s next call by its measured time between calls, so a client that pauses briefly between calls gets several calls per frame (#1376)
Read and write each connection on threads of its own, so a client that stops reading cannot freeze the game (#1376)
Read up to 16 requests ahead of the one running, and end the connection of a client that leaves more than 16 MB of messages unread (#1376)
Read from a serial port as bytes arrive, and accept the stream RPCs over serial IO (#1219, #1376)
End a connection whose message stalls partway, after 3 seconds over serial IO and 30 seconds otherwise (#1219)
Move the default local socket to
krpc.sockinXDG_RUNTIME_DIRorLOCALAPPDATA, or to/tmp/krpc-<user>.sock(#1219)Start the remaining servers when one fails to start (#1330)
Load the services faster in games with many mods (#1353)
Fix a serial IO server stopping when it sends a response over a megabyte (#1386)
Fix a WebSockets connection with a frame too large to buffer throwing
OverflowException(#1193)Fix RPCs stopping on .NET after a client disconnects during a yielding call (#1189)
HTTP and WebSockets
Streams and events
Breaking Fire a
KRPC.AddEventevent once each time its function becomes true (#1234)Update a stream when its value changes between 0.0 and -0.0, or a collection it returns changes in place (#1199)
Run a stream of a call or server side function with no value on each update, for its effects (#1198)
Fix rate limited streams updating at as little as half their rate (#1310)
Server side functions
Add the
KRPC.Expression.MatchandKRPC.Expression.Switchstatements (#1334)Combine flags enumeration values with
KRPC.Expression.And,Or,ExclusiveOrandNot(#1311, #1313)Add variants of the procedures that take ids in place of names, such as
KRPC.Type.ClassTypeByIdandKRPC.Expression.GetFieldByIndex(#1336)Breaking
KRPC.Expression.CallWithArgumentstakes a call template, and throws an exception for a call that carries arguments (#1352)Fail when a function is built, in place of when it runs, for a null constant passed to a parameter that cannot be null (#1352)
Server status and settings
Breaking Return
KRPC.GetStatusas the structKRPC.ServerStatus, with the settings and statistics in nested structs, and remove theStatusmessage (#1244)Breaking Replace the statistics per update with statistics per frame, adding
FrameRate,BudgetPerFrameandMedianTurnaround(#1376)Breaking Rename the stream counters to
Streams,StreamEvaluationsandStreamEvaluationRate, and addTickHoldTimeout,DeferredCallsandStreamUpdatesSent(#1244)Breaking Replace the settings
MaxTimePerUpdate,BlockingRecvandRecvTimeoutwithTargetFrameRate,MaxTimePerFrameandMaxCallWait(#1376)Breaking Remove the “One RPC per update” setting and
KRPC.ServerSettings.OneRpcPerUpdate(#1349)Turn on “Auto-start server” by default (#1349)
Writing services
Support flags enumerations, a
KRPCEnumwith[Flags]whose values a client can combine, marked byflagsin theEnumerationmessage (#1311)Add
Idto the attributes, withGetterIdandSetterIdonKRPCProperty, to resolve an id clash, andKRPCProcedureIdfor a procedure a class inherits (#1265, #1324)Add
ModAPI,ModBinder,MemberBinderand theRequiresModattribute, for a service that binds to another mod by name (#1341, #1342, #1382)Add
StdLib.ImageFormat, the format of the images from the camera services (#1341)Allow a
<see cref>in service documentation to link to an exception, or a member of a service with a custom name (#1185, #1188)Breaking Reject two services, two types of a service, or two members, values, fields or parameters that share a name, ignoring case (#1324, #1325, #1338)
Breaking Reject a type named after its service, a method
GetFooorSetFoobeside a propertyFoo, or a parameter or value name that is not ASCII letters and digits (#1325, #1338)Breaking Reject a service declared by more than one class, or a parameter defaulting to a value its enumeration does not declare (#1192, #1325)
Breaking Reject a stream or an event outside a return value, or a stream returned by a procedure that is not internal (#1269)
Logging
Log each request at the debug level as one line naming its calls and their errors, and stop logging each stream update (#1219)
Log the transport connection lines and object store sweeps at the debug level (#1235)
Log the address and settings of a server when it starts (#1235)
Name a client in log lines by its address and the start of its identifier, and leave out the time, which the game log adds (#1219, #1235)
Server#
Servers and settings
Breaking Listen on one port or socket path per server, removing the stream port and stream path settings (#1219)
Breaking Reset each existing server’s settings to their defaults, so a TCP/IP and a WebSockets server both use port 50000 until one is changed (#1219)
Breaking Turn on “Auto-accept new clients” for new installs. An existing settings file keeps its value (#1219)
Start a new install with a TCP/IP server on port 50000 and a WebSockets server on port 50001, each named for its protocol (#1349, #1371)
Add *JSON over HTTP* to the protocols, on port 50003 by default, and the origins whose web pages may connect to WebSockets and HTTP servers (#1391, #1392)
Add RTS/CTS flow control to serial IO servers (#1386)
Keep the server settings on an upgrade, as the release no longer includes
settings.cfg(#1349)Keep each readable setting from a damaged
settings.cfg, and back up a file with no readable settings assettings.cfg.bak(#1349)Build the serial port code into
KRPC.Core.dll, in place of a separateKRPC.IO.Ports.dll(#1386)
Performance
Breaking Replace “Max. time per update” with “Max. time per frame”, 10 ms by default, and “Blocking receives” and “Receive timeout” with “Max. call wait”, 5 ms by default (#1376)
Hold the frame rate at the new “Target frame rate” setting with adaptive rate control, 60 fps by default (#1376)
Add presets to the advanced settings: “Game first”, “Balanced” and “Calls first” (#1376)
Server windows
Show the number of connected clients beside each server, and remember which servers are expanded (#1385)
Name a server added in the window “Server”, “Server 2” and so on, and default the port of a WebSockets server to 50001 (#1371, #1385)
Name the TCP/IP protocol “Protobuf over TCP/IP” (#1225)
Reorganize the info window around the frame, with deferred calls, stream updates and a “Limited by” row naming what holds down the call rate (#1244, #1376)
Widen the server window so the advanced settings fit, and line up their labels (#1349)
Give the kRPC windows an opaque background, and hide them while the game hides its UI (#1349, #1376)
Fix the server window keeping its height after clients disconnect (#1186)
Fix “Clear statistics” leaving the data read and written (#1376)
Mods and service errors
Keep running when a service has errors, and leave out only the members with them and the members that use them (#1345)
Load each supported mod whatever its version, and fail only the calls that use a missing member (#1341)
Disable only the integration of a mod that fails to load, and give the reason in the errors of its RPCs (#1341, #1342)
List the members left out, the RPCs that use them, and the mods whose support failed to load, in a window at the main menu (#1345)
Logging
Log a connection the player is asked to allow once, naming the client, and an auto-accepted connection at the debug level (#1235)
Log auto-starting the servers only when one is stopped (#1235)
Fix the game scene in log lines reading
Inherit, Flight(#1235)Fix errors logged on every scene change, and on quitting, when the server fails its startup checks (#1376)
SpaceCenter service#
Auto-pilot
Fix the auto-pilot oscillating or departing on aircraft (#1191, #526)
Add
AutoPilot.LimitAngularVelocity, on by default, which limits the angular velocity to what the control surfaces hold against the aerodynamics (#1191, #526)Shrink the attenuation angles with the share of the torque that comes from control surfaces (#1191, #526)
Turn with a moving target, such as a gravity turn’s pitch, and measure the angular velocity in
AutoPilot.Waitrelative to the target (#1373)Fix limit-cycling on a vessel steered by slow engine gimbals, such as the KS-25 (#1348, #1347)
Fix the auto-pilot keeping its flexible-craft mitigations after staging or docking (#1373)
Fix the auto-pilot turning away from its target when
AutoPilot.ReferenceFramechanges whileAutoPilot.TargetSmoothingTimeis set (#1373)Add
AvailableSASModestoAutoPilotandControl, the SAS modes that can be set (#1383)Add an aerodynamics section to the info window, and make its sections collapsible (#1191)
Log a failure once, naming the vessel and client, in place of on every physics tick (#1235)
Parts
Breaking Rename
ConfigNode.GetValuesandGetNodestoFindValuesandFindNodes(#1261)Add the strength and stiffness of the joint to the parent part, such as
Part.JointBreakForceandPart.JointSpring, andPart.BreakingForceandBreakingTorque(#1362)Add
ControlSurface.DeflectionAngle,ControlRangeandActuatorSpeed(#1191)Add
Engine.GimbalResponseSpeedand the gimbal axis toggles, such asEngine.GimbalPitchEnabled(#1360)Apply the axis toggles of a gimbal or RCS block to
Engine.AvailableTorque,Engine.GimbalActuationand the RCS overrides (#1360)Add the live suspension state to
LegandWheel, such asSuspensionSpringandLoad, and the tolerances that break them, andContactPosition(#1361)Add
Leg.SuspensionSpringStrengthandLeg.SuspensionDamperStrength(#1361)Include the cost of part modules, such as fairing panels and TweakScale’s scaling, in
Part.Cost(#1314)Fix setting a
PartFieldskipping the callbacks the right-click menu runs, such as for a B9PartSwitch subtype switch (#1314)Fix
ControlSurface.AvailableTorquescaling the torque by the surface’s distance along each axis, and overstating roll torque near the center line (#1191)
Vessels and crew
Add
SpaceCenter.Kerbals, every Kerbal in the roster, andCrewMember.Inactive,InactiveUntilandExperienceLevel(#1383)Fix
CrewMember.OnMission,CrewMember.ExperienceandSpaceCenter.GetKerbalfor unassigned Kerbals, applicants and tourists (#1383)Add
Vessel.LaunchSite, andLaunchSite.Latitude,LongitudeandAltitude(#1363)Fix the
MomentOfInertiaandInertiaTensorofVesselandEditorVesselmeasuring each part from its origin instead of its center of mass (#1191)Fix
Vessel.Name,EditorVessel.NameandEditorVessel.Descriptionreturning a localization tag for stock craft (#1343)Fix
RaycastDistanceandRaycastParthitting trigger volumes, such as the robotic arm scanner’s (#1233)
Game
Allow the rails warp rates the game allows the player, which ignore the altitude limits when the periapsis is clear of the atmosphere and terrain (#1167)
Fix
Load,Quickload,RevertToLaunchand the launch RPCs sometimes leaving the game on the loading screen (#1374)Add the scenario modules of newly installed mods to a save loaded with
LoadorQuickload(#1374)Fix setting
Camera.Modeto IVA straight after a launch doing nothing, and setting it again in the IVA leaving it (#1318)Breaking Make
MapFilterTypea flags enumeration, and changeMapFilterType.Allfrom -1 to 32767 (#1311)Fix
CelestialBody.SurfaceGravitydiffering from the gravity the game applies by about 0.03% (#1359)
Mods
Support RealAntennas: link budgets, targeting and data rates on
AntennaandCommLink, and each antenna of a part with several (#1320)Support the curved solar panels from Near Future Solar in
SolarPanel(#1314)Add
<Mod>Availablefor each supported mod that lacked one, such asRealChuteAvailable(#1320, #1340)Keep the FAR, RealFuels, RealAntennas and Action Groups Extended RPCs working when a mod update removes members, and fail only the RPCs that use them (#1341)
Fail the FAR and RealFuels members, and
Part.Tag, with the reason when the mod is missing or failed to load (#1342)Fix velocities, orbits and orbital reference frames throwing an exception in a Kopernicus system whose star is not named
Sun(#1359)Test with Kopernicus, Real Solar System, Realism Overhaul and Procedural Parts, and list their tested versions in the documentation (#1359)
Documentation
DockingCamera service#
Breaking Support the public Docking Camera (KURS) 1.3.9 release, in place of an unreleased fork, including the cameras it adds to docking ports (#1232)
Breaking Make
Camera.Imagea method taking aStdLib.ImageFormatand a JPEG quality, which throws an exception if the camera is off or not started (#1232, #1317)Keep working when a Docking Camera update removes members, and fail only the RPCs that use them (#1341)
Stop logging each read of
Camera.Image(#1235)
InfernalRobotics service#
KerbalAlarmClock service#
Kerbal Engineer Redux service#
Add the Kerbal Engineer Redux service, with impact and suicide burn predictions, the staged vessel simulation in flight and the editor, burn times and rendezvous angles (#1327)
LIDAR service#
Deprecated The
LIDARservice, superseded bySpaceCenter.RaycastDistance(#1233)
MechJeb service#
Move the MechJeb service into kRPC from Genhis’ KRPC.MechJeb 0.7.1, and update it for MechJeb 2.15.4.0 (#1326)
Log a MechJeb member the service cannot bind, and fail only the calls that use it, in place of an error pop-up (#1326)
Layout
Breaking Lay out the service like MechJeb’s windows. The docs list each moved member (#1382)
Breaking Rename
AscentAutopilottoAscentGuidance, with its settings inAscentGuidance.Settings,LandingAutopilottoLandingGuidance, andAirplaneAutopilottoAircraftAutopilot(#1382)Breaking Replace
AscentPathClassicandAscentPathPVGwithAscentGuidance.ClassicPathandPVGSettings, andAscentPathIndexwithAscentType(#1382)Breaking Move
ThrustController,StagingControllerand the deployable controllers intoUtilities, asThrust,Staging,SolarPanelsandAntennas(#1382)Breaking Move the members of
NodeExecutortoManeuverPlanner, ofRCSControllertoSmartRCS, and the landing target members ofTargetControllertoLandingGuidance(#1382)Breaking Spell out abbreviations in names, such as
LimitAoAtoLimitAngleOfAttack,CourseCorrectFinalPeAtoFinalPeriapsisAltitudeandRcsAdjustmenttoRCSAdjustment(#1382)Breaking Make
Autostaging.AutostagingOnceread-only, and addAutostageOnceto set it (#1382)
Removed for MechJeb 2.15
Breaking Remove
AscentGTandAscentAutopilot.AscentPathGT, as MechJeb 2.15 has no gravity turn ascent path (#1326)Breaking Remove
NodeExecutor.Tolerance,ThrustController.SmoothThrottle,ThrottleSmoothingTimeandOperationTransfer.PeriodOffset(#1326)Breaking Throw an exception on setting
SmartRCSMode.ZeroVelocityorTranslatronMode.KeepRelative, as MechJeb 2.15 has no such mode (#1326)Breaking Remove
MechJeb.APIReady, in place ofMechJeb.AvailableandMechJeb.Ready(#1326)Breaking Remove
Operation.MakeNode, deprecated in 0.7.1 (#1382)Breaking Remove
OperationTransfer.InterceptOnlyandSimpleTransfer, in place ofCaptureandCoplanar(#1382)
New windows and operations
Add
AircraftApproach, the Aircraft Approach & Autoland window, which lands a plane on a runway (#1382)Add
RoverAutopilot, the Rover Autopilot window, which drives a rover along waypoints (#1382)Add
AttitudeAdjustment, the Attitude Adjustment window, which selects the attitude controller (#1382)Add
ManeuverPlanner.OperationAdvancedTransfer, a transfer to another planet at the departure that needs the least delta-v (#1382)Add
ManeuverPlanner.OperationEccentricity, which changes the eccentricity (#1382)
New settings
Add the launches to a longitude of the ascending node,
AscentGuidance.LaunchToLanandLaunchToMatchLan, withDesiredLan(#1382)Add
AscentGuidance.DesiredFPAandOverrideWarpToPlane, andAscentSettings.RollAltitude,LimitingAngleOfAttackandCurrentMaxAngleOfAttack(#1382)Add the stage, coast, spin-up and Qα limit settings of the PVG Settings window to
PVGSettings(#1382)Add
OperationTransfer.Capture,PlanCapture,Rendezvous,LagTimeandCoplanar(#1382)Add
AutowarptoAscentSettings,LandingGuidanceandRendezvousAutopilot(#1382)Add
ManeuverPlanner.RCSOnlyandKillRollRotation,RendezvousAutopilot.MaxClosingSpeedandSmartASS.Roll(#1382)Add
ThrustLimiter.LimitToPreventUnstableIgnition,AutoRCSUllaging, andLimiter, the limiter that limits the throttle (#1382)
Fixes
Plan
Operation.MakeNodesfrom the orbit after the last maneuver node, and remove the nodes it placed when it fails (#1382)Set
Operation.ErrorMessageto the errorMakeNodesthrows, and clear the message of an earlier call (#1382)Apply
AscentSettings.LimitAngleOfAttackand theSmartASSforce settings without MechJeb’s windows open (#1382)Make
OperationLan.NewLANandOperationLongitude.NewSurfaceLongitudeset the same longitude (#1326)Release the autopilots of both ascent paths when the ascent autopilot is disabled (#1326)
Throw an exception from the members that need a target, a landing target or a maneuver node when there is none, and from the landing methods when landed (#1382)
Raster Prop Monitor service#
Add the Raster Prop Monitor service, with the persistent variables that IVA props show and switches set, reads of any RPM variable, and the pages, buttons, text and images of IVA monitors (#1335)
Add screen pages that a script draws and whose button presses it answers, and page button captures that show a script’s page (#1335)
Add PNG and JPEG images from RPM’s external cameras, which a stream turns into video (#424)
SCANsat service#
Add the SCANsat service, with scan coverage, the terrain, biome, anomaly and resource data the scans reveal, control of the scanners, and maps of a body as PNG or JPEG images (#1328)
Trajectories service#
Add the Trajectories service, with the predicted trajectory and impact point, the target, and the descent profile (#1253)
C-nano client#
Connections
Breaking Connect with protocol version 2, and remove
KRPC_SINGLE_CONNECTION, as every mechanism opens one connection (#1219)Breaking Return
KRPC_ERROR_CONNECTION_REFUSEDfromkrpc_connectwhen the server denies the connection or its protocol version, andKRPC_ERROR_CONNECTION_FAILEDwhen the response cannot be read (#1219)Add
krpc_disconnect, which sends the server a disconnect message before closing the connection (#1219)Skip messages an earlier session left on a serial line while connecting (#1219)
Relicense the C-nano client and the Arduino library under the MIT license (#1281)
Fix the Arduino library failing to compile with
pb_common.h: No such file or directory(#1387)
Transports
Breaking Build every transport into the library, and choose one when opening a connection with
krpc_open_serial,krpc_open_tcporkrpc_open_localsocket(#1176)Breaking Remove
KRPC_COMMUNICATION_TCP,KRPC_COMMUNICATION_LOCALSOCKETandkrpc_connection_config_t, and thetcpandlocalsocketvcpkg features (#1176)Breaking Replace
KRPC_COMMUNICATION_CUSTOMwith akrpc_transport_tthat a program fills in (#1176)Breaking On Arduino, open any
Stream, such asSoftwareSerialor a USB port, withkrpc_open_stream, or start a serial port withkrpc_open_serial(#1176)
Services and types
Breaking Call procedures by the hashed ids, which needs a server of the same version (#1265)
Breaking Return a stream or an event as the
uint64_tid of its stream (#1266)Breaking Leave internal procedures, such as
krpc_KRPC_AddStream, out of the services (#1269)Breaking Return
krpc_KRPC_GetStatusaskrpc_KRPC_ServerStatus_t, whoseversionis allocated on the heap (#1244)Mark deprecated types, values and procedures with
KRPC_DEPRECATED, and deprecate each member of a deprecated service, class, enumeration or structure (#1322)Document every parameter of a service function, and name references by their C names (#1185)
Fix the clang-tidy warning from
KRPC_FREE_LISTandKRPC_FREE_SETon a list or set of strings (#1375)
Errors
Breaking Replace the error codes with one per kind of error:
KRPC_ERROR_CONNECTION,KRPC_ERROR_SERVER,KRPC_ERROR_ENCODING,KRPC_ERROR_ARGUMENTandKRPC_ERROR_NO_MEMORY.KRPC_ERROR_CONNECTION_REFUSED,KRPC_ERROR_BUFFER_TOO_SMALL,KRPC_ERROR_IOandKRPC_ERROR_EOFstay (#1333)Add
krpc_get_error_info, the details of the last error, such as the ids of a server exception or the reason of a disconnect (#1333)Add a
KRPC_EXCEPTION_macro for each exception of a service, andKRPC_IS_EXCEPTIONto check the last error against it (#1333)Breaking Give a message for every error under
KRPC_ERROR_MESSAGES, with the message of its cause, which a transport gives with the newkrpc_set_error_cause(#1333)Add
KRPC_ERROR_CODES_ONLY, which keeps only the code of each error (#1333)Breaking Return
KRPC_ERROR_ARGUMENTfor a null string argument, a null argument to akrpc_open_function, and a local socket path that is too long (#1333)
Server side functions
Breaking Replace
krpc_KRPC_CompileFunctionandkrpc_KRPC_RunFunctionwithkrpc_compile_functionandkrpc_run_function, inkrpc_cnano/functions.h(#1267)Add a
_callfunction for each procedure, such askrpc_SpaceCenter_Flight_Speed_call, forkrpc_KRPC_Expression_Call, and a_call_templatefunction for each member (#1267, #1352)Add a
KRPC_CLASS_,KRPC_ENUMERATION_,KRPC_STRUCT_orKRPC_FIELD_macro for each type and structure field, with its ids for server side functions (#1336)
C# client#
Connections
Breaking Connect over one connection, removing the
streamPortandstreamPathparameters of theConnectionconstructor andConnection.ConnectLocal. A server from before 0.8 refuses the connection (#1219)Breaking Rename the
rpcPortandrpcPathparameters toportandpath(#1219)Breaking Give up after 5 seconds if the server does not accept the connection. Pass a
handshakeTimeoutofTimeout.InfiniteTimeSpanto wait for the player to approve it (#1219)Add the
handshakeTimeoutandstallTimeoutparameters (#1219)Send calls from several threads without waiting for each other’s responses (#1219)
Tell the server when the connection is disposed, and keep a thread interrupt pending across
Dispose(#1219)
Packaging
Target .NET Standard 2.0 in place of .NET Framework 4.7.2, so a .NET 5 or later project uses the package without a compatibility warning (#1274)
Fix .NET Framework programs failing to load
System.Memorywhen decoding a nullable value in a collection or structure (#1274)Breaking Regenerate service stubs generated by an earlier
krpc-clientgen.Encoder.Decodemoved toDecoder.Decode, and stubs from before 0.7.0 can miss a stream’s first update (#1219, #1332)
Services and types
Add
Bindto classes with static methods, for calling them without passing the connection (#1195)Generate a flags enumeration with
[Flags](#1311)Order remote objects by id, with
CompareToand the comparison operators (#1377)Breaking Leave internal procedures, such as
KRPC.AddStream, out of the services (#1269)Breaking Return
KRPC.GetStatusas the structServerStatus(#1244)Mark a deprecated service with
[Obsolete], and deprecate each member of a deprecated service, class, enumeration or structure (#1322)Fix a nullable enum return value throwing
InvalidCastException(#1194)Fix the links in service documentation, which named no type or member (#1185)
Errors
Breaking Derive every exception of the client from the new
RemoteException(#1333)Breaking Rename
RPCExceptiontoServerException, andFunctionCompilationExceptiontoCompilationException(#1333)Breaking Remove the generated classes of mapped exceptions, which were never thrown, such as
KRPC.ArgumentException. The .NET exception is thrown, as before (#1333)Breaking Throw
ConnectionExceptionwhen the server cannot be reached, with theSocketExceptionas its inner exception, or for a call afterDispose(#1219, #1333)Add
StatusandReasontoConnectionExceptionfor a refused or ended connection (#1219)Breaking Throw
EncodingExceptionfor every value that fails to decode, including a null for a type that cannot hold one and an undeclared enumeration value (#1269, #1333, #1377)Throw
ArgumentNullExceptionfor a null passed for a parameter that cannot be null, before the call is sent (#1377)Breaking Remove the trailing space after
Server stack trace:in an exception’s message, and separate its lines with\non every platform (#1172)
Streams and events
Breaking Throw the new
StreamExceptionwhen a stream or event is removed, or read or waited on after removal (#1219, #1333)Breaking Wait with no deadline in
Stream.WaitandEvent.Waitby default, or for an infinite timeout, and throwArgumentOutOfRangeExceptionfor a negative or NaN one (#1219)Make
StreamandEventIDisposable, to remove them at the end of ausingblock (#1291)Stream a lambda or server side function with no value as a
Stream, and add an overload ofConnection.GetCallfor one (#1198)Breaking Derive
Stream<T>from a new classStream, ambiguous withSystem.IO.Streamin a file that uses both namespaces (#1198)Breaking Take the type code of the return value in
IConnection.Invoke(#1266)Keep a stream running when a value fails to decode, dropping the value (#1219)
Server side functions
Add
Connection.Compilefor a function built with the expression API (#1269)Add
Connection.GetCallTemplateandGetSetCallTemplate, forExpression.CallWithArguments(#1352)Compile
~andHasFlagon flags enumeration values (#1313)Breaking Throw
ArgumentExceptionfor a function whose value does not match the type parameter (#1333)
C++ client#
Connections
Breaking Connect over one connection, removing the
stream_portandstream_pathparameters ofconnectandconnect_local. A server from before 0.8 refuses the connection (#1219)Breaking Give up after 5 seconds if the server does not accept the connection. Pass a
handshake_timeoutof zero to wait for the player to approve it (#1219)Add the
handshake_timeoutandstall_timeoutparameters (#1219)Send calls from several threads without waiting for each other’s responses (#1219)
Add
close, which closes the connection for every copy of it, and tell the server when the last copy is released (#1219, #1286)Breaking Services, objects, streams and events hold the connection open, so they stay valid once the connection object is destroyed (#1286)
Breaking Take the connection by reference in service, object, stream and event constructors, as in
SpaceCenter sc(conn), and accept a temporary in a service constructor (#1285, #1286)Relicense the C++ client under the MIT license (#1281)
Naming
Breaking Rename
krpc::Clienttokrpc::Connection, inkrpc/connection.hpp.krpc.hppincludes it as before (#1332)Breaking Rename
krpc::Connectionandkrpc::LocalConnectiontokrpc::TCPIPTransportandkrpc::LocalTransport, inkrpc/transport.hpp(#1332)Breaking Rename
krpc::Objectandkrpc::Servicetokrpc::RemoteObjectandkrpc::RemoteService, in headers of the same names (#1332)Breaking Convert names with
UInt,FoV, a plural acronym or digits next to an acronym as written, e.g.Type::uint,Camera::fovandMapFilterType::evas(#1339)
Services and types
Add
bindto classes with static methods, for calling them without passing the connection (#1195)Generate the operators
|,&,^and~for a flags enumeration (#1311)Breaking Leave internal procedures, such as
KRPC::add_stream, out of the services (#1269)Breaking Return
KRPC::get_statusas the structKRPC::ServerStatus(#1244)Declare deprecated services and procedures
[[deprecated]], and deprecate each member of a deprecated service, class, enumeration or structure (#1322)Fix generated headers warning about their own deprecated members, and the service documentation that Doxygen warns about (#1185, #1322)
Errors
Breaking Derive every error of the client from the new
krpc::RemoteError, and renamekrpc::RPCErrortokrpc::ServerError(#1333)Breaking Throw a server exception with a standard equivalent as the standard exception, e.g.
KRPC::ArgumentExceptionasstd::invalid_argument(#1172)Breaking Add the server stack trace to an exception’s message (#1172)
Breaking Throw
ConnectionErrorwhen the server cannot be reached, nesting the error from the socket, or through a connection or object that is not connected (#1219, #1286)Add
statusandreasontoConnectionErrorfor a refused or ended connection (#1219)Throw
std::invalid_argumentfor a local socket path that is too long, or a default-constructed object passed as an argument (#1333, #1377)Throw
EncodingErrorfor a tuple of the wrong length, which crashed, and for a null function value of a type that cannot hold one (#1194, #1333)Raise the exception types of the
KRPCservice without first creating aKRPCservice object (#1269)
Streams and events
Breaking Remove a stream or event from the server when its last copy is destroyed, and remove
Client::remove_streamand theStreamconstructor taking a stream id (#1219)Breaking Throw
StreamErrorwhen the server removes a stream or event (#1333)Breaking Wait with no deadline in
Stream::waitandEvent::waitby default, or for an infinite timeout, and throwstd::invalid_argumentfor a negative or NaN one (#1219)Breaking Remove
Client::Returns::event, as a call that returns an event usesReturns::stream(#1266)Stream a procedure or server side function with no value as a
Stream<void>(#1198)
Server side functions
Java client#
Connections
Breaking Connect over one connection, removing the stream port and stream path parameters of
Connection.newInstanceandConnection.newLocalInstance. A server from before 0.8 refuses the connection (#1219)Breaking Give up after 5 seconds if the server does not accept the connection. Pass a handshake timeout of
Duration.ZEROto wait for the player to approve it (#1219)Add overloads of
Connection.newInstanceandnewLocalInstancetaking a handshake timeout and a stall timeout (#1219)Send calls from several threads without waiting for each other’s responses (#1219)
Tell the server when the connection closes (#1219)
Fix an interrupted call closing the connection (#1219)
Publish the client to Maven Central as
io.github.krpc:krpc-java(#1231)
Naming
Breaking Name enumeration constants in upper snake case, e.g.
AltimeterMode.AGLandTypeCode.UINT32in place ofA_GLandU_INT32(#1339)Breaking Lower case a leading acronym in method and field names, e.g.
CelestialBody.mslPositionandType.uintin place ofmSLPositionanduInt(#1339)Breaking Move
Encoder.decodetoDecoder.decode. Stubs generated by an earlierkrpc-clientgenneed regenerating (#1332)
Services and types
Add
bindto classes with static methods, for calling them without passing the connection (#1195)Deprecated Passing the connection to
addStreamandgetCallfor a static method (#1195)Breaking Generate a flags enumeration, such as
SpaceCenter.MapFilterType, as a class of constants withor,and,xor,andNotandcontains(#1311)Breaking Leave internal procedures, such as
KRPC.addStream, out of the services (#1269)Breaking Return
KRPC.getStatusas the structKRPC.ServerStatus(#1244)Mark a deprecated service with
@Deprecated, and deprecate each member of a deprecated service, class, enumeration or structure (#1322)Fix remote objects with an id past 63 bits ordering first (#1377)
Fix the javadoc of the services, with links that named no method and markup
javadocrejects (#1185)
Errors
Breaking Make every exception unchecked, deriving the new
RemoteException, and removethrows IOExceptionfromnewInstance,newLocalInstanceandclose(#1333)Breaking Rename
RPCExceptiontoServerException(#1333)Breaking Remove the generated classes of mapped exceptions, which were never thrown, such as
KRPC.ArgumentException(#1333)Breaking Throw
InvalidOperationExceptionasIllegalStateException, andArgumentOutOfRangeExceptionasIllegalArgumentException(#1172)Breaking Throw
ConnectionExceptionfor a call or stream the connection ends, and when the server cannot be reached or its host name does not resolve (#1219, #1332, #1333)Add
getStatusandgetReasontoConnectionExceptionfor a refused or ended connection (#1219)Breaking Throw
CancellationExceptionfor an interrupted call or wait (#1333)Breaking Throw
IllegalArgumentExceptionfor a null in a position that cannot hold one, before the call is sent, a local socket path that is too long, and a methodaddStreamorgetCallcannot find (#1333, #1377)Throw
EncodingException, with the message of its cause, for a tuple with too few items or an undeclared enumeration value (#1333, #1377)
Streams and events
Breaking Throw
StreamExceptionwhen the server removes a stream or event (#1333)Breaking Throw
IllegalArgumentExceptionfromwaitForUpdateWithTimeoutandwaitForWithTimeoutfor a negative or NaN timeout, and wait with no deadline for an infinite one (#1219)Make
StreamandEventAutoCloseable, to remove them at the end of a try-with-resources block (#1291)Stream a procedure or server side function with no value as a
Stream<Void>(#1198)Keep a stream running when a value fails to decode, dropping the value (#1219)
Server side functions
JavaScript client#
Add a JavaScript client, for web pages and Node.js, that connects over WebSockets (#1346)
Export each service’s enumerations, structures and exceptions from the package, for use without a connection (#1346)
Add streams, with
Connection.addStream, and events, each with callbacks (#1346)Add server side functions built with the expression API, run with
Connection.run, or streamed withConnection.addStreamandConnection.addEvent(#1346)Compile a JavaScript function into a server side function, with its captured values, and type its body in TypeScript (#1346)
Lua client#
Connections
Breaking Connect with protocol version 2, and fail to connect to a server from before 0.8 (#1219)
Add a
handshake_timeoutparameter toconnectandconnect_local, and raise an error for one that is not positive (#1219, #1377)Tell the server when the connection closes (#1219)
Deprecated
krpc.platform.sleep, in favor of luasocket’ssocket.sleep. It now sleeps without holding a CPU core, and for fractions of a second (#1323)
Services and types
Breaking Return
nilfor a null result, in place ofTypes.none, and pass anilargument as null (#1278)Breaking Convert names with
UInt,FoV, a plural acronym or digits next to an acronym as written, e.g.Type.uint,Camera.fovandMapFilterType.evas(#1339)Breaking Leave internal procedures, such as
KRPC.add_stream, out of the services (#1269)Breaking Return
get_statusas a struct (#1244)Breaking Return a stream or an event as the id of its stream (#1266)
Add
union,intersection,differenceandcontainsto the values of a flags enumeration (#1311)Order remote objects by id with
<(#1377)Warn once per member on standard error on a use of a deprecated member, including through
get_call(#1322)Deprecate each member of a deprecated service, class or enumeration (#1322)
Fix a
nilargument dropping the arguments after it (#1278)Fix a returned enumeration value comparing unequal to the same named value (#1377)
Errors
Breaking Raise errors as objects of the new classes
krpc.RemoteError,krpc.ConnectionError,krpc.ServerErrorandkrpc.EncodingError, in place of strings. An argument the client rejects still raises a string (#1333)Breaking Drop the source position and the
Service.Name:prefix from the message of an error, which the error’s fields now carry (#1333)Breaking Raise
ConnectionErrorfor malformed service definitions, andbad argument :issue:`2` to 'connect_local'for a local socket path that is too long (#1333)
Server side functions
Breaking Replace
KRPC.compile_functionandKRPC.run_functionwithClient:compileandClient:run(#1267)Add
Connection:get_call, forKRPC.Expression.call(#1267)Add
Connection:get_call_template, and take a procedure such asEngine.get_has_fuelas its call template, forExpression.call_with_arguments(#1352)
Python client#
Connections
Breaking Connect over one connection, removing the
stream_portandstream_pathparameters ofconnectandconnect_local. A server from before 0.8 refuses the connection (#1219)Breaking Rename the
rpc_portandrpc_pathparameters toportandpath(#1219)Breaking Give up after 5 seconds if the server does not accept the connection. Pass
handshake_timeout=Noneto wait for the player to approve it (#1219)Add the
handshake_timeoutandstall_timeoutparameters (#1219)Send calls from several threads without waiting for each other’s responses (#1219)
Tell the server when the connection closes (#1219)
Fix later calls reading the wrong response after a call is interrupted by an exception (#1219)
Naming
Breaking Rename
krpc.Clienttokrpc.Connection, and each<Service>Clientto<Service>Connection, such askrpc.ksp.KSPConnection(#1332)Breaking Rename the transports
krpc.Connectionandkrpc.LocalConnectiontokrpc.TCPIPTransportandkrpc.LocalTransport(#1332)Breaking Rename the base classes of generated types to
RemoteObject,RemoteEnum,RemoteFlagsandRemoteService(#1332)Breaking Move the modules of the KSP services from
krpc.servicestokrpc.ksp, such askrpc.ksp.spacecenter(#1304)Breaking Convert names with
UInt,FoV, a plural acronym or digits next to an acronym as written, e.g.Type.uint,Camera.fovandMapFilterType.evas(#1339)
Services and types
Add
connect[T]andconnect_local[T], which type the connection asT, and a connection type per service module to combine in a subclass (#1303)Support
isinstancewith a class accessed through a connection, such asisinstance(vessel, conn.space_center.Vessel)(#1279)Support flags enumerations, such as
SpaceCenter.MapFilterType, as anenum.Flag(#1311)Breaking Remove
use_pregenerated_stubs, and raise anAttributeErrorfor a service the server lacks (#1302)Breaking Raise a
TypeErrorfor a static method called on a class imported from a service’s module (#1302)Breaking Leave internal procedures, such as
KRPC.add_stream, out of the services (#1269)Breaking Return
KRPC.get_statusas the named tupleServerStatus(#1244)Warn on a use of a deprecated member, including through a stream or
get_call, and mark them with@deprecatedin the stubs (#1322)Deprecate each member of a deprecated service, class, enumeration or structure (#1322)
Keep the parameters of a deprecated procedure in its signature (#1301)
Arguments
Raise
ValueErrorfor a tuple or structure of the wrong length, a negative unsigned value, or a local socket path that is too long (#1333)Raise an error for a number out of range of its type, or for a string, bytes or a dictionary passed for a list, tuple or structure (#1377)
Raise
TypeErrorforNonepassed for a parameter that cannot be null, before the call is sent (#1333, #1377)
Errors
Breaking Derive every error of the client from the new
krpc.error.RemoteError(#1333)Breaking Rename
krpc.error.RPCErrortoServerError, andFunctionCompilationErrortoCompilationError(#1333)Raise each exception a service declares as its own class, derived from
ServerErroror the builtin it maps, soexcept conn.krpc.ArgumentExceptioncatches it (#1172, #1300, #1333)Breaking Raise
ConnectionErrorwhen the server cannot be reached, with theOSErroras its cause, or sends malformed service definitions (#1219, #1333)Add
statusandreasontoConnectionErrorfor a refused or ended connection (#1219)Raise
EncodingErrorfor every value that fails to decode, including an enumeration value the enumeration does not declare (#1311, #1333)
Streams and events
Breaking Raise
ValueErrorfromStream.waitandEvent.waitfor a negative or NaN timeout, and wait with no deadline for an infinite one (#1219)Breaking Raise
StreamErrorwhen the server removes a stream or event, or for a stream of a procedure that returns an event (#1333, #1377)Breaking Raise
ValueErrorin place ofStreamErrorfor arguments to a streamed function, and for a compiled function with parameters (#1333)Remove a stream or an event at the end of a
withstatement on it (#1291)Deprecated
Client.stream, superseded byadd_streamin awithstatement (#1291)Stream a procedure, property setter or server side function with no value as a stream of
None, and build the call of a property setter withget_call(#1198)Keep a stream running when a value fails to decode, dropping the value (#1219)
Fix
Stream.waitandEvent.waitreturning before the timeout on Windows (#1220)
Server side functions
Compile
matchstatements, and|,&,^,~,inand truth tests on flags enumeration values (#1313, #1337)Accept a function built with the expression API in
Connection.compile(#1269)Add
Connection.get_call_template, and take a member such asEngine.has_fuelas its call template, forExpression.call_with_arguments(#1352)Type the functions
compile,run,add_streamandadd_eventtake, and theKRPC.Expressionobjectcompilereturns (#1306)
Documentation and packaging
Link the references in service docstrings with Sphinx roles, and fix their invalid reStructuredText (#1185)
Write the units and formulas in docstrings as Unicode text (#1169)
Fix a
SyntaxWarningfor an invalid escape sequence on importing theSpaceCenterstubs (#1169)Publish a wheel in place of an sdist (#1289)
krpctools#
Packaging
Client generation
Generate the JavaScript client’s TypeScript modules with
krpc-clientgen js(#1346)Name the connection class
Connectionin C++ and Python, and decode values withDecoderin C# and Java (#1332)Generate exceptions that stand for their language’s equivalent, and derive the others from
ServerErrororServerException(#1172, #1333)Generate the C-nano
_callfunctions, and theKRPC_EXCEPTION_,KRPC_CLASS_,KRPC_ENUMERATION_,KRPC_STRUCT_andKRPC_FIELD_macros (#1267, #1333, #1336)Generate a C++
_streamfunction for a method with no return value (#1198)Support flags enumerations in
krpc-clientgenandkrpc-docgen(#1311)Leave internal procedures out of generated services and API documentation (#1269)
Name the module of another service a generated Python module imports with
--include(#1304)Deprecated
--kspinkrpc-clientgen, superseded by--reference-dir(#1228)Fix bytes default arguments in generated C# and C++ code and in the Lua documentation (#1194)
Documentation generation
Breaking Replace the
SOURCEandOUTPUTarguments ofkrpc-docgenwith--page, which generates several pages in one run (#1252)Add the
jslanguage tokrpc-docgen(#1346)Add the
httplanguage tokrpc-docgen(#1391)Breaking Write the Lua API documentation for
sphinx-lua-ls, in place ofsphinxcontrib-luadomain, with typed signatures (#1202)Add
<unit>and a LaTeX subset for<math>to service documentation, typeset bykrpc-docgenand written as Unicode text bykrpc-clientgen(#1169)Report invalid documentation markup as an error from
krpc-docgen, and a warning fromkrpc-clientgen(#1169)Link each
<see cref>to the member it names, including a service, and warn about onekrpc-clientgencannot resolve (#1185)Say in the reference docs what each client raises for each exception of a service (#1333)
Print a plain error when the ordering file is missing a member (#1228)
Fix the links to a C-nano property with only a setter, and the Java links to a service’s own members and to enumeration values (#1185, #1252)
Service definitions
Breaking Pass the directories of the assemblies a service references to
krpc-servicedefswith--reference-dir, in place of the Kerbal Space Program directory (#1228)Write the
mapped_typeof each exception to the service definitions (#1172)Run
krpc-servicedefson Windows, and write its members in a fixed order (#1228, #1296)Reject unknown options and invalid values in
krpc-servicedefsandkrpc-testserver(#1296)
Test server
Add
krpc-testserver, which runs the bundledTestServer, on Windows too (#1228)Breaking Stop releasing the
TestServerarchive and Docker image, replaced bykrpc-testserver(#1228)Breaking Set the port of the WebSockets server with
--websockets-port, in place of--tcpip-port(#1220)Add the
httpserver type, with--http-portand--http-allowed-origins, and--websockets-allowed-origins(#1391, #1392)Add
--frame-limit,--fixed-rate,--tick-work-us,--frame-work-usand--preset, which model a game’s frame loop (#1376)Add
--flow-control, for RTS/CTS over serial IO (#1386)Fix serial IO (#1228)
Testing
Add
krpc-conformance, which runs the client conformance tests against a client library (#1220)Ship the
TestService2,ConformanceServiceandDeprecatedServicedefinitions besideTestService.json, and addDeprecationSignalsto the testee protocol (#1284, #1322)Add
krpc-game, which installs kRPC, its test add-on and the requested mods into KSP, and runs the game (#1299)Add
krpctools.game, with a pytest plugin and test case classes for testing a mod against a running game (#1299)
v0.7.0#
Core#
Server side functions
Extend
KRPC.Expressionto build server side functions, which the server evaluates (#503, #517, #521, #1124)Allow a function to declare local variables, loop, branch, assign, return early, raise and handle exceptions, and call a procedure that returns no value (#1124)
Allow a function to work on strings, nullable values, and lists, sets and dictionaries, including changing them (#1124)
Add
KRPC.RunFunction, which runs a function once within a single physics tick, andKRPC.CompileFunctionandKRPC.AddFunctionStream(#1124)Add
KRPC.Expression.StateVariable, a variable that keeps its value between evaluations of a function (#1124)Add
KRPC.Expression.CallWithArguments,CreateStruct,GetField,IsNull,Negate,Conditional,ConditionalAnd,ConditionalOr, the empty collections and a constant for every type (#1124)Add
KRPC.Expression.ReturnTypeandHasReturnType(#1124)Add
KRPC.TypeCodeand theCode,Service,Name,TypesandNullableproperties ofKRPC.Type, which names every type a procedure takes or returns (#1124)Add the
StdLibservice, of scalar mathematics and vector and quaternion operations, withStdLib.Printfor debugging a function (#1125)Widen numbers, tuples and collections to a common type in
KRPC.Expression.Invoke,Cast,CreateList,CreateSet,CreateDictionaryandConcat(#1124)Fix
KRPC.Expression.Counton a returned collection, andOrderByordering strings by the system locale (#1124)Fix
KRPC.Expression.Equal,NotEqual,Contains,ToSetandCreateSetcomparing objects, tuples, bytes and collections by reference (#1124)Fix the integer arithmetic of
KRPC.Expressionfor mixed operand types, on overflow and for the smallest integer divided by -1 (#1124)Breaking Rename
KRPC.Expression.FunctiontoLambda, and the parameter ofKRPC.AddEventfromexpressiontofunction(#1124)Breaking Renumber the procedures of the
KRPCservice, so a client that calls them by id must use stubs generated for this version (#1124)Breaking Type
KRPC.Expression.Powerby both operands, require a constant index inGet, limitCreateTupleto seven elements, and reject calls toKRPCprocedures (#1124)
Errors
Add
KRPC.NullReferenceException,KeyNotFoundException,IndexOutOfRangeException,DivideByZeroException,NotSupportedException,TimeoutExceptionandOverflowException, raised by any service and by a function (#1124)Add
KRPC.Error, a general error a function can raise (#1124)Add
KRPC.ObjectDestroyedException, for an object whose game object is gone, andKRPC.ObjectNotLoadedException, for one that is not loaded (#1051, #1120)Breaking Throw
KRPC.UnsupportedSceneExceptionfor a procedure called outside its game scenes (#1119)
Streams and events
Breaking Start a stream when it is added, removing
KRPC.StartStreamand thestartargument ofKRPC.AddStream(#1122)Breaking Create a new stream for every
KRPC.AddStream, so removing one leaves the others for the same call (#1122, #902)Hold a stream or event over an unloaded object, or a procedure unavailable in the game scene, until it is available (#1122, #877)
Add
KRPC.StreamRemovedException, the final result of a stream the server ends (#1122)Throw an exception when streaming a procedure that returns a stream or event, and from
KRPC.RemoveStreamfor an unknown stream id (#1122)Fix a failing stream or event stopping the others, and the server keeping memory for every stream sent on a connection (#1122)
Types and protocol
Breaking Support null for any nullable type, signaled by an
is_nullfield. Class-typed arguments are not implicitly nullable (#1017)Breaking Carry nullability in
Type.nullableat every position, replacingParameter.nullableandProcedure.return_is_nullable(#1091)Breaking Return
KRPC.Clientsas a list ofKRPC.ClientInfostructures (#1148)Allow a structure field, list element, tuple item and dictionary value to be nullable, declared with
Nullable<T>orKRPCNullable(#1091)Add structure types, a compound value with named fields, declared with
KRPCStructon a C#struct(#1066)Add
StdLib.ColorRGBandStdLib.ColorRGBA, the colors of the SpaceCenter, Drawing and UI services (#1148)Add extension members, which a service declares on another service’s class as C# extension methods (#1077)
Add a communication protocol over a unix domain socket, for clients on the same machine as the game (#1065)
Fix a serial connection freezing the game while it carries an RPC (#1035)
Add a protocol version to the connection handshake, sent over WebSockets as the subprotocol
krpc.Nand reported byKRPC.GetStatus(#1162)Fix an exception on a serial connection request that carries no
ConnectionRequest(#1162)Encode and decode values without reflection, cutting the server cost of a call that passes or returns an object by about three quarters (#1091)
Game state
Breaking Remove
KRPC.CurrentGameScene, replaced byKRPC.GameScene(#1140)Add
KRPC.HoldTick,KRPC.ReleaseTickandKRPC.NextTick, which hold the game on one physics tick so a control loop can read, compute and write within it (#1070)Add
KRPC.GameStateLoads, the number of game states that have finished loading (#1121)Remove objects whose game objects are gone from the object store when a game state loads (#1051)
Fix one server stopping emptying the object store that every server shares (#1020)
Fix a request naming an object the server no longer has leaving the connection stuck (#1019)
Server#
Breaking KSP 1.12.5 is the minimum supported version, matching the maximum (#1048)
Add the local socket protocol to the server window. It opens no network port (#1065)
Add the
TickHoldTimeoutsetting, which bounds how long a client may hold the game on one physics tick (#1070)Update the server before the game collects control inputs, so a control input takes effect on the tick of its call (#1070)
Stop the server whenever no game is loaded, disconnecting clients when the player quits to the main menu (#1041)
Save the game when setting
KRPC.GameSceneleaves flight, unless the game cannot be saved (#1117)Remove objects whose game objects are gone from the object store when the game loads, changes scene or destroys a part or vessel (#1051)
Fix setting
KRPC.GameScenefrom one editor to the other, or back to flight, breaking the flight camera or failing with a null reference (#1038, #1117)Fix the error from a call that waits on the game being reported as
Exception has been thrown by the target of an invocation(#1083)Fix the end of a long serial port name being hidden in the server window (#1065)
SpaceCenter service#
Object lifetime
Look up the game object behind a vessel, crew member, part, part module, orbit, alarm, contract, waypoint or communication link on every call, so it keeps working across a quickload (#1051, #764, #885)
Raise
KRPC.ObjectDestroyedExceptionfor an object whose game object is gone, andKRPC.ObjectNotLoadedExceptionfor a part of an unloaded vessel (#1051, #885)Renaming a kerbal destroys its objects, and loading a game replaces a vessel’s maneuver nodes (#1051)
Fix decoupler, maneuver node and force objects accumulating for the rest of the session (#1051, #771)
Add
Orbit.Remove,ReferenceFrame.RemoveandResourceTransfer.Remove, which free the memory the server holds for an object (#1072)Breaking Return a new frame from each call to
ReferenceFrame.CreateRelativeandCreateHybrid, owned by the calling client (#1072)Throw an exception from
ReferenceFrame.CreateRelativeandCreateHybridwhen given no frame (#1072)
Structures
Breaking Return the available torque, force and acceleration members of
Vessel,ReactionWheel,ControlSurface,EngineandRCSasAxisRangestructures (#1148)Breaking Return
Vessel.BoundingBox,Part.BoundingBox,Flight.SimulateAerodynamicWrenchAtandRoboticController.AxesasBoundingBox,WrenchandRoboticAxisstructures (#1148)Breaking Return and set
Part.HighlightColorandLight.ColorasStdLib.ColorRGBstructures (#1148)Breaking Make
LaunchSite,ScienceSubject,ScienceData,ActionGroupActionandCommNodestructures (#1148, #1132)Breaking Replace
CareerLogFlights,CareerLogTypesandCareerLogTargetswithCrewMember.CareerLog, a list ofFlightLogEntrystructures (#1148)Add
ScienceSubject.Id(#1148)
Space center
Breaking Make the
crewparameter ofSpaceCenter.LaunchVesseloptional and exact.nulluses the craft’s default crew, an empty list none, and a list seats the named Kerbals in order (#1017)Breaking Remove
SpaceCenter.LoadSpaceCenter, replaced by settingKRPC.GameScene(#1140)Add
SpaceCenter.CanSave, whether the game can be saved (#1117)Return from
SpaceCenter.RevertToLaunchonce the scene has reloaded, asSpaceCenter.Loaddoes (#1097)Allow the time warp RPCs, apart from
PhysicsWarpFactor, in the space center and tracking station (#1145)Throw an exception from
SpaceCenter.WarpToif the game scene changes during the warp (#1145)Fix
SpaceCenter.MaximumRailsWarpFactorreturning 0 when only warp factor 1 is allowed (#1145)Fix setting
SpaceCenter.ActiveVesselfrom the space center or tracking station clearing the game’s contracts (#1102)Fix the offset of an apoapsis, periapsis, SOI or maneuver node alarm, and
Alarm.EventOffset, leaving the alarm time unchanged (#1114)Fix many stages, vessel resources, communication links, resource converters or hybrid reference frames slowing the server down (#1071)
Editor
Add
SpaceCenter.Editor, for the vessel under construction in the vehicle assembly building and space plane hangar, withEditor.LoadVesselandEditor.LaunchVessel(#1038)Add
EditorVessel.Parts,Resources,Stages,StageAt,DecoupleStagesandDecoupleStageAt, with the figures they give in flight (#1038)Add
EditorVessel.DeltaV,VacuumDeltaV,SeaLevelDeltaV,BurnTimeandDeltaVReady, for a situation set withEditor.DeltaVBody,DeltaVAltitudeandDeltaVSituation(#1038)Add
EditorVessel.Position,MomentOfInertia,InertiaTensor,ReferenceFrame,SurfaceReferenceFrame,BoundingBox,RotationandDirection, as onVessel(#1059, #1153)Make the position, orientation, mass and inertia members of
Partavailable in the editor (#1059, #1064, #1153)Add
EditorVessel.Flight, aSimulatedFlightfor the vessel in a simulated attitude (#1153)
Vessels and crew
Add
Vessel.Terminate, which removes a vessel without recovering it (#1034)Recover a vessel other than the active one with
Vessel.Recoverwithout switching to the space center, and close the mission completion dialog (#1021)Add
Vessel.OrbitSpeedReferenceFrame,SurfaceSpeedReferenceFrameandTargetSpeedReferenceFrame, one per navball speed mode (#1029)Restrict
Vessel.InertiaTensorto flight, asVessel.MomentOfInertiais (#1059)
EVA
Add
CrewMember.EVA, which sends a Kerbal out through the hatch and returns its vessel (#319)Drive a Kerbal on EVA with
Vessel.Control. The translation inputs walk and fly the jetpack,Control.RCSdeploys it, andControl.Lightsswitches the helmet lamp (#319)Add
Control.Board,Airlock,GrabLadder,ReleaseLadderandLadder, for a Kerbal on EVA (#319)
Staging
Breaking Remove
Parts.InStage,Parts.InDecoupleStageandVessel.ResourcesInDecoupleStage, replaced byVessel.StageAtandVessel.DecoupleStageAt(#1140)Calculate the delta-v figures of
VesselandStagewithout the game’s delta-v app open (#1076)Add
Vessel.RecalculateDeltaVandVessel.DeltaVReady(#1076)Fix stages breaking after a revert to launch (#1023)
Document that the
Stagemass figures include all later stages (#1112)
Autopilot
Keep the target roll when setting
AutoPilot.TargetDirection(#1054)Fly a target set during a tick on that tick, at the point in the update that
AutoPilot.UpdateModechooses (#1070)Fix an engaged auto-pilot failing on every physics tick once the object its reference frame is defined against is gone (#1070)
Orbits and bodies
Breaking Fix
CelestialBody.BiomeAttreating its latitude and longitude as radians. It takes degrees, as documented (#1099)Breaking Take a universal time
utinOrbit.OrbitalSpeedAt, and deprecate it in favor ofOrbit.SpeedAt(#1086)Breaking Remove
Orbit.TimeOfClosestApproach,DistanceAtClosestApproachandListClosestApproaches, replaced byOrbit.NextClosestApproachandOrbit.ClosestApproaches(#1140)Breaking Follow the two orbits in a
ClosestApproachas the game runs, and return the same object for the same approach (#1072)Deprecated
Orbit.OrbitalSpeedandOrbit.OrbitalEnergy, superseded byOrbit.SpeedandOrbit.SpecificEnergy, and fixOrbitalSpeedreporting a stale value (#1086)Add
Orbit.CreateFromPositionAndVelocityandOrbit.CreateFromOrbitalElements, for an orbit with no object in the game (#1046)Add
Orbit.Position,Velocity,Altitude,MeanMotion,SemiLatusRectum,SpecificAngularMomentum,SpecificEnergy,ReferenceFrameandOrbitalReferenceFrame(#1046, #1086, #1087)Add
Orbit.VelocityAt,SpeedAt,PositionAtTrueAnomaly,VelocityAtTrueAnomaly,SpeedAtTrueAnomalyandSpeedAtRadius, and a reference frame toOrbit.PositionAt(#1046, #1086, #1087)Document
Orbit.Epochas the universal time of the mean anomaly at epoch (#1046)Add
CelestialBody.SurfaceNormal,BedrockNormalandMSLNormal, andFlight.SurfaceNormal, the slope of the terrain (#1030)Add
CelestialBody.SurfaceReferenceFrame, fixed to the surface at a latitude and longitude (#1116)Fix
ClosestApproach.VelocityandTargetVelocitybeing offset by the velocity of the reference body’s frame (#1047)
Flight and aerodynamics
Add
Flight.SideForce, the aerodynamic force across the air stream (#1032)Fix
Flight.LiftandLiftAccelerationbeing scaled by the cosine squared of the sideslip angle (#1032)Fix
Flight.StallFractionreturningNaNfor a vessel with no lifting surfaces (#1032)Fix
Flight.AerodynamicForce,AerodynamicAcceleration,AerodynamicTorqueand theFlight.Simulatemethods with Ferram Aerospace Research installed (#1032)
Buoyancy
Add the buoyancy of boats and submarines to
Flight, such asDisplacement,CenterOfBuoyancy,BuoyantForce,DepthandBuoyantForceAt(#1103)Add the buoyancy of a part to
Part, such asSplashed,Displacement,BuoyantForce,SubmergedPortionand the water drag multipliers (#1103)Add
SimulatedFlight.Displacement,FullySubmergedCenterOfBuoyancy,BuoyantForceAtandBuoyantTorqueAt, for trimming a hull before launch (#1103)Add
CelestialBody.HasOcean,CelestialBody.OceanDensity,SpaceCenter.BuoyancyScalar,Part.StaticPressureandPart.MaxPressure(#1103)Fix
Flight.StaticPressureandCelestialBody.PressureAtleaving out the water pressure below sea level (#1103)
Control and communications
Breaking Return
nullfromParts.Controllingwhen the vessel has no control point (#1043)Breaking Return
nullfromCommNode.Vesselfor a node that is not a vessel (#1132)Take
Control.StateandControl.Sourcefrom the control level KSP gates a vessel’s control on (#1043)Report no control and no communications from
ControlandCommsfor a vessel outside the communication network (#1043)Add
Control.PrecisionMode(#1082)Keep the Alt+L shortcut in step with
Control.StageLock(#1022)Fix control inputs being applied twice each tick with a RemoteTech flight computer, and apply
Control.Throttleregardless of signal delay (#1093)
Engines and RCS
Breaking Thrust
RCS.TranslationOverridealong the right, up and forward axes it documents (#1080)Add
RCS.Force,RCS.Torque,RCS.OverrideWrenchandThruster.Thrust(#1080)Account for precision mode in the available force and torque of
RCSandVessel, keeping a block driven byRCS.InputOverrideat full thrust (#1082)Count only the nozzles of an RCS part’s selected variant (#1079)
Fix
Engine.ThrustersandRCS.Thrusterson a part with both modules, and after a multi-mode engine switches mode (#1096)Fix
ReactionWheel.AvailableTorquebeing scaled by the square of the authority limiter with KSPCommunityFixes installed (#1042)Add support for [RealFuels](https://forum.kerbalspaceprogram.com/topic/58236-18-real-fuels/), with ignition, ullage and feed pressure members on
Engineand boil-off onPart(#1039)
Parts
Breaking Remove kRPC’s own name tag part module.
Part.Tagneeds KSPCommunityPartModules 0.5 or later, or kOS, to provide one (#1155)Breaking Remove the string-dictionary
Modulemembers, replaced byModule.FieldList,Module.EventListandModule.ActionList(#1140)Deprecated
Part.AddForceandPart.InstantaneousForce, superseded byDebug.AddForceandDebug.InstantaneousForce(#1146)Warn in game when a save or craft has name tags the installed mods cannot load (#1155)
Add
ControlSurface.DeployAngle,MinDeployAngleandMaxDeployAngle(#1088)Fix
ControlSurface.DeflectionOverrideleaving the deploy angle set when released, and throw an exception from settingDeployedduring an override (#1088)Measure only a part’s own meshes in
Part.BoundingBoxandVessel.BoundingBox, with animated meshes in their current pose (#1024, #1153)Fix computing a bounding box duplicating the meshes of every part it measures (#1024)
Fix
Decoupler.IsOmniDecouplerbeing false for every decoupler (#1048)Return the separated vessel from
Decoupler.Decouplefor an omni-decoupler such as a stack separator (#1043)Make
ModuleRefpublic, for a mod that exposes a part module in its own service (#1077)
Resources and camera
Add
ResourceTransfer.Cancel(#1028)Fix a resource transfer never completing once one of its parts is destroyed (#1051)
Move the IVA view between crew with
Camera.NextCameraandCamera.PreviousCamera(#1031)Return
nullfromCamera.FocussedCrewMemberwhen no crew member is in view (#1031)Fix setting
Camera.FocussedCrewMemberto the crew member in view switching to the flight camera (#1031)
Drawing service#
Breaking Return and set colors as a
StdLib.ColorRGBstructure, in place of a tuple (#1148)Breaking Removing a drawing object another client created, or one the server no longer holds, reports that it is not among those this client created (#1072)
Add
Drawing.AddPolyline,AddCircle,AddArc,AddBox,AddSphere,AddPoint,AddAxesandAddOrbit(#1116)Add
StartArrow,EndArrow,ArrowSize,Colors,DashedandLabelto lines, polygons and paths, andText.FaceCamera(#1116)Add
Drawing.AddMapMarker, which draws one of the game’s map icons in the map view, andDrawing.AddImagefor custom marker images (#1116)Add
Drawing.AddNavballMarker, which draws a marker on the navball pointing in a given direction (#1037)Draw lines, polygons and text in the map view, the editor and the tracking station (#1115)
Raise
KRPC.ObjectDestroyedExceptionfrom a drawing object once the object it draws is gone, and skip drawing one whose reference frame is gone (#1051)
User Interface service#
Breaking changes
Breaking Return and set colors as a
StdLib.ColorRGBAstructure with an alpha component, forText.Colorand the color of aUI.Message(#1040, #1148)Breaking Draw user interface elements with the game’s own skin, so
Textstarts out with the game’s size and color (#1040)Breaking Make
Visiblethe element’s own setting. An element is drawn when everything it is inside is visible too (#1040)Breaking Set
InputField.Changedonly when the user types in the field (#1040)Breaking Removing an element another client created, or one the server no longer holds, reports that it is not among those this client created (#1072)
Elements
Add
Toggle, a check box, andToggleGroup, which makes a set of toggles behave as radio buttons (#1040)Add
Slider, horizontal or vertical, andDropdown(#1040)Add
Image, showing a PNG or JPEG file, a plain colored rectangle, or raw pixels fromImage.SetPixelsandImage.UpdatePixels(#1040)Add
ScrollView, a view onto a panel larger than the space available for it (#1040)Add
Layoutto arrange the contents of aPanelin a row, column or grid, withLayoutElementandPanel.SizeFitterfor sizing (#1040)
Properties and behavior
Create user interface elements in every game scene, and remove them when the scene changes (#1040)
Add
Interactable,ColorandTooltipto every control (#1040)Add
Panel.Style,Panel.Color,Panel.DraggableandPanel.BringToFront, to use a panel as a movable window (#1040)Add
InputField.Placeholder,ContentType,CharacterLimitandReadOnly(#1040)Add
Button.Pressed, true while the user holds the button down, andText.WordWrap(#1040)Scale a canvas added with
UI.AddCanvasby the player’s interface scale, as the stock canvas is (#1040)Compare two user interface objects for the same element equal (#1040)
Raise
KRPC.ObjectDestroyedExceptionfrom a user interface object,RectTransform,Layout,LayoutElementorSizeFitteronce its element is gone (#1051)Fix
Text.Fontcreating a font on every set and leaking it (#1040)Fix
RectTransformobjects accumulating for the rest of the session (#1051)
Debug service#
Initial version. Provides RPCs to modify the state of the simulation directly: teleporting a vessel, setting its position, velocity and attitude, applying forces to its parts, filling its resource tanks, and the game’s debug menu cheats (#1033)
DockingCamera service#
A
Camerawhose part is destroyed, or that is no longer a camera, raisesKRPC.ObjectDestroyedException(#1051)
InfernalRobotics service#
Look up a servo and a servo group on every call, so they keep working across a quickload and raise
KRPC.ObjectDestroyedExceptiononce their part or vessel is gone (#1051)Renaming a servo group destroys its objects, which must be obtained again under the new name (#1051)
Fix
ServoandServoGroupobjects accumulating for the rest of the session, and comparing unequal for the same servo or group (#1051)Return the vessel the group was obtained for from
ServoGroup.Vessel(#1051)Fix a servo being listed more than once in a
ServoGroupafter switching to and from its vessel (#1154)
KerbalAlarmClock service#
An alarm keeps working across a quickload, and raises
KRPC.ObjectDestroyedExceptiononce the mod no longer has an alarm with its id (#1051)
LIDAR service#
RemoteTech service#
An
Antennawhose part is destroyed, or that is no longer an antenna, and aCommswhose vessel is gone, raiseKRPC.ObjectDestroyedException(#1051)
C-nano client#
Breaking Support null for any nullable type. A nullable non-class return adds a
bool* returnValueIsNullout-parameter, and a nullable argument is a pointer (#1017)Breaking Renumber the
KRPCservice’s procedures, so a program built against an earlier version must be rebuilt (#1124)Breaking Rename
dockingcamera.htodocking_camera.h(#1149)Breaking Send protocol version 1 when connecting, and fail to connect to a server from before 0.7 (#1162)
Support structure types, as a C struct with a member per field, and nullable structure fields and collection elements, as the value beside a
boolpresence flag (#1066, #1091)Add
KRPC_COMMUNICATION_TCPandKRPC_COMMUNICATION_LOCALSOCKET, withtcpandlocalsocketvcpkg features, to communicate over TCP/IP or a unix domain socket (#1055, #1065)Add
KRPC_SINGLE_CONNECTION, for aKRPC_COMMUNICATION_CUSTOMmechanism that opens its own connection to each server (#1055)Reduce a remote procedure call from tens of reads and writes to one write and two reads (#1056)
Add
KRPC_BUFFER_SIZE, how much of a message to hold in memory while it is sent or received, 1024 bytes by default and 128 on Arduino (#1056)Include the header of every service a service header uses, so service headers can be included in any order (#1150)
Update to protobuf v36.2 and nanopb 0.4.9.2 (#1139)
C# client#
Streams and events
Breaking Start a stream when it is added, removing
Stream.StartandEvent.Start(#1122)Breaking Return
truefromStream.WaitandEvent.Waiton an update, andfalseon a timeout (#1122)Breaking Add an
IConnection.Invokeoverload taking the return type, which a class implementingIConnectionmust provide (#1122)Wait for a stream’s first value in
Stream.Get(#1122)End a stream on an error from the server, and every stream with
ConnectionExceptionwhen the connection closes or fails (#1122)Throw
InvalidOperationExceptionwhen reading or waiting on a removed stream or event, and fromAddStreamon a connection with no stream server (#1122)Add
AddEndCallbackto streams and events, called with the exception that ends the stream (#1122)Call a callback added to a stream or event straight away for a value or firing already received (#1122)
Fix
Event.Waitmissing an earlier firing, and waking only one of two waiting threads (#1122)Fix the stream update thread ending the process on a value it cannot decode or a message it cannot parse (#1122)
Fix a second removal of a stream removing a newer stream for the same call, and stream callbacks throwing
InvalidCastExceptionon an error from the server (#1122)
Server side functions
Add
Connection.Compile, which compiles a lambda into a server side function (#1128)Compile operators, conditionals, casts,
System.Math, string operations, collection, tuple and structure constructors,Console.WriteLineand the common LINQ operators (#1128)Throw
FunctionCompilationExceptionnaming a construct a lambda cannot contain, including a call that depends on the current culture (#1128)Add
Connection.RunandConnection.AddEvent, and aConnection.AddStream<T>overload taking a server side function (#1128)Breaking Compile a lambda given to
AddStream, so the remote calls in its arguments are evaluated on every update (#1128)Breaking Replace
RemoteObject.idwithRemoteObject.GetObjectId, which returns the id of a remote object forExpression.ConstantObject(#1160)
Types and errors
Breaking Throw the matching .NET exception, such as
NullReferenceException,KeyNotFoundExceptionorTimeoutException, for an error reported by any service, in place ofRPCException(#1124)Breaking Support
nullfor any nullable type, including a structure field, list element, tuple item and dictionary value. Value types use the nullable form (int?) (#1017, #1091)Throw
InvalidOperationExceptionfromStream.Getfor a null value the stream’s type cannot hold (#1128)Support structure types, generated as a
structwith a constructor, equality and ordering over its fields (#1066)Fix an
ArgumentExceptionfrom the server carrying its message as the parameter name (#1111)
Connections
Breaking Send protocol version 1 when connecting, and fail to connect to a server from before 0.7 (#1162)
Add
Connection.ConnectLocal, which connects to a server on the same machine over a unix domain socket (#1065)Add a
timeoutparameter to theConnectionconstructor, bounding how long a connection is waited for (#1065)Reduce the cost of a remote procedure call, most for one that returns a collection or an object (#1056)
Update to Google.Protobuf 3.36.2 (#1139)
C++ client#
Streams and events
Breaking Start a stream when it is added, removing
Stream::startandEvent::start(#1122)Breaking Remove
Client::freeze_streamsandClient::thaw_streams. Calls made while holding the tick withKRPC::hold_tickgive values from one physics tick (#1118)Breaking Return a
krpc::Conditionfrom theget_conditionmethods andClient::get_stream_update_condition, locked with akrpc::RecursiveMutex(#1122)Return
truefromStream::waitandEvent::waiton an update, andfalseon a timeout (#1122)Wait for a stream’s first value when reading it (#1122)
End a stream on an error from the server, and every stream with
krpc::ConnectionErrorwhen the connection closes or fails (#1122)Throw
krpc::StreamErrorwhen reading or waiting on a removed stream or event, or on a client with no stream connection (#1122, #1109)Add
add_end_callbackto streams and events, called with the exception that ends the stream (#1122)Call a callback added to a stream or event straight away for a value or firing already received (#1122)
Fix
Event::waitmissing an earlier firing, and a thread waiting on a stream staying blocked when the stream is removed (#1122, #1090)Fix the stream update thread spinning after the server closes the connection, and ending the process on a bad message or a throwing callback (#1122)
Fix data races between a stream update and reading the value or changing the callbacks (#1090, #1108)
Fix use of freed memory by streams and callbacks once the client, stream or event they came from is moved or destroyed (#1122)
Fix two copies of a stream sharing one condition lock, a removed stream returning its last value, and a second removal removing a newer stream (#1122, #1090)
Server side functions
Add
krpc::run, which runs a server side function within a single physics tick and returns its value (#1129)Add
krpc::add_streamandkrpc::add_event, which stream a server side function and create an event from one (#1129)Add
krpc::get_object_id, which returns the id of a remote object forExpression::constant_object(#1160)
Types
Breaking Support null for any nullable type, held as
std::optional, including a structure field, list element, tuple item and dictionary value (#1017, #1091)Support structure types, generated as a
structwith a constructor, equality, ordering and astd::hashover its fields (#1066)Add
krpc::hash_valueandkrpc::hash, which hash any type the client carries, so a tuple or a collection can key an unordered container (#1067)Include the header of every service a service header uses, so service headers can be included in any order (#1150)
Fix a stream of an enumeration or structure, and a procedure with a collection of enumerations, failing to compile (#1094, #1044)
Connections
Breaking Send protocol version 1 when connecting, and fail to connect to a server from before 0.7 (#1162)
Add
krpc::connect_local, which connects to a server on the same machine over a unix domain socket (#1065)Add a
timeoutparameter tokrpc::connect, bounding how long a connection is waited for (#1065)Fix
krpc::Connection::closefailing to link (#1065)Reduce the cost of a remote procedure call, most for one that carries a collection (#1056)
Update to protobuf v36.2 and ASIO 1.38.2 (#1139)
Java client#
Streams and events
Breaking Start a stream when it is added, removing
Stream.start,Stream.startAndWaitandEvent.start(#1122)Breaking Return
truefromStream.waitForUpdateWithTimeoutandEvent.waitForWithTimeouton an update, andfalseon a timeout (#1122)Wait for a stream’s first value in
Stream.get(#1122)End a stream on an error from the server, and every stream with a
StreamExceptionwhen the connection closes or fails (#1122)Throw
StreamExceptionwhen reading or waiting on a removed stream or event (#1122)Add
addEndCallbackto streams and events, called with the exception that ends the stream (#1122)Call a callback added to a stream or event straight away for a value or firing already received (#1122)
Fix
Event.waitFormissing an earlier firing, and waking only one of two waiting threads (#1122)Fix the stream update thread stopping on a value it cannot decode (#1122)
Fix a second removal of a stream removing a newer stream for the same call, and an error ending a stream throwing
ClassCastExceptionin its callbacks (#1122)
Server side functions
Types and errors
Breaking Throw the matching Java exception, such as
NullPointerException,NoSuchElementExceptionorArithmeticException, for an error reported by any service, in place ofRPCException(#1124)Breaking Support
nullfor any nullable type, including a structure field, list element, tuple item and dictionary value. Primitives use the boxed type (Integer, …) (#1017, #1091)Support structure types, generated as a class with a constructor, getters,
equals,hashCodeandComparableover its fields (#1066)
Connections
Breaking Send protocol version 1 when connecting, and fail to connect to a server from before 0.7 (#1162)
Breaking Require Java 17 or later, for unix domain sockets (#1065)
Add
Connection.newLocalInstance, which connects to a server on the same machine over a unix domain socket (#1065)Add
Connection.newInstanceoverloads taking atimeout, bounding how long a connection is waited for (#1065)Update to protobuf-java 4.36.2 (#1139)
Lua client#
Breaking Support
Types.nonefor any nullable type, including a structure field, list element, tuple item and dictionary value (#1017, #1091)Breaking Return messages, such as the server status, as plain tables (#1142)
Breaking Rename
conn.li_dartoconn.lidar, for theLIDARservice (#1149)Breaking Send protocol version 1 when connecting, and fail to connect to a server from before 0.7 (#1162)
Support Lua 5.3 and 5.4, where 64-bit values decode to exact integers (#1142)
Depend on
lua-protobufin place ofprotobuf, and require luasocket 3.0 or later (#1142, #1060)Add
krpc.connect_local, which connects to a server on the same machine over a unix domain socket, on Linux and macOS (#1065)Support structure types, built from their field values in order with named access (#1066)
Skip a service member naming an unknown type with a warning, and connect (#1066)
Add
krpc.limits, the extremes of the numeric types kRPC carries, such askrpc.limits.SINT32_MAX(#1045)Add
krpc.get_object_id, which returns the id of a remote object forExpression.constant_object(#1160)Reduce the cost of a remote procedure call (#1056)
Fix a service failing to load when a default value names an enumeration of a service not yet loaded (#1044)
Fix a type occasionally being built twice, leaving an enumeration or class type unusable (#1068)
Fix the client assigning global variables, such as
dataandtyp(#1142)
Python client#
Streams and events
Breaking Start a stream when it is added, removing
Stream.startandEvent.start(#1122)Return
TruefromStream.waitandEvent.waiton an update, andFalseon a timeout (#1122)End a stream on an error from the server, and every stream with
ConnectionErrorwhen the connection closes or fails (#1122, #315)Raise
StreamErrorwhen reading or waiting on a removed stream or event (#1122)Add
add_end_callbackto streams and events, called with the exception that ends the stream (#1122)Call a callback added to a stream or event straight away for a value or firing already received (#1122)
Fix
Event.waitmissing an earlier firing, and waking only one of two waiting threads (#1122)Fix the stream update thread stopping on a value it cannot decode (#1122, #198)
Fix a second removal of a stream removing a newer stream for the same call, and an error ending an event calling its callbacks (#1122)
Server side functions
Add
Client.compile, which compiles a Python function or lambda into a server side function (#1127)Compile operators, comprehensions, f-strings, slices,
print, a subset of the builtins and themathmodule, and the statements of a function body (#1127)Compile a captured
nonlocalvariable to a state variable, which keeps its value between runs (#1127)Raise
FunctionCompilationErrornaming an unsupported construct (#1127)Add
Client.runandClient.add_event, and stream a function withClient.add_streamandClient.stream(#1127)Add
krpc.get_object_id, which returns the id of a remote object forExpression.constant_object(#1160)
Types and errors
Breaking Raise the matching built-in exception, such as
TypeError,KeyError,IndexErrororTimeoutError, for an error reported by any service, in place ofRPCError(#1124)Breaking Support
Nonefor any nullable type, including a structure field, list element, tuple item and dictionary value (#1017, #1091)Breaking Rename the
LiDARservice class toLIDAR, andconn.li_dartoconn.lidarin a client without stubs (#1149)Support structure types as named tuples, accepting a tuple or list with one element per field (#1066)
Skip a service member naming an unknown type with a warning, and connect (#1066)
Add the class members only the server declares to a service with pre-generated stubs (#1077)
Escape an enumeration member named after a keyword in a dynamically created service, such as
Classtoclass_, as the stubs do (#1094)Add
krpc.limits, the extremes of the numeric types kRPC carries, such askrpc.limits.SINT32_MAX(#1045)Fix a service failing to load when a default value names an enumeration of a service not yet loaded (#1044)
Fix type checkers skipping code after a name the service defines, typing a stream value as
object, and rejectingstream_port=None(#1134)
Connections
Breaking Send protocol version 1 when connecting, and fail to connect to a server from before 0.7 (#1162)
Add
krpc.connect_local, which connects to a server on the same machine over a unix domain socket (#1065)Add a
timeoutparameter tokrpc.connect, bounding how long a connection is waited for (#1065)Reduce the cost of a remote procedure call (#1056)
Require protobuf 7.36.2 or later (#1139)
krpctools#
Breaking Require
--includeinkrpc-clientgenfor each service whose types a C++ or C nano service uses, giving the path of its header (#1150)Breaking Generate C# and C++ stubs that mark the calls returning a stream or an event, which need a v0.7.0 client (#1122)
Breaking Construct a generator module given to
krpc-clientgenby path with the definitions of every loaded service (#1044)Breaking Run
krpc-servicedefsandTestServeron the .NET 10 runtime, in place of .NET 8 (#1139)Generate and document the structure types and nullable values a service defines, for every client (#1066, #1017, #1091)
Read the definitions of several services in
krpc-clientgen, from JSON files alongside DLLs (#1148)Generate python stubs that declare a service’s classes, enumerations, structures and exceptions for type checkers (#1134)
Allow NaN, the infinities and the numeric extremes as parameter default values, named as the target language names them (#1045)
Generate an enumeration default value as the member it names, and report an undeclared one with its service, procedure and parameter (#1044)
Fix default values containing an enumeration failing to generate, and Lua and C++ documentation writing default values in the wrong syntax (#1044)
Fix a 32-bit float default value being written in full, so
0.1fread as0.10000000149011612(#1045)Fix the escaping of member names that are keywords in the generated Python, C++ and Java code and documentation (#1094)
Fix the python stubs for a service that names a type the KRPC service defines failing to import, and its exception types naming no service (#1094)
Fix
krpc-clientgenfailing to load a generator from a file (#1134)
v0.6.0#
Core#
Add
Versionproperty toCore, set by the server plugin on startup (#848)Enable
TCP_NODELAYon client TCP connections, reducing RPC round-trip latency (#879)Surface deprecated members (annotated with
[Obsolete]) in the service definition and over the wire (#904)Add
KRPC.GameSceneand make it settable to switch the current game scene (#897)Deprecated
KRPC.CurrentGameScene, kept as a read-only alias ofKRPC.GameScene(#897)Add
AstronautComplex,MissionControl,ResearchAndDevelopment,AdministrationandMissionBuildergame scenes (#897)Fix the game scenes a procedure is available in never being sent by
GetServices; thegame_scenesfield of every procedure was always empty (#991)Reduce copying and allocation overhead receiving protobuf messages (#972)
Fix the websocket servers rejecting connection requests that are split across multiple reads (#973)
Fix websocket connection URL query parameter parsing (#973)
Fix locale issues with type codes in the service description, and HTTP and websocket protocol tokens (#993)
Server#
Fix server version reported to clients (read from
KRPC.dllnotKRPC.Core.dll) (#848)Fix Logger to write to both
KSP.logandPlayer.log(#780)Improve RPC and stream update performance (#879)
Fix Stream RPCs Executed and Stream RPC Rate always showing 0 in the info window (#879)
Improve the server window UI (#919)
Fix incorrect unit shown for “max. time per update” and “receive timeout” (#919)
Support switching the game scene by setting
KRPC.GameScene(#897)Fix repeated toolbar icons appearing in some situations (#939)
SpaceCenter service#
Space center
Add
SpaceCenter.Expansionsto report the installed KSP expansions (#985)Add
SpaceCenter.AltimeterModeand anAltimeterModeenumeration to get and set the mode of the in-game altimeter (#808)SpaceCenter.ActiveVesselnow returns null when there is no active vessel, instead of raising an error (#821)Breaking Make
LaunchVesselcrew parameter non-optional to work around protocol issue (#824)Deprecated
SpaceCenter.LoadSpaceCenter, superseded by settingKRPC.GameScene(#897)
Vessels and crew
Add
Vessel.LoadedandVessel.Packedto report a vessel’s loading and on-rails state (#967)Add
Vessel.PhysicsRangeto set how far from the active vessel a vessel keeps running its physics simulation, so that it stays controllable beyond the game’s default range. The range applies to that vessel only, and persists until it is set back to zero or the game is exited (#987)Add RPCs for getting acceleration to
FlightandVesselclasses (#581)Fix
Vessel.AvailableTorquedue to sign inconsistency in KSP’sITorqueProviderimplementations (#525)Add
CrewMember.Partand per-partCrewCapacityandCrewproperties (#1001)
Staging
Add staging API giving per-stage delta-v and resource information (#920)
Deprecated
Parts.InStage,Parts.InDecoupleStageandVessel.ResourcesInDecoupleStage, superseded by the staging API (#920)Fix
Part.DecoupledAtnot considering if a decoupler is enabled (#818)Fix
Part.DecoupledAtreturning the wrong stage when the part is decoupled by a decoupler on its parent part (#800)Fix
Decoupler.AttachedPartraising an error when no part is attached to the decoupler’s node; it now returns null (#822)
Autopilot
Rework the
AutoPilotfor smoother, more accurate pointing across a wide range of craft, from small probes to large flexible launchers, with no per-craft tuning (#882, #571, #394, #220, #248, #542)The
AutoPilotnow controls pitch and yaw together, so the nose tracks a straight path to the target and holding a roll no longer curves that path (#882)The
AutoPilotnow detects and damps structural oscillations on long or flexible craft automatically; rigid craft are unaffected (#882)Replace
AutoPilot.EngageandDisengagewith theAutoPilot.Engagedproperty (#882)Add
AutoPilot.TargetRotationto command a full target orientation (direction and roll) (#882)Add
AutoPilot.SetDirectionAndUpto aim the nose along a direction while keeping the roof aligned to an up vector, so an orientation can be held through a maneuver without the singularity the old roll control hit at the vertical (#882)Add
AutoPilot.UpReference, a persistent reference thatAutoPilot.TargetRollis measured against, and makeTargetRollwell-defined through the vertical (#882)Add
AutoPilot.AttitudeErrorfor a singularity-free (pitch, yaw, roll) attitude error;PitchErrorandHeadingErrornow use the same well-defined decomposition (#882)Fix
AutoPilot.RollErrorreturning spurious large values near vertical (#564)Document
Flight.Pitch,HeadingandRolland the scalar target pitch/heading/roll as ill-defined near vertical, pointing to the rotation and error readouts instead (#882)Add
AutoPilot.TargetSmoothingTimeto slew the target smoothly when it changes, with matchingCurrent*readouts of the smoothed target actually being tracked (#882)Add
AutoPilot.SoftStartTimeto fade in control output on engagement (#882)Add
AutoPilot.Resetto disengage and restore all settings to their defaults (#882)Add
AutoPilot.ShowInfoUIto show an in-game autopilot info window (#882)Replace
AutoPilot.RollThresholdwithRollStartAngleandRollEngageAngle(#882)Replace
AutoPilot.StoppingTimeandDecelerationTimewithAutoPilot.MaxAngularVelocity(#882)Replace
AutoPilot.AttenuationAnglewithPitchYawAttenuationAngleandRollAttenuationAngle(#882)Add controls to tune and observe the
AutoPilot’s oscillation mitigation (rate filter, bandwidth floor, feedforward-cut and output-filter modes, and manual structural-frequency settings) (#882)Add
AutoPilot.StoppingAngleThresholdandStoppingVelocityThresholdto control whenAutoPilot.Wait()returns (#882)Add an optional timeout to
AutoPilot.Wait(), throwingTimeoutExceptionif it expires (#882)Add
AutoPilot.DiagnosticLoggingandDiagnosticLogfor per-tick controller diagnostics (#882)On client disconnect the
AutoPilotis now disengaged but its settings and target are kept (#882)Fix
AutoPilot.Errorto return the absolute value of the normalized angle (#893)Fix the auto-pilot no longer controlling the vessel after a Revert to Launch when a client keeps its auto-pilot object across the reload (it appeared engaged but stopped driving the vessel until the game was restarted) (#958)
Fix
AutoPilot.ReferenceFrameraising an error when set to a docking port reference frame (#882)
Reference frames
Fix
ManeuverandManeuverOrbitalreference frame velocity (previously returned zero; now returns the orbital velocity at the node UT) (#880)Fix angular velocity for
VesselSurface,VesselSurfaceVelocity,CelestialBodyOrbital,Maneuver,ManeuverOrbital,Part,PartCenterOfMass,DockingPortandThrustreference frames (previously returned zero) (#880)Fix
VesselOrbitalreference frame angular velocity (missing Coriolis correction) (#823)Fix reference frame velocity being incorrect at non-equatorial latitudes (#454)
Fix
Vessel/Part/Hybridreference frame rotation precision (#880)Fix
ReferenceFrame.CreateHybridusing velocity frame’s angular velocity instead of theangularVelocityframe (#880)Fix
VesselSurfaceVelocityreference frame producing NaN when surface velocity is near zero; now throwsInvalidOperationException(#880)Fix
PartCenterOfMassreference frame throwingInvalidOperationExceptionon velocity transforms (#880)Fix
Maneuverreference frame forward-vector fallback using unnormalized burn vector in collinearity check (#880)Fix
LookRotation2producing NaN for rotations near 180° by using Shepperd’s method (#880)Fix maneuver node reference frame positions being computed relative to the active vessel, giving wrong positions for maneuver nodes on other vessels (#880)
Improve performance of
CommNode.IsVessel,CommNode.Vessel,Vessel.AngularVelocityand reference frame angular velocities (#975)
Orbits, nodes and bodies
Add
Orbit.OrbitalEnergy(#303)Add
Orbit.NextClosestApproachandOrbit.ClosestApproaches, and aClosestApproachclass exposing the time, distance, positions, velocities, relative position/velocity and relative speed at a close approach with a target orbit, plus the vessels or bodies involved (#334)Deprecated
Orbit.TimeOfClosestApproach,Orbit.DistanceAtClosestApproachandOrbit.ListClosestApproaches, superseded byOrbit.NextClosestApproachandOrbit.ClosestApproaches(#334)Add
Node.Rotation(#880)Fix
Nodeobjects whose maneuver node was removed byControl.RemoveNodes, anotherNodeobject or the in-game UI: all members now raise an error, instead of silently reading and writing the detached node (#975)Fix
CelestialBody.Rotationreturning incorrect values before a flight scene loads (#890)
Flight and aerodynamics
Breaking Add a rotation parameter to
Flight.SimulateAerodynamicForceAtto set the vessel attitude (angle of attack and sideslip) independently of velocity. Pass the current rotation for the previous behavior (#915)Add
Flight.SurfaceProgradeandFlight.SurfaceRetrogradedirection vectors (surface-relative velocity direction, matching navball surface mode) (#582)Fix
Flight.AngleOfAttackandFlight.SideslipAngletreating dot product as radians instead of usingasin(#880)Add
Flight.AerodynamicTorque, the live counterpart toFlight.AerodynamicForce, giving the net aerodynamic torque acting on the vessel about its center of mass on the current physics frame; not available with FAR (#914)Add
Flight.SimulateAerodynamicTorqueAtto simulate the aerodynamic torque about the vessel’s center of mass, for a hypothetical attitude and angular velocity, with both stock aerodynamics and FAR, in newton-meters. The torque includes both damping mechanisms the game applies: the change in each part’s local airflow due to rotation, and the per-part rigidbody angular drag (#825, #914, #429)Add
Flight.SimulateAerodynamicWrenchAtto evaluate stock aerodynamic force and torque together at a hypothetical center-of-mass state, attitude, body rate and atmospheric ephemeris time (#914)Add
Part.DragandPart.Liftreturning the aerodynamic drag and lift forces acting on an individual part (#459)Fix
Flight.SimulateAerodynamicForceAtignoring the current deflection of aerodynamic control surfaces, including deployed airbrakes (#622)Fix
Flight.SimulateAerodynamicForceAtoverestimating drag at low altitude and subsonic speed by applying KSP’s pseudo-Reynolds drag multiplier to cube drag (#912)Fix
Flight.SimulateAerodynamicForceAtreturning force in kilonewtons instead of newtons when FAR is installed (#915)Fix
Flight.SimulateAerodynamicForceAtcomputing incorrect lift for command pods and other parts with a perpendicular-only lifting-surface module: cube body lift was applied even where the game disables it (a pod with a heatshield occupying its bottom node has none), and lifting-surface modules were evaluated against stale internal airflow state, so results depended on the game context the call was made from (landed, in vacuum, or in atmospheric flight) (#914)Fix
Part.Lift,Flight.LiftandFlight.AerodynamicForceincluding stale body lift for parts whose body lift the game suppresses, e.g. a pod with a heatshield attached (#971)A
Flightis freed once the reference frame it is measured in is gone, rather than being kept for as long as its vessel exists (#1072)
Control
Breaking
Control.SASnow throws an exception when set to true while the autopilot is engaged, matchingAutoPilot.SAS. Previously the write was accepted and the autopilot silently switched SAS back off on the next physics tick (#492)Fix
Control.SASModebeing dropped when set in the same physics tick as enabling SAS (#236)Add
Control.PitchTrim,Control.YawTrimandControl.RollTrimto get/set the persistent pitch, yaw and roll trim of the active vessel (#863)Add
Control.AeroSurfacesto enable/disable pitch, yaw and roll on all control surfaces (#827)Add
Control.EngineGimbalsto enable/disable gimbal on all gimballed engines (#827)Add
Control.ThrustReversersto engage/disengage thrust reversers on all engines (#865)Add
Control.GetActionGroupActionsto list the part actions assigned to an action group (#864)Add direct control of engine gimbals, RCS and control surfaces (#917)
Fix
Control.CustomAxis01-04being applied to the active vessel instead of the target vessel, and the getters not reading back the value that was set (#938)Fix throttle being applied to a vessel with no RemoteTech control connection (#938)
Engines
Add
Engine.Flameout(#311)Add
Engine.CanReverseThrust,Engine.ThrustReversedandEngine.ToggleThrustReversalto control thrust reversal on stock and recognized mod engines (#865)Fix
Engine.Propellantsfailing for non-active mode on multi-mode engines with different propellants (#833)Fix
Engine.AvailableThrustandMaxThrustfor air-breathing engines at supersonic speeds (#924)
Reaction wheels, RCS and control surfaces
Add
ReactionWheel.AuthorityLimiter(#909)Fix
ReactionWheel.AvailableTorquenot considering authority limiter setting (#909)Fix RCS force and torque vector calculations using max thrust rather than available thrust (#909)
Fix
RCS.MaxTorquedocumentation error - it considers thrust limit set to 100% (#909)Fix
RCS.Activereporting a shielded thruster as inactive when it is able to thrust while shielded (#975)Fix
ControlSurface.AvailableTorquereturning inconsistent signs (ModuleControlSurfacenegates the roll axis); now normalized to positive/negative torque like other parts (#881)
Parachutes and wheels
Fix
Parachute.Deploybeing a silent no-op for RealChute parachutes (#382)Add
Parachute.SafeStatereporting whether it is currently safe to deploy the parachute (safe, risky, unsafe, or not applicable) (#977)Add
Wheel.SteeringAngleAutoto get/set automatic speed-based steering angle limiting (#975)
Deployable parts
Breaking Replace the
RadiatorState,SolarPanelState,AntennaState,LegState,WheelStateandCargoBayStateenumerations with a singleDeployableStateenumeration, whose members areDeployed,Retracted,Deploying,RetractingandBroken.Radiator.StateandSolarPanel.Statenow reportDeployedandDeployingin place ofExtendedandExtending, andCargoBay.StatereportsDeployed,Retracted,DeployingandRetractingin place ofOpen,Closed,OpeningandClosing. The underlying values are unchanged, so only the enumeration and member names need updating (#986)Breaking
ResourceHarvester.Stateis now aDeployableStateand no longer reportsActive; useResourceHarvester.Activeto check whether the harvester is drilling. TheResourceHarvesterStateenumeration is removed and its values renumbered, so clients using it must be regenerated (#986)Fix
CargoBay.StatereportingDeployedfor a closed cargo ramp, and reporting a resting state while the bay was still moving (#986)
Robotic parts
Breaking
RoboticController.AddAxis,AddKeyFrameandClearAxisnow identify an axis by the name of its field, for exampletargetAngle, instead of by the label shown in the part’s menu, for example “Target Angle”. The names now match those returned byRoboticController.Axes, which previously could not be passed back in, and no longer change with the language the game is running in (#993)Add
Parts.RoboticControllers(#985)Add to
RoboticController:Enabled,Playing,Position,Length,PlaySpeed,PlayandStop(#985)Add to
RoboticHinge:MinAngle,MaxAngleandIsMoving(#985)Add to
RoboticPiston:MinExtension,MaxExtensionandIsMoving(#985)Add to
RoboticRotation:MinAngle,MaxAngle,AllowFullRotationandIsMoving(#985)Add to
RoboticRotor:MaxTorque,BrakePercentageandIsMoving(#985)Fix
RoboticRotation.CurrentAngleandRoboticRotor.CurrentRPMreturning stale values in flight (the KSP fields they read are only refreshed while the part action window is open) (#985)
Resource harvesters and converters
Fix
ResourceHarvester.Activebeing silently ignored when set while the harvester is deploying; the requested state is now applied when the deploy completes (#983)Fix
ResourceHarvester.ExtractionRatereturning 0 when part action window is not open (#889)Fix
ResourceConverter.StateandResourceHarvester.ThermalEfficiencymisreading the KSP status string (#892)Fix
Sensor.Valuereturning zero when the part action window is not open (#883)
Part modules, fields and configuration
Add
PartField,PartEventandPartActionAPI (#859)Deprecated the string-dictionary
Modulefield, event and action members (#859)Allow
Module.HasFieldWithId,GetFieldById,SetFieldIntById,SetFieldFloatById,SetFieldStringById,SetFieldBoolByIdandResetFieldByIdto also access fields not visible in the UI (#858)Add
Part.Config,Module.ConfigandConfigNodefor accessing part and module static configuration (#831)
Science, contracts and waypoints
Fix
Experiment.Resetnot clearing the science data stored by DMagic experiments, which caused the next call toRunto fail with “Experiment already contains data” (#550)Add
Contract.DateAccepted,DateDeadline,DateExpireandDateFinished(#977)Guard
ContractManageragainst nullContractSystemin non-career game modes (#819)Fix
Waypoint.MeanAltitudereturning the altitude relative to the terrain below the waypoint instead of relative to sea level (#801)Fix
Waypoint.MeanAltitude,SurfaceAltitudeandBedrockAltitudenot round-tripping: the setters did not account for KSP storing waypoint altitudes relative to the bedrock height, so the altitude read back differed from the value set (#891)
Alarms
Breaking
Alarm.Typenow returns anAlarmTypeenumeration value instead of a string (#853)Add to
Alarm:Node,OriginBody,DestinationBody,WarpAction,MessageAction,PlaySound,DeleteOnDismiss,TriggeredandActioned(#853)Add
AlarmType,AlarmWarpActionandAlarmMessageActionenumerations (#853)Add
Alarm.Removeto delete an alarm (#853)Add
AlarmManager.AlarmWithName,AlarmManager.AlarmsWithTypeandAlarmManager.AddTransferWindowAlarm(#853)Fix
NullReferenceExceptionraised every frame after creating or removing an alarm (#853)
Camera
Add
Camera.FoVto get and set the camera field of view, and read-onlyCamera.MinFoV,Camera.MaxFoVandCamera.DefaultFoV(#804)Add
Camera.NextCamera,Camera.PreviousCameraandCamera.FocussedCrewMemberto cycle and select IVA cameras (#804)Fix
CameraDistance,Pitch,HeadingandFoVsetters being lost when set during a camera mode switch (#318)
Client disconnect cleanup
Remove forces added by
Part.AddForcewhen the client that added them disconnects (#934)Cancel in-progress resource transfers when the client that started them disconnects; a canceled transfer is marked as complete (#934)
Fix part highlighting leaking a client-disconnect event handler each time the flight scene is loaded (#934)
Localization
Fix
DockingPort.Undockdoing nothing when the game is not running in English (#993)Fix
Fairing.Jettisondoing nothing, andFairing.Jettisonedalways reporting true, when the game is not running in English (#993)Fix
CargoBay.Openneither opening nor closing the bay when the game is not running in English (#993)Fix
ResourceConverter.Stateonly ever reportingRunningwhen the game is not running in English, leavingMissingResource,StorageFullandCapacityunreachable (#993)Fix
DockingPort.StatereportingShieldedinstead ofMovingwhile a shield is opening or closing, when the game is not running in English (#993)Fix part module field values being formatted using the machine’s locale, so that
Module.Fields,Module.GetFieldandPartField.Valuereturned numbers that clients running under a locale that writes decimals with a comma could not parse (#993)
User Interface service#
Fix locale issues with
UI.Message(#993)
DockingCamera service#
Fix
DockingCamera.Availableincorrectly reporting false in game scenes other than flight (#937)
InfernalRobotics service#
Add to
Servo:UID,Mode(with a newServoModeenum),TargetPosition,TargetSpeed,CommandedPosition,DefaultPosition,ForceLimit,MaxForce,MaxAcceleration,MaxSpeed,ElectricChargeRequired,SpringPower,DampingPower,RotorAcceleration,IsLimited,IsRotational,IsServo,CanHaveLimits,HasSpring,IsRunning,PresetPositions,AddPreset,RemovePresetAtandSortPresets(#942)Add to
ServoGroup:Vessel,MovingDirection,AdvancedMode,ElectricChargeRequired,BuildAidandIKActive(#942)Fix
Servo.MinPositionandMaxPositionto return the position limits set in the tweak menu, rather than the fixed range from the part configuration (#942)Support controlling servos on any loaded vessel, not just the active vessel (#943)
Fix
Servo.MoveLeft,MoveCenterandMoveRightfailing with the latest version of IR (#941)Make
InfernalRobotics.Availablereport correctly in all game scenes (#941)Fix
InfernalRobotics.Readyreporting false when queried before IR has finished loading (#941)
KerbalAlarmClock service#
Make available in all game scenes (#944)
Add
AlarmType.ScienceLab(#982)Add
AlarmAction.CustomandAlarmAction.Converted(#982)Add
Alarm.Enabled,Alarm.PlaySound,Alarm.Triggered,Alarm.SupportsRepeatandAlarm.SupportsRepeatPeriod(#982)Fix
Alarm.Remainingalways failing with an invalid cast error (#982)Fix alarm equality, so the same alarm obtained twice compares equal (#982)
Fix accessing an alarm after it has been removed; it now fails with an “Alarm does not exist” error (#982)
LIDAR service#
Fix
LiDAR.Availableincorrectly reporting false in game scenes other than flight (#937)
RemoteTech service#
Fix
RemoteTech.Availableincorrectly reporting false in game scenes other than flight (#937)
C-nano client#
Distribute via vcpkg (#874)
Breaking Drop autotools build; CMake is now the only supported build system (#870)
Breaking Modernize CMake build: require CMake 3.15+, target-based usage requirements (#834)
Breaking nanopb is now an external dependency (fetched via
FetchContentor found on the system) rather than being bundled in the release archive; the Arduino package still bundles nanopb (#870)Breaking Pre-generated protocol buffer code and
krpc.protoare bundled in the release archive; setKRPC_REGENERATE_PROTO=ONto regenerate the code fromkrpc.protousing the nanopb generator (#872)Add CMake package config so consumers can use
find_package(krpc_cnano CONFIG REQUIRED)(#870)CMake dependency options (
KRPC_FETCH_DEPS,KRPC_FETCH_PROTOBUF,KRPC_FETCH_NANOPB): when OFF (default) the system install is required; when ONFetchContentis used. (#870)Add support for serial port communication on Windows (#872)
Mark deprecated functions with the
KRPC_DEPRECATEDattribute macro (#904)Generated functions are now defined as static inline, so the generated service headers can be safely included from multiple translation units (#948)
Breaking On Arduino, a read now fails with
KRPC_ERROR_EOFwhen the serial timeout elapses instead of retrying forever (#1002)Add
KRPC_ERROR_MESSAGESoption, which captures the message describing an error returned by the server so that it can be read usingkrpc_get_error_message. (#1002)Fix corruption of received data on POSIX systems when a serial read returns fewer bytes than were asked for (#1002)
C# client#
Breaking Requires .NET Framework 4.7.2 or later (#948)
Update to protobuf v3.35.1 (#850)
Mark deprecated members with the
[Obsolete]attribute (#904)Disposing a connection now stops and joins the stream update thread (#1005)
An error from a service whose exception types were never registered now raises an
RPCExceptiondescribing it (#1005)An exception thrown by a stream or event callback no longer escapes the stream update thread (#1005)
Fix a deadlock between the stream update thread and a thread waiting for an update (#1005)
C++ client#
Update to protobuf v35.1 (#850)
Update to ASIO 1.38.0 (#850)
Distribute via vcpkg (#874)
Breaking Drop autotools build; CMake is now the only supported build system (#851)
Breaking Modernise CMake build: require CMake 3.15+, C++17, target-based usage requirements (#834)
Add CMake package config so consumers can use
find_package(krpc CONFIG REQUIRED)(#851)CMake dependency options (
KRPC_FETCH_DEPS,KRPC_FETCH_PROTOBUF,KRPC_FETCH_ASIO,KRPC_FETCH_ABSL): when OFF (default) the system install is required; when ONFetchContentis used. (#857)Mark deprecated members with the
[[deprecated]]attribute (#904)An error from a service whose generated header is not included now throws an
RPCErrordescribing it (#1007)An exception thrown by a stream or event callback no longer escapes the stream update thread (#1007)
Fix a data race on the exception thrower map between constructing a service and handling an error (#1007)
Fix stream update notifications being lost, which could leave
Client::wait_for_stream_updatesleeping through the update it was waiting for (#974)Fix
Client::freeze_streamsblocking forever when no stream is producing updates (#974)
Java client#
Update to protobuf v4.35.1, guava 33.4.8-jre, antlr4-runtime 4.13.2 (#850)
Mark deprecated members with the
@Deprecatedannotation and an@deprecatedjavadoc tag (#904)Reduce copying when encoding values (#979)
Fix
Stream.getRatealways returning zero, whatever the rate had been set to (#1004)Fix looking up the method to stream or call (#1004)
An exception thrown by a stream or event callback no longer ends the stream update thread (#1004)
Fix a deadlock between the stream update thread and a thread waiting for an update (#1004)
An error from a service with no generated stubs loaded now raises an
RPCExceptiondescribing it (#1004)
Lua client#
Fix
attributesmodule to always return boolean foris_a_class_memberandis_a_class_property_accessor(#850)Fix service, method and property names being converted to snake case using the machine’s locale (#993)
Calling a procedure with an argument that needs coercing no longer leaves a global named
okbehind (#1003)Remove
encoder.client_name; a leftover from before the protocol used protocol buffers (#1003)
Python client#
Breaking Requires Python 3.10+ (#837)
Update to protobuf v7.35.1 (#850)
Allow calling static class methods from a class instance (#832)
Emit a
DeprecationWarningwhen calling a deprecated member, and note deprecation in docstrings (#904)Fix static class method calls being sent to the wrong connection when multiple clients are connected (#979)
An exception raised by a stream or event callback no longer ends the stream update thread (#1008)
Fix a deadlock between the stream update thread and a thread waiting for an update (#1008)
An error from a service this client does not know about now raises an
RPCErrordescribing it (#1008)Fix decoding of
sint64values at or above2**62(#1008)A closed connection is now reported instead of being mistaken for no data having arrived (#1008)
Removing a stream, or closing the client, now wakes threads waiting for an update on it, which previously waited for an update that could never arrive (#1008)
The client can now be closed from a stream or event callback, which raised
RuntimeErrorand left the client half closed (#1008)Fix a stream returning
Nonerather than its value, or the error saying it has none, when read as its first update was being stored (#1008)
krpctools#
Breaking Requires Python 3.10+
Breaking
krpc-servicedefsnow runs theServiceDefinitionstool on the .NET 8 runtime; Mono is no longer requiredSurface deprecated members in generated documentation and client stubs (#904)
Fix generated Java clients failing to compile when a service has enough procedures to push the generated type tables past the JVM’s method size limit
Generated C-nano functions are now defined as static inline, so the generated service headers can be safely included from multiple translation units
Fix C-nano client generation emitting zero-sized argument arrays for procedures with no parameters
Fix C-nano documentation rendering an entire service’s API as an indented block quote
Fix
docgendropping remarks in service-level documentationFix cross-service member references not resolving in generated C# and Lua documentation (#897)
Fix member references in generated Python documentation using lowerCamelCase instead of snake_case
Fix generating client stubs and documentation from a KSP install failing when the machine’s locale is not UTF-8 and a service’s documentation contains non-ASCII characters
v0.5.4#
Core#
Initial version, split off from
KRPC.dll
Server#
Fix memory leaks when switching game scene (#779)
SpaceCenter service#
Fix vessel recovery (#782)
Allow vessel switch from any scene (#781)
Fix memory leaks on each scene switch (#779)
Force throttle to zero when timewarping (#792)
Add
SpaceCenter.Decoupler.IsOmniDecoupler(#789)Fix decoupler crashes with stack separators (#790)
Make
CelestialBodyparameters doulbe precision (#786)Fix scaled camera distance clamp (#785)
Python client#
Fix streams for services without pre-generated stubs (#774)
krpctools#
v0.5.3#
Python client#
Fix assertion error when connecting to a server with third party services installed (#754)
v0.5.2#
Server#
SpaceCenter service#
Fix null reference exception when
SpaceCenter.LaunchVesselFromVABis called with no crew (#599)Add
Engine.IndependentThrottleto check whether it is enabledAllow setting the independent throttle using
Engine.ThrottleFix
Engine.HasFuelsometimes returning true for flamed-out SRBs (#631)Add functions to manipulate a part modules fields based on identifier
Module.Fieldsnow throws an exception if there are multiple fields with the same nameAdd
Module.FieldsByIdto get a dictionary of field values keyed by their identifierAdd
Module.SetFieldBoolandModule.SetFieldBoolByIdto set a field with a boolean valueModule.SetField*methods now raise an exception if setting the field to the wrong value typeChange default names for alarms created by
AlarmManager
C-nano client#
The arduino compatible version of the library now uses the same “krpc_cnano/…” include directory as the version released on GitHub.
C++ client#
Use protobuf-lite
Roll back to protobuf v3.21.12 to avoid absl dependency
Python client#
Requires Python 3.7+
Add type hints (#703)
Pre-generated stubs now include implementation of services as well as type hints
Fix various type hint bugs in generated stubs
Allow importing types from a service using, for example “
from krpc.services.spacecenter import Vessel”
v0.5.1#
SpaceCenter service#
Fix null reference exception in autopilot for vessels without custom axis controls (#649)
v0.5.0#
Server#
Support for KSP 1.8+
Update to protobuf v3.9.1
Update to ModuleManager 4.2.2
Fix bug with streams where a stream update is not sent initially after a stream is created, if the stream value is null (#515)
SpaceCenter service#
Update to work with KSP 1.8+
Add to
SpaceCenter:LaunchSitesCanRevertToLaunchRevertToLaunchTransferCrewCreateKerbalGetKerbalLoadSpaceCenterMapFilterScreenshot
Add crew and
flagUrlparameters toSpaceCenter.LaunchVesselAdd support for more vessel types
Add
LaunchSiteAdd
CelestialBody.IsStarandCelestialBody.HasSolidSurfaceAdd custom axes to
ControlclassAdd
Part.FlagURLAdd
Part.AvailableSeatsAdd
Part.GlowAdd
Part.AutoStrutModeAdd support for resource drain parts
Add support for stock robotic parts
Add
Parachute.CutAdd support for docking port rotation
Add support for
LightblinkingAdd support for wheel steering angle limit and response time
Fix
ParachuteState.Activestate and clean up real chute vs. stock parachute logicAdd support for stock alarms (
AlarmManagerandAlarmclasses)Use raycast to measure surface height more precisely in
CelestialBody.SurfaceHeight(#524)Fix null reference exception when checking active vessel (#528, #530)
Fix null reference exception when waiting for active vessel change (#516, #529)
Add
RCS.ThrustLimitandRCS.AvailableThrust(#519)Add
Control.StageLock(#541)Fix launch checks and automatic vessel recovery in
SpaceCenter.LaunchVesselFix setting camera target to an unloaded vessel (#536)
Fix
Control.LegsandControl.Wheelsnot deploying/retracting legs/wheels correctly (#509, #261)Allow legs/wheels can be individually deployed/retracted using
Leg.DeployedandWheel.Deployed(#509, #261)Allow lights to be individually turned on and off (#261)
Fix
Engineand RCS fuel calculations only being done when they are enabled (#514, #254)Add support for parts that contain multiple experiments (#533)
Part.Experimentnow throws an exception if the part has more than one experimentAdd
Part.Experimentswhich returns a list of experiments in the partUpdate
Parts.Experimentsto return all experiments contained in the parts
Add
Experiment.NameandExperiment.TitleFix
Fairing.JettisonandFairing.Jettisonedfor parts from the ProceduralFairings mod (#549)Fix
Engine.SpecificImpulsereturning 0 for Realism Overhaul engines that are active but not throttled up (#548)Fix compatibility with DMagic science experiments mod (#550)
Fix
RCS.MaxThrustreturning incorrect valuesFix
SimulateAerodynamicForceAt(#587)Fix
RCS.GetTorqueVectorsnot considering if each direction is enabled (#591)Add
RCS.AvailableForceandVessel.AvailableRCSForce(#597)
Drawing service#
Add
Drawing.AddDirectionFromCoMChange
Drawing.AddDirectionto start the line at the origin of the reference frame (#518)
DockingCamera service#
Initial version
InfernalRobotics service#
Update to work with Infernal Robotics Next v3.1.9
Drop support for original Infernal Robotics mod
Remove
Servo.MoveNextPresetandServo.MovePrevPresetas they no longer exist in the mod
KerbalAlarmClock service#
Update API wrapper to work with KerbalAlarmClock v3.13.0.0
LIDAR service#
Initial version
C-nano client#
Update to protobuf 22.0
Update to nanopb 0.4.7
Rename
KRPC_COMMS_CUSTOMtoKRPC_COMMUNICATION_CUSTOM
C# client#
Update to protobuf v3.22.0
Drop support for net35
C++ client#
Update to protobuf v3.22.0
Update to ASIO 1.24.0
Fix include path to ASIO header in CMake build scripts
Fix CMake build scripts not building a static library with MSVC on Windows
Java client#
Update to protobuf v3.22.0
Lua client#
Update to protobuf v3.22.0
Python client#
v0.4.9#
krpctools#
v0.4.8#
Server#
Support for KSP 1.5.1
Update to protobuf v3.6.1
Add support for specifying more granular game scenes for RPCs (#471)
SpaceCenter service#
Allows RPCs to be accessed from game scenes other than just flight (#471)
Merge NameTag (krpc/NameTag) into the main kRPC release
Fix air-relative velocity calculation for
SimulateAeroDynamicForceAtwith FAR (#500)Changed
OrbitAPI to accept target orbits asOrbitobjects instead ofVesselobjects, to allow computing closest approach etc. to planets (#479)Trying to enable SAS while the autopilot is engaged now throws an exception as this is not permitted (#492)
Add color and size paramters to
UI.Message(#499)Fix
Flight.TerminalVelocity(#485)Fix null reference exception when deploying fairings after reverting to launch (#501)
Drawing service#
Fix reference frames for
AddDirectionso that the line always starts at the active vessel’s CoM (#486)
InfernalRobotics service#
Add suport for both original Infernal Robotics and Infernal Robotics Next (#476)
Add
InfernalRobotics.Readywhich indicates if the IR is on the current vessel and ready to receive commandsChange
InfernalRobotics.Availableto return whether the IR mod is installed (not if the IR API is “ready”)
C-nano client#
Update to protobuf v3.6.1
Change second parameter of
krpc_opento be a configuration parameter of typekrpc_connection_config_tto allow additional configuration options to be passed, such as baud rate for Arduino serial port (#487)Fix encoding issue in procedure call messages that was causing compilation on Arduino Due to fail
C# client#
Update to protobuf v3.6.1
C++ client#
Update to protobuf v3.6.1
Update to ASIO 1.12.1
Add condition variable and callbacks that are called when a stream update message is processed (#473)
Fix compilation issue on MacOS
Fix cmake configuration detection of protoc binary
Java client#
Make
Connectionclass implementAutoClosable(#491)Update to protobuf v3.6.1
Lua client#
Update to protobuf v3.6.1
Python client#
Update to protobuf v3.6.1
Add condition variable and callbacks that are called when a stream update message is processed (#473)
krpctools#
Fix Python 3 compatibility
Fix template loading in
docgenon WindowsAdd documentation of game scenes for each RPC
v0.4.7#
Server#
Support for KSP 1.4.4
Fix launch site clear checks (#483)
SpaceCenter service#
Fix
Flight.LiftandFlight.Dragshould return values in Newtons (#475)
C-nano client#
Fix include paths on Arduino (#482)
C++ client#
Ensure .lib files are generated when building using CMake with MSVC (#474)
v0.4.6#
Server#
Support for KSP 1.4.3
Remove
CompatibilityCheckeras it’s deprecated - instead rely on CKAN and KSP-AVC version checksUpdate icons to be 64x64 to fix blurring when loading as textures (#453)
Fix equality checking for streams of collections (#452)
Fix RPC errors being reported in
Response.errorinstead of individualProcedureResult.errorfields (#467)
SpaceCenter service#
Added
SpaceCenter.GameMode(#455)Added
SpaceCenter.Science,FundsandReputation(#455)Fix pre-flight checks not happending in
SpaceCenter.LaunchVessel(#469)Add ‘recover’ boolean argument to
SpaceCenter.LaunchVesselto recover existing vessels on the launch pad (#469)Change
CelestialBody.Biomesto return an empty list instead of throwing an exception if the body has no biomes (#457)Fixed science transmission not working correctly (#456)
C-nano client#
Include directory and main header now suffixed with “_cnano” to avoid name clashes with C++ client
C# client#
Add methods to remove callbacks from streams and events (#451)
C++ client#
Add methods to remove callbacks from streams and events (#451)
Improve Autotools and CMake build scripts to regenerate the protobuf source if protoc is installed
Java client#
Add methods to remove callbacks from streams and events (#451)
Python client#
Add methods to remove callbacks from streams and events (#451)
v0.4.5#
Server#
Support KSP 1.4.1
Update to protobuf v3.5.1
Fix server error and client hang when quickly removing and re-adding a stream
SpaceCenter service#
Fixed roll input when input mode is override (#445)
Marked
CelestialBody.Orbitas nullable, as it returns null for the sun
C-nano client#
Fix connection timing out on Arduino when connecting to a server with new client confirmation enabled (#446)
C# client#
Update to protobuf v3.5.1
C++ client#
Update to protobuf v3.5.1
Java client#
Update to protobuf v3.5.1
Lua client#
Update to protobuf v3.5.1
Python client#
Update to protobuf v3.5.1
v0.4.4.post1#
C++ client#
Add missing files to build scripts
v0.4.4#
Server#
SpaceCenter service#
Add
ResourceConverter.ThermalEfficiency,CoreTemperatureandOptimumCoreTemperature(#439)
v0.4.3#
Server#
C-nano client#
Remove
KRPC_NO_PRINT_ERRORSoption (now enabled by default) and replace withKRPC_PRINT_ERRORS_TO_STDERREnable
PB_NO_ERRMSGby default in Arduino version of libraryInvoke remote procedures using service and produce identifiers instead of names to reduce code size and communication overhead
C# client#
C++ client#
Java client#
Python client#
v0.4.2#
Server#
Include missing
KRPC.IO.PortsDLL
v0.4.1#
Server#
Add SerialIO server
Fix connection timeout when client connects with auto-accept connections disabled (#425)
Add option to pause the server when the game is paused
New connections time out after 3 seconds if a connection request message is not received (#428)
Fix issue with partial receipt of connection request messsages
SpaceCenter service#
C-nano client#
Initial version
v0.4.0#
Server#
New server architecture that allows multiple concurrent servers, using different settings and protocols
Add websockets server protocol for communication with browsers
Improved communication protocol (#325)
Multiple RPCs can now be grouped into a single network message
Remove unnecessary message fields
Improved message encoding when establishing a connection
Significantly reduced the size of the message returned by GetServices
More compact encoding of signed integers
Added ability for RPCs to throw custom exception types in the calling client
Add start flag to
KRPC.AddStreamand addKRPC.StartStream. Allows streams to be added but not started until a later timeIf a stream returns an error, it is removed from the server automatically (#269)
Add support for streaming RPCs that yield execution to a future game update
Add
KRPC.GetClientIDandKRPC.GetClientNameAdd support for events
Server no longer freezes if the game is paused (#347)
Added
KRPC.Pausedproperty to get/set whether the game is paused (#422)
SpaceCenter service#
AutoPilot.WaitandErrormethods now throw an exception if the auto-pilot is not engaged (#409)
Drawing service#
Make
Test.AvailableFontsa static method
C# client#
Updated protocol in line with server changes
Add support for RPCs and streams to throw exceptions
C++ client#
Updated protocol in line with server changes
Remove connection retries. Client will now fail fast if it fails to connect to the server.
Add support for RPCs and streams to throw exceptions
Java client#
Updated protocol in line with server changes
Add support for RPCs and streams to throw exceptions
Clean up error reporting:
ConnectionExceptionthrown when connection to a server fails This inheritsIOExceptionDecoding messages now throws an unchecked
EncodingException, as these errors should not occur as a result of user input.
Minor code clean up, and source now checked with CheckStyle
Lua client#
Updated protocol in line with server changes
Python client#
Updated protocol in line with server changes
Remove connection retries. Client will now fail fast if it fails to connect to the server
Reorder parameters to
krpc.connect()so that name is first - to be consistent with other client librariesAdd support for RPCs and streams to throw exceptions
Add stream waiting and update callbacks
Add support for events
Don’t execute an initial RPC when a stream is created, wait for the first update instead
v0.3.11#
Server#
Support for KSP 1.3.1
C# client#
Update to protobuf v3.4.1
C++ client#
Update to protobuf v3.4.1
v0.3.10#
Server#
Update to protobuf v3.4.0
SpaceCenter service#
Fix maneuver node reference frame to point in the direction of the remaining burn, rather than just the initially planned burn (#404)
Add following to
CelestialBodyclass:AltitudeAtPosition,LatitudeAtPosition,LongitudeAtPositionandAtmosphericDensityAtPosition(#413)Add following to
Orbitclass:RadiusAt,PositionAt,MeanAnomalyAtUT,TrueAnomalyAtAN,TrueAnomalyAtDNAdd rendezvous method to
Orbitclass:RelativeInclination,TimeOfClosestApproach,DistanceAtClosestApproach,ListClosestApproaches(#407)Add
Control.InputModeto configure the way that control inputs are handled (they are either additive or override the vessels control inputs) (#384)Add
CelestialBody.TemperatureAt,DensityAtandPressureAt(#350, #352)Add
Flight.SimulateAerodynamicForceAt(#352)
C# client#
Add support for .NET 3.5 (allows use of the client from within KSP itself)
Update to protobuf v3.4.0
C++ client#
Set
ASIO_STANDLONEin build script instead of source code so that configure script can find the header correctlyAdd support for building using Cygwin
Update to protobuf v3.4.0
Java client#
Update to protobuf v3.4.0
Lua client#
Update to protobuf v3.4.0
Python client#
Update to protobuf v3.4.0
v0.3.9.post1#
Python client#
Fix compatibility with protobuf v3.4.0
v0.3.9#
Server#
Update to protobuf v3.3.0
KSP 1.3 support
Fix client activity indicators in UI
SpaceCenter service#
Add
VesselType.PlaneandVesselType.Relay(#385)Fix
Control.WheelThrottleandWheelSteering(#388)Fix off by one error in stage numbers for
Vessel.ResourcesInDecoupleStage(#380)Fix
CelestialBody.InitialRotationandRotationAnglereturning values out of range 0 - 2*PI (#391)Add
WaypointManager.AddWaypointAtAltitude(#399)Add
CelestialBody.PositionAtAltitude(#399)Fix
SpaceCenter.SetTargetnot correctly setting target if input locks are enabled (#397)Fix possible null reference exception in
ResourceConverter.State
C# client#
Update to protobuf v3.3.0
C++ client#
Update to protobuf v3.3.0
Java client#
Update to protobuf v3.3.0
Lua client#
Update to protobuf v3.3.0
Python client#
Update to protobuf v3.3.0
v0.3.8.post1#
Python client#
v0.3.8#
Server#
Update to protobuf v3.2.0
SpaceCenter service#
Add support for CommNet
Add support for contracts (#361)
Add support for RealChutes, add
Parachute.ArmandParachute.Armed(#382)Add support for Procedural Fairings (#368)
Add
CelestialBody.InitialRotationandRotationAngle(#369)Add
SpaceCenter.Navballto show/hide the navball (#355)Add
SpaceCenter.UIVisibleto show/hide the UI (#355)Add
ControlSurface.AuthorityLimiter(#352)Extended wheels functionality
Rename
LandingLegtoLegRename
LandingGeartoWheelAdd
Antenna.Deployable,Leg.DeployableandSolarPanel.DeployableAdd properties to
Controlclass to set the state of all solar panels, radiators, legs, etc. on a vessel (#383)Fix bug with
DockingPort.Rotation(#371)Fix bug with
Part.Rotation(#371)Fix bug with
Part.BoundingBox(#370)
C# client#
Update to protobuf v3.2.0
C++ client#
Update to protobuf v3.2.0
Update build scripts to check for protobuf >= 3.2 (#374)
Move
krpc::connectinto client constructor to allow use of smart pointersFix bug in
StreamManagerwhen client is not set
Java client#
Update to protobuf v3.2.0
Lua client#
Update to protobuf v3.2.0
Python client#
Clean up code to meet PEP 8 guidelines
Update to protobuf v3.2.0
Change package requirements to protobuf >= 3.2
krpctools#
Clean up code to meet PEP 8 guidelines
v0.3.7#
Server#
Support for KSP 1.2.2
Add
KRPCDefaultValueattribute. Can be used to set default arguments to non-compile time constants.Update to Protocol Buffers v3.1.0
SpaceCenter service#
Add custom reference frames (
ReferenceFrame.CreateRelativeandCreateHybrid) (#252)Add
Vessel.BoundingBoxandPart.BoundingBox(#352)Add
LandingGear.IsGroundedandLandingLeg.IsGrounded(#352)Add
Part.HighlightedandHighlightColor(#332)Change
CelestialBody.Biomesto return a set instead of a listChange available torque methods to return a pair of torque vectors, one in the positive control directions and one in the negative control direction.
Add
Vessel.AvailableOtherTorquewhich returns the available torque from other parts (i.e. torque providers other than the stock reaction wheels, RCS thrusters, gimballed engines and control surfaces)Include this ‘other’ torque in
Vessel.AvailableTorqueChange required RemoteTech version to 1.8.0
Change maneuver node methods and properties to use double precision values (#357)
InfernalRobotics service#
Add
InfernalRobotics.Available
KerbalAlarmClock service#
Add
KerbalAlarmClock.Available
RemoteTech service#
Add
RemoteTech.AvailableChange required RemoteTech version to 1.8.0
C# client#
Update to protobuf v3.1.0
Remove pre-release flag from nuget version
C++ client#
Python client#
Fix bug parsing nested collection types
krpctools#
Fix bug parsing nested collection types
Fix bug generating key type for dictionaries
v0.3.6#
Server#
Add
KRPC.Clientsthat clients can use to get a list of connected clients (#304)Make
KRPC.Core.Instancepublic so that other mods can subscribe to server events and access other server APIs (#304)Add “Yes (don’t show again)” options to dialogs, add option to skip confirmation when force disconnecting a client
SpaceCenter service#
Add
Part.Tagwhich can be used to get/set the name tag set via the NameTag mod, or kOS (#297)Add
Parts.WithTagto get a list of all parts with the given tag valueRemove
DockingPort.NameandParts.DockingPortsWithName- part tagging can now be used insteadAdd
Flight.TrueAirSpeedAdd FAR support for
Flight.Machand addFlight.ReynoldsNumber(#313)Fix value returned by
Orbit.Inclination(#301)An error is now thrown when
Autopilot.ReferenceFrameis set to a reference frame that rotates with the vesselFix issues with
Part.DecoupleStage(#307)Add
Part.AddForce,Part.InstantaneousFourceandForceclass for exerting arbitrary forces on parts (#287)Fix units for
Flight.DynamicPressurewhen FAR is installed - value returned is now in Pa, not kPa (#329)Add
Decoupler.StagedFix issue where disabled decouplers are included in stage index calculation (#323)
Add
CelestialBody.Biomesto get all the biomes for a planet/moon (#296)Add
CelestialBody.BiomeAtto get the biome at a location on a planet/moon (#296)Add altitude thresholds for science to
CelestialBodyAdd
Experiment.Biometo get the biome an experiment part is currently in (#296)Add
Experiment.IsAvailablewhich indicates if there is science that be gathered by the experiment partAdd
ScienceSubjectclass for getting information about a type of experiment. Accessed viaExperiment.ScienceSubject.Fix landing gear state on launch (#314)
Add
SpaceCenter.WaypointManagerandWaypointclass for interacting with waypoints (#335)Change camera distances to use meters (#339)
Fix engine thrust calculation for air breathing engines (#327)
C++ client#
Fix configure script
Python client#
Fix values not being documented in generated enumeration classes
krpctools#
Fix generating Java client stubs using
krpc-clientgenwith Python 3 (#308)
v0.3.5#
Server#
Support for KSP 1.1.3
Fix issue with uncaught exceptions when receiving malformed tuples from clients (#276)
Fix issue causing empty stream update messages to be sent to clients
SpaceCenter service#
Improved
AutoPilotthat auto-tunes itself based on the vessels available torque and moment of inertia (#289)Add
Resources.Enabledto enable/disable all of the resources in a part or stage at once (#283)Add
Vessel.RecoverableandVessel.Recover()(#277)Add
SpaceCenter.LaunchableVesselsto get a list of names of launchable vessels (#278)Add
SpaceCenter.LaunchVesselso that, for example, rockets built in the VAB can be launched from the runway (#278)Rename
Engine.PropellantstoEngine.PropellantNamesAdd
Propellantclass, obtained usingEngine.PropellantspropertyAdd
ExperimentandScienceDataclasses for interacting with science experimentsFix angular velocity for vessel reference frames
Fix
Engine.AvailableThrustso that it returns 0 if the vessel is not activeMake
ReferenceFrametype, underlying object and its transform accessible via public properties (#290)
User Interface service#
Add
Canvasclass (#281)Add
UI.StockCanvasto get the stock KSP UI canvas andUI.AddCanvasto create additional canvasesMove
UI.AddPanelandUI.RectTransformtoCanvasclass
InfernalRobotics service#
Add vessel parameter to
ServoGroups,ServosandServoWithName(#282)Add
Servo.PartAdd
ServoGroup.Parts
C# client#
Fix race condition where the connection constructor returns before the stream server connection has been established
Make
ConnectionandStreamManagerdisposable so that they clean up resources correctlyFix issue where network streams are closed prematurely
Fix issue with receiving partial protobuf messages
Python client#
v0.3.4#
Server#
Update protobuf to v3.0.0-beta-3 (#270)
Move
settings.cfgto PluginData directory to avoid trashing module managers cacheFix stack trace output when verbose errors is enabled
Performance improvements and reduced memory allocation pressure in main server loop
Renamed
Parameter.default_argumenttodefault_valuein protobuf definitions
SpaceCenter service#
Move drawing functionality into new
Drawingservice (#253)Add
Light.ColorAdd RPCs for setting
PartModulefields:Module.ResetField,SetFieldInt,SetFieldFloatandSetFieldString
Drawing service#
Initial version (#253)
User Interface service#
Initial version
C# client#
Update to protobuf v3.0.0-beta-3
C++ client#
Update to protobuf v3.0.0-beta-3
Java client#
Update to protobuf v3.0.0-beta-3
Python client#
Update protobuf to v3.0.0-beta-3
krpctools#
Update protobuf to v3.0.0-beta-3
v0.3.3#
Server#
Fix popup dialogs not displaying (#266)
SpaceCenter service#
Add
AvailableTorqueproperties to vessels, reaction wheels, RCS, engines and control surfacesRename
ReactionWheel.TorquetoReactionWheel.MaxTorqueFix
Vessel.MomentOfInertia- use custom inertia tensor calculations to avoid issues with KSPsVessel.MoIandVessel.findLocalMoIMove RemoteTech functionality to separate RemoteTech service
InfernalRobotics service#
Rename
ControlGrouptoServoGroup
RemoteTech service#
Moved from
SpaceCenterto separate serviceSupport RemoteTech 1.7
Add individual
AntennaobjectsAdd support for getting and setting an antennas target
v0.3.2#
Server#
Fix
KRPC.CurrentGameScene(#262)
SpaceCenter service#
Fix
Control.SpeedMode(#258)
v0.3.0#
SpaceCenter service#
Support for KSP 1.1
Add camera controls (note: rotation and zooming of the IVA camera is not yet supported)
Add saving and loading games using
SpaceCenter.Save,Load,QuicksaveandQuickload(#247)Add
ResourceTransferobjectAdd
Resourceobjects, representing an individual resource stored in a partAdd
Vessel.MomentOfInertia, AddVessel.InteriaTensorandPart.InertiaTensorAdd
Vessel.TorqueandVessel.ReactionWheelTorqueMerged
ReactionWheel.PitchTorque,YawTorqueandRollTorqueinto a singleReactionWheel.TorquemethodAdd
Part.CenterOfMassandPart.CenterOfMassReferenceFrameAdd
Part.ShieldedandPart.DynamicPressureAdd RCS objects.
Add
Thrusterobjects, which represent individual rocket nozzels or RCS thrusters.Added
ControlSurfaceobjects.DockingPort.Undock()now returns the newly created vessel, instead of the ‘undocked vessel’DockingPort.Undock()now throws an exception (instead of returning null) if the port is not dockedReturn newly created vessels from
Decoupler.Decouple()(#214)Removed
Vessel.Target, as this functionality is provided bySpaceCenter.TargetVessel(#206)Change autopilot so that the target reference frame, direction and roll are cleared when the client disconnects and the autopilot is engaged (#248)
Removed
LandingLegState.RepairingAdded
LandingGearState.BrokenFix bug where
Engine.HasFuelrequires the engine to be throttled upFix bug with vessel center of mass calculations (#218)
v0.2.4#
Server#
Shut down server when switching to main menu (or any other non-game scene)
v0.2.3#
Server#
Added
KRPC.CurrentGameScene(#237)
SpaceCenter service#
Add support for engine mode switching (#219)
Engine.GimbalLimitandGimbalLockednow return an error if the engine is not gimballedAdd cargo bays, fairings and intakes
Add support for fixed and ‘advanced’ langing gear to
LandingGearclassAdd support for ‘active’ (non-deployable) radiators to
Radiatorclass (#156)Remove
Part.ExternalTemperature(#206,:issue:174)Fix units returned by thermal mass and flux methods in
Partclass (#174)Fix null pointer exception in autopilot when switching scenes (#220)
Fix bug with translation inputs in
Controlclass (#223)
C# client#
Make client thread safe
C++ client#
Make client thread safe
Add checks for
asio.hppand protobuf library to cmake scriptAdd Windows with MSVC support to cmake script
Fix compiler warnings reported by MSVC
Java client#
Make client thread safe
Support JDK 1.7+
v0.2.2#
Server#
Stream updates are only sent to clients when the result changes (#170)
Removed support for protobuf enumerations and custom protobuf messages as RPC parameter/return values. Note: these features were not used anywhere, and only cause complications for client libraries
Fix bug where KSP hangs if the game is quit whilst the server is running
Remove support for blizzy’s toolbar, in favour of using the stock applauncher
SpaceCenter service#
Add
Part.IsFuelLineFix bug with
Part.FuelLinesTo(#193)Part.FuelLinesToandFuelLinesFromnow return an error if called on a fuel line partFix bugs with equality testing of objects. For example, vessel and part objects now persist correctly when reverting to launch (#201,:issue:210)
Fix array index out of range error in
SpaceCenter.WarpTo(#169)Fix bug with vessel’s surface velocity reference frame (#194)
C# client#
Remove support for protobuf enumeration and custom protobuf messages
C++ client#
Add support for streams (#175)
Add documentation to service header files
Add autotools and cmake build scripts
Move header file
krpc/krpc.hpp->krpc.hppRemove support for protobuf enumeration and custom protobuf messages
Add comparison operations for remote objects
Java client#
Initial version
Lua client#
Remove support for protobuf enumeration and custom protobuf messages
Python client#
Fix exception when stream thread shuts down (#197)
Remove support for protobuf enumeration and custom protobuf messages
Add comparison methods to remote objects so that they are sortable
krpctools#
Refactor into ‘
krpctools’ package containing ‘krpc-clientgen’, ‘krpc-docgen’ and ‘krpc-servicedefs’.Fixes caused by removal of support for protobuf enumeration and custom protobuf messages from server and clients
v0.2.1#
Server#
Add “Any” option to server address drop down
SpaceCenter service#
Fix
Orbit.Speedalways returning 0Add
CelestialBody.SurfaceHeight,BedrockHeight,MSLPosition,SurfacePosition,BedrockPosition(#186)
C# client#
Add documentation to generated service code
Add support for streams
C++ client#
Remove dependency on boost
Use standalone ASIO library for network communication
Lua client#
None
Python client#
Fix bug with
setup.pyon WindowsAdd version number to python module
krpctools#
Initial version
v0.2.0#
Server#
Update to protobuf 3.0.0-beta-2
SpaceCenter service#
C# client#
Initial version
C++ client#
Update to protobuf 3.0.0-beta-2
Lua client#
Update to protobuf 3.0.0-beta-2
Python client#
Update protobuf 3.0.0-beta-2
Fix bug in keyword arg handling (#168)
Removed
TestServer.exeand associated binaries from release archive
v0.1.12#
Server#
Built for KSP 1.0.5
SpaceCenter service#
Built for KSP 1.0.5
KerbalAlarmClock service#
Renamed
Alarm.DeletetoAlarm.Remove(to not clash with C++ keyword)
C++ client#
Initial version
Lua client#
None, bumped version number
Python client#
Server connection method now retries 10 times every 0.1 seconds
v0.1.11#
Server#
Documentation returned by calling
KRPC.GetServices(#31)Fix bug preventing disconnection of clients from the server window (#161)
Fix clearing bytes read/written statistics when the server is restarted
Add “Clear Statistics” button to server info window
Documentation at https://krpc.github.io/krpc/ generated by calling
KRPC.GetServices(#31)
SpaceCenter service#
Rename
maxRateparameter inSpaceCenter.WarpTotomaxRailsRateAdd more thermal properties to
Partclass (for new thermal model in KSP 1.0.3) (#155)Add
Comms.HasLocalControlAdd
Control.SASMode(identical toAutoPilot.SASMode)Change control behaviour: now shared amongst clients, and cleared when all clients that set a control have disconnected
Fix setting the throttle with RemoteTech enabled and no connection
Rewrite
AutoPilotto use a tunable PID controller (#75)Add setting of
SpaceCenter.ActiveVesselto allow switching vessels (#95)Add
SpaceCenter.LaunchVesselFromVABandSpaceCenter.LaunchVesselFromSPH(#95)Update aero methods to use FAR 0.15 if available
Lua client#
Initial version
Python client#
Docstrings generated from documentation returned by
KRPC.GetServices(#31)
v0.1.10#
Server#
SpaceCenter service#
KSP 1.0.4 support (#151)
Add more time warp functionality:
SpaceCenter.WarpMode,WarpRate,WarpFactor,RailsWarpFactor,PhysicsWarpFactor,CanRailsWarpAtandMaximumRailsWarpFactor(#134)Implement physical time warp for
SpaceCenter.WarpTo(#137)Add support for radiator parts (#154)
Fix
Vessel.Thrust,Engine.ThrustandEngine.AvailableThrustwhen engines have no fuel (#146)Add
Resoures.FlowModeAdd ability to control vessels other than the active one, when they are within physics range (#61)
Add
SpaceCenter.DrawLineto draw arbitrary lines (#150)Rename
SpaceCenter.ClearDirectionstoSpaceCenter.ClearDrawing
KerbalAlarmClock service#
Service now available in all game scenes (#135)
Python client#
Bump version number
v0.1.9#
Server#
None
SpaceCenter service#
InfernalRobotics service#
Initial version - API for InfernalRobotics
KerbalAlarmClock service#
Initial version - API for Kerbal Alarm Clock
Python client#
Bump version number
v0.1.8#
Server#
SpaceCenter service#
Add
Engine.MaxVacuumThrustAdd
Engine.ThrottleAdd
Engine.GimbalLimitAdd
Vessel.MaxVacuumThrustClean up float/double types (#113)
Remove
Vessel.CrossSectionalAreaRemove
CelestialBody.AtmospherePressure,AtmosphereDensity,AtmosphereScaleHeight,AtmosphereMaxAltitude,AtmospherePressureAt,AtmosphereDensityAtAdd
CelestialBody.AtmosphereDepthandHasAtmosphericOxygen
Python client#
v0.1.7#
Server#
Fix CKAN install bug on Windows (#105)
SpaceCenter service#
Add
AutoPilot.SAS,SASModeandSpeedMode(#94)Update
AutoPilot.Errorto also return SAS error (#94)Change return types of
Vessel.Mass,DryMass,CrossSectionalArea,SpecificImpulseto floatChanges to thrust functions
Vessel.Thrust,AvailableThrustandMaxThrust(#103)Changes to thrust functions
Engine.Thrust,Engine.AvailableThrustandMaxThrust(#103)Fix orientation of docking port reference frames
Rename
Engine.ActivatedtoEngine.Activeto match other parts
Python client#
Support for Python 3
Upgrade to Protocol Buffers 3.0.0-alpha-1
Checking of address and port parameters before connecting
Connecting to the stream server is now optional
Improve detection of protobuf message and enum types and improve support for 3rd party types (#38)
Fix unicode decoding/encoding bugs (#104)
v0.1.6#
Server#
SpaceCenter service#
PartsTargeting of vessels, bodies and docking ports
Remove
Orbit.ReferenceFrameFix
AutoPilot.Errorand addAutoPilot.RollError(#98)
Python client#
None, bumped version to match server version
v0.1.5#
Server#
Server now persists across game scene changes
Services specify during which game scenes they are available
Use a combo box for the server address
Display service errors when KSP loads (#89)
Add KSP compatibility checker
Add logging severity levels
Fix bug where yielded continuations are run more than once per update
SpaceCenter service#
Add
SpaceCenter.DrawDirectionandClearDirectionsfor visual debuggingAdd
Vessel.Commsto interact with RemoteTechAdd
Control.WheelThrottleandWheelSteeringChange
Control.ActivateNextStageto return a list of jettisoned vesselsAdd
Flight.LongitudeandLatitudeRename
Flight.NormalNegtoAntiNormalandFlight.RadialNegtoAntiRadial(#90)Add FAR functionality to
Vessel.FlightFix
Body.AtmospherePressureAtandAtmosphereDensityAtwhen there is no atmosphereAdd
Vessel.SurfaceVelocityReferenceFrameAdd
Node.OrbitalReferenceFrameAdd
Node.RemainingBurnVectorFix lots of reference frame bugs
Remove
Vessel.NonRotatingReferenceFrameRemove
Body.SurfaceReferenceFrameChange default reference frame to
Vessel.SurfaceReferenceFrameforVessel.FlightandAutoPilotmethodsAdd wait parameter to
AutoPilotmethodsAutoPilotandControlinputs reset to 0 when the client that requested them disconnectsChange
AutoPilotto set SAS to false when it’s disengaged
Python client#
Add
Client.close()
v0.1.4#
Server#
SpaceCenter service#
Major refactoring of reference frames (#66)
Add
Control.Nodes(#53)Add
Body.AtmosphereDensity(#52)Add
CelestialBody.AtmospherePressureAtandAtmosphereDensityAtAdd
Vessel.MassandDryMass(#51)Add
Vessel.CrossSectionalArea,DragCoefficientandDragAdd
Vessel.ThrustandSpecificImpulseAdd
Orbit.Period,MeanAnomalyAtEpochandEpochChange altitude properties to have sensible names (#62)
Improvements to
Control.Nodeclass (#48)Fix argument type in
Conrol.AddNode(#59)Fix bug with
Vessel.HorizontalSpeed(#67)
Python client#
Improved network code to fix bugs and make it more robust
Add python version checks
Make connections thread safe
v0.1.3#
Server#
Add support for collections (lists, dictionaries and sets)
SpaceCenter service#
Add
SpaceCenter.VesselsAdd
SpaceCenter.BodiesRemove
SpaceCenter.BodyAdd
SpaceCenter.GAdd
CelestialBody.SatellitesAdd
Orbit.RadiusAdd
Orbit.SpeedAdd
Orbit.TimeToSOIChangeAdd
Orbit.NextOrbitAdd
Node.OrbitAdd
Control.CurrentStageResources.Namesnow returns a list of resource namesAdd support for abort and 0 action groups
Rename
Flight.AltitudetoFlight.TrueAltitudeRename
Flight.TrueAltitudetoFlight.AbsoluteAltitudeAdd
Flight.SurfaceAltitudeAdd
Flight.ElevationFix bug with
Node.Vectorreturning a vector in the wrong vector spaceImprovements to
Resourcesclass
Python client#
Fix bug with encoding/decoding of infinities and NaNs
v0.1.2#
Server#
None
SpaceCenter service#
Include reference frame velocity in orbital direction vectors
Remove
ReferenceFrame.SurfaceVelocityandReferenceFrame.TargetVelocityChange default reference frames for
Vessel.Flight()andAutoPilotfunctions toReferenceFrame.OrbitalUse Pa instead of kPa for atmospheric pressure
Python client#
Convert parameter names to snake_case
v0.1.1#
Server#
Minor server code improvements
SpaceCenter service#
Add new functionality to
SpaceCenterservice
Python client#
Update example script
v0.1.0#
Server#
Initial pre-release
SpaceCenter service#
Initial pre-release
Python client#
Initial pre-release