Jump to content

[1.11.2] B9PartSwitch v2.18.0 (March 17)


blowfish
 Share

Recommended Posts

If anyone wants to provide any useful information about what is or is not working in new KSP versions, including relevant debugging issue such as logs, please do so, otherwise just wait for an update.

Link to comment
Share on other sites

9 hours ago, blowfish said:

If anyone wants to provide any useful information about what is or is not working in new KSP versions, including relevant debugging issue such as logs, please do so, otherwise just wait for an update.

I use B9PartSwitch for my mods BetterSRBs and EveOptimizedEngines and I haven't had a problem with either one in KSP 1.12.1.  Everything seems to be functioning normally, at least for what I'm using it for.

Link to comment
Share on other sites

10 hours ago, blowfish said:

If anyone wants to provide any useful information about what is or is not working in new KSP versions, including relevant debugging issue such as logs, please do so, otherwise just wait for an update.

Only thing I could spot so far is incompatibility with the new inventory system (so already pre 1.12). Configured Items put into the Inventory will come out in some random (not the base item) setting. E.g.  to be tested with the Habtech2 Truss connectors.

Link to comment
Share on other sites

Heho @blowfish!

I'm adding support for CryoTanks, Kerbal Atomics and CryoEngines for SIMPLEX Resources.  I'm doing so by adding a CryoFuel in place of LqdMethane.  I have the patching all done, Nertea's patches for this were very straightforward.

However, in line with the the SIMPLEXResources philosophy of keeping it simple stupid, I don't want the resource for CryoFuel to be available on the stock tanks before a certain tech node .  I'm not sure whether that will be the first Methalox engine, or until the first CryoTanks are made available.   It means that early game tanks won't see CryoFuel until later in the game.

Is there an example of how this could be implemented? 

I see that there is an option for "upgradeRequired = name of a PARTUPGRADE that is required to unlock the subtype"  Is it just a matter of defining a stock part upgrade for the appropriate tech tree node?

Peace.

Link to comment
Share on other sites

On 7/3/2021 at 6:43 PM, theJesuit said:

Is there an example of how this could be implemented? 

I see that there is an option for "upgradeRequired = name of a PARTUPGRADE that is required to unlock the subtype"  Is it just a matter of defining a stock part upgrade for the appropriate tech tree node?

There's an example here: RR Science Lab Blacksmith

Yes, it's simply a matter of creating a stock part upgrade ( PARTUPGRADE {} ). Its name value is then what you give to upgradeRequired in the subtype.

I have a web of fancy config stuff in there, so, gentle warning to tread cautiosly and not get webbed up. :sticktongue:

taYAkPm.jpg

 

Link to comment
Share on other sites

  • 2 weeks later...

User error ignore

you guys love big crashes so heres one, hard crashes on loadup, seems the same as the others, somethign funky is going on, having mmwatchdog there or not dosent change the crashes. and obviously for me, OPT is unusable without the part switch. 

i cant read all the other warnings behind because they all pop up together and the game actually freezes then crashes to desktop. the game is 1.11.2 and everything is brand new for 1.11.2 as far as i can tell (just down graded to make pathfinder work)

https://drive.google.com/file/d/1M4pY3FoMaFbedA3I5PJEXPRwgs4YP96z/view?usp=sharing
https://drive.google.com/file/d/1M4pY3FoMaFbedA3I5PJEXPRwgs4YP96z/view?usp=sharing

installed mods 

Spoiler

