Jump to content

Upgradable Probe Core (Stock+MM)


KerbMav

Recommended Posts

Blew some hours into figuring out how thinks work, finding a number of syntax errors on my behalf and still not getting 100% what I wanted - but 95%.

I always wanted all probe cores to remain valid parts in constructing vessels, regardless on how far a player has progressed in the tech tree.

Stumbling over the stock part upgrade system while looking at PorkJet's rocket part overhaul configs, I set out on my little journey.

By now I managed to add a software upgrade into the respective tech tree nodes (of the probe core that offers a new SAS level), which will set the SAS level in all probe cores (new and launched) to the new level.

BUT: For the Stayputnik to work, it had to receive the basic level of SAS. Because: I did not find a way to add a new MODULE to a part, only how to change a value inside an already existing MODULE.

Reason: The Stayputnik has NO ModuleSAS to begin with - SASServiceLevel = 0 already gives basic attitude assist, Level 1 Pro+Retrograde, etc. http://wiki.kerbalspaceprogram.com/wiki/Command_module#Control

 

@PART[probeCoreSphere]
{
	MODULE
	{
	name = ModuleSAS
	}
}

@PART[*]:HAS[@MODULE[ModuleSAS]]:Final
{
	@MODULE[ModuleSAS]
	{
				
		SASServiceLevel = 0
		
		showUpgradesInModuleInfo = true
		
		UPGRADES
		{

//			UPGRADE
//			{
//				name__ = SASupgradeLvl0
//				description__ = SAS Vers. 1.0
//				ExclusiveWith__ = SASlvl
//				SASServiceLevel = 0
//			}
			
			UPGRADE
			{
				name__ = SASupgradeLvl1
				description__ = SAS Vers. 1.1
				ExclusiveWith__ = SASlvl
				SASServiceLevel = 1
			}
			
			UPGRADE
			{
				name__ = SASupgradeLvl2
				description__ = SAS Vers. 1.2
				ExclusiveWith__ = SASlvl
				SASServiceLevel = 2
			}
			
			UPGRADE
			{
				name__ = SASupgradeLvl3
				description__ = SAS Vers. 1.3
				ExclusiveWith__ = SASlvl
				SASServiceLevel = 3
			}
		}
	}
}
//PARTUPGRADE
//	{
//	name = SASupgradeLvl0
//	partIcon = probeCoreSphere
//	techRequired = electrics
//	entryCost = 1000
//	cost = 0
//	title = SAS Software Upgrade 1.0
//	description = Installs SAS software Version 1.0
//	}

PARTUPGRADE
	{
	name = SASupgradeLvl1
	partIcon = probeCoreSphere
	techRequired = precisionEngineering
	entryCost = 5000
	cost = 0
	title = SAS Software Upgrade 1.1
	description = Updates SAS software to Version 1.1	
	}

PARTUPGRADE
	{
	name = SASupgradeLvl2
	partIcon = probeCoreSphere
	techRequired = unmannedTech
	entryCost = 10000
	cost = 0
	title = SAS Software Upgrade 1.2
	description = Updates SAS software to Version 1.2	
	}

PARTUPGRADE
	{
	name = SASupgradeLvl3
	partIcon = probeCoreSphere
	techRequired = advUnmanned
	entryCost = 15000
	cost = 0
	title = SAS Software Upgrade 1.3
	description = Updates SAS software to Version 1.3	
	}

 

Edited by KerbMav
Link to comment
Share on other sites

@Nightside Finally got it running without having the Stayputnik getting SAS from the start.

moduleIsEnabled = false does not work for everything, but it does work for ModuleSAS.

A bit confused though, as with my old config launched vessels seemed to receive upgrades, but not sure anymore ...

@PART[probeCoreSphere]:BEFORE[SASupgrade]
{
	MODULE
	{
	name = ModuleSAS	
	}
}

@PART[*]:HAS[@MODULE[ModuleSAS]]:FOR[SASupgrade]

{

	@MODULE[ModuleSAS]
	{
				
	%SASServiceLevel = 0
	%moduleIsEnabled = false		
	%showUpgradesInModuleInfo = true
		
		UPGRADES
		{

			UPGRADE
			{
				name__ = SASupgradeLvl0
				description__ = SAS Vers. 1.0
				ExclusiveWith__ = SASb
				//IsAdditiveUpgrade__ = false
				moduleIsEnabled = true
				SASServiceLevel = 0
			}
			
			UPGRADE
			{
				name__ = SASupgradeLvl1
				description__ = SAS Vers. 1.1
				ExclusiveWith__ = SASb
				//IsAdditiveUpgrade__ = false
				moduleIsEnabled = true
				SASServiceLevel = 1
			}
			
			UPGRADE
			{
				name__ = SASupgradeLvl2
				description__ = SAS Vers. 1.2
				ExclusiveWith__ = SASb
				//IsAdditiveUpgrade__ = false
				moduleIsEnabled = true
				SASServiceLevel = 0
			}
			
			UPGRADE
			{
				name__ = SASupgradeLvl3
				description__ = SAS Vers. 1.3
				ExclusiveWith__ = SASb
				//IsAdditiveUpgrade__ = false
				moduleIsEnabled = true
				SASServiceLevel = 0
			}
		}
	}
	
}

 

PARTUPGRADE
	{
	name = SASupgradeLvl0
	partIcon = probeCoreSphere
	techRequired = electrics
	entryCost = 1000
	cost = 0
	title = SAS Software 1.0
	description = Installs SAS software Version 1.0
	}

PARTUPGRADE
	{
	name = SASupgradeLvl1
	partIcon = probeCoreSphere
	techRequired = precisionEngineering
	entryCost = 5000
	cost = 0
	title = SAS Software Upgrade 1.1
	description = Updates SAS software to Version 1.1	
	}

PARTUPGRADE
	{
	name = SASupgradeLvl2
	partIcon = probeCoreSphere
	techRequired = unmannedTech
	entryCost = 10000
	cost = 0
	title = SAS Software Upgrade 1.2
	description = Updates SAS software to Version 1.2	
	}

PARTUPGRADE
	{
	name = SASupgradeLvl3
	partIcon = probeCoreSphere
	techRequired = advUnmanned
	entryCost = 15000
	cost = 0
	title = SAS Software Upgrade 1.3
	description = Updates SAS software to Version 1.3	
	}

 

Link to comment
Share on other sites

  • 1 month later...

Thank you @KerbMav, that is a really helpful explanation of usable upgrade system MM config syntax.

Have you considered adding it to the database of MM patches (if it is intended for free use by everybody). In the database thread there is already another good example, that moves the Stayputnik to an earlier tech node.

I was thinking that maybe I could add a 'ModuleResourceIntake' that would generate electricity when moving through the atmosphere, much like an airliner ram air turbine. My naive attempt (shown below) failed. Is there an easy fix?

@PART[probeCoreSphere]
{  
  MODULE
  {
    name = ModuleResourceIntake
    resourceName = ElectricCharge
    checkForOxygen = true
    area = 0.005
    intakeEnabled = true
    intakeSpeed = 1
    intakeTransformName = Intake
    densityRecip = 1
    resourceUnits = 1
  }
}

 

Link to comment
Share on other sites

12 minutes ago, Bottle Rocketeer 500 said:

@RodhernThe problem is that the Stayputnik doesn't have a transform called Intake.

Does that mean one would have only some certain stock parts available to use as atmospheric/ocean/stardust resource collectors?

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...