Jump to content

Life Support from the "inside"?


Recommended Posts

Hey guys!

I was thinking about life support mods for KSP. There are a lot of great mods out there with great functionality. I use to create stations and crafts that are inspired by their real-life counterparts. Therefor I don't like putting all the containers for life support on the outside of the ships/stations. IRL meals are also carried on the inside reachable  for the astronauts. As Snacks! are now massless resupply-missions are now massless too. 

So I am now searching for a way to stuff containers for life support inside crafts and make kerbals consume resources from there. Maybe via a config file.

So - is there anything like this already out there or do you guys have any hints/ideas on achieving this?

Greetings, JJ.

Link to comment
Share on other sites

Haven't snacks been massless for over a year now?
And the mod Snacks! that actually uses snacks, stores them inside crew compartments only(MK1 capsule, Hitchhiker, Cabins,...etc all get some amount of snacks as an extra resource)

It does fit nicely with stock though

Link to comment
Share on other sites

Check!

So I should only have to bring density-values back into my copy of the resources config for Snacks! ?

Otherwise I am looking for a way to use Life resources from inside an inventory module. Like IRL. But I haven't found a line yet to provide this feature.

Edited by Jeb Jawkins
Link to comment
Share on other sites

6 hours ago, Jeb Jawkins said:

So I should only have to bring density-values back into my copy of the resources config for Snacks! ?

i have do that,

RESOURCE_DEFINITION
{
  name = Snacks
  density = 0.001
  unitCost = .5
  flowMode = ALL_VESSEL
  transfer = PUMP
  isTweakable = true
}

and changed the patch in a way that add only storage and not snacks, on this way i can decide the amount to load first to launch a vessel


@PART[*]:HAS[@MODULE[ModuleCommand],#CrewCapacity[*],~CrewCapacity[0],!RESOURCE[Snacks]]
{
	RESOURCE
	{
		name= Snacks
		amount = 0
		maxAmount = 50
	        @maxAmount *= #$/CrewCapacity$
	}
}

@PART[*]:HAS[!MODULE[ModuleCommand],#CrewCapacity[*],~CrewCapacity[0]!RESOURCE[Snacks]]
{
	RESOURCE
	{
		name= Snacks
		amount = 0
		maxAmount = 100
	        @maxAmount *= #$/CrewCapacity$
	}
}

@PART[seatExternalCmd]
{
	RESOURCE
	{
		name= Snacks
		amount = 2
		maxAmount = 2
	}
}

@PART[Large_Crewed_Lab]
{
	@RESOURCE[Snacks]
	{
		@amount = 200
		@maxAmount = 200
	}

	MODULE
	{
		 name = ModuleResourceConverter
		 ConverterName = Snack Cultivator
		 StartActionName = Start Snack Cultivator
		 StopActionName = Stop Snack Cultivator
		AutoShutdown = false
		GeneratesHeat = false
		UseSpecialistBonus = true
		SpecialistEfficiencyFactor = 0.2
		SpecialistBonusBase = 0.05
		Specialty = Engineer
		EfficiencyBonus = 1

		 
		 INPUT_RESOURCE
		 {
			ResourceName = Ore
			Ratio = 0.00015
			FlowMode = STAGE_PRIORITY_FLOW
  		 }
		 INPUT_RESOURCE
		 {
			ResourceName = ElectricCharge
			Ratio = 5
		 }
		 OUTPUT_RESOURCE
		 {
			ResourceName = Snacks
			Ratio = 0.00015
			DumpExcess = false
			FlowMode = STAGE_PRIORITY_FLOW
		 }
	}
}


@PART[cupola]
{
	@RESOURCE[Snacks]
	{
		@amount = 0
		@maxAmount = 100
	}
}

@PART[roverBody]
{
	RESOURCE
	{
		name = Snacks
		amount = 0
		maxAmount = 10
	}
}

 

Link to comment
Share on other sites

  • 2 weeks later...

Okay. Worked out fine so far. Thx.

I'm now trying to add Snacks! as a resource to unmanned Pods/Utilities for making supply missions necessery. Tried this with Progress-Orbital-Module from Tantares first. ModuleManager now shows one more patch applying. So it's applying something to this part. But snack is not showing up ingame on this particular part. Do I need another line for unmanned parts?

This is what I've added to Snacks! patch.cfg so far:

@PART[Hamal_Orbital_A]
{
    RESOURCE[Snacks]
    {
        amount = 0
        maxAmount = 200
    }
}
 

Edited by Jeb Jawkins
Link to comment
Share on other sites

14 minutes ago, Jeb Jawkins said:

Okay. Worked out fine so far. Thx.

I'm now trying to add Snacks! as a resource to unmanned Pods/Utilities for making supply missions necessery. Tried this with Progress-Orbital-Module from Tantares first. ModuleManager now shows one more patch applying. So it's applying something to this part. But snack is not showing up ingame on this particular part. Do I need another line for unmanned parts?

This is what I've added to Snacks! patch.cfg so far:

@PART[Hamal_Orbital_A]
{
    RESOURCE[Snacks]
    {
        amount = 0
        maxAmount = 200
    }
}
 

For add snacks to all unmanned pod try this (not tested)

@PART[*]:HAS[MODULE[ModuleCommand],CrewCapacity[0],!RESOURCE[Snacks]]
{
	RESOURCE
	{
		name= Snacks
		amount = 0
		maxAmount = 100
	}
}

Edit i have correct 1 misspelling in the patch

Edited by Badsector
Link to comment
Share on other sites

Thanks again! Didn't work out unfortunately.

Guess unmanned modules are recognized by SAS or ReactionWheel or something.

So I think writing configs for the mods I want Snacks! to be applied to might be easier. Had a little try doing an extra config for Tantares:

@PART[Hamal_Orbital_A]:AFTER[Snacks]
{
	RESOURCE
	{
		name= Snacks
		amount = 0
		maxAmount = 200
	}
}

This worked out pretty well. I'll be adding some more parts to this file and then probably post the results here. Thanks for your help - wouldn't have been able to understand the reading of KSP without.

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