Jump to content

Fraz86

Members
  • Posts

    462
  • Joined

  • Last visited

Posts posted by Fraz86

  1. @Nertea A new version of KerbalHealth was just released, with some significant changes that render my previous compatibility patch out-of-date. The new patch below adjusts to these changes and addresses a MM patch-order problem:

    // KerbalHealth functions
    // Authored by Fraz86
    
    @PART[sspx-habitation-125-1]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 0.8
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 0.75
    		multiplyFactor = Crowded
    		multiplier = 0.4
    		crewCap = 2
    	}
    }
    @PART[sspx-utility-125-1]:NEEDS[KerbalHealth,!USILifeSupport]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 0.4
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 0.5
    		multiplyFactor = Crowded
    		multiplier = 0.5
    		crewCap = 1
    	}
    }
    @PART[sspx-utility-125-1]:NEEDS[KerbalHealth,USILifeSupport]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 0.3 //reduced space with USI-LS due to life support system
    	}
    }
    @PART[sspx-inflatable-hab-125-1]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 2.7
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 0.61
    		multiplyFactor = Crowded
    		multiplier = 0.45
    		crewCap = 6
    	}
    }
    @PART[sspx-inflatable-hab-125-2]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 1.3
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 0.61
    		multiplyFactor = Crowded
    		multiplier = 0.45
    		crewCap = 3
    	}
    }
    @PART[sspx-inflatable-hab-125-3]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 1.3
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 0.61
    		multiplyFactor = Crowded
    		multiplier = 0.45
    		crewCap = 3
    	}
    }
    @PART[sspx-inflatable-centrifuge-125-1]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 0.3
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 0.93
    		multiplyFactor = Crowded
    		multiplier = 0.35
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Microgravity
    		multiplier = 0.2
    		crewCap = 6
    		resourceConsumption = 6
    	}
    	RESOURCE
    	{
    		name = RadiationShielding
    		amount = 0
    		maxAmount = 3
    	}
    }
    @PART[sspx-inflatable-centrifuge-125-2]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 0.6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 0.75
    		multiplyFactor = Crowded
    		multiplier = 0.4
    		crewCap = 4
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Microgravity
    		multiplier = 0.4
    		crewCap = 4
    		resourceConsumption = 1.5
    	}
    	RESOURCE
    	{
    		name = RadiationShielding
    		amount = 0
    		maxAmount = 2
    	}
    }
    @PART[sspx-core-125-1]:NEEDS[KerbalHealth,!USILifeSupport]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 1.7
    	}
    }
    @PART[sspx-core-125-1]:NEEDS[KerbalHealth,USILifeSupport]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 0.8 //reduced space with USI-LS due to life support system
    	}
    }
    @PART[sspx-cupola-125-1]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 0.1
    	}
    }
    @PART[sspx-habitation-25-1]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 2.0
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 1.17
    		multiplyFactor = Crowded
    		multiplier = 0.3
    		crewCap = 6
    	}
    }
    @PART[sspx-inflatable-hab-25-1]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 1.8
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 4.5
    		multiplyFactor = Crowded
    		multiplier = 0.1
    		crewCap = 9
    	}
    }
    @PART[sspx-inflatable-hab-25-2]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 2.3
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 1.5
    		multiplyFactor = Crowded
    		multiplier = 0.25
    		crewCap = 6
    	}
    }
    @PART[sspx-inflatable-centrifuge-25-1]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 1.5
    		multiplyFactor = Crowded
    		multiplier = 0.25
    		crewCap = 8
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Microgravity
    		multiplier = 0.1
    		crewCap = 8
    		resourceConsumption = 18
    	}
    	RESOURCE
    	{
    		name = RadiationShielding
    		amount = 0
    		maxAmount = 4
    	}
    }
    @PART[sspx-observation-25-1]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 1.1
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 1
    		crewCap = 6
    		resourceConsumptionPerKerbal = 1
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Loneliness
    		multiplier = 0.5
    	}
    }
    @PART[sspx-observation-25-1]:NEEDS[KerbalHealth]:FINAL
    {
    	!RESOURCE[RadiationShielding] {}
    }
    @PART[sspx-core-25-1]:NEEDS[KerbalHealth,!USILifeSupport]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 4.0
    	}
    }
    @PART[sspx-core-25-1]:NEEDS[KerbalHealth,USILifeSupport]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 1.7 //reduced space with USI-LS due to life support system
    	}
    }
    @PART[sspx-greenhouse-25-1]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 1.5
    	}
    	RESOURCE
    	{
    		name = RadiationShielding
    		amount = 0
    		maxAmount = 1
    	}
    }
    @PART[sspx-habitation-375-1]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 1.2
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 0.75
    		multiplyFactor = Crowded
    		multiplier = 0.4
    		crewCap = 12
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Assigned
    		multiplier = 0.5
    		crewCap = 12
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		shielding = 10
    	}
    }
    @PART[sspx-habitation-375-2]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 0.6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 0.75
    		multiplyFactor = Crowded
    		multiplier = 0.4
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Assigned
    		multiplier = 0.5
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		shielding = 5
    	}
    }
    @PART[sspx-habitation-375-3]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 1.2
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 0.5
    		multiplyFactor = Crowded
    		multiplier = 0.5
    		crewCap = 3
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		shielding = 25 //equivalent to 2.5t of add-on shielding
    	}
    }
    @PART[sspx-expandable-centrifuge-375-1]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 2.1
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 4.5
    		multiplyFactor = Crowded
    		multiplier = 0.1
    		crewCap = 10
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Assigned
    		multiplier = 0.5
    		crewCap = 10
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Microgravity
    		multiplier = 0.1
    		crewCap = 14
    		resourceConsumption = 31.5
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 1
    		crewCap = 6
    		resourceConsumptionPerKerbal = 1
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Loneliness
    		multiplier = 0.5
    	}
    	RESOURCE
    	{
    		name = RadiationShielding
    		amount = 0
    		maxAmount = 7
    	}
    }
    @PART[sspx-expandable-centrifuge-375-2]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 1.5
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 4.5
    		multiplyFactor = Crowded
    		multiplier = 0.1
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Assigned
    		multiplier = 0.5
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Microgravity
    		multiplier = 0.1
    		crewCap = 10
    		resourceConsumption = 22.5
    	}
    	RESOURCE
    	{
    		name = RadiationShielding
    		amount = 0
    		maxAmount = 5
    	}
    }
    @PART[sspx-core-375-1]:NEEDS[KerbalHealth,!USILifeSupport]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 5.5
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		shielding = 5
    	}
    }
    @PART[sspx-core-375-1]:NEEDS[KerbalHealth,USILifeSupport]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 2.2 //reduced space with USI-LS due to life support system
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		shielding = 5
    	}
    }
    @PART[sspx-cupola-375-1]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 2.2
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 1
    		crewCap = 4
    		resourceConsumptionPerKerbal = 1
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Loneliness
    		multiplier = 0.5
    	}
    }
    @PART[sspx-lab-375-1]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 1.1
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 0.1
    		multiplyFactor = Connected
    		multiplier = 1.2
    		crewCap = 3
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 1
    		multiplyFactor = Sickness
    		multiplier = 0.5
    		crewCap = 3
    		partCrewOnly = true
    	}
    }
    @PART[sspx-greenhouse-375-1]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 2.3
    	}
    	RESOURCE
    	{
    		name = RadiationShielding
    		amount = 0
    		maxAmount = 1.5
    	}
    }
    @PART[sspx-aquaculture-375-1]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 2.4
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		shielding = 25
    	}
    }
    @PART[sspx-airlock-125-1]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 0
    	}
    }
    @PART[sspx-airlock-25-1]:NEEDS[KerbalHealth]:FOR[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 0
    	}
    }

     

  2. @garwel It looks like there's another issue with General.cfg, such that it still isn't excluding cupolas and cockpits. Apparently MM requires "~name" rather than "!name." I can confirm that with this modification, it does indeed work as intended.

    On an unrelated note, I thought it might be neat if airlock modules had an EVA multiplier, reducing the health drain for nearby Kerbals on EVA (representing the greater convenience/practicality of EVA when an airlocks is available). I have no idea if this would be technically difficult to implement, but if it happens to be easy, I would enjoy it.

  3. 5 hours ago, garwel said:

    A new pre-release of v1.1.0 is out:

    • Added: Living Space and RadShield values for stock cockpits
    • Changed: Living Space has been lowered for most parts from pre-release 1
    • Changed: Crowded factor default base value is now -3 instead of -5; a message will warn you to change it manually in an ongoing game
    • Fixed: Cupola and some cockpits still had RadShield capacity when they shouldn't have (thanks @Fraz86 for pointing out)

    Download here

    As always, it is recommended that you visit your every crewed vessel after updating to make sure new Kerbal Health values are applied.

    I'm going to release KH 1.1 on January 20, one year since publication of the first alpha.

    I look forward to trying out the new release! Might you be able to post the latest version of your spreadsheet?

  4. @garwel From General.cfg, the following does not work as intended:

    @PART[*]:HAS[#CrewCapacity[>0],!name[*Cockpit*],!name[*cupola*],!RESOURCE[RadiationShielding],!MODULE[KerbalSeat]]:AFTER[KerbalHealth]
    {
    	RESOURCE
    	{
    		name = RadiationShielding
    		amount = 0
    		maxAmount = #$../CrewCapacity$
    	}
    }

    In MM syntax, "*" can't represent nothing. For example, *Cockpit* looks for strings with at least one character before the "C" and after the "t", which happens to exclude all of the cockpits in the game. In order to function as you intended, I suggest the following modification:

    @PART[*]:HAS[#CrewCapacity[>0],!name[*ockpi*],!name[*upol*],!RESOURCE[RadiationShielding],!MODULE[KerbalSeat]]:AFTER[KerbalHealth]
    {
    	RESOURCE
    	{
    		name = RadiationShielding
    		amount = 0
    		maxAmount = #$../CrewCapacity$
    	}
    }

     

  5. On 1/2/2018 at 12:05 PM, Nertea said:

    I'm wary of including this if it directly affects behaviour of another mod. Seems like that could be a problem, though from what you've written, I agree with your changes. I wonder if the dev of KerbalHealth would be open to your suggestions?

    I made my case to the KerbalHealth dev (garwel), and now his latest test version substantially limits the abusability of the recuperation mechanic. Recuperation-providing parts now have a limit on the number of Kerbals to whom benefit is provided, and each Kerbal may only benefit from the single best available recuperation bonus (i.e., the bonuses are no longer additive). Given these changes, it is now possible to write a compatibility patch in which SSPX parts have meaningful use without overwriting any of KerbalHealth's own behavior.

    Still, I found myself confronted with a minor dilemma. Garwel uses a spreadsheet to formulaically determine mod-related values based on a part's mass, crew capacity, and cost. The spreadsheet is well-conceived (and I generally prefer the mathematical, non-arbitrary approach myself), but, unfortunately, the formulas result in values for SSPX parts that are, in some cases, (1) counterintuitive given the part's appearance/description, (2) unlikely to be useful for any realistic gameplay situation, and/or (3) failing to present the player with any meaningful trade-offs (versus, for instance, just stacking Hitchhikers).

    Thus, for the compatibility patch below, I tried to generally respect garwel's formulas, but I hand-tweaked a number of values in an attempt to ensure that all parts are interesting and useful. Within garwel's mathematic system, there exists a natural trade-off between "space" (which I interpret, literally, as referring to extra space in a module) versus the Crowded multiplier (which I imagine to represent crew amenities). For a hab module of given mass, a better crowded multiplier generally means less space, and vice versa. In my hand-tweaking of values, I played up this relationship, and also added a third variable for parts with private crew cabins (i.e., PXL-1, PXL-2, PXL-E, and PXL-F), allowing these parts to reduce the negative impact of being "assigned" (i.e., on a mission). So, for instance, the Hostel and Shelter provide relatively little "space" for their size, and only a mediocre Crowded multiplier, but reduce the "assigned" burden by 50%, giving these parts a unique purpose (without my tweaks, these parts would basically just be larger Hitchhikers). Such trade-offs incentivize the combination of various habitation modules that confer different benefits, resulting in more interesting ship design. It would certainly be possible to write a patch that more strictly conforms to garwel's formulas, and I understand if that is the direction you'd prefer to go for the official patch, but here's my version nonetheless:

    @PART[sspx-habitation-125-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 1.3
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 0.75
    		multiplyFactor = Crowded
    		multiplier = 0.4
    		crewCap = 2
    	}
    }
    @PART[sspx-utility-125-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 0.5
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 0.5
    		multiplyFactor = Crowded
    		multiplier = 0.5
    		crewCap = 1
    	}
    }
    @PART[sspx-inflatable-hab-125-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 4.1
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 0.61
    		multiplyFactor = Crowded
    		multiplier = 0.45
    		crewCap = 6
    	}
    }
    @PART[sspx-inflatable-hab-125-2]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 2.1
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 0.61
    		multiplyFactor = Crowded
    		multiplier = 0.45
    		crewCap = 3
    	}
    }
    @PART[sspx-inflatable-hab-125-3]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 2.1
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 0.61
    		multiplyFactor = Crowded
    		multiplier = 0.45
    		crewCap = 3
    	}
    }
    @PART[sspx-inflatable-centrifuge-125-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 1.8
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 0.93
    		multiplyFactor = Crowded
    		multiplier = 0.35
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Microgravity
    		multiplier = 0.2
    		crewCap = 6
    		resourceConsumption = 6
    	}
    }
    @PART[sspx-inflatable-centrifuge-125-2]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 1.6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 0.75
    		multiplyFactor = Crowded
    		multiplier = 0.4
    		crewCap = 4
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Microgravity
    		multiplier = 0.4
    		crewCap = 4
    		resourceConsumption = 4
    	}
    }
    @PART[sspx-core-125-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 2.6
    	}
    }
    @PART[sspx-cupola-125-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 0.1
    	}
    }
    @PART[sspx-habitation-25-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 3.1
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 1.17
    		multiplyFactor = Crowded
    		multiplier = 0.3
    		crewCap = 6
    	}
    }
    @PART[sspx-inflatable-hab-25-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 3.8
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 4.5
    		multiplyFactor = Crowded
    		multiplier = 0.1
    		crewCap = 9
    	}
    }
    @PART[sspx-inflatable-hab-25-2]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 4.3
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 1.5
    		multiplyFactor = Crowded
    		multiplier = 0.25
    		crewCap = 6
    	}
    }
    @PART[sspx-inflatable-centrifuge-25-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 0.4
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 1.5
    		multiplyFactor = Crowded
    		multiplier = 0.25
    		crewCap = 8
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Microgravity
    		multiplier = 0.1
    		crewCap = 8
    		resourceConsumption = 8
    	}
    }
    @PART[sspx-observation-25-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 1.3
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 1
    		crewCap = 8
    		resourceConsumptionPerKerbal = 1
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Loneliness
    		multiplier = 0.5
    	}
    	!RESOURCE[RadiationShielding] {}
    }
    @PART[sspx-core-25-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 6.2
    	}
    }
    @PART[sspx-greenhouse-25-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 2.3
    	}
    }
    @PART[sspx-habitation-375-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 3.8
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 0.75
    		multiplyFactor = Crowded
    		multiplier = 0.4
    		crewCap = 12
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Assigned
    		multiplier = 0.5
    		crewCap = 12
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		shielding = 10
    	}
    }
    @PART[sspx-habitation-375-2]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 1.9
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 0.75
    		multiplyFactor = Crowded
    		multiplier = 0.4
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Assigned
    		multiplier = 0.5
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		shielding = 5
    	}
    }
    @PART[sspx-habitation-375-3]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 2.2
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 0.17
    		multiplyFactor = Crowded
    		multiplier = 0.75
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		shielding = 20
    	}
    }
    @PART[sspx-expandable-centrifuge-375-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 4.2
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 4.5
    		multiplyFactor = Crowded
    		multiplier = 0.1
    		crewCap = 10
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Assigned
    		multiplier = 0.5
    		crewCap = 10
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Microgravity
    		multiplier = 0.1
    		crewCap = 14
    		resourceConsumption = 14
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 1
    		crewCap = 10
    		resourceConsumptionPerKerbal = 1
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Loneliness
    		multiplier = 0.5
    	}
    }
    @PART[sspx-expandable-centrifuge-375-2]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 3
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 4.5
    		multiplyFactor = Crowded
    		multiplier = 0.1
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Assigned
    		multiplier = 0.5
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Microgravity
    		multiplier = 0.1
    		crewCap = 10
    		resourceConsumption = 10
    	}
    }
    @PART[sspx-core-375-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 8.4
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		shielding = 5
    	}
    }
    @PART[sspx-cupola-375-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 1.3
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 1
    		crewCap = 4
    		resourceConsumptionPerKerbal = 1
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Loneliness
    		multiplier = 0.5
    	}
    }
    @PART[sspx-lab-375-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 1.3
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 0.1
    		multiplyFactor = Connected
    		multiplier = 1.2
    		crewCap = 3
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 1
    		multiplyFactor = Sickness
    		multiplier = 0.5
    		crewCap = 3
    		partCrewOnly = true
    	}
    }
    @PART[sspx-greenhouse-375-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 3.5
    	}
    }
    @PART[sspx-aquaculture-375-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		space = 3.6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		shielding = 20
    	}
    }

     

  6. @garwel A few thoughts have come up in the course of playing with your spreadsheet (which is awesome, by the way) and working on a compatibility patch for Nertea's new SSPX mod. The use of "Eff t/k" as the primary determinant of habitation modules' "Crowd" factor yields intuitive results for most parts. However, unintuitive results arise for some large hab modules - clearly intended for much longer habitation than a Hitchhiker - that end up with unimpressive Crowd multipliers due to their very high crew capacities. The problem, in my view, is that the crew capacity for such parts is meant to represent the maximum capacity rather than the intended long-term habitation capacity. For example, Nertea's PFD-A Inflatable Habitation Module has a crew capacity of 18 (Eff t/k = 0.54, Crowd = 0.40), but its part description clearly states it has only 9 beds (the other 9 spots are in common areas with exercise equipment, dining, etc.). It would make much more sense, thematically, it the part provided a 0.10 Crowded multiplier for 9 Kerbals, rather than a 0.40 multiplier for 18 Kerbals. This would also allow the part to be much more interesting and useful in terms of gameplay and craft design, providing a meaningful difference vs just stacking multiple Hitchhikers.

    In short, I would love to see the addition of some kind of "long-term habitation capacity" that represents the number of Kerbals for whom the part is equipped to provide its maximal benefit. For stock parts (Hitchhiker, Mk1/2/3 Crew Cabins), this is identical to crew capacity, but I believe there are a number of mod parts that could benefit from such a distinction. Perhaps you could subtract half of the difference between Crew Capacity and "long-term habitation capacity" in calculating EffCrew (in the above example: 18 - 0.5 * [18 - 9] = 13.5) and set the Crowded CrewCap equal to the long-term habitation capacity.

    EDIT: I also wish that microgravity modification (i.e., a module being a centrifuge) was factored in to calculation of the Crowded multiplier. Basically, a centrifuge should be less effective at reducing crowdedness than an non-centrifuge habitation module with identical mass, capacity, and cost.

  7. 12 minutes ago, garwel said:

    I actually calculate most of these values in a big, 32-column wide Excel spreadsheet and manually copy them into configs. It doesn't make sense to do it in the plugin and the formulas are too complicated to be used in MM patches. The one @Fraz86 cited is not correct any more; I've made a lot of changes. I may upload the spreadsheet to Google Drive for everyone to play with, but it's really complex to use correctly.

    With Recuperation, I decide it case-by-case. Basically, if the part is big (something like 1 ton per kerbal or more), is supposed to be used mainly for long-term habitation, and has no other primary use, it should probably have recup. I rarely look at the parts' visual models; in fact I usually grab all the data I need from parts' config files.

    I would love to see your spreadsheet, or even just your most up-to-date formulas. It would be very helpful for writing compatibility patches.

  8. 8 minutes ago, wile1411 said:

    For the Mk1 Crew cabin - based on the github, I see that it's been specifically set, so it doesn't use the calculation patch.

    https://github.com/GarwelGarwel/KerbalHealth/blob/master/Patches/KHStock.cfg#L84

    I'm not seeing any calculation patch (at least, not as a MM file). It looks like all of the crowded multipliers are specifically set. It's just that the multipliers chosen for other stock parts approximately match the value given by the formula. See below:

      Predicted multiplier Actual multiplier
    Hitchhiker 0.4 0.4
    Mk1 Crew Cabin 0.953 0.75
    Mk2 Crew Cabin 0.488 0.5
    Mk3 Crew Cabin 0.449 0.45

    The multipliers for other parts were just rounded to nice even numbers, whereas the multiplier for the Mk1 Crew Cabin got a substantial buff from 0.953 to 0.75. I'm trying to understand if there's some logic I'm missing that explains this discrepancy, so that I can reproduce this logic when I write compatibility patches for Nertea's mods.

  9. 13 hours ago, garwel said:

    Here is the promised beta release of Kerbal Health 1.1.0.

    • Added: (Almost) every crewable part now provides Living Space, which is used to calculate Crowded factor instead of seats number. Generally, heavier and more expensive parts tend to provide more space, but factor multipliers and Recuperation are also taken into account.
    • Added: Recuperation now has crew cap and can't go higher than the highest Recuperation value among your parts. E.g. a Cupola provides 1% Recuperation for 2 crew => 4 Cupolas give 1% Recup for 8 crew (not 4%!).
    • Added: Support patches for Atomic Age, FTmN, FTmn-New, RSCapsuledyne (thanks @linuxgurugamer for these), and DSEV mods
    • Added: Recuperation is now shown in Health Report
    • Added: Some parts (stocks as well as from mods) now provide bonuses to Loneliness and Connected factors
    • Changed: Health modules can only be enabled or disabled if they consume resources (EC). Therefore alwaysActive keyword has been deprecated.
    • Changed: All parts' values have been rebalanced
    • Significantly improved performance for vessels with a lot of crew

    NOTE: As all parts have been rebalanced, be careful when updating a live save file with ongoing missions. Check that your kerbals are ok after updating and change settings accordingly (or rescue them before it's too late).

    Download here

    Send me your bug reports (be sure to enable Debug Mode and attach the output log) and feedback re new mechanics and balance.

    Thanks for the update! For the purpose of creating compatibility patches, I was hoping to get additional details regarding any values that are now determined formulaically. For instance, I saw your post from page 11 where you gave the following formula:

    Quote

    CrowdedFactor = min (100%, 25% * (1 + RecuperationBonus) * sqrt (1000 * EffCrew / Cost) * EffCrew / Mass)

    where

    EffCrew = CrewCapacity + CommandModule + 5 * SciLab

    Does a hab being a centrifuge have a defined impact on the CrowdedFactor (e.g., in terms of modifying EffCrew like CommandModule or SciLab)? How is EC use calculated? What about "space"? Are there formulae for calculation of RecuperationBonus, or connected/loneliness/sickness multipliers multipliers?

    EDIT: Upon further review, it appears that some parts don't actually obey the above formula for CrowdedFactor. For example, the calculation for the Mk1 Crew Cabin should be 0.25 * (1 + 0) * sqrt(1000 * 2 / 550) * 2 / 1 = ~0.95, but instead it has a CrowdedFactor of 0.75. Am I missing something, or has it been arbitrarily adjusted?

  10. 19 hours ago, garwel said:

    I've been thinking of it lately. I may adjust the recuperation system in the next release where I'll change a lots of maths. Recuperation is supposed to be used for long-term habitation, in stations and bases. I don't want to force the player to spam cupolas (or any other part). So for most practical purposes, having a Hitchhiker and 2 Cupolas, or vice versa, and a few extra seats should be enough for a crew of 3. It may not be balanced for very big crews though, but those make little sense in a Career campaign anyway. I guess adding a relatively high cap for recuperation parts should fix it.

    PS: Yes, crew cap is not currently implemented for recuperation, regardless of MM settings.

    Thank you for considering the issue. I believe the problems become apparent when attempting to apply KerbalHealth to mods that add larger/better/more complex habitation modules (as I am currently attempting to do for Nertea's new SSPX pack).

    Consider the microgravity penalty. The penalty is appropriately small (-0.5 HP/day), such that it only needs to be addressed for longer missions, which makes good sense. Long missions, in which compensation for microgravity is needed, would be an intuitive use case for centrifuges. Unfortunately, as it stands now, adding one additional Cupola can more than offset the entire microgravity penalty for all Kerbals onboard (1% recuperation will generate +0.5-0.75 HP/day for Kerbals at 50% of their max HP, depending on level). The Cupola presumably has lower mass, lower cost, lower EC use, and lower technology required than any centrifuge. Additionally, the Cupola can apply its effect to any crew size (whereas the centrifuge would presumably be capped at its crew capacity), and its benefit is more versatile (i.e., it continues to provide it's recuperation even when the craft is landed on a planet with full gravity, where a centrifuge would be useless; also, a Cupola can allow HP recovery, whereas a centrifuge can only prevent HP loss). In short, the Cupola works out to be a superior solution to the problem of microgravity.

    Your mod provides a variety of potentially interesting problems to solve for long-term missions. What do I do about microgravity? How can I prepare for sickness? How do I offset/eliminate the last bit of crowded penalty (after it's already been reduced by a factor of 0.375 or whatever)? What should I do if it will be difficult to maintain a comms connection back to KSP? Currently, I believe Cupolas are the best solution to all of these problems (Cupolas even provide better mitigation of sickness than labs, on an HP/mass basis), which flattens much of your mod's potential for nuance and complexity. I understand that you face quite a dilemma: you need to make your mod playable using only stock parts, and considering that the stock game doesn't include any centrifuges, long-term hab modules, etc., you need to balance your mod such that Hitchhikers and Cupolas are sufficient for missions of any duration. Unfortunately, this balancing ultimately leaves little purpose for larger/more complex parts introduced by mods. I honestly don't know what to recommend as a solution to this dilemma, other than perhaps scaling certain variables based on the mods a player has installed.

    If it's any use to you, below is a draft of my compatibility patch for Nertea's SSPX. The recuperation bonus provided by cupolas/observation modules is reduced by a factor of 10, but the bonus remains ship-wide with no crewCap, and is now alwaysActive with no EC cost, so these modules are useful when you need a small longevity bump for the ship as a whole, but they are no longer efficient as the primary solution to HP loss. Hab modules are given better crowdedness-reduction (with the largest modules completely eliminating the crowded penalty up to their crew capacity), as well as moderate partCrewOnly recuperation bonuses. Centrifuges reduce or eliminate the microgravity penalty. Labs are more effective at mitigating sickness, with a multiplier of 0.25. In summary, I made various parts more effective at accomplishing their specific purposes, while dramatically nerfing ship-wide recuperation as a panacea.

    @PART[cupola]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	@MODULE[ModuleKerbalHealth]:HAS[#recuperation[>0]]
    	{
    		@recuperation = 0.1
    		!resourceConsumptionPerKerbal = DELETE
    		%alwaysActive = true
    	}
    	!MODULE[ModuleKerbalHealth]:HAS[#multiplyFactor[Crowded]] {}
    	!RESOURCE[RadiationShielding] {}
    }
    @PART[crewCabin]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	@MODULE[ModuleKerbalHealth]
    	{
    		@resourceConsumptionPerKerbal = 1.5
    		@multiplier = 0.3
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.4
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 4
    	}
    }
    @PART[MK1CrewCabin]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	@MODULE[ModuleKerbalHealth]
    	{
    		@resourceConsumptionPerKerbal = 1
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.3
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 2
    	}
    }
    @PART[mk2CrewCabin]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.3
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 4
    	}
    }
    @PART[mk3CrewCabin]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.3
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 16
    	}
    }
    @PART[Large_Crewed_Lab]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	@MODULE[ModuleKerbalHealth]
    	{
    		@resourceConsumptionPerKerbal = 2
    		@multiplier = 0.25
    	}
    }
    @PART[sspx-lab-375-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 2.5
    		multiplyFactor = Sickness
    		multiplier = 0.25
    		crewCap = 3
    		partCrewOnly = true
    	}
    }
    @PART[sspx-habitation-125-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.3
    		resourceConsumptionPerKerbal = 1.5
    		crewCap = 2
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.4
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 2
    	}
    }
    @PART[sspx-utility-125-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.3
    		resourceConsumptionPerKerbal = 1.5
    		crewCap = 1
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.4
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 1
    	}
    }
    @PART[sspx-inflatable-hab-125-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.3
    		resourceConsumptionPerKerbal = 1.5
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.4
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 6
    	}
    }
    @PART[sspx-inflatable-hab-125-2]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.3
    		resourceConsumptionPerKerbal = 1.5
    		crewCap = 3
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.4
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 3
    	}
    }
    @PART[sspx-inflatable-hab-125-3]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.3
    		resourceConsumptionPerKerbal = 1.5
    		crewCap = 3
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.4
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 3
    	}
    }
    @PART[sspx-inflatable-centrifuge-125-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.3
    		resourceConsumptionPerKerbal = 1.5
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.5
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Microgravity
    		multiplier = 0.25
    		resourceConsumption = 6
    		crewCap = 6
    	}
    }
    @PART[sspx-inflatable-centrifuge-125-2]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.5
    		resourceConsumptionPerKerbal = 1
    		crewCap = 4
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.4
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 4
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Microgravity
    		multiplier = 0.5
    		resourceConsumption = 4
    		crewCap = 4
    	}
    }
    @PART[sspx-habitation-25-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.1
    		resourceConsumptionPerKerbal = 2
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.5
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 6
    	}
    }
    @PART[sspx-observation-25-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.2
    		alwaysActive = true
    	}
    	!RESOURCE[RadiationShielding] {}
    }
    @PART[sspx-inflatable-hab-25-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.1
    		resourceConsumptionPerKerbal = 2
    		crewCap = 18
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.5
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 18
    	}
    }
    @PART[sspx-inflatable-hab-25-2]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.1
    		resourceConsumptionPerKerbal = 2
    		crewCap = 9
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.5
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 9
    	}
    }
    @PART[sspx-inflatable-centrifuge-25-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.1
    		resourceConsumptionPerKerbal = 2
    		crewCap = 8
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.6
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 8
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Microgravity
    		multiplier = 0
    		resourceConsumption = 8
    		crewCap = 8
    	}
    }
    @PART[sspx-habitation-375-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.05
    		resourceConsumptionPerKerbal = 2.5
    		crewCap = 12
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.6
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 12
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		alwaysActive = true
    		shielding = 10
    	}
    }
    @PART[sspx-habitation-375-2]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.05
    		resourceConsumptionPerKerbal = 2.5
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.6
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		alwaysActive = true
    		shielding = 5
    	}
    }
    @PART[sspx-habitation-375-3]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.5
    		resourceConsumptionPerKerbal = 1
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.3
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		alwaysActive = true
    		shielding = 20
    	}
    }
    @PART[sspx-core-375-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		alwaysActive = true
    		shielding = 5
    	}
    }
    @PART[sspx-aquaculture-375-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		alwaysActive = true
    		shielding = 20
    	}
    }
    @PART[sspx-cupola-375-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.1
    		alwaysActive = true
    	}
    	!RESOURCE[RadiationShielding] {}
    }
    @PART[sspx-expandable-centrifuge-375-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0
    		resourceConsumptionPerKerbal = 3
    		crewCap = 14
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.7
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 14
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.3
    		alwaysActive = true
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Microgravity
    		multiplier = 0
    		resourceConsumption = 14
    		crewCap = 14
    	}
    }
    @PART[sspx-expandable-centrifuge-375-2]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0
    		resourceConsumptionPerKerbal = 3
    		crewCap = 10
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.7
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 10
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Microgravity
    		multiplier = 0
    		resourceConsumption = 10
    		crewCap = 10
    	}
    }

    Unrelated side note: I noticed that the config you use to give parts RadiationShielding does not successfully exclude Cupolas and Cockpits.

  11. Below is a draft of my KerbalHealth compatibility patch. I am quite  happy with the outcome, though as I mentioned before, it should be noted that this patch rebalances the native behavior of KerbalHealth. Unfortunately, I do not believe it is possible to achieve a satisfactory result without rebalancing.

    //////////////////////////////////////////////////////////////////////////////////////////////
    //  Experimental KerbalHealth Compatibility Patch For SSPX                                  //
    //  By Fraz86                                                                               //
    //                                                                                          //
    //  WARNING - This patch substantially rebalances the KerbalHealth mod. Most importantly,   //
    //  this patch dramatically reduces the ship-wide "recuperation" provided by the Cupola.    //
    //  Without this reduction, Cupola-spam is objectively the optimal approach for missions    //
    //  with large crews and/or long durations, leaving SSPX parts without any clear use case.  //
    //                                                                                          //
    //  MECHANICS - This patch makes it such that all habitation modules serve at least two     //
    //  functions:                                                                              //
    //  (1) Reduction of the "crowded" factor (larger, more luxurious modules provide greater   //
    //  reductions). Kerbals benefit from this reduction regardless of their location on the    //
    //  craft, though the total number of Kerbals who may benefit is limited to the crew        //
    //  capacity of the module. Each Kerbal may only benefit from a single crowdedness-         //
    //  reducing module (the best available is automatically used).                             //
    //  (2) A small amount of "recuperation" is provided to all Kerbals physically present on   //
    //  the module (larger, more luxurious modules provide greater recuperation).               //
    //                                                                                          //
    //  - In addition to the above, centrifuges also reduce or eliminate the microgravity       //
    //  penalty for a number of Kerbals up to the centrifuge's crew capacity (Kerbals need not  //
    //  be located on the centrifuge itself in order to benefit).                               //
    //  - Cupolas/Observation Modules provide global recuperation bonuses, affecting all        //
    //  Kerbals on the craft. These bonuses are quite small, but because crowdedness-reducing   //
    //  effects do not stack, and hab modules only provide recuperation for Kerbals located on  //
    //  the part itself, cupolas provide a means to achieve additional longevity.               //
    //  - Placing a Kerbal inside a lab module reduces the impact of sickness.                  //
    //////////////////////////////////////////////////////////////////////////////////////////////
    
    @PART[cupola]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	@MODULE[ModuleKerbalHealth]:HAS[#recuperation[>0]]
    	{
    		@recuperation = 0.1
    		!resourceConsumptionPerKerbal = DELETE
    		%alwaysActive = true
    	}
    	!MODULE[ModuleKerbalHealth]:HAS[#multiplyFactor[Crowded]] {}
    	!RESOURCE[RadiationShielding] {}
    }
    @PART[crewCabin]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	@MODULE[ModuleKerbalHealth]
    	{
    		@resourceConsumptionPerKerbal = 1.5
    		@multiplier = 0.3
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.4
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 4
    	}
    }
    @PART[MK1CrewCabin]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	@MODULE[ModuleKerbalHealth]
    	{
    		@resourceConsumptionPerKerbal = 1
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.3
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 2
    	}
    }
    @PART[mk2CrewCabin]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.3
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 4
    	}
    }
    @PART[mk3CrewCabin]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.3
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 16
    	}
    }
    @PART[Large_Crewed_Lab]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	@MODULE[ModuleKerbalHealth]
    	{
    		@resourceConsumptionPerKerbal = 2
    		@multiplier = 0.25
    	}
    }
    @PART[sspx-lab-375-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		resourceConsumptionPerKerbal = 2.5
    		multiplyFactor = Sickness
    		multiplier = 0.25
    		crewCap = 3
    		partCrewOnly = true
    	}
    }
    @PART[sspx-habitation-125-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.3
    		resourceConsumptionPerKerbal = 1.5
    		crewCap = 2
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.4
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 2
    	}
    }
    @PART[sspx-utility-125-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.3
    		resourceConsumptionPerKerbal = 1.5
    		crewCap = 1
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.4
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 1
    	}
    }
    @PART[sspx-inflatable-hab-125-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.3
    		resourceConsumptionPerKerbal = 1.5
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.4
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 6
    	}
    }
    @PART[sspx-inflatable-hab-125-2]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.3
    		resourceConsumptionPerKerbal = 1.5
    		crewCap = 3
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.4
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 3
    	}
    }
    @PART[sspx-inflatable-hab-125-3]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.3
    		resourceConsumptionPerKerbal = 1.5
    		crewCap = 3
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.4
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 3
    	}
    }
    @PART[sspx-inflatable-centrifuge-125-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.3
    		resourceConsumptionPerKerbal = 1.5
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.5
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Microgravity
    		multiplier = 0.25
    		resourceConsumption = 6
    		crewCap = 6
    	}
    }
    @PART[sspx-inflatable-centrifuge-125-2]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.5
    		resourceConsumptionPerKerbal = 1
    		crewCap = 4
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.4
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 4
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Microgravity
    		multiplier = 0.5
    		resourceConsumption = 4
    		crewCap = 4
    	}
    }
    @PART[sspx-habitation-25-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.1
    		resourceConsumptionPerKerbal = 2
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.5
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 6
    	}
    }
    @PART[sspx-observation-25-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.2
    		alwaysActive = true
    	}
    	!RESOURCE[RadiationShielding] {}
    }
    @PART[sspx-inflatable-hab-25-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.1
    		resourceConsumptionPerKerbal = 2
    		crewCap = 18
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.5
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 18
    	}
    }
    @PART[sspx-inflatable-hab-25-2]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.1
    		resourceConsumptionPerKerbal = 2
    		crewCap = 9
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.5
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 9
    	}
    }
    @PART[sspx-inflatable-centrifuge-25-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.1
    		resourceConsumptionPerKerbal = 2
    		crewCap = 8
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.6
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 8
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Microgravity
    		multiplier = 0
    		resourceConsumption = 8
    		crewCap = 8
    	}
    }
    @PART[sspx-habitation-375-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.05
    		resourceConsumptionPerKerbal = 2.5
    		crewCap = 12
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.6
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 12
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		alwaysActive = true
    		shielding = 10
    	}
    }
    @PART[sspx-habitation-375-2]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.05
    		resourceConsumptionPerKerbal = 2.5
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.6
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		alwaysActive = true
    		shielding = 5
    	}
    }
    @PART[sspx-habitation-375-3]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0.5
    		resourceConsumptionPerKerbal = 1
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.3
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 6
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		alwaysActive = true
    		shielding = 20
    	}
    }
    @PART[sspx-core-375-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		alwaysActive = true
    		shielding = 5
    	}
    }
    @PART[sspx-aquaculture-375-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		alwaysActive = true
    		shielding = 20
    	}
    }
    @PART[sspx-cupola-375-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.1
    		alwaysActive = true
    	}
    	!RESOURCE[RadiationShielding] {}
    }
    @PART[sspx-expandable-centrifuge-375-1]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0
    		resourceConsumptionPerKerbal = 3
    		crewCap = 14
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.7
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 14
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.3
    		alwaysActive = true
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Microgravity
    		multiplier = 0
    		resourceConsumption = 14
    		crewCap = 14
    	}
    }
    @PART[sspx-expandable-centrifuge-375-2]:NEEDS[KerbalHealth]:AFTER[KerbalHealth]
    {
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Crowded
    		multiplier = 0
    		resourceConsumptionPerKerbal = 3
    		crewCap = 10
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		recuperation = 0.7
    		partCrewOnly = true
    		alwaysActive = true
    		crewCap = 10
    	}
    	MODULE
    	{
    		name = ModuleKerbalHealth
    		multiplyFactor = Microgravity
    		multiplier = 0
    		resourceConsumption = 10
    		crewCap = 10
    	}
    }

     

  12. @garwel

    I just discovered your mod, and I am very excited to try it out! However, I am concerned about a balance issue with respect to recuperation. Currently, there appears to be no limit on the number of Kerbals who benefit from the recuperation bonus provided by cupolas. Every Kerbal on board gains the full 1% HP regeneration, whether it's a crew of 1 or 100. This stands in contrast to parts that reduce crowdedness or microgravity, which appear to have limits on the number of Kerbals allowed to benefit. Furthermore, the recuperation effect is fully additive, with no diminishing returns (two cupolas is fully twice as good as one), whereas crowdedness-reducing parts do not stack (only one reduction of crowdedness applies to each Kerbal, even if there are additional unused crowdedness-reducing parts). With these factors in mind, it will often be mathematically most efficient to use mostly cupolas in place of habitation modules for missions with large crews and/or long durations, and it is especially easy to ignore small effects like microgravity rather than using centrifuges. I would recommend that the recuperation mechanic be carefully reconsidered. Limiting the number of Kerbals who benefit from a given recuperation-providing part (or dividing the recuperation value by the number of crew) would be a start, but I would also suggest that you reduce the magnitude of the effect, and/or introduce diminishing returns (i.e., so that the second cupola provides less benefit than the first), and/or create a maximum ceiling for total recuperation per day. Anyway, I know that I can make adjustments via a MM patch if needed, but I just wanted to raise these concerns for your consideration. Thanks for creating such an interesting mod!

     

    Addendum:

    After testing some MM patches, it appears that adding "crewCap = 1" to a ModuleKerbalHealth that provides recuperation (such as in the cupola) does not function as expected. Some elements do function as one would expect: the tooltip in the VAB reads "Recuperation: 1%/day for up to 1 Kerbal," and the module only consumes a max of 1 EC/s (rather than 1 EC/s per Kerbal). However, all Kerbals on board still gain the full 1%/day recuperation, with no cap. I would have expected that either (a) only 1 Kerbal would gain recuperation, or (b) the available recuperation would be divided equally among the crew (e.g., with a crew of 5 and a single cupola [1%/day, crewCap = 1], each Kerbal would gain 0.2%/day recuperation).

  13. On 12/24/2017 at 6:00 PM, OldMold said:

    Have you tried Kerbal Health? Looking forward to mash these two mods + life support + construction time together for proper deep space crew missions.

    Thanks for the link. I've been away from KSP for about a year, so I wasn't aware of Kerbal Health. It appears to have just about everything I'm looking for. Strange that it doesn't involve food as a factor in maintaining health, but I suppose that's easily enough addressed with a separate mod (e.g., USI-LS or Snacks).

    On 12/24/2017 at 8:04 PM, JadeOfMaar said:

    Thanks for pointing that out. It will be addressed.

    This seems intriguing. Proper compatibility for this, though, will likely have to come from the KerbalHealth dev or an MM expert who understands both these mods very well. Nertea has no direct involvement with life support mods.

    Luckily, I happen to be a MM expert with experience writing configs for Nertea's mods in the past. I'd be happy to write a compatibility patch, however, I do have a couple concerns. As it stands, the "recuperation" mechanic makes it mathematically more efficient to just slap on a bunch of cupolas for large/long-term missions, rather than actually addressing crowdedness and microgravity (explanation: each cupola provides 1% HP regeneration for every Kerbal on board - it has the same benefit per Kerbal regardless of crew size, and the benefit is additive for any number of cupolas, so there's a point where it's more efficient to just make HP regeneration exceed loss rather than reducing loss). I believe the recuperation mechanic needs to be dramatically reduced in order to give Nertea's parts real purpose. In short, I intend to write a patch (at least for my own purposes), but my patch may overhaul/rebalance some of the native behavior of Kerbal Health, so it may not be appropriate as a general compatibility patch.

  14. @Nertea

    The new SSPX is a masterpiece - it might be my favorite parts pack ever. The parts are absolutely beautiful, thoughtfully designed, and cover a wide range of applications. I am very excited for finished IVAs (and I love what you've already done, especially the PXL-F). Plus, the need to move large interplanetary craft composed of these parts will provide me with a pragmatic reason to use all of your fancy end-game engines & reactors!

    I only wish that there was a crew health mod capable of giving SSPX a real sense of purpose and interesting gameplay mechanics. Unfortunately, I'm not aware of any such mod. Mods like TAC-LS or Snacks ultimately treat all crew compartments as nothing more than resource storage and/or recyclers. USI-LS has a "habitation" mechanic, which is maybe a rough approximation of what I'm hoping for, but its logic is a bit simplistic/wonky. I would love to see a mod that encourages meeting various crew needs: space, amenities, privacy (i.e., individual cabins), artificial gravity, shelter from radiation, etc., which have varying degrees of importance based on the length of the mission.

    One quick note about your current USI-LS patch: the use of MaterialKits is a feature of MKS, not USI-LS. Players who use USI-LS without MKS will find themselves unable to deploy the inflatable modules.

  15. On 1/3/2017 at 10:26 AM, Nertea said:

    Now that there is no longer a mass discrepancy between cooled and non-cooled tanks, it seems like it might be a good idea to add the cooling ability to all tanks, and just have it be enabled or disabled by default depending on type. Opinions?

    Personally, I don't love the idea of making the two sets of tanks functionally identical/redundant. I suppose we're already almost there, with the only remaining trade-off being cooling vs cost & maxTemp. It's tempting to suggest removing LH modes from stock tanks altogether, though I understand many would object that cryo engine launch stages would look a bit silly with the exposed foil tanks. I guess I don't have a great solution at the moment, but I'll think it over and get back to you if I come up with something.

  16. I vote option A. Maybe also warn the user if they attempt to use max timewarp while there are vessels with insufficient EC capacity. I think disabling max timewarp would be overkill, since most vessels should have some EC storage anyway, making it a non-issue.

  17. @ShotgunNinja Regarding compatibility with Nertea's mods, there is one more custom module that I previously missed when requesting background simulation support. It's ModuleCryoTank, found in the KerbalAtomics and CryoEngines mods. Specifically, it is implemented by SimpleBoiloff.dll, found in GameData/CryoTanks/Plugins when either of the two aforementioned mods is installed. The module implements a gradual boil-off for liquid hydrogen tanks, which can only be prevented in some tanks with continuous EC consumption. Currently, it looks like these tanks aren't registering as consuming any EC when running in the background with Kerbalism.

  18. 57 minutes ago, blowfish said:

    That shouldn't be too hard.  Can I ask what the use case is though?

    For NearFutureConstruction Octo-Girders. There are various subtypes (solid, hollow, open, saddle, fuel tanks, etc.), which intuitively ought to have different strengths (the open version should certainly be weaker than the solid girder).

  19. @ShotgunNinja I'm not sure if you saw this request from a few weeks ago (if you did, I apologize for the repetition), so I wanted to reiterate my desire for a way to modify a part's "living space" via the part config/ModuleManager. My argument is that crew capacity often does not correlate well to living space - some parts are very cramped (e.g., see RoverDude's Malemute crew compartment, which carries 4 Kerbals in less than half the volume of a Hitchhiker), whereas other parts have plenty of extra space. Some mods even have parts with no crew capacity, but that would clearly add to the habitable space. Such adjustments would allow for better balancing of habitation modules - currently (and counterintuively), the most cramped hab modules are often the most efficient way to add living space, because they provide the most crew capacity for the least mass and volume.

  20. @ShotgunNinja

    Just a few updates regarding the NearFuture compatibility patch:

    • Now that Kerbalism does not modify the stock RTG, we can remove the NearFuture RTG tweaks.
    • I like where we ended up with the NearFutureSolar panels, with one exception: the blanket arrays need a buff. They're enormous, high-tech, non-retractable, very slow-tracking, and their selling point is supposed to be low mass relative to surface area. However, their current EC per mass is actually worse than any other non-retractable panel. I would suggest a chargeRate of 65 (up from 50) for solarpanel-blanket-1 and 12.5 (up from 10) for solarpanel-blanket-2.
    • Given that RTGs and fuel cells have been restored to their stock properties, and solar panels ended up closer to stock than they were before (25-30% of stock output rather than ~10%), I think it would be appropriate to move NearFuture EC production/consumption rates (for reactors, recyclers, capacitors, and ion engines) closer to their original values as well. I'm thinking 50% (up from 25%) feels right.

    If you agree with the above changes, I've incorporated them into a new patch below:

    // by Fraz86
    
    
    // ============================================================================
    // tweak NearFutureSolar panels
    // ============================================================================
    
    
    @PART[solarpanel-static-truss-1]:NEEDS[NearFutureSolar]         { @MODULE[ModuleDeployableSolarPanel] { @chargeRate = 1.6 }       @mass *= 0.5 }
    @PART[solarpanel-static-truss-2]:NEEDS[NearFutureSolar]         { @MODULE[ModuleDeployableSolarPanel] { @chargeRate = 0.8 }       @mass *= 0.5 }
    @PART[solarpanel-deploying-1x3-1]:NEEDS[NearFutureSolar]        { @MODULE[ModuleDeployableSolarPanel] { @chargeRate = 0.7 }       @mass *= 0.5 }
    @PART[solarpanel-deploying-1x4-1]:NEEDS[NearFutureSolar]        { @MODULE[ModuleDeployableSolarPanel] { @chargeRate = 0.88 }      @mass *= 0.5 }
    @PART[solarpanel-deploying-1x4-2]:NEEDS[NearFutureSolar]        { @MODULE[ModuleDeployableSolarPanel] { @chargeRate = 1.12 }      @mass *= 0.5 }
    @PART[solarpanel-deploying-1x5-1]:NEEDS[NearFutureSolar]        { @MODULE[ModuleDeployableSolarPanel] { @chargeRate = 2.1 }       @mass *= 0.5 }
    @PART[solarpanel-deploying-1x5-2]:NEEDS[NearFutureSolar]        { @MODULE[ModuleDeployableSolarPanel] { @chargeRate = 3.25 }      @mass *= 0.5 }
    @PART[solarpanel-deploying-2x1-1]:NEEDS[NearFutureSolar]        { @MODULE[ModuleDeployableSolarPanel] { @chargeRate = 8.5 }       @mass *= 0.5 }
    @PART[solarpanel-deploying-2x1-2]:NEEDS[NearFutureSolar]        { @MODULE[ModuleDeployableSolarPanel] { @chargeRate = 4.0 }       @mass *= 0.5 }
    @PART[solarpanel-deploying-2x3-1]:NEEDS[NearFutureSolar]        { @MODULE[ModuleDeployableSolarPanel] { @chargeRate = 13.0 }      @mass *= 0.5 }
    @PART[solarpanel-deploying-circular-1]:NEEDS[NearFutureSolar]   { @MODULE[ModuleDeployableSolarPanel] { @chargeRate = 1.0 }       @mass *= 0.5 }
    @PART[solarpanel-blanket-1]:NEEDS[NearFutureSolar]              { @MODULE[ModuleDeployableSolarPanel] { @chargeRate = 65.0 }      @mass *= 0.5 }
    @PART[solarpanel-blanket-2]:NEEDS[NearFutureSolar]              { @MODULE[ModuleDeployableSolarPanel] { @chargeRate = 12.5 }      @mass *= 0.5 }
    @PART[solarpanel-curved-deploying-25-1]:NEEDS[NearFutureSolar]  { @MODULE[ModuleCurvedSolarPanel]     { @TotalEnergyRate = 1.6 }  @mass *= 0.25 }
    @PART[solarpanel-curved-375-1]:NEEDS[NearFutureSolar]           { @MODULE[ModuleCurvedSolarPanel]     { @TotalEnergyRate = 0.75 } @mass *= 0.25 }
    @PART[solarpanel-curved-25-1]:NEEDS[NearFutureSolar]            { @MODULE[ModuleCurvedSolarPanel]     { @TotalEnergyRate = 2.5 }  @mass *= 0.25 }
    
    
    // ============================================================================
    // Tweak everything from NearFutureElectrical
    // ============================================================================
    
    
    // Fission reactors cut to 50% power generation
    @PART[*]:HAS[@MODULE[FissionGenerator]]:AFTER[NearFutureElectrical]:NEEDS[NearFutureElectrical]
    {
      @MODULE[FissionGenerator]
      {
        @PowerGeneration *= 0.5
      }
    }
    
    // Nuclear waste recyclers cut to 50% power requirements
    @PART[nuclear-recycler-*]:AFTER[NearFutureElectrical]:NEEDS[NearFutureElectrical]
    {
      @MODULE[ModuleResourceConverter],0
      {
        @INPUT_RESOURCE[#ResourceName[ElectricCharge]]
        {
          @rate *= 0.5
        }
      }
      @MODULE[ModuleResourceConverter],1
      {
        @INPUT_RESOURCE[#ResourceName[ElectricCharge]]
        {
          @rate *= 0.5
        }
      }
      @MODULE[ModuleResourceConverter],2
      {
        @INPUT_RESOURCE[#ResourceName[ElectricCharge]]
        {
          @rate *= 0.5
        }
      }
    }
    
    // Capacitor charge/discharge rates cut to 50%
    @PART[*]:HAS[@MODULE[DischargeCapacitor]]:AFTER[NearFutureElectrical]:NEEDS[NearFutureElectrical]
    {
      @MODULE[DischargeCapacitor]
      {
        @ChargeRate *= 0.5
        @DischargeRate *= 0.5
      }
    }
    
    
    // ============================================================================
    // Tweak ion engines from NearFuturePropulsion
    // ============================================================================
    
    
    // All ion engine power requirements cut to 50%
    // note: also cover the stock ion engine
    @PART[ionEngine,ionArgon-*,ionXenon-*,mpdt-*,pit-*,vasimr-*]:AFTER[NearFuturePropulsion]:NEEDS[NearFuturePropulsion]
    {
      @MODULE[ModuleEnginesFX],0
      {
        @PROPELLANT[ElectricCharge]
        {
          @ratio *= 0.5
        }
      }
    }
    
    @PART[pit-*]:AFTER[NearFuturePropulsion]:NEEDS[NearFuturePropulsion]
    {
      @MODULE[VariablePowerEngine]
      {
        @PowerCurve
        {
          @key,0[1, ] /= 0.5
          @key,1[1, ] /= 0.5
        }
      }
    }
    
    @PART[vasimr-*]:AFTER[NearFuturePropulsion]:NEEDS[NearFuturePropulsion]
    {
      @MODULE[ModuleEnginesFX],1
      {
        @PROPELLANT[ElectricCharge]
        {
          @ratio *= 0.5
        }
      }
      @MODULE[VariableISPEngine]
      {
        @EnergyUsage /= 0.5
      }
    }
    
    
    // ============================================================================
    // Tweak stuff from NearFutureSpacecraft
    // ============================================================================
    
    
    // The Mk3-9 pod was intended to have advanced technology that allows it to continue
    // operating even when there isn't a Kerbal at the helm. The game doesn't allow a part
    // to actually function as both a manned command pod and a drone, so technically it was
    // just a drone (it could not be piloted by a Kerbal). With Kerbalism's signal requirement
    // for drones, this becomes a disadvantage rather than an advantage. Thus, this feature is
    // replaced with conventional crew command, and SAS is converted to standalone.
    @PART[mk3-9pod]:AFTER[NearFutureSpacecraft]:NEEDS[NearFutureSpacecraft]
    {
      @description = This newer command cockpit is optimized for orbital operations - it sacrifices some durability for lower mass. Advanced computer-assisted flight control allows even an untrained pilot to operate the pod with ease.
      @MODULE[ModuleCommand]
      {
        @minimumCrew = 1
        !RESOURCE[ElectricCharge] {}
      }
      @MODULE[ModuleSAS]
      {
        standalone = True
        RESOURCE
        {
          name = ElectricCharge
          rate = 0.03
        }
      }
    }
    
    // Though the Itinerant resembles a half-capacity Hitchhiker, it feels too cramped and
    // utilitarian to have an Entertainment value. Instead, it seems appropriate for it to
    // have a CO2 scrubber.
    @PART[utilityCabin]:AFTER[NearFutureSpacecraft]:NEEDS[NearFutureSpacecraft,EnableScrubber]
    {
      MODULE
      {
        name = Scrubber
        resource_name = Oxygen
        waste_name = CO2
        ec_rate = 0.02
        co2_rate = 0.09259258
      }
    }

     

  21. @Nertea Congrats on the release! The new fuel-switching patch looks good, except that the costs for ZBO tanks in LH2O and OX configurations are not calculated properly. Here's the problem: the dry cost for a ZBO tank is more than 3x that of the corresponding stock tank. This represents the cost of its high-tech cooling/insulation. When you switch to LH2/O, you should only need expensive cooling for 60% of the tank volume. The OX configuration shouldn't need expensive cooling at all (and therefore ought to have the same dry cost as a stock tank; otherwise you're paying 3x as much for a functionally identical tank). These cost calculations are a bit tricky due to the imprecise way that dry costs scale across different stock tank volumes, but I'll try to draft a solution shortly.

    EDIT - I think I got it. This appears to function correctly in my tests:

    // ZBO tanks
    @PART[*]:HAS[@RESOURCE[LqdHydrogen],!MODULE[InterstellarFuelSwitch],!MODULE[ModuleEnginesFX],!MODULE[ModuleEngines],!MODULE[FSfuelSwitch]]:NEEDS[!modularFuelTanks&!RealFuels]:FOR[zzz_CryoTanks]
    {
    	%LH2 = #$RESOURCE[LqdHydrogen]/maxAmount$
    	
    	%massOffset = #$LH2$
    	@massOffset *= 0.00003125 // <- EDIT HERE (dry mass per unit LH2 capacity)
    	@massOffset *= -1
    	
    	%costOffsetLH2 = #$LH2$
    	@costOffsetLH2 *= #$@RESOURCE_DEFINITION[LqdHydrogen]/unitCost$
    	@costOffsetLH2 *= -1
    	
    	%costOffsetOX = #$cost$
    	@costOffsetOX *= -0.5 // reduction to wet cost of corresponding stock tank in LFO configuration
    	%tempVar = #$LH2$
    	@tempVar *= 0.055 // units of OX in hypothetical LFO configuration
    	@tempVar *= #$@RESOURCE_DEFINITION[Oxidizer]/unitCost$
    	@costOffsetOX -= #$tempVar$
    	@tempVar = #$LH2$
    	@tempVar *= 0.045 // units of LF in hypothetical LFO configuration
    	@tempVar *= #$@RESOURCE_DEFINITION[LiquidFuel]/unitCost$
    	@costOffsetOX -= #$tempVar$
    	
    	%costOffsetLH2O = #$costOffsetLH2$
    	@costOffsetLH2O *= 0.6
    	@tempVar = #$costOffsetOX$
    	@tempVar *= 0.4
    	@costOffsetLH2O += #$tempVar$
    	
    	!RESOURCE[LqdHydrogen] {}
    	
    	MODULE
    	{
    		name = ModuleB9PartSwitch
    		moduleID = fuelSwitch
    		switcherDescription = Tank Type
    		baseVolume = #$../LH2$
    		@baseVolume *= 0.1
    		
    		SUBTYPE
    		{
    			name = LH2
    			tankType = LH2Cryo
    			addedMass = #$../../massOffset$
    			addedCost = #$../../costOffsetLH2$
    		}
    		SUBTYPE
    		{
    			name = LH2/O
    			tankType = LH2OCryo
    			addedMass = #$../../massOffset$
    			addedCost = #$../../costOffsetLH2O$
    		}
    		SUBTYPE
    		{
    			name = Oxidizer
    			tankType = OX
    			addedMass = #$../../massOffset$
    			addedCost = #$../../costOffsetOX$
    		}
    	}
    	
    	MODULE
    	{
    		name =  ModuleCryoTank
    		FuelName = LqdHydrogen
    		// in % per hour
    		BoiloffRate = 0.05
    		// in Ec per 1000 units per second
    		CoolingCost = 0.08
    	}
    }

     

×
×
  • Create New...