allista / GroundConstruction

Plugin for the Kerbal Space Program. Allows building vessels on any planet in any place.
Other
12 stars 9 forks source link

Most USI Parts don't show up in Global Construction Assembly Line #78

Open aidygus opened 4 years ago

aidygus commented 4 years ago

I've had an since 1.7 when I began using USI/MKS which installs this mod via ckan as a dependency. If I click on the Add Part button on the Assembly window I can find parts for all other mods but only a handful for USI parts show up. For instance I can type Tundra, Duna or PAL into the search box and nothing shows up. Typing Ranger only shows 4 items (2.5m stack adapter, Battery Pack, Mini hab module and thermal control system). To build anything from the MKS range I have to create them as sub-assemblies in the VAB/SPH. The only parts that show up from the USI range seems to be the Honeybadger cargo parts.

I get no errors in the log relating to conflicts between USI or GC and all my mods are installed via ckan so dependencies should be automagically handled.

System Details :

Ubuntu 20.04 KSP 1.7 through to 1.10

Installed mods via ckan - kOS - InterstellarFuelSwitch - RemoteTechStockConfigs - UnmannedBeforeMannedChallenge - UnmannedBeforeManned - Konstruction - USI-ART - USI-Core - USI-EXP - USI-FTT - USI-LS - USITools - GroundConstruction-Core - CommunityResourcePack - AviationLights - UKS - ASETProps - TriggerAu-Flags - TextureReplacer - FirespitterCore - StationScienceContinued - FinalFrontier - KerbalEngineerRedux - BetterBurnTime - KIS - KerbalPlanetaryBaseSystems - ToolbarController - EVAStruts - ClickThroughBlocker - SCANsat - NearFutureConstruction - SmokeScreen - KRASH - StageRecovery - ModuleManager - HideEmptyTechNodes - EditorExtensionsRedux - AblativeAirbrake - MalemuteRover - AT-Utils - xScienceContinued - B9PartSwitch - CommunityTechTree - GroundConstruction - RasterPropMonitor - B9-props - ContractConfigurator-CleverSats - ContractConfigurator-FieldResearch - ContractConfigurator-KerbalAcademy - ContractConfigurator-RemoteTech - ContractConfigurator-Tourism - SETI-Contracts - ConfigurableContainers - CustomBarnKit - B9AerospaceLegacy - EnvironmentalVisualEnhancements - EVAEnhancementsContinued - PatchManager - B9AerospaceHX - EnvironmentalVisualEnhancements-HR - B9 - B9AnimationModules - Scatterer - Scatterer-sunflare - RemoteTech - Scatterer-config - NearFutureProps - JanitorsCloset - KSP-AVC - FelineUtilityRovers - BonVoyage - AlcubierreStandalone - AsphaltTiles - AsphaltTilesWelded - B9-PWings-Fork - TweakScale - ShipManifest - MagiCore - QuantumStrutsContinued - FilterExtensions - ContractConfigurator-KerbinSpaceStation - KerbinRoverOffRoadVehicles - ContractConfigurator-AnomalySurveyor - GAP - EvaFollower - PreciseManeuver - CapCom - NavballDockAlignIndCE - ContractConfigurator - RCSBuildAidCont - ProceduralFairings - AECS-Motion-Suppressor - Chatterer - KerbalConstructionTime - KAS - STMsFFRibbonPackEngineeringRoles - STMsFFRibbonPackOperationsRoles - ProgressParser - ContractParser - KSPInterstellarExtended - ASETAgency - EasyVesselSwitch - Toolbar - WaypointManager - SAVE - CommunityCategoryKit - InterstellarFuelSwitch-Core - SixSeatMk3cockpit - DMagicOrbitalScience - InfernalRoboticsNext - SixCrewScienceLab - StationPartsExpansionRedux - CrewQueueTwo - HyperEdit - ScienceRelay - ChattererExtended - DockingPortAlignmentIndicator - TransferWindowPlanner - RasterPropMonitor-Core - Trajectories - KerbalAlarmClock - MechJebForAll - ScienceRolesFinalFrontierRibbonPack - USIKolClassSuitsRedux - RoutineMissionManager - MemGraph - kOSPropMonitor - ZeroMiniAVC - PhotonSailor - KerbalChangelog - VesselView - VesselView-UI-RasterPropMonitor - JSIPartUtilities - SpaceTuxLibrary - ExtraPlanetaryLaunchpads - KerbalKonstructs - CustomPreLaunchChecks
allista commented 4 years ago

That is strange; part selection dialog looks through all parts loaded into the game database and filters them out as follows:

A part should:

Here's the relevant code ```c# var part_list = PartLoader.LoadedPartsList; for(int i = 0, part_listCount = part_list.Count; i < part_listCount; i++) { var info = part_list[i]; if(!string.IsNullOrEmpty(info.title) // a part should have a title && info.category != PartCategories.none // a part should be in a valid category && Utils.PartIsPurchased(info)) // a part should be purchased in not-sandbox games { ... public static bool PartIsPurchased(AvailablePart info) { return (HighLogic.CurrentGame != null && (HighLogic.CurrentGame.Mode == Game.Modes.SANDBOX || ResearchAndDevelopment.PartModelPurchased(info))); } ```

@BobPalmer maybe you have some insight as to why this can happen?

aidygus commented 4 years ago
  • be in a valid part category

That explains it then. Looking at the part .cfgs most of the USI categories are empty.

category = none subcategory = 0 title = MKS 'Duna' Medical Bay

While the minihab which is listed :

category = Utility subcategory = 0 title = MKS 'Ranger' Mini-Habitation Module

I ran a blanket search replace on MKS, Konstruction and Kontainer parts putting them in Utility and they now show up. I guess the bug is with those mods in that case

allista commented 4 years ago

I doubt this is actually a bug.

Setting category = none in part cfg is a common way to smoothly transition from old parts to new ones while not breaking existing saves. Such parts would not show up in the part selector in editor (the stock one, on the left), but they would still be available in flight. So you can have two parts with the same title and description, but with different id, and only one is placed in a real category to add to new ships. Or you could simply deprecate a part in this manner.

But maybe there's something more interesting is going on here; like dynamic categorization or some such. Bob would know better.

chalbin73 commented 3 years ago

Hello,

i came across the same problem recently. Did you find a way to correct that bug or something ? Thank you very much !