Jump to content

Adding resources via Part Upgrades


Recommended Posts

@PART[SSTU-SC-A-DM]:FINAL
{
	%CrewCapacity = 2
	!MODULE[PartStatsUpgradeModule]{}
	MODULE
	{
		name = PartStatsUpgradeModule
		showUpgradesInModuleInfo = true
		UPGRADES
		{
			UPGRADE 
			{
				name__ = SC-A-DM-3
				description__ = SSTU-SC-A-DM: Extra seat w/ suitable supplies
				techRequired__ = commandModules
				IsExclusiveUpgrade__ = true
				PartStats
				{
					cost = 800
					CrewCapacity = 3
					
					@RESOURCE[Food]:NEEDS[TacLifeSupport]
					{
						amount = 3.291
						maxAmount = 3.291
					}
					@RESOURCE[Water]:NEEDS[TacLifeSupport]
					{
						amount = 2.175
						maxAmount = 2.175
					}
					@RESOURCE[Oxygen]:NEEDS[TacLifeSupport]
					{
						amount = 333.114
						maxAmount = 333.114
					}
					@RESOURCE[CarbonDioxide]:NEEDS[TacLifeSupport]
					{
						maxAmount = 287.739
					}
					@RESOURCE[Waste]:NEEDS[TacLifeSupport]
					{
						maxAmount = 0.3
					}
					@RESOURCE[WasteWater]:NEEDS[TacLifeSupport]
					{
						maxAmount = 2.772
					}
				}
			}
		}
	}
}
PARTUPGRADE
{
	name = SC-A-DM-3
	partIcon = SSTU-SC-A-DM
	title = SSTU - SC - A - DM-3
    description = An upgrade for the SC-A-DM which adds an extra seat, and extra life support supplies (if such a mod is installed). Now you can take the full suite of Kerbal professions with you on one mission.
	techRequired = commandModules
	entryCost = 10000
}

Hey there,

I'm trying to add a custom upgrade to a part (SSTU's Soyuz), and so far it works in adding an extra crew slot, but I have hit an unexpected snag: Resource amounts don't seem to be upgraded when the upgrade is unlocked. I've fiddled with the values (first, by using a *= 1.5 multiplier, then just calculating the amount myself and put it in the upgrade section). Anyone have some tips to help me fix this weird issue? Or if it's impossible, any workarounds?

Here's my config:

 

Edited by T-10a
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...