Jump to content

Adding Xenon harvesting to sensorAtmosphere


theJesuit

Recommended Posts

Hi everyone,

I'm wanting to utilise the sensorAtmosphere (Atmospheric Fluid Spectro-Variometer) to extract Xenon out of the Air, (HarvesterType = 1), but only as a PartUpgrade - to be upgraded once ion engines are unlocked.

I've been looking, but can't seem to see an ability to do this without the GUI showing 'something' when in an atmosphere when the part is originally unlocked. Obviously using HaversterType 0, 2 or 3 changes, but then the GUI to extract Xenon appears then.

Does anyone know of a workaround?

Alternately, I've just thought of a solution - have a separate part (using +Part) with the module to appear at the required tech level, but does anyone know if it is possible to remove a part from the part list when a tech node is unlocked, i.e. using part variants to change category = none?

Any help would be appreciated!

Peace.

Link to comment
Share on other sites

On 11/25/2018 at 2:36 PM, theJesuit said:

Hi everyone,

I'm wanting to utilise the sensorAtmosphere (Atmospheric Fluid Spectro-Variometer) to extract Xenon out of the Air, (HarvesterType = 1), but only as a PartUpgrade - to be upgraded once ion engines are unlocked.

I've been looking, but can't seem to see an ability to do this without the GUI showing 'something' when in an atmosphere when the part is originally unlocked. Obviously using HaversterType 0, 2 or 3 changes, but then the GUI to extract Xenon appears then.

Does anyone know of a workaround?

Alternately, I've just thought of a solution - have a separate part (using +Part) with the module to appear at the required tech level, but does anyone know if it is possible to remove a part from the part list when a tech node is unlocked, i.e. using part variants to change category = none?

Any help would be appreciated!

Peace.

Should be able to put moduleIsEnabled = false in your harvester module, and then set up the PartUpgrade to change that to true at the desired tech tree node.

Link to comment
Share on other sites

On 11/27/2018 at 6:01 PM, SchwinnTropius said:

Should be able to put moduleIsEnabled = false in your harvester module, and then set up the PartUpgrade to change that to true at the desired tech tree node.

Great suggestion, unfortunately, it won't work as ModuleResourceHarvester doesn't have that as an option.  There is a workaround somebody made for adding Science Modules to command pods (I quite like that neat idea!) but this won't work as the harvest option is always there, even if it is for a fake resource, and I tried with a different module, but KSP didn't buy it.

The only possibility is to remove the resource name and converter names into the upgrade.  The harvest (converter) option is there, but won't work until the upgrade then specifics xenon.  I guess in game I could call it a potential extraction upgrade.   It isn't elegant, but it will work.  Maybe i'll add it to the suggestion forum to give harvesting the moduleIsEnabled option.

Peace.

Link to comment
Share on other sites

Now I'm wondering if the PartStatsupgrade can change the category ie to unknown to hide the part so i can add a replicant part with the harvestor module in it.  I also wondet and if it would be automatic...

Anyone know?

Peace. 

Edited by theJesuit
Link to comment
Share on other sites

You have the wrong resource type.

  • 0 = Crustal (drill)
  • 1 = Oceanic
  • 2 = Atmospheric
  • 3 = Exospheric

I've successfully done harvesters that are locked behind part upgrades. The "upgradeName" value here must match in all target modules in all affected parts to tie them to a given upgrade. The upgrade itself will appear like a part in the parts list of a tech node.

PARTUPGRADE
{
	name = upgradeName
	partIcon = partName // the internal name of any valid, loaded part
	techRequired = advScienceTech
	entryCost = 12000 // change this as you like
	cost = 0 // for display only; all parts implementing this will need a PartStatsUpgradeModule with cost = this.
	title = ...
	basicInfo = ... // shows in upper row of part info box in R&D
	manufacturer = ...
	description = ...
}

@PART[sensorAtmosphere] // stock atmo sensor
{
	MODULE
	{
		name = ModuleResourceScanner
		ScannerType = 2
		ResourceName = XenonGas
		RequiresUnlock = false // I haven't touched this
	}
	
	MODULE
	{
		name = ModuleResourceHarvester
		HarvesterType = 2
		Efficiency = 1 // scales harvest rate and EC consumption. Perhaps nerf this as the part is < 1.25m size
		airSpeedStatic = 1000 // atmo harvesting is bugged. without this and a high value, the harvester may not function while motionless
		ResourceName = XenonGas
		ConverterName = XenonGas Harvester
		StartActionName = Start XenonGas Harvester
		StopActionName = Stop XenonGas Harvester
		ToggleActionName = Toggle XenonGas Harvester
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 2 // nerf or buff as needed
		}
		
		moduleIsEnabled = false // it may appear as normal but will tell you to go to a tech node 
		showUpgradesInModuleInfo = true
		UPGRADES
		{
			UPGRADE
			{
				name__ = upgradeName
				description__ = ...
				techRequired__ = advScienceTech
				moduleIsEnabled = true //now you can use it
			}
		}
	}
}

 

Edited by JadeOfMaar
Link to comment
Share on other sites

18 hours ago, JadeOfMaar said:

You have the wrong resource type.

  • 0 = Crustal (drill)
  • 1 = Oceanic
  • 2 = Atmospheric
  • 3 = Exospheric

I've successfully done harvesters that are locked behind part upgrades. The "upgradeName" value here must match in all target modules in all affected parts to tie them to a given upgrade. The upgrade itself will appear like a part in the parts list of a tech node.


PARTUPGRADE
{
	name = upgradeName
	partIcon = partName // the internal name of any valid, loaded part
	techRequired = advScienceTech
	entryCost = 12000 // change this as you like
	cost = 0 // for display only; all parts implementing this will need a PartStatsUpgradeModule with cost = this.
	title = ...
	basicInfo = ... // shows in upper row of part info box in R&D
	manufacturer = ...
	description = ...
}

@PART[sensorAtmosphere] // stock atmo sensor
{
	MODULE
	{
		name = ModuleResourceScanner
		ScannerType = 2
		ResourceName = XenonGas
		RequiresUnlock = false // I haven't touched this
	}
	
	MODULE
	{
		name = ModuleResourceHarvester
		HarvesterType = 2
		Efficiency = 1 // scales harvest rate and EC consumption. Perhaps nerf this as the part is < 1.25m size
		airSpeedStatic = 1000 // atmo harvesting is bugged. without this and a high value, the harvester may not function while motionless
		ResourceName = XenonGas
		ConverterName = XenonGas Harvester
		StartActionName = Start XenonGas Harvester
		StopActionName = Stop XenonGas Harvester
		ToggleActionName = Toggle XenonGas Harvester
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 2 // nerf or buff as needed
		}
		
		moduleIsEnabled = false // it may appear as normal but will tell you to go to a tech node 
		showUpgradesInModuleInfo = true
		UPGRADES
		{
			UPGRADE
			{
				name__ = upgradeName
				description__ = ...
				techRequired__ = advScienceTech
				moduleIsEnabled = true //now you can use it
			}
		}
	}
}

 

This doesn't seem to work still.  After unlocking the part (not the upgrade) the option  to extract XenonGas is still present on the right click GUI and will work.

I'm not sure that moduleIsEnabled works with the harvestor module.

Peace.

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