Maxi
Member
- Messages
- 219
- Reaction score
- 171
Game Version
v2026.11.25.5949, base game (only Core). The code that causes it came in with v2026.11.10.5801 and is unchanged in 5901 and 5949.
Operating System
Windows 10 Pro 10.0.19045.
What Happened
With automatic resource groups on (the default), every part of a vehicle with decouplers gets resource group (stage) 0. The stack decoupler, the interstage fairing and the cargo bay decoupler all give the same result, e.g. there is only one group, "Group 0", that holds the whole vehicle.
The saved vehicle.xml then has Stage="0" on every part.
Visible results:
Each side of a decoupler gets its own resource group, as before 5801 (my vehicles saved with v2026.9.7.5402, v2026.9.22.5482 and v2026.10.25.5707 have Stage 0, 1, 2 and more across their decouplers). For the test rocket below: one group for the lower stage, one for the upper stage and one for the capsule, and a fuel bar that shows only the lower stage tank.
Reproduction Steps
Always, for every vehicle with a decoupler or a docking port whose groups are calculated in 5801 or later.
Additional Info
The default vehicles Rocket and Gemini7 in Content/Core/defaultvehicles also have Stage="0" on all 944 parts, and the launch menu uses the saved numbers without a recalculation (CalculateStages runs only in VehicleEditor). Launched from the launch menu, they have one resource group too.
Technical analysis (decompiled 5949)
ResourceGroupList.BuildListsForBoundaryPart starts with a walk from the decoupler part itself (startPart is the part of the Decoupler or DockingPort):
In 5707, GatherConnectedGroup never walked into a connector target (!allConnectorParts.Contains(treeParent)). Since 5801 it uses IsWalledConnectorTarget, which walls a target only when the part the walk comes from has no connection to it:
The decoupler part is always connected to its own target through the decoupler connector, so the first walk goes through the joint and collects both sides into one retained list. The target is then visited, so the loop over the connector targets makes no jettisoned list. MergeOverlappingRetainedLists joins the retained lists of all decouplers, and ApplyPartLists gives the single list stage 0.
The stage is read by:
Keep the new rule for other parts, but wall the boundary part's own connector target, for example in IsWalledConnectorTarget (made an instance method so it can read _connectorTargetsByBoundary):
I tested this rule with a patch on 5949 and it gives the groups and fuel bar listed above. Saves made since 5801 keep Stage="0" until the vehicle is edited again, so a recalculation on load (or in the launch menu) would also correct the default vehicles and old saves.
Related threads
v2026.11.25.5949, base game (only Core). The code that causes it came in with v2026.11.10.5801 and is unchanged in 5901 and 5949.
Operating System
Windows 10 Pro 10.0.19045.
What Happened
With automatic resource groups on (the default), every part of a vehicle with decouplers gets resource group (stage) 0. The stack decoupler, the interstage fairing and the cargo bay decoupler all give the same result, e.g. there is only one group, "Group 0", that holds the whole vehicle.
The saved vehicle.xml then has Stage="0" on every part.
Visible results:
- The Resource Groups window shows only "Group 0" with all parts.
- In flight, the fuel bar of a first stage engine in the staging window also counts the tanks of the upper stage.
- The default flow rule of rocket engines, FurtherestToNearestSameStage, and the stage check at decoupler joints for bulk propellant cannot separate anything, because all parts have the same stage. Stock parts are still safe, because the stock decoupler joints have no BulkFluid capability. A decoupler joint that carries bulk propellant (for example from a mod) would let a lower stage engine drain the upper stage.
Each side of a decoupler gets its own resource group, as before 5801 (my vehicles saved with v2026.9.7.5402, v2026.9.22.5482 and v2026.10.25.5707 have Stage 0, 1, 2 and more across their decouplers). For the test rocket below: one group for the lower stage, one for the upper stage and one for the capsule, and a fuel bar that shows only the lower stage tank.
Reproduction Steps
- Start the game with only Core and open the vehicle editor with a new vehicle. Keep automatic resource groups on.
- Build a stack from top to bottom: Mk1 command capsule (CoreCommandA_Prefab_MediumCapsuleVariantA), cargo bay (CoreServiceModuleA_Prefab_SetA2DoubleA), 3 m tank (CoreFuelTankA_Prefab_LF3W3HA), 3 m stack decoupler (CoreCouplingA_Prefab_Decoupler3WA), 3 m tank (LF3W3HA), sea level engine (CorePropulsionA_Prefab_EngineA2). Any stack with a decoupler between two tanks shows the same.
- Switch automatic resource groups off (the switch above the sequence list). This recalculates the groups and opens the Resource Groups window. It shows only "Group 0" with all parts. Expected: three groups.
- Switch automatic resource groups on again and save the vehicle. vehicle.xml in the Vehicles folder has Stage="0" on every part.
- Add an upper stage engine under the upper tank so that both tanks fill with the same propellant (or use the stack: capsule, cargo bay, tank with a vacuum engine CorePropulsionA_Prefab_EngineA5 inside an interstage fairing CoreFairingA_Prefab_Interstage3W3HB, tank, sea level engine). Launch, ignite the first stage and burn for some seconds. The fuel bar of the first stage engine in the staging window goes down at about half the rate of its own tank, and stays at about half when the first stage is empty.
Always, for every vehicle with a decoupler or a docking port whose groups are calculated in 5801 or later.
Additional Info
The default vehicles Rocket and Gemini7 in Content/Core/defaultvehicles also have Stage="0" on all 944 parts, and the launch menu uses the saved numbers without a recalculation (CalculateStages runs only in VehicleEditor). Launched from the launch menu, they have one resource group too.
Technical analysis (decompiled 5949)
ResourceGroupList.BuildListsForBoundaryPart starts with a walk from the decoupler part itself (startPart is the part of the Decoupler or DockingPort):
Code
GatherConnectedGroup(startPart, allConnectorParts, connectorParts, boundaryParts, ref visited, ref retainedLists, ref jettisonedLists);
...
foreach (Part item2 in connectorParts)
{
if (visited.Add(item2) && !boundaryParts.Contains(item2))
{
GatherConnectedGroup(item2, ...); // the jettisoned side
}
}
Code
private static bool IsWalledConnectorTarget(Part from, Part target, HashSet<Part> allConnectorParts)
{
if (!allConnectorParts.Contains(target)) return false;
foreach (Part.Connection connection in from.Connections)
{
if (connection.OtherPart(from) == target) return false;
}
return true;
}
The stage is read by:
- ResourceManager.CreateOrders and ResourceManagerBase.BuildOrders through PassesSameStageFilter (flow rule FurtherestToNearestSameStage, the default that PlumbedCore.RecreateManager gives an EngineController).
- ResourceManager.CanFlowAcross (to.Stage != fullPart.Stage at DecouplerJoint connections), and TryMarkDonor and FloodMarkDonorStage for fuel links.
- SequenceList.GetEngineFuelVolumeFraction (the fuel bar adds all tanks of the engine's ResourceGroup).
- Vehicle.MergeFrom (docking offsets the stages of the other vehicle by ResourceGroupList.Count), SequencePerformanceList ("(stage N)") and the Resource Groups window.
Keep the new rule for other parts, but wall the boundary part's own connector target, for example in IsWalledConnectorTarget (made an instance method so it can read _connectorTargetsByBoundary):
Code
private bool IsWalledConnectorTarget(Part from, Part target, HashSet<Part> allConnectorParts)
{
if (!allConnectorParts.Contains(target)) return false;
if (_connectorTargetsByBoundary.TryGetValue(from, out List<Part> own) && own.Contains(target)) return true;
foreach (Part.Connection connection in from.Connections)
{
if (connection.OtherPart(from) == target) return false;
}
return true;
}
Related threads
- "Fuel Lines" (thread 1431): the fuel line fix announced for the build after 5638. The IsWalledConnectorTarget change came in 5801, probably for that fix, so a fix here should keep the radial decoupler case of that thread working.
Upvote
1