Juno Mod: Mod Assets

The Juno mod is the game-side component that exposes craft, Vizzy, stage, and telemetry data to VizzyCode over localhost. It runs inside Juno through Unity mod infrastructure. mod unity bridge

Scope

The mod is not part of the WinForms desktop compilation. It lives under Mod Assets/Scripts/VizzyCode and is excluded from VizzyCode.csproj.

Mod Scripts

FileClassResponsibility
VizzyBridge.csVizzyBridgeHTTP bridge server, endpoint routing, request/response handling.
VizzyCodeMod.csVizzyCodeModMod entry point and lifecycle integration.
VizzyCodeUpdater.csVizzyCodeUpdaterRuntime update loop and state refresh.
DesignerIntegration.csDesignerIntegrationDesigner-scene access to craft parts and Vizzy program data.
CraftInfo.csCraftInfoSerialization of craft, part, stage, activation group, modifier, and related data.

Unity-Side Architecture

graph TD
    A[Juno Mod Loader] --> B[VizzyCodeMod]
    B --> C[VizzyBridge]
    B --> D[VizzyCodeUpdater]
    C --> E[DesignerIntegration]
    C --> F[CraftInfo]
    E --> G[Juno Designer Craft]
    D --> H[Juno Flight Craft]
    F --> I[JSON Responses]
    C --> J[127.0.0.1:7842]

HTTP Server Role

VizzyBridge exposes read and write operations that the desktop app and VS Code extension can call:

OperationBridge role
StatusReport active scene and mod availability.
Part listingIdentify craft parts and Vizzy-capable parts.
Vizzy importRead XML from a part.
Vizzy exportWrite XML to a part.
StagesSerialize stage and activation group metadata.
SnapshotSerialize a full craft context payload.
TelemetrySerialize active flight data when available.

CraftInfo Serialization

CraftInfo.cs is responsible for turning Juno craft structures into stable JSON-friendly data:

Data groupExamples
Craft identityCraft name, part count, active command pod, root part.
PartsIDs, names, types, tags, mass, dry/wet mass, positions, rotations.
ConnectionsParent/child relationships and body structure.
ModifiersModifier names, type IDs, mass, scale, activation groups.
StagesCurrent stage, stage groups, activation groups, part membership.
Vizzy statusWhich parts have a Vizzy program.

AI context

Craft snapshots are useful for AI because they ground generated Vizzy code in real part names, stage layout, and available craft data. See Context Bundles.

Mod debugging checklist
  • Confirm Juno is running with the mod enabled.
  • Call GET /status.
  • Confirm the active scene.
  • Call craft/part endpoints before importing or exporting Vizzy.
  • Save a craft snapshot before AI-assisted authoring.
  • Save telemetry only when runtime flight state matters.

Related notes: 01 - Project Architecture, 06 - Juno Live Bridge, 07 - VS Code Extension, 08 - AI Integration, 14 - Troubleshooting.