12/07/2021  12.51    <DIR>          000_USITools
12/07/2021  17.07            14ÿ336 666_ModuleManagerWatchDog.dll
12/07/2021  17.07    <DIR>          999_KSP-Recall
12/07/2021  16.53             5ÿ120 999_Scale_Redist.dll
12/07/2021  11.54    <DIR>          Ablative-Airbrake
13/07/2021  00.47    <DIR>          B9AnimationModules
13/07/2021  00.47    <DIR>          B9_Aerospace_HX
12/07/2021  13.02    <DIR>          B9_Aerospace_ProceduralWings
12/07/2021  11.54    <DIR>          B9_HX_Reconfig
12/07/2021  11.53    <DIR>          Benjee10_X-37B
12/07/2021  16.20    <DIR>          BetterBurnTime
12/07/2021  11.54    <DIR>          BonVoyage
12/07/2021  11.48    <DIR>          CommunityCategoryKit
12/07/2021  11.48    <DIR>          CommunityResourcePack
12/07/2021  16.23    <DIR>          ContractConfigurator
12/07/2021  13.08    <DIR>          ContractPacks
13/07/2021  00.34    <DIR>          CraftManager
12/07/2021  13.19    <DIR>          DeepSky
12/07/2021  12.50    <DIR>          DMagicOrbitalScience
12/07/2021  11.50    <DIR>          Endurance
12/07/2021  13.19    <DIR>          EnduranceReconfig
12/07/2021  12.50    <DIR>          ExtraplanetaryLaunchpads
12/07/2021  11.47    <DIR>          Firespitter
12/07/2021  11.53    <DIR>          FruitBatIndustries
12/07/2021  11.48    <DIR>          HLAirships
12/07/2021  13.11    <DIR>          IXSWarpShipOS
12/07/2021  13.12    <DIR>          IXSWarshipsBlueshift
12/07/2021  23.32    <DIR>          JanitorsCloset
12/07/2021  11.55    <DIR>          JSI
12/07/2021  11.53    <DIR>          KAS
14/07/2021  22.01    <DIR>          KerbalEngineer
12/07/2021  11.55    <DIR>          KerbalReusabilityExpansion
12/07/2021  11.48    <DIR>          KIS
12/07/2021  12.04    <DIR>          Knes
12/07/2021  11.55            10ÿ240 KSPModFileLocalizer.dll
12/07/2021  11.54    <DIR>          KSTS
13/07/2021  00.25    <DIR>          KXAPI
14/07/2021  22.28                 0 listing.txt
12/07/2021  11.53    <DIR>          MechJeb2
12/07/2021  16.19    <DIR>          MechJebForAll
12/07/2021  11.47           141ÿ312 ModuleManager.4.1.4.dll
14/07/2021  22.01        19ÿ934ÿ494 ModuleManager.ConfigCache
14/07/2021  22.01           812ÿ962 ModuleManager.ConfigSHA
14/07/2021  22.01             9ÿ164 ModuleManager.Physics
14/07/2021  22.01            36ÿ364 ModuleManager.TechTree
12/07/2021  23.33    <DIR>          ModuleManagerWatchDog
12/07/2021  11.54    <DIR>          NavyFish
12/07/2021  11.46    <DIR>          NearFutureProps
12/07/2021  11.48    <DIR>          NearFutureSolar
12/07/2021  17.11    <DIR>          OPT
13/07/2021  00.23    <DIR>          OPT_Legacy
12/07/2021  11.55    <DIR>          PlanetaryBaseInc
12/07/2021  12.50    <DIR>          ProceduralFairings
12/07/2021  13.08    <DIR>          PWBFuelBalancerRestored
12/07/2021  11.48    <DIR>          REPOSoftTech
12/07/2021  11.47    <DIR>          RetractableLiftingSurface
12/07/2021  11.47    <DIR>          scatterer
12/07/2021  12.50    <DIR>          ScienceRelay
07/07/2021  14.30    <DIR>          Squad
03/04/2020  18.54    <DIR>          SquadExpansion
12/07/2021  12.54    <DIR>          StageRecovery
12/07/2021  11.52    <DIR>          StationScience
12/07/2021  11.48    <DIR>          SXT
14/07/2021  16.22    <DIR>          ThunderAerospace
12/07/2021  12.55    <DIR>          Trajectories
12/07/2021  12.43    <DIR>          Tundra-ExplorationV5.0
12/07/2021  23.33    <DIR>          TweakScale
12/07/2021  12.51    <DIR>          UmbraSpaceIndustries
12/07/2021  13.11    <DIR>          Waterfall
14/07/2021  22.01                39 WBIPlayMode.cfg
14/07/2021  21.58    <DIR>          WildBlueIndustries
              10 File(s)     20ÿ964ÿ031 bytes
              63 Dir(s)  88ÿ547ÿ450ÿ880 bytes free

 

Edited by Space Kadet
Link to comment
Share on other sites

I'm working on a mod that adds the option to switch between different propellants for the stock engines. I recently updated from 1.7.3 to 1.12 and it no longer calculates the delta-v given in the VAB/SPH properly until I switch editors, reload the craft file, or exit and re-enter the VAB/SPH.

MODULE
{
  IDENTIFIER
  {
    name = ModuleEnginesFX
  }
  DATA
  {
    maxThrust = 300
    PROPELLANT{}
    PROPELLANT{}
    PROPELLANT
    {
      name = MonoPropellant
      ratio = 1
      DrawGauge = True
    }
    atmosphereCurve
    {
      key = 0 196
      key = 1 186
      key = 7 0.001
    }
  }
}

My changes to the max thrust and atmosphere curve are calculated correctly when I select this ModuleB9PartSwitch subtype, but the delta-v is still calculated as though the engine runs on LF/Ox instead of MonoProp.

