Alshain

[1.3.0] Community Database of Module Manager Patches for Stock KSP

Recommended Posts

I also refer it here because I like it.

And I need feedback about the outcome.

It started with this thread
https://forum.kerbalspaceprogram.com/index.php?/topic/175961-trying-to-fiddle-with-modulegimbal/

and resulted in this patch:

GameData\zFinal\zzz_useGimbalReponseTime.cfg

@PART[*]:HAS[@MODULE[ModuleGimbal]]:NEEDS[!RealismOverhaul]:FINAL
{
	@MODULE[ModuleGimbal]:HAS[~gimbalResponseSpeed[]]
	{
		%useGimbalResponseSpeed = true
		%gimbalResponseSpeed = 6
	}
}

@PART[*]:HAS[@MODULE[ModuleGimbal],@MODULE[ModuleEngines]]:NEEDS[!RealismOverhaul]:FINAL
{
	@MODULE[ModuleGimbal]:HAS[#gimbalRange[>0]]
	{
		@gimbalRange /= #$/mass$
		temp = #$gimbalRange$
		tempb = #$/MODULE[ModuleEngines]/maxThrust$
		@gimbalRange /= #$tempb$
		@gimbalRange *= 100
		@gimbalRange /= #$temp$
		@gimbalResponseSpeed /= #$/mass$
	}
}

@PART[*]:HAS[@MODULE[ModuleGimbal],@MODULE[ModuleEnginesFX]]:NEEDS[!RealismOverhaul]:FINAL
{
	@MODULE[ModuleGimbal]:HAS[#gimbalRange[>0]]
	{
		@gimbalRange /= #$/mass$
		temp = #$gimbalRange$
		tempb = #$/MODULE[ModuleEnginesFX]/maxThrust$
		@gimbalRange /= #$tempb$
		@gimbalRange *= 100
		@gimbalRange /= #$temp$
		@gimbalResponseSpeed /= #$/mass$
	}
}

@PART[*]:HAS[@MODULE[ModuleGimbal]]:NEEDS[!RealismOverhaul]:FINAL
{
	@MODULE[ModuleGimbal]:HAS[#gimbalResponseSpeed[>15]]
	{
		@gimbalResponseSpeed = 15
	}
}

@PART[*]:HAS[@MODULE[ModuleGimbal]]:NEEDS[!RealismOverhaul]:FINAL
{
	@MODULE[ModuleGimbal]:HAS[#gimbalResponseSpeed[<6]]
	{
		@gimbalResponseSpeed = 6
	}
}
	
@PART[*]:HAS[@MODULE[ModuleGimbal],@MODULE[ModuleEngines*]]:NEEDS[!RealismOverhaul]:FINAL
{
	@MODULE[ModuleGimbal]:HAS[#temp[*],#tempb[*]]
	{
		!temp = delete
		!tempb = delete
	}
}

// Ferram Aerospace Research
//
// ATTENTION:
// You have to delete the following config:
// GameData\FerramAerospaceResearch\stockEngineGimbalIncrease.cfg
//
// @PART[*]:HAS[@MODULE[ModuleGimbal]]:NEEDS[!RealismOverhaul,FerramAerospaceResearch]:FINAL
// {
	// @MODULE[ModuleGimbal]
	// {
		// @gimbalResponseSpeed *= 1.5
	// }
// }

The last block which is commented out is just in there as a reminder.
Without that the whole patch works in stock and for all mods.

ofc I cannot test every single engine from stock and from mods out there - especially because issues depend of the whole vessel design, CoM, CoL etc. pp.

But in short words:

This patch decreases the gimballing range in degrees of all engines containing a ModuleEngines or a ModuleEnginesFX and contain a ModuleGimbal which contains a gimbalRange.
The higher the mass / thrust of the engine, the lower the gimbalRange.

Specific gimbal factors like gimbalRangeX etc. are untouched.
So this works with "normal" rocket engines, verniers or fins with verniers.
Very modded and sophisticated engines with built-in verniers which are customized by the dev are untouched.

The gimbalResponseSpeed is also calculated, but with a low pass filter to be minimum 6 and a high pass filter to be maximum 15.
The higher the mass / thrust of the engine, the slower the response speed.

So you don't need to move the gimbal slider to the left anymore in VAB or flight mode to avoid wobbling.

Edited by Gordon Dry

Share this post


Link to post
Share on other sites

I wanted a Launch Escape System appropriate to the stock 1.25m and 1.875m pods, without installing a parts pack (and the one I've tried was way unbalanced, as usual for modded parts).  So trying to keep it simple, I just rescaled the stock LES by 0.5:

Quote

//Add 0.625m Launch Escape System
//Author: Fourfa

+PART[LaunchEscapeSystem]
{
    %name = LaunchEscapeSystemSmall
    @rescaleFactor = 0.5
    @TechRequired = start
    @entryCost = 2000
    @cost = 500
    @title = Small Launch Escape System
    @mass = 0.3
    @bulkheadProfiles = size0

@MODULE
    {
        name = ModuleEnginesFX
        @maxThrust = 325
    }

@RESOURCE
    {
        name = SolidFuel
        @amount = 10
        @maxAmount = 10
    }
}

I did some playtesting, and this seems to work ok.  Pad aborts with only the basic 0.625m chute could be a bit spicy.  Open to feedback on tuning the numbers I chose...

Share this post


Link to post
Share on other sites

I was looking for a way to reduce the range and strength of the docking port "magnetism"

Does this look right? Any suggestions? I thought I'd seen it on the forums before, but couldn't find it using search.

 

@PART[*]:HAS[@MODULE[ModuleDockingNode]]
{
	@MODULE[ModuleDockingNode]
	{
		%acquireForce = 0.1
		%acquireRange = 0.1
		%captureRange = 0.1
	}
}

 

Edited by Tyko

Share this post


Link to post
Share on other sites
On 5/17/2016 at 1:34 PM, Alshain said:

Default Flag Decals to Off
Contributor: @Messy Recipe

I salute you, sir. I have been looking for a way to do this for years. Only just now have I discovered Module Manager and figured someone would want the flags off by default.

Share this post


Link to post
Share on other sites

Smart™ Classes to the Part Description CommNet Antennas

Spoiler

// Class Descriptions to CommNet antennas v1.1 (20190318)
// Author: Flart

@PART[*]:HAS[@MODULE[ModuleDataTransmitter]]:NEEDS[!RemoteTech]:FINAL {
	@description ^= :^:antenna.</color> :
}

@PART[*]:HAS[@MODULE[ModuleDataTransmitter]:HAS[#antennaType[RELAY]]]:NEEDS[!RemoteTech]:FINAL {
	@description ^= :^:relay :
}
@PART[*]:HAS[@MODULE[ModuleDataTransmitter]:HAS[#antennaType[DIRECT]]]:NEEDS[!RemoteTech]:FINAL {
	@description ^= :^:direct :
}

@PART[*]:HAS[@MODULE[ModuleDataTransmitter]:HAS[#antennaType[INTERNAL]]]:NEEDS[!RemoteTech]:FINAL {
	@description ^= :^:internal :
}

// C0 = 5000
@PART[*]:HAS[@MODULE[ModuleDataTransmitter]:HAS[#antennaPower[<5499]]]:NEEDS[!RemoteTech]:FINAL {
	@description ^= :^:<color=orange>Class 0 :
}
@PART[*]:HAS[@MODULE[ModuleDataTransmitter]:HAS[#antennaPower[>5499],#antennaPower[<249E3]]]:NEEDS[!RemoteTech]:FINAL {
	@description ^= :^:<color=orange>Class 0+ :
}
@PART[*]:HAS[@MODULE[ModuleDataTransmitter]:HAS[#antennaPower[>249E3],#antennaPower[<449E3]]]:NEEDS[!RemoteTech]:FINAL {
	@description ^= :^:<color=orange>Class 0++ :
}

// C1 = 500k
@PART[*]:HAS[@MODULE[ModuleDataTransmitter]:HAS[#antennaPower[>449E3],#antennaPower[<549E3]]]:NEEDS[!RemoteTech]:FINAL {
	@description ^= :^:<color=orange>Class 1 :
}
@PART[*]:HAS[@MODULE[ModuleDataTransmitter]:HAS[#antennaPower[>549E3],#antennaPower[<4499E3]]]:NEEDS[!RemoteTech]:FINAL {
	@description ^= :^:<color=orange>Class 1+ :
}

// C2 = 5M
@PART[*]:HAS[@MODULE[ModuleDataTransmitter]:HAS[#antennaPower[>4499E3],#antennaPower[<5499E3]]]:NEEDS[!RemoteTech]:FINAL {
	@description ^= :^:<color=orange>Class 2 :
}
@PART[*]:HAS[@MODULE[ModuleDataTransmitter]:HAS[#antennaPower[>5499E3],#antennaPower[<494E6]]]:NEEDS[!RemoteTech]:FINAL {
	@description ^= :^:<color=orange>Class 2+ :
}
@PART[*]:HAS[@MODULE[ModuleDataTransmitter]:HAS[#antennaPower[>494E6],#antennaPower[<1996E6]]]:NEEDS[!RemoteTech]:FINAL {
	@description ^= :^:<color=orange>Class 2++ :
}

// C3 = 2G
@PART[*]:HAS[@MODULE[ModuleDataTransmitter]:HAS[#antennaPower[>1996E6],#antennaPower[<2004E6]]]:NEEDS[!RemoteTech]:FINAL {
	@description ^= :^:<color=orange>Class 3 :
}
@PART[*]:HAS[@MODULE[ModuleDataTransmitter]:HAS[#antennaPower[>2004E6],#antennaPower[<14960E6]]]:NEEDS[!RemoteTech]:FINAL {
	@description ^= :^:<color=orange>Class 3+ :
}

// C4 = 15G
@PART[*]:HAS[@MODULE[ModuleDataTransmitter]:HAS[#antennaPower[>14960E6],#antennaPower[<15040E6]]]:NEEDS[!RemoteTech]:FINAL {
	@description ^= :^:<color=orange>Class 4 :
}
@PART[*]:HAS[@MODULE[ModuleDataTransmitter]:HAS[#antennaPower[>15040E6],#antennaPower[<99E9]]]:NEEDS[!RemoteTech]:FINAL {
	@description ^= :^:<color=orange>Class 4+ :
}

// C5 = 100G
@PART[*]:HAS[@MODULE[ModuleDataTransmitter]:HAS[#antennaPower[>99E9],#antennaPower[<101E9]]]:NEEDS[!RemoteTech]:FINAL {
	@description ^= :^:<color=orange>Class 5 :
}
@PART[*]:HAS[@MODULE[ModuleDataTransmitter]:HAS[#antennaPower[>101E9],#antennaPower[<996E9]]]:NEEDS[!RemoteTech]:FINAL {
	@description ^= :^:<color=orange>Class 5+ :
}

// C6 = 1000G
@PART[*]:HAS[@MODULE[ModuleDataTransmitter]:HAS[#antennaPower[>996E9],#antennaPower[<1004E9]]]:NEEDS[!RemoteTech]:FINAL {
	@description ^= :^:<color=orange>Class 6 :
}
@PART[*]:HAS[@MODULE[ModuleDataTransmitter]:HAS[#antennaPower[>1004E9],#antennaPower[<9960E9]]]:NEEDS[!RemoteTech]:FINAL {
	@description ^= :^:<color=orange>Class 6+ :
}

// C7 = 10T
@PART[*]:HAS[@MODULE[ModuleDataTransmitter]:HAS[#antennaPower[>9960E9],#antennaPower[<10040E9]]]:NEEDS[!RemoteTech]:FINAL {
	@description ^= :^:<color=orange>Class 7 :
}
@PART[*]:HAS[@MODULE[ModuleDataTransmitter]:HAS[#antennaPower[>10040E9]]]:NEEDS[!RemoteTech]:FINAL {
	@description ^= :^:<color=orange>Class 7+ :
}

 

 

Edited by flart

Share this post


Link to post
Share on other sites
On 5/17/2016 at 1:34 PM, Alshain said:

You can now download this database formatted for use with @linuxgurugamer's PatchManager mod.  Simply extract the zip file to your GameData folder.

Download

Is this up-to-date, or are there new patches not in the database?

Share this post


Link to post
Share on other sites
3 hours ago, linuxgurugamer said:

Is this up-to-date, or are there new patches not in the database?

Well I would say any patches added to the topic since Sep 07, 2017 (date of the database) would not be in the database.

Doing a quick and dirty scan of the thread. It looks like nothing since the July 9 2017 post has been included.

Edited by BlackHat

Share this post


Link to post
Share on other sites
On 5/17/2016 at 1:34 PM, Alshain said:

Stop Solar Panels from Sun Tracking
Contributor: @tg626, @Alshain

  Hide contents



// Stop solar panel from sun tracking
// Author: tg626, Alshain
@PART[*]:HAS[@MODULE[ModuleDeployableSolarPanel]]:FINAL
{
	@MODULE[ModuleDeployableSolarPanel]
	{
		//%sunTracking = false //v1.1 and earlier
		%isTracking = false // v1.2+
	}
}

 

Hey fellas, is there anyway this could be made as a PAW button that could turn tracking on and off mid-flight?

Share this post


Link to post
Share on other sites
13 hours ago, klesh said:

Hey fellas, is there anyway this could be made as a PAW button that could turn tracking on and off mid-flight?

Would love that too, but I've been told by people with actual modding skills that PAW buttons for which no module is preexisting require coding - iow it can't be done with a simple MM patch.

Share this post


Link to post
Share on other sites
14 hours ago, klesh said:

Hey fellas, is there anyway this could be made as a PAW button that could turn tracking on and off mid-flight? 

Tweakable Everything does this.

Share this post


Link to post
Share on other sites
1 hour ago, EchoLima said:

Tweakable Everything does this.

 

In fact it does. Works great too.  Booyah!  Thanks for the heads up, homie.

@swjr-swis You might be interested...

Share this post


Link to post
Share on other sites

So my solar panels have been producing double the electric charge that they are supposed to produce, the panels still read default numbers ie 1.6 ec/s for the basic 1x6 panels and AmpYear does too, however the actual charge produced is double. My thought after trying to find the offending mod and fix it, which was not successful, I decided mm patch might fix it but the patch i've created either doesn't work or is unable to fix the issue as it is coded into a mod. Can any one of the brilliant minds out there check the patch to see if the patch was built right and should work or if it needs tweaking. Thanks to anyone who reads this post and double thanks if you can also help, even if it is pointing in right direction. 

@PART[*]:HAS[@MODULE[ModuleDeployableSolarPanel],@RESOURCE[ElectricCharge]]:FINAL
{
	@RESOURCE[ElectricCharge]
	{
		@chargeRate = *0.5 	
	}
}

Share this post


Link to post
Share on other sites
On 3/14/2019 at 12:49 PM, icecreamcooper said:

So my solar panels have been producing double the electric charge that they are supposed to produce, the panels still read default numbers ie 1.6 ec/s for the basic 1x6 panels and AmpYear does too, however the actual charge produced is double. My thought after trying to find the offending mod and fix it, which was not successful,

Are you using a planet mod that replaces Sun with a giant star and/or puts Kerbin closer to the star? If either is true then the star's luminosity is likely greater, causing the double solar input.

Your MM patch for solar panels should be more like this, but then in the VAB, the panel will also tell you beforehand that it will produce half of what it normally will (so the Gigantor panel will tell you it will produce 12 EC/s, not 24 EC/s), which I don't expect you to enjoy. Also, most solar panels don't have batteries so targeting RESOURCE {} will lead to very little or nothing happening.

@PART:HAS[@MODULE[ModuleDeployableSolarPanel]]
{
	@MODULE[ModuleDeployableSolarPanel]
	{
		@chargeRate *= 0.5
	}
}

 

Share this post


Link to post
Share on other sites

A couple prophylactic patches:

Fix for error thrown by ContractConfigurator caused by missing title field in agent definition. I have several old (some not so old) mods that don't have this defined.

// Fix missing agent title string
@AGENT[*]:HAS[~title] { title = #$name$	}

Fix for VAB lockups on missing bulkhead profiles. Most mod authors have pushed updates to fix their mods when the problem has been pointed out. But I've had two rather popular modders that have failed to fix this since I raised the issue. One never replied or applied fixes even while pushing other updates. This defines a new profile missingsrf that will group your problem parts together to make it easier to identify problem parts.

// Catchall for poorly patched mods
@PART[*]:HAS[~bulkheadProfiles[]] { bulkheadProfiles = missingsrf }

Share this post


Link to post
Share on other sites
On 5/17/2016 at 7:34 PM, Alshain said:

Kerbal EVA Lights On
 Contributor: @slubman

 

The new Breaking Ground suits add a ModuleColorChanger for the suit light strips that needs to be switched on, too:

Spoiler

// Kerbal have lights on when starting EVA
// Author: slubman
@PART[*]:HAS[@MODULE[KerbalEVA]]:FINAL
{
    @MODULE[KerbalEVA]
    {
        %lampOn = true
    }

    @MODULE[ModuleColorChanger]
    {
        %animState = true
    }
}

 

 

Share this post


Link to post
Share on other sites

Has anyone written a mod to change the default Docking Acquire Force with 1.7.3?

Share this post


Link to post
Share on other sites
Posted (edited)
13 hours ago, Tyko said:

Has anyone written a mod to change the default Docking Acquire Force with 1.7.3?

The attribute is "acquireForceTweak" in ModuleDockingNode. To change the force in all docking nodes, use this:

Spoiler

@PART:HAS[@MODULE[ModuleDockingNode]]
{
    @MODULE[ModuleDockingNode]
    {
    	// Change to any whole number between 0 and 200
        %acquireForceTweak = 150
    }
}

 

 

Edited by HansAcker

Share this post


Link to post
Share on other sites

When pasting these into a new file, can I name it whatever I want?

Share this post


Link to post
Share on other sites
21 minutes ago, GKSP said:

When pasting these into a new file, can I name it whatever I want?

Yes. You could even paste them all into a single file, but that usually leeds to (human) errors when editing, deleting, adding stuff later.

Share this post


Link to post
Share on other sites
23 minutes ago, GKSP said:

When pasting these into a new file, can I name it whatever I want?

As long as it ends with “.cfg”, it’s all good. 

Share this post


Link to post
Share on other sites
Posted (edited)

Thanks.  Is there also a patch to make Sun tracking optional?  Sometimes I like it, sometimes I don't.

Edit: on solar panels

Edited by GKSP
clarification

Share this post


Link to post
Share on other sites

I think it's really strange that the large lander pods don't have space for experiments.

I've added 6 slots to the new Mk2 Lander Can, which is really useful when it's in large rover form.

// Add experiment inventory slots to new Mk 2 lander can
// Author: GeneCash
@PART[mk2LanderCabin_v2] {
    MODULE {
       name = ModuleInventoryPart
       InventorySlots = 6
    }
}

Share this post


Link to post
Share on other sites

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.