Jump to content

ModuleScienceContainer Question


Tabris

Recommended Posts

Hey all,

I've written a Module Manager patch that adds ModuleScienceContainer (i.e the Science Box) to KOS Processor parts.

@PART[*]:HAS[@MODULE[kOSProcessor],!MODULE[KerbalEVA]]:final
{
	%MODULE[ModuleScienceContainer]
	{
		//name = ModuleScienceContainer
		reviewActionName = #autoLOC_502201 //#autoLOC_502201 = Review Stored Data
		storeActionName = #autoLOC_502202 //#autoLOC_502202 = Store Experiments
		evaOnlyStorage = False // i.e. can nearby regular vessels also do this, or EVA only
		capacity = 500
		storageRange = 1.3
		canBeTransferredToInVessel = True
		canTransferInVessel = True
		showStatus = True
		+description ^= :^.*$: Adds a Science Container.
	}
}

however the line capacity = 500 means that it can hold 500 experiment results. i would like it to hold a percentage of the KOS diskspace (eg. if the KOS diskspace is 5000, the experiment space is 500Mits)

also how can i make it so this information shows up in the VAB/SPH right click part info panel

Link to comment
Share on other sites

// cannot do more than one MOP per code line (mm limitation)

// first set it to the parts diskSpace
%capacity = #$../kOSProcessor/diskSpace$

// then multiply it by say 10% - not easy to round - so remember that if you want clean numbers
@capacity *= .1

hopefully this helps. There is a way to round - using REGEX - just can't remember how to do it off the top of my head. :awe:

 

see Module Manager wiki for more, and its forum thread to ask specific questions. 

 

Link to comment
Share on other sites

@PART[*]:HAS[@MODULE[kOSProcessor],!MODULE[KerbalEVA]]:final
{
	%MODULE[ModuleScienceContainer]
	{
		//name = ModuleScienceContainer
		reviewActionName = #autoLOC_502201 //#autoLOC_502201 = Review Stored Data
		storeActionName = #autoLOC_502202 //#autoLOC_502202 = Store Experiments
		evaOnlyStorage = False // i.e. can nearby regular vessels also do this, or EVA only
		storageRange = 1.3
		capacity = 30
		canBeTransferredToInVessel = True
		canTransferInVessel = True
		showStatus = True
		+description = :^.*$: Adds a Science Container.
		%capacity = #$../MODULE[kOSProcessor]/diskSpace$
		@capacity *= .1
	}
}

ok, so this works. now to figure out how the translate the Capacity to MITS instead of Experiments.

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