I'm using the latest version of B9PartSwitch (v2.18.0) and no other mods.

Link to comment
Share on other sites

I'm trying to write a MM patch for TAC-LS, merging all the containers in one single model, using B9PartSwitch to change the resource type. It worked for the cylindrical containers, but with the radial containers, the texture don't change!

What I'm doing wrong?

This is my patch:

Spoiler
@PART[HexCanLifeSupport]:NEEDS[B9PartSwitch]
{
	refVolume = 0
	@refVolume += #$RESOURCE[Food]/maxAmount$
	@refVolume += #$RESOURCE[Water]/maxAmount$
	@refVolume += #$RESOURCE[Oxygen]/maxAmount$
	
	MODULE
	{
		name = ModuleB9PartSwitch
		moduleID = Supply Type
		switcherDescription = Supply Type
		affectDragCubes = false
		affectFARVoxels = false
		switchInFlight = false
		baseVolume = #$../refVolume$

		SUBTYPE
		{
			name = Supplies
			title = Supplies
			primaryColor = #39826b
			defaultSubtypePriority  = 90
			tankType = TAC_Supplies
			
			TEXTURE
			{
				currentTexture = HexCan000
				texture = ThunderAerospace/TacLifeSupportHexCans/HexCanLifeSupport/Texture
			}
		}
		SUBTYPE
		{
			name = Food
			title = #autoLOC_TACLS_00016 // Food
			primaryColor = #b29368
			defaultSubtypePriority  = 60
			tankType = TAC_Food
			
			TEXTURE
			{
				currentTexture = HexCan000
				texture = ThunderAerospace/TacLifeSupportHexCans/HexCanFood/Texture
			}
		}
		SUBTYPE
		{
			name = Water
			title = #autoLOC_TACLS_00017 // Water
			primaryColor = #316178
			defaultSubtypePriority  = 50
			tankType = TAC_Water
			
			TEXTURE
			{
				currentTexture = HexCan000
				texture = ThunderAerospace/TacLifeSupportHexCans/HexCanDrinkingWater/Texture
			}
		}
		SUBTYPE
		{
			name = Oxygen
			title = #autoLOC_TACLS_00018 // Oxygen
			primaryColor = #94aebd
			defaultSubtypePriority  = 40
			tankType = TAC_Oxygen
			
			TEXTURE
			{
				currentTexture = HexCan000
				texture = ThunderAerospace/TacLifeSupportHexCans/HexCanBreathingOxygen/Texture
			}
		}
		SUBTYPE
		{
			name = Waste
			title = #autoLOC_TACLS_00020 // Waste
			primaryColor = #1d1d1d
			defaultSubtypePriority  = 10
			tankType = TAC_Waste
			
			TEXTURE
			{
				currentTexture = HexCan000
				texture = ThunderAerospace/TacLifeSupportHexCans/HexCanWaste/WasteTexture
			}
		}
	}

	-RESOURCE[Food] {}
	-RESOURCE[Water] {}
	-RESOURCE[Oxygen] {}
}

// Hide obsolete parts
@PART[HexCanFood|HexCanDrinkingWater|HexCanOxygen|HexCanLifeSupportWaste]:NEEDS[B9PartSwitch]
{
	%TechHidden = True
	@category = none
	@tags ^= :\s*cck-lifesupport::
}

This is the original parts:

    MODEL
    {
        model = ThunderAerospace/TacLifeSupportHexCans/Models/HexCan
        position = 0.0, 0.0, 0.0
        scale     = 1.0, 1.0, 1.0
        rotation = 0.0, 0.0, 0.0
        texture = HexCan000, ThunderAerospace/TacLifeSupportHexCans/HexCanLifeSupport/Texture
    }
    MODEL
    {
        model = ThunderAerospace/TacLifeSupportHexCans/Models/HexCan
        position = 0.0, 0.0, 0.0
        scale     = 1.0, 1.0, 1.0
        rotation = 0.0, 0.0, 0.0
        texture = HexCan000, ThunderAerospace/TacLifeSupportHexCans/HexCanFood/Texture
    }
    MODEL
    {
        model = ThunderAerospace/TacLifeSupportHexCans/Models/HexCan
        position = 0.0, 0.0, 0.0
        scale     = 1.0, 1.0, 1.0
        rotation = 0.0, 0.0, 0.0
        texture = HexCan000, ThunderAerospace/TacLifeSupportHexCans/HexCanDrinkingWater/Texture
    }
    MODEL
    {
        model = ThunderAerospace/TacLifeSupportHexCans/Models/HexCan
        position = 0.0, 0.0, 0.0
        scale     = 1.0, 1.0, 1.0
        rotation = 0.0, 0.0, 0.0
        texture = HexCan000, ThunderAerospace/TacLifeSupportHexCans/HexCanBreathingOxygen/Texture
    }
    MODEL
    {
        model = ThunderAerospace/TacLifeSupportHexCans/Models/HexCan
        position = 0.0, 0.0, 0.0
        scale     = 1.0, 1.0, 1.0
        rotation = 0.0, 0.0, 0.0
        texture = HexCan000, ThunderAerospace/TacLifeSupportHexCans/HexCanWaste/WasteTexture
    }

