Skip to content

Releases

KRPC.Bridge 2.1.0 / TowerCatch 1.1.0

Choose a tag to compare

@romsti romsti released this 25 Oct 10:20

KRPC.Bridge 2.1.0 and TowerCatch 1.1.0

This release still needs kRPC 0.7.0 (it does not load on kRPC 0.6.x). Two things change since 2.0.0:

  • MechJeb leaves the bridge. The conn.mech_jeb service and its plugin KRPC.Bridge.MechJeb.dll
    are removed. If you still use them, stay on KRPC.Bridge 2.0.0.
  • The booster catch tower is entirely in TowerCatch. The tower's plugin, KRPC.Bridge.Tower.dll
    (the services conn.tower and conn.tower_site, unchanged), moves from GameData/KRPC.Bridge into
    GameData/TowerCatch/Plugins. KRPC.Bridge now holds nothing of the tower; if you do not fly a tower you
    install nothing more than the bridge, and TowerCatch is the tower's parts, its craft and its services in
    one optional download. The plugin declares a dependency on the bridge's Core, so KSP loads it after it.

The release has two downloads, as before:

File What it is
KRPC.Bridge-2.1.0.zip The mod. Required.
TowerCatch-1.1.0.zip The whole booster catch tower: ModuleManager patch, craft and plugin. Optional. Needs KRPC.Bridge 2.1.0 or later.

Upgrading from 2.0.0 (read this if you update by hand)

Delete your old GameData/KRPC.Bridge folder before you unzip the new one. If you prefer to update in
place, you must at least delete these four files from GameData/KRPC.Bridge/Plugins:

  • KRPC.Bridge.Tower.dll and KRPC.Bridge.Tower.xml
  • KRPC.Bridge.MechJeb.dll and KRPC.Bridge.MechJeb.xml

Why: the tower's plugin now lives in GameData/TowerCatch/Plugins. If the 2.0.0 copy stays in
GameData/KRPC.Bridge/Plugins, two assemblies declare the kRPC service Tower and TowerSite; kRPC refuses
the duplicate, and that takes the whole kRPC server down, not only the tower. (MechJeb's plugin is
harmless left in place, but nothing uses it any more.)

If you use a tower, install TowerCatch-1.1.0.zip too, the same way (GameData/TowerCatch/), and delete
GameData/TowerCatch of 1.0.0 first if you have it. Never keep a second copy of TowerCatch.cfg: two copies
make every tower part twice. If an older bridge left GameData/KRPC.Bridge/Patches and
GameData/KRPC.Bridge/Crafts, delete those two folders as well. The TG.* part names did not change: a tower
already in a save loads as before.

CKAN does all of this for you: TowerCatch 1.1.0 depends on KRPC-Bridge 2.1.0, and KRPC-Bridge 2.1.0
conflicts with TowerCatch 1.0.0 (whose plugin it no longer carries).

Requirements

  • Kerbal Space Program 1.12.x (checked on 1.12.5)
  • kRPC 0.7.0, and its Python client: pip install "krpc>=0.7,<0.8"
  • Optional, each one only for its own service: FMRS Continued, Trajectories, OfCourseIStillLoveYou with
    HullCamera VDS Continued. A mod you do not have makes its service report available = False.
  • For TowerCatch only: ModuleManager, Modular Launch Pads, HullCamera VDS Continued, and the two paid
    expansions Breaking Ground and Making History (CKAN can detect them, not install them).

Installation

  1. Unzip KRPC.Bridge-2.1.0.zip into your KSP folder, so that GameData/KRPC.Bridge/ appears in GameData/
    (after deleting the old folder, see above). Keep each .xml next to its .dll: kRPC reads it to build
    the Python docstrings.

  2. Optional: unzip TowerCatch-1.1.0.zip the same way (GameData/TowerCatch/).

  3. Start KSP, start the kRPC server, and check:

    import krpc
    conn = krpc.connect()
    print(conn.bridge.ping())    # "pong"
    print(hasattr(conn, "tower"), hasattr(conn, "tower_site"))   # True True with TowerCatch, False False without

CKAN

The two records (distribution/KRPC.Bridge.netkan, distribution/TowerCatch.netkan) pick their own zip of
this shared release by name and take their own version from it (KRPC-Bridge 2.1.0, TowerCatch 1.1.0), ask
for kRPC v0.7.0 as CKAN numbers it, and TowerCatch declares the Making History and Breaking Ground
expansions (MakingHistory-DLC, BreakingGround-DLC).

See CHANGELOG.md for the detail.

Files

File Size sha256
KRPC.Bridge-2.1.0.zip 458 295 bytes bc57018c4d3c500a41a57feb1a29ec2770bd6d1e75b4a3db0d9a1f183d4a2f10
TowerCatch-1.1.0.zip 92 335 bytes da73b9a9b982ad0955b0920fd4f6cae4886a574c90d4d9904553b4c22ead1083

