Jump to content

Best way to disable a part with modulemanager?


tjsnh

Recommended Posts

So, I'm currently using modulemanager to change the required tech for some of the stock parts to make a more sensible progression with the 3 modded parts (yes, a grand total of 3 parts lol) I have added in.

I currently use the following syntax:

@PART[stackSeparatorMini]
{
@TechRequired = precisionEngineering
}

I now have some plans that involve disabling a couple of the stock parts completely.

My original plan was to just set the TechRequired for the parts I want to disable to require the "Advanced Motors", which I never bother with, and move those wheels into a different tech.

Then I realized there might be a better way.

Anyone have advice on a more "clean" way to disable a stock part entirely using modulemanager?

Link to comment
Share on other sites

  • 3 years later...

Hmm my parts refuse to die:

+PART[HexCanOxygenSmall]:NEEDS[TacLifeSupport]
{
    @name = MacLuky.TAC.HexCan.Small
    @title = Small Switchable Hex Can for Tac
    @manufacturer = MacLuky Space Solutions

	MODULE
	{
		name = FStextureSwitch2
		nextButtonText = Next resource
		prevButtonText = Previous resource
		statusText = Current resource
		switchableInFlight = true
		repaintableEVA = false
		textureRootFolder = MacLuky/SmallTAC/
		textureNames = hexempty;hexfood;hexwater;hexlifesupport;hexoxygen;hexwaste
		objectNames = Canister
		textureDisplayNames = Empty;Food;Water;LifeSupport;Oxygen;Waste
		useFuelSwitchModule = true
		fuelTankSetups = 0;1;2;3;4;5
	}

	MODULE
	{
		name = FSfuelSwitch
		resourceNames = Structural;Food;Water;Water,Food,Oxygen;Oxygen;Waste,WasteWater,CarbonDioxide
		resourceAmounts = 0;16.2;16.2;7.6,5,776.4;3593.4;1.3,12.2,1272.9
		initialResourceAmounts = 0;16.2;16.2;7.6,5,776.4;3593.4;0,0,0
		hasGUI = false
		switchableInFlight = true
	}
}

!PART[HexCanFoodSmall]:AFTER[TacLifeSupport] {}
!PART[HexCanDrinkingWaterSmall]:AFTER[TacLifeSupport] {}
!PART[HexCanLifeSupportSmall]:AFTER[TacLifeSupport] {}
!PART[HexCanOxygenSmall]:AFTER[TacLifeSupport] {}
!PART[HexCanLifeSupportWasteSmall]:AFTER[TacLifeSupport] {}

+PART[MacLuky.TAC.HexCan.Small]:NEEDS[TacLifeSupport]
{
    @name = MacLuky.TAC.HexCan.Medium
    @title = Medium Switchable Hex Can for Tac
    @cost *= 4
    @mass *= 5
    
    @MODULE[FSfuelSwitch]
    {
    	resourceAmounts = 0;130;130;61.3,40.5,6211.2;28747.5;10.5,98,10183.4
    	initialResourceAmounts = 0;130;130;61.3,40.5,6211.2;28747.5;0,0,0
    }
}

!PART[HexCanFoodNormal]:AFTER[TacLifeSupport] {}
!PART[HexCanDrinkingWaterNormal]:AFTER[TacLifeSupport] {}
!PART[HexCanLifeSupportNormal]:AFTER[TacLifeSupport] {}
!PART[HexCanOxygenNormal]:AFTER[TacLifeSupport] {}
!PART[HexCanLifeSupportWasteNormal]:AFTER[TacLifeSupport] {}

+PART[MacLuky.TAC.HexCan.Medium]:NEEDS[TacLifeSupport]
{
    @name = MacLuky.TAC.HexCan.Large
    @title = Large Switchable Hex Can for Tac
    @cost *= 4
    @mass *= 5
    
    @MODULE[FSfuelSwitch]
    {
    	resourceAmounts = 0;1040;1040;490.8,324.4,49689.9;229980.1;84.7,784.2,81467.2
    	initialResourceAmounts = 0;1040;1040;490.8,324.4,49689.9;229980.1;0,0,0
    }
}
    	
!PART[HexCanFoodLarge]:AFTER[TacLifeSupport] {}
!PART[HexCanDrinkingWaterLarge]:AFTER[TacLifeSupport] {}
!PART[HexCanLifeSupportLarge]:AFTER[TacLifeSupport] {}
!PART[HexCanOxygenLarge]:AFTER[TacLifeSupport] {}
!PART[HexCanLifeSupportWasteLarge]:AFTER[TacLifeSupport] {}

Now why would that be?

Link to comment
Share on other sites

Thanks, I'll try that. I had a feeling that something was re-enabling the parts. I'm testing in sandbox mode, I presume that shouldn't effect the outcome?

Update: is still around.

-PART[HexCanLifeSupportWasteLarge]:FINAL {}

I even tried nuking the part, it is if as if they re-emerge ;-(

@PART[HexCan*]:FINAL 
{
    @module = PartDisabled
}

Edited by MacLuky
Link to comment
Share on other sites

5 hours ago, MaximumThrust said:

This prevents the part from being loaded, or is just a soft disable?

The part is gone from the config so it will not be present. it does not prevent the loading of the model and texture however. It s just that the part will not show up in the part list

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.

×
×
  • Create New...