*  Only showing here the definition of the 'MODEL'!

The resources are changing correctly. Only the texture don't change! It keeps the texture of the original part that I'm editing!

I was able to do the same thing with the stackable (cylindrical) container, changing the resources and texture!

 

Thanks.

Link to comment
Share on other sites

10 hours ago, Dominiquini said:

I'm trying to write a MM patch for TAC-LS, merging all the containers in one single model, using B9PartSwitch to change the resource type. It worked for the cylindrical containers, but with the radial containers, the texture don't change!

What I'm doing wrong?

This is my patch:

@PART[HexCanLifeSupport]:NEEDS[B9PartSwitch]
{
	refVolume = 0
	@refVolume += #$RESOURCE[Food]/maxAmount$
	@refVolume += #$RESOURCE[Water]/maxAmount$
	@refVolume += #$RESOURCE[Oxygen]/maxAmount$
	
	MODULE
	{
		name = ModuleB9PartSwitch
		moduleID = Supply Type
		switcherDescription = Supply Type
		affectDragCubes = false
		affectFARVoxels = false
		switchInFlight = false
		baseVolume = #$../refVolume$

		SUBTYPE
		{
			name = Supplies
			title = Supplies
			primaryColor = #39826b
			defaultSubtypePriority  = 90
			tankType = TAC_Supplies
			
			TEXTURE
			{
				currentTexture = HexCan000
				texture = ThunderAerospace/TacLifeSupportHexCans/HexCanLifeSupport/Texture
			}
		}
		SUBTYPE
		{
			name = Food
			title = #autoLOC_TACLS_00016 // Food
			primaryColor = #b29368
			defaultSubtypePriority  = 60
			tankType = TAC_Food
			
			TEXTURE
			{
				currentTexture = HexCan000
				texture = ThunderAerospace/TacLifeSupportHexCans/HexCanFood/Texture
			}
		}
		SUBTYPE
		{
			name = Water
			title = #autoLOC_TACLS_00017 // Water
			primaryColor = #316178
			defaultSubtypePriority  = 50
			tankType = TAC_Water
			
			TEXTURE
			{
				currentTexture = HexCan000
				texture = ThunderAerospace/TacLifeSupportHexCans/HexCanDrinkingWater/Texture
			}
		}
		SUBTYPE
		{
			name = Oxygen
			title = #autoLOC_TACLS_00018 // Oxygen
			primaryColor = #94aebd
			defaultSubtypePriority  = 40
			tankType = TAC_Oxygen
			
			TEXTURE
			{
				currentTexture = HexCan000
				texture = ThunderAerospace/TacLifeSupportHexCans/HexCanBreathingOxygen/Texture
			}
		}
		SUBTYPE
		{
			name = Waste
			title = #autoLOC_TACLS_00020 // Waste
			primaryColor = #1d1d1d
			defaultSubtypePriority  = 10
			tankType = TAC_Waste
			
			TEXTURE
			{
				currentTexture = HexCan000
				texture = ThunderAerospace/TacLifeSupportHexCans/HexCanWaste/WasteTexture
			}
		}
	}

	-RESOURCE[Food] {}
	-RESOURCE[Water] {}
	-RESOURCE[Oxygen] {}
}

// Hide obsolete parts
@PART[HexCanFood|HexCanDrinkingWater|HexCanOxygen|HexCanLifeSupportWaste]:NEEDS[B9PartSwitch]
{
	%TechHidden = True
	@category = none
	@tags ^= :\s*cck-lifesupport::
}

