Sign in to follow this  
Nnimrod

Help with upgrades needed

Recommended Posts

I don't know where I'm erring :( When right clicking on the part on the tech tree, it shows that it has upgrades, and says they're available at #autoLOC_501052, but as you can see I didn't use that dictionary entry when I specified where to put the PARTUPGRADE - I just typed the id of the tech node.

And on top of that, there's no upgrade at the electrics node.

 

@PART[part1]:FINAL{
MODULE
	{
		name = PartStatsUpgradeModule
		showUpgradesInModuleInfo = true
		UPGRADES
		{
			UPGRADE
			{
				name__ = 4x2x1 MZ Upgrade
				techRequired__ = electrics
				IsAdditiveUpgrade__ = true
				PartStats
				{
					mass = .1
				}
			}
			
		}
	}
}
PARTUPGRADE
{
	name = 4x2x1 MZ Upgrade
	partIcon = LiquidEngine2
	techRequired = electrics 
	entryCost = 30
	title = Improved Hg-Zn batteries
	basicInfo = Battery technology has improved
	description = The small Hg-Zn Battery Pack has gotten a little better.
}

 

Share this post


Link to post
Share on other sites

I think you want to add the UPGRADES section to the module it's self - not a separate PartStatsUpgradeModule. Just got this working last night - upgrades SAS - Note the module name

	MODULE
	{
		name = ModuleSAS
		SASServiceLevel = 0
		moduleIsEnabled = false

		UPGRADES
		{
			UPGRADE
			{
				name__ = SAS_Level_0
				description__ = SAS level 0
				techRequired__ = electrics
				IsAdditiveUpgrade__ = false
				//ExclusiveWith__ = SASb
				SASServiceLevel = 0
				moduleIsEnabled = true
				hideUIwhenUnavailable = false
			}

			UPGRADE
			{
				name__ = SAS_Level_1
				description__ = SAS level 1
				techRequired__ = precisionEngineering
				SASServiceLevel = 1
				moduleIsEnabled = true
				hideUIwhenUnavailable = false
			}

			UPGRADE
			{
				name__ = SAS_Level_2
				description__ = SAS level 2
				techRequired__ = unmannedTech
				SASServiceLevel = 2
				moduleIsEnabled = true
				hideUIwhenUnavailable = false
			}

			UPGRADE
			{
				name__ = SAS_Level_3
				description__ = SAS level 3
				techRequired__ = advUnmanned
				SASServiceLevel = 3
				moduleIsEnabled = true
				hideUIwhenUnavailable = false
			}
		}
	}

 

Share this post


Link to post
Share on other sites
On 7/12/2019 at 6:11 PM, wasml said:

I think you want to add the UPGRADES section to the module it's self - not a separate PartStatsUpgradeModule. Just got this working last night - upgrades SAS - Note the module name


	MODULE
	{
		name = ModuleSAS
		SASServiceLevel = 0
		moduleIsEnabled = false

		UPGRADES
		{
			UPGRADE
			{
				name__ = SAS_Level_0
				description__ = SAS level 0
				techRequired__ = electrics
				IsAdditiveUpgrade__ = false
				//ExclusiveWith__ = SASb
				SASServiceLevel = 0
				moduleIsEnabled = true
				hideUIwhenUnavailable = false
			}

			UPGRADE
			{
				name__ = SAS_Level_1
				description__ = SAS level 1
				techRequired__ = precisionEngineering
				SASServiceLevel = 1
				moduleIsEnabled = true
				hideUIwhenUnavailable = false
			}

			UPGRADE
			{
				name__ = SAS_Level_2
				description__ = SAS level 2
				techRequired__ = unmannedTech
				SASServiceLevel = 2
				moduleIsEnabled = true
				hideUIwhenUnavailable = false
			}

			UPGRADE
			{
				name__ = SAS_Level_3
				description__ = SAS level 3
				techRequired__ = advUnmanned
				SASServiceLevel = 3
				moduleIsEnabled = true
				hideUIwhenUnavailable = false
			}
		}
	}

 

Ok, I've had some success. This shows up properly in the tech tree, and the upgrade shows up properly in the Electrics node. I tried editing the mass inside the partStatsUpgradeModule, and that worked, but I haven't been able to make the upgrade work on stuff inside the StoredCharge RESOURCE or inside the BatteryFailureModule. That's where I'm stuck atm.

 

@PART[batteryPack]:FINAL
{
	@mass = .0004
	@rescaleFactor = .3333
	@cost = .08
	!entryCost = 800
	@title = Small Hg-Zn Battery Pack
	@TechRequired = start
	@description = A little non-rechargable battery pack. 
	@PhysicsSignificance = 0
	!RESOURCE[ElectricCharge]{}
	%MODULE
	{
		name = BatteryFailureModule
		baseChanceOfFailure = 0.01
		expectedLifetime = 10
		UPGRADES
		{
			UPGRADE
			{
				name__ = Hg-Zn Battery Upgrade
				description__ = Improves capacity and expected life
				expectedLifetime = 12
			}
		}
	}
	%RESOURCE
	{
		name = StoredCharge
		amount = 3.332
		maxAmount = 3.332
		UPGRADES
		{
			UPGRADE
			{
				name__ = Hg-Zn Battery Upgrade
				description__ = Improves capacity and expected life
				amount = 4.704
				maxAmount = 4.704
			}
		}
	}
	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = Battery 
		StartActionName = Connect Battery 
		StopActionName = Disconnect Battery 
		ToggleActionName = Toggle Battery 
		FillAmount = 0.95 
		AutoShutdown = false
		GeneratesHeat = false
		UseSpecialistBonus = false
 
		 
		INPUT_RESOURCE
		{
			ResourceName = StoredCharge
			Ratio = .0111
			FlowMode = None
		}
		OUTPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = .0111
			DumpExcess = false
		}
	}
	//MODULE
	//{
	//	name = ModuleResourceConverter
	//	ConverterName = Charger
	//	StartActionName = Allow Charging
	//	StopActionName = Disable Charging
	//	ToggleActionName = Toggle Charging
	//	FillAmount = 0.95
	//	AutoShutdown = false
	//	GeneratesHeat = false
	//	UseSpecialistBonus = false 
	//	INPUT_RESOURCE
	//	{
	//		ResourceName = ElectricCharge
	//		Ratio = .0083
	//		FlowMode = None
	//	}
	//	OUTPUT_RESOURCE
	//	{
	//		ResourceName = StoredCharge
	//		Ratio = .0083
	//		DumpExcess = false
	//	}
	//}
	MODULE
	{
		name = PartStatsUpgradeModule
		UPGRADES
		{
			UPGRADE
			{
				name__ = Hg-Zn Battery Upgrade
				description__ = Improves capacity and expected life
				techRequired__ = electrics
				IsAdditiveUpgrade__ = true			
			}			
		}
	}
}
PARTUPGRADE
{
	name = Hg-Zn Battery Upgrade
	partIcon = batteryPack
	techRequired = electrics
	entryCost = 30
	cost = 0 // for display only; all parts implementing this will need a PartStatsUpgradeModule with cost = this.
	
	title = Hg-Zn Battery Upgrade
	basicInfo = <color=green>Advancements allow for about 41% greater energy density and 20% longer life</color>
	manufacturer = Zaltonic Electronics
	description = Applies to all Mercuric oxide-Zinc batteries.
}

 