Both zips were built from commit 7292b0bd93a7129f7263450fbbbc9bc19b12ea0d; the manifest.json inside each
gives the sha256 of every file it ships.

KRPC.Bridge 2.0.0

Choose a tag to compare

@romsti romsti released this 25 Oct 08:01

KRPC.Bridge 2.0.0

This release needs kRPC 0.7.0. It is built against kRPC 0.7.0 and does not load on kRPC 0.6.x.
If you are still on kRPC 0.6, stay on 1.0.0.

KRPC.Bridge adds kRPC services for mods that have no scriptable interface (FMRS, OCISLY, MechJeb 2,
Trajectories) and services of its own for flight control, telemetry and booster catch towers.
It ships two downloads:

File What it is
KRPC.Bridge-2.0.0.zip The mod. Required.
TowerCatch-1.0.0.zip The booster catch tower's ModuleManager patch and craft. Optional, first public version.

What is new since 1.0.0

  • Twelve services, 307 members (1.0.0 had FMRS, OCISLY and MechJeb):
    • conn.control and conn.telemetry: the half of the bridge that writes (per-engine throttle and
      gimbal leases, atomic control frames, the AttitudeV1 attitude controller, every option off until
      a client switches it on) and the half that only observes (engine and gimbal samples, dynamics
      frames at the physics rate, aerodynamic wrench, contact by leg).
    • conn.stock (delta-v and stage table, staging from the frame loop, landing legs, part module
      fields and events in one call), conn.ident, conn.discovery.
    • conn.trajectories: the Trajectories mod's impact prediction, landing target and descent profile.
    • conn.tower and conn.tower_site: booster catch towers, from the Space Center and in flight.
  • MechJeb: any module by name, the landing predictor and the maneuver planner (1.0.0 reached the
    ascent autopilot only).
  • FMRS: a table of dropped stages (dropped_stages_v1) and a readiness probe.
  • conn.bridge.manifest_v1 says which build is loaded and the commit it came from; every zip
    carries a manifest.json with the sha256 of each file.
  • The catch tower's parts left the bridge: they are the separate, optional TowerCatch package.
  • Full API reference: docs/API.md or the
    documentation site.

See CHANGELOG.md for the detail.

Requirements

  • Kerbal Space Program 1.12.x (checked on 1.12.5)
  • kRPC 0.7.0, and its Python client: pip install "krpc>=0.7,<0.8"
  • Optional, each one only for its own service: FMRS Continued, MechJeb 2, Trajectories,
    OfCourseIStillLoveYou with HullCamera VDS Continued. A mod you do not have makes its service
    report available = False; nothing else is affected.
  • For TowerCatch only: ModuleManager, Modular Launch Pads, HullCamera VDS Continued, and the two
    paid expansions Breaking Ground and Making History (no mod manager can install those).

Installation

  1. Delete your old GameData/KRPC.Bridge folder if you have one. The set of DLLs is not the same
    as in 1.0.0, and an old and a new assembly that declare the same service make kRPC refuse the
    duplicate, which takes the whole kRPC server down.

  2. Unzip KRPC.Bridge-2.0.0.zip into your KSP folder, so that GameData/KRPC.Bridge/ appears in
    GameData/. Keep each .xml next to its .dll: kRPC reads it to build the Python docstrings.

  3. Optional: unzip TowerCatch-1.0.0.zip the same way (GameData/TowerCatch/). Never keep a second
    copy of TowerCatch.cfg: if an older build left GameData/KRPC.Bridge/Patches and
    GameData/KRPC.Bridge/Crafts, delete those two folders.

  4. Start KSP, start the kRPC server, and check with python python/check_bridge.py (in the source
    repository) or:

    import krpc
    conn = krpc.connect()
    print(conn.bridge.ping())   # "pong"

Files

File Size sha256
KRPC.Bridge-2.0.0.zip 558 kB 15a3ac45815a4ceb145865030fbb0bc5bdeabd1078ad17e1408cb38c159fd7e0
TowerCatch-1.0.0.zip 13 kB acb7660f201cac536ab2b0f5de32c6c1ac73a98940649f1036faa4d26223d84a

Both zips were built from commit 296af108706498913f50c66e54260079b9fde925 (tag v2.0.0); the manifest.json inside each gives the sha256 of every file it ships.

1.0.0

Choose a tag to compare

@romsti romsti released this 08 Aug 14:27

First public release. The mod was previously a single unreleased KRPC.Bridge.dll; this
version splits it into a Core plus three plugins and adds a large amount of FMRS surface
that was verified against the mod's source but never exposed.

Added