This is the original parts:

    MODEL
    {
        model = ThunderAerospace/TacLifeSupportHexCans/Models/HexCan
        position = 0.0, 0.0, 0.0
        scale     = 1.0, 1.0, 1.0
        rotation = 0.0, 0.0, 0.0
        texture = HexCan000, ThunderAerospace/TacLifeSupportHexCans/HexCanLifeSupport/Texture
    }
    MODEL
    {
        model = ThunderAerospace/TacLifeSupportHexCans/Models/HexCan
        position = 0.0, 0.0, 0.0
        scale     = 1.0, 1.0, 1.0
        rotation = 0.0, 0.0, 0.0
        texture = HexCan000, ThunderAerospace/TacLifeSupportHexCans/HexCanFood/Texture
    }
    MODEL
    {
        model = ThunderAerospace/TacLifeSupportHexCans/Models/HexCan
        position = 0.0, 0.0, 0.0
        scale     = 1.0, 1.0, 1.0
        rotation = 0.0, 0.0, 0.0
        texture = HexCan000, ThunderAerospace/TacLifeSupportHexCans/HexCanDrinkingWater/Texture
    }
    MODEL
    {
        model = ThunderAerospace/TacLifeSupportHexCans/Models/HexCan
        position = 0.0, 0.0, 0.0
        scale     = 1.0, 1.0, 1.0
        rotation = 0.0, 0.0, 0.0
        texture = HexCan000, ThunderAerospace/TacLifeSupportHexCans/HexCanBreathingOxygen/Texture
    }
    MODEL
    {
        model = ThunderAerospace/TacLifeSupportHexCans/Models/HexCan
        position = 0.0, 0.0, 0.0
        scale     = 1.0, 1.0, 1.0
        rotation = 0.0, 0.0, 0.0
        texture = HexCan000, ThunderAerospace/TacLifeSupportHexCans/HexCanWaste/WasteTexture
    }

*  Only showing here the definition of the 'MODEL'!

The resources are changing correctly. Only the texture don't change! It keeps the texture of the original part that I'm editing!

I was able to do the same thing with the stackable (cylindrical) container, changing the resources and texture!

 

Thanks.

I resolved here!

I change 'HexCan000' for 'Texture' in the 'currentTexture' field and works! I don't know why...

Link to comment
Share on other sites

  • 4 weeks later...
12 hours ago, aleianand said:

yo i can´t start ksp cause of errors from the mod, i am currently playing in 1.12.3 here is the log https://drive.google.com/file/d/1V_8UAPSk3fv50NR6oXSw6eJCZmkbnq1t/view?usp=sharing

Welcome to the forums.

You have plenty of mods installed and your log shows the following MM error summary (search for #### in the log file) that suggests the problem might be with IFS configs or WarpPlugin (KSPIE), not B9PartsSwitch itself.

Spoiler
[LOG 19:30:36.942] ModuleManager: 21049 patches applied, found <color=orange>77 errors</color>
2 errors related to GameData/InterstellarFuelSwitch/Patches/IFSISTGmodular.cfg
6 errors related to GameData/InterstellarFuelSwitch/Patches/IFSRFCmodular.cfg
8 errors related to GameData/InterstellarFuelSwitch/Patches/IFSCCmodular.cfg
15 errors related to GameData/InterstellarFuelSwitch/Patches/IFSCTmodular.cfg
2 errors related to GameData/InterstellarFuelSwitch/Patches/IFSISTLmodular.cfg
2 errors related to GameData/InterstellarFuelSwitch/Patches/IFSPGTmodular.cfg
5 errors related to GameData/InterstellarFuelSwitch/PatchManager/ActiveMMPatches/IFSWRAPPER305LqdHydrogen.cfg
5 errors related to GameData/InterstellarFuelSwitch/PatchManager/ActiveMMPatches/IFSWRAPPER310LqdMethane.cfg
5 errors related to GameData/InterstellarFuelSwitch/PatchManager/ActiveMMPatches/IFSWRAPPER315Hydrazine.cfg
5 errors related to GameData/InterstellarFuelSwitch/PatchManager/ActiveMMPatches/IFSWRAPPER505LqdOxygen.cfg
5 errors related to GameData/InterstellarFuelSwitch/PatchManager/ActiveMMPatches/IFSWRAPPER510HTP.cfg
17 errors related to GameData/WarpPlugin/Patches/B9PartSwitch/CryoTanksFuelTankSwitcher.cfg

You could ask in those forum topics or, if you want to diagnose the problem yourself, start with a fresh KSP 1.12.2 install and add your key mods a few at a time and see when the errors start.

Link to comment
Share on other sites

@blowfish is it possible to use SUBTYPE/MODULE to modify not a module, but PART/mass?

I want make mass_multiplier_switcher:
one typical b9ps with addedMass, and another "mass_multiplier" b9ps that will multiply final mass of the part x0.001, x1000, etc

 

Edited by flart
Link to comment
Share on other sites

  • 2 weeks later...
45 minutes ago, Brainpop14 said:

Anyone tested this in 1.12.2 yet?

If you have the time to wait on an answer (and the time to play KSP while you wait) you should test for yourself. Consider this golden advice. ;) That said, I don't think there's ever a time where B9PS breaks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...