Share this post


Link to post
Share on other sites
Posted (edited)

An old post by JPLRepo stated "The UPGRADE node is applied to a MODULE node" - so I take it you can't change values in a resource section - would like to be wrong - capacity is one thing I would like to upgrade.

As far as the BatteryFailureModule - I would have thought that would work. My only suggestion would be to try to get it working on a test part without the MM patch.

Edit:

I found a upgrade in Angel125's Buffalo mod - in the AuxEN pod - that upgrades the Kerbnet scan mode: (note the full DISPLAY_MODES section is included - not just the change - not sure if that's because they're both "Mode" or if it's the key to changing something like a resource)

		UPGRADES
		{
			UPGRADE
			{
				name__ = WBIFlightControl2
				description__ = Can now scan Biomes; Anomaly Detection: 6%
				AnomalyDetection = 0.06
				DISPLAY_MODES
				{
					Mode = Biome
					Mode = Terrain
				}
			}
		}		

and thought that maybe something like this might work:

	RESOURCE
	{
		name = ElectricCharge
		amount = 10
		maxAmount = 10
	}

	MODULE
	{
		name = PartStatsUpgradeModule
		UPGRADES
		{
			UPGRADE
			{
				name__ = test
				description__ = increase EC
				RESOURCE
				{
					name = ElectricCharge
					amount = 15
					maxAmount = 15
				}
			}
		}
	}

but have not been able to get it to work - but then changing RESOURCE to mass = doesn't change anything either so I'm doing something wrong - still holding on to a bit of hope that this might be made to work.

Edited by wasml

Share this post


Link to post
Share on other sites

if you can find "TykoEnginePartUpgrades.cfg" - really helpful source for me, just don't remember where I found them.

Share this post


Link to post
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.

Sign in to follow this