FMRS

  • recovery_report() and recovered_funds() — read FMRS's recovery ledger. The only place
    the outcome of a booster recovery is stated as a number rather than inferred by diffing
    the funds counter. Covers funds, science, contracts, kerbals lost and buildings destroyed.
  • recover_current() — recover the dropped stage you are flying, through FMRS's own
    settlement path.
  • revert_to_launch() — FMRS's Revert To Launch, which still works after a jump when KSP's
    own revert is gone.
  • delete_dropped() and delete_all_dropped() — stop tracking a stage and delete its save.
  • separation_times — UT per FMRS save file, so a stage's separation time comes from what
    FMRS recorded rather than from when a poll happened to notice it.
  • kerbals_aboard — which dropped stage each kerbal is on.
  • set_vessel_state() — repair a stage wrongly marked RECOVERED so a landing series can
    continue.
  • launched_at, enabled, kick_to_main — mission clock, plugin state, and advance
    warning that FMRS is about to drag the game back into the main mission.
  • track_parachutes, control_uncontrollable, auto_cut_off, screen_messages,
    window_hidden — the session settings that decide whether a booster is tracked at all,
    plus two for recording.

Core (conn.bridge)

  • An ordered, id-numbered event log: poll_events(), on_event(), mark(),
    events_recorded. Lets a script observe an instant — a separation, a part dying —
    rather than sampling a value and hoping. Hooks ten stock GameEvents plus
    fmrs.dropped, fmrs.forgotten, fmrs.on_dropped, fmrs.on_main and
    ocisly.rearmed.
  • describe_type() — list any loaded mod type's members from Python, without a rebuild.
  • plugins, available_plugins, has_plugin() — what loaded and, when it did not, why.
  • hide_ui(), show_ui(), ui_visible — fires the GameEvents F2 fires, so mod windows go
    away too.
  • Background jobs (await_job and friends) for work too expensive to run inside a single
    RPC. Scaffolding for plugins you write; nothing shipped here uses it.

Build

  • build/scan runs kRPC's own Scanner.GetServices against the built DLLs, catching a
    malformed signature — which would disable the entire kRPC server in game — in about a
    second. build.cmd runs it on every build.
  • build/verify now globs src/**/*.cs instead of listing files, so a new plugin cannot
    be left unchecked by omission.

Changed

  • Split into Core plus plugins. One KRPC.Bridge.dll becomes KRPC.Bridge.Core.dll at
    the root of the mod folder, with Fmrs, Ocisly and MechJeb under Plugins/. Load
    order is declared with KSPAssembly/KSPAssemblyDependency, so a plugin whose Core is
    missing is skipped by KSP with a log line rather than throwing on first use.
  • FMRS now works outside flight. The service bound only to the flight KSPAddon, but
    FMRS keeps its state on a base class shared by four per-scene subclasses. Resolving
    against the base makes the tracked stages and the recovery ledger readable from the space
    centre — which is where you want them.
  • MechJeb.ascent_setting_names, ascent_flag_names and core_members are cached. They
    are reflection walks, a client can put a stream on any property, and a streamed property
    re-runs every physics tick.
  • HUD control moved from the FMRS-era Bridge service to the Core; the automatic hide
    after a scene load stays on conn.ocisly, because it has to happen after the cameras are
    restored and only that coroutine knows when they are.
  • Every XML docstring rewritten against verified FMRS 1.2.9.6 and kRPC 0.6.0 behaviour, and
    checked against the tags the kRPC Python client actually parses.

Fixed

  • jump_to_vessel bound the FMRS overload by exact parameter types. FMRS declares three,
    two of which take two arguments — (Guid, bool) and (Guid, string) — so binding by
    name or arity can select the wrong one.
  • ocisly.rearm() now raises the game HUD for the half second it needs and puts it back.
    OCISLY refuses to open a camera while the UI is hidden and refuses silently, so with
    hide_ui_on_scene_load on — the configuration for a recorded flight — a manual rearm
    armed nothing and reported success. It also counts cameras the mod actually took, rather
    than calls that did not throw.
  • jump_to_main() returns immediately when you are already on the main mission. FMRS's own
    entry point early-returns there, so nothing reloaded and the wait ran to its 90-second
    timeout before throwing — on a call the guard-rail advice tells you to make defensively.
  • mech_jeb.ascent_setting_names and ascent_flag_names no longer advertise MechJeb's
    public backing fields. _autostage sits next to Autostage and writing it skips the
    staging registration, so the list offered two names of which one silently did nothing.
  • fmrs.main_vessel_id returns an empty string rather than the zero GUID when no flight is
    armed. The zero GUID is truthy in Python.

Documentation

  • docs/API.md, docs/SCRIPTING.md, docs/ARCHITECTURE.md, all in English.
  • LICENSE (MIT) and NOTICE recording that the mod links against kRPC (LGPL v3) using
    the player's own copy, and reaches FMRS, MechJeb, OCISLY and HullcamVDS purely by
    reflection with nothing redistributed.