Jump to content

Module manager exampels


maculator

Recommended Posts

  • 3 months later...

Is it possible to set up an mm cfg to rename the professions of the kerbals? I want to be able to use the mods like roster manager,  station science, portrait stats but as of right now,  just changing the the job title in the traits.cfg results in not being able to collect science or change careers with those mods. Portrait stats doesn't even recognize the new titles. 

 I read through the examples on the multiple pages with examples but I can't find anything.  I don't even know of if you can. 

Any help is appreciated. 

 

 

Edited by Galileo
Link to comment
Share on other sites

  • 1 month later...

I have a request / challenge for any one that knows MM

Is it possible to set MechJeb to only be available when an engineer is in a vessel and to have certain modules unlock with the engineers level?

What I would like to have is Mechjeb available on probes but only certain modules depending on the probe (I know how to do this part) and make this dependent on the connection to the KSC com network.

Then have it available to pilots and scientists dependent on their level and a connection to the KSC. Eg a level 1 pilot and level 4 scientist this representing the ground crew being able to walk them threw programing the computer.

Then having the engineer the only one that has access without a connection to the KSC.

If someone could give me an example of what I would need to do or send me in the direction of where I could find what I need, or if this is even possible with MM.

Link to comment
Share on other sites

  • 2 weeks later...

Remove flags from all parts

Spoiler

@PART[*]:HAS[@MODULE[FlagDecal]]
{
    !MODULE[FlagDecal] {}
}

 

 

Create the new Science Box in a radial version using the accelaromator casing

Spoiler

+PART[sensorAccelerometer]
{
    @name = ScienceBoxRadial
    @title = Radial-Mount Science Box
	@description = A radial mount version of the Science Box
    @tags = science box radial storage
   	@entryCost = 2200
	@cost = 1000
	@TechRequired = basicScience
    
    -MODULE[ModuleEnviroSensor] {}
    
    -MODULE[ModuleScienceExperiment] {}

    MODULE
	{
		name = ModuleConductionMultiplier
		modifiedConductionFactor = 0.001
		convectionFluxThreshold = 500
	}

	MODULE
	{
		name = ModuleScienceContainer

		reviewActionName = Review Stored Data
		storeActionName = Store Experiments
		evaOnlyStorage = True // i.e. can nearby regular vessels also do this, or EVA only
		storageRange = 1.3
		canBeTransferredToInVessel = True
		canTransferInVessel = True
		showStatus = True
	}
}

 

 

 

Edited by Jimbodiah
Link to comment
Share on other sites

Hello,

I need help with a little specific MM-configuration.

I want to change a used resource: DepletedFuel should be replaced by DepletedUranium.
And this in different parts: 

		OUTPUT_RESOURCE
		{
			ResourceName = DepletedFuel
			Ratio = 0.00000605
			DumpExcess = false
			FlowMode = NO_FLOW
		}
	RESOURCE
	{
		name = DepletedFuel
		amount = 0
		maxAmount = 280
	}
	MODULE
	{
		name = RadioactiveStorageContainer
		DangerousFuel = DepletedFuel
		SafeFuel = EnrichedUranium
		// What engineer level is needed to transfer the safe fuel
		EngineerLevelForSafe = 1
		// What engineer level is needed to transfer the dangerous fuel
		EngineerLevelForDangerous = 3
		// Max temp for transferring fuel into or out of the part
		MaxTempForTransfer = 400
		// kW of heat per unit of waste
		HeatFluxPerWasteUnit = 5
	}

This is, how it is now. But would like to use DepletedUranium instead.

How do I manage this with a MM script? I have tried some, but it was unsuccessful.

 

Please help :)

- Isabelle

Link to comment
Share on other sites

On 11/3/2016 at 7:55 PM, Isabelle.V.Fuchs said:

Hello,

I need help with a little specific MM-configuration.

I want to change a used resource: DepletedFuel should be replaced by DepletedUranium.
And this in different parts: 

This is, how it is now. But would like to use DepletedUranium instead.

How do I manage this with a MM script? I have tried some, but it was unsuccessful.

 

Please help :)

- Isabelle

 

It would be something like this.. but you should change PART[*] to limit it to the parts you want.  This assumes that DepletedUranium is already defined; if not then make a RESOURCE {} block just like the DepletedFuel one.

@PART[*]{
  @MODULE[RadioactiveStorageContainer] {
    %DangerousFuel = DepletedUranium
  }
}

@PART[*]{
  @MODULE[ModuleResourceConverter]
  {
   -%OUTPUT_RESOURCE[DepletedFuel]
   OUTPUT_RESOURCE
   {
     resourceName = DepletedUranium
     Ratio = 0.00000605
     DumpExcess = false
     FlowMode = NO_FLOW
    }
  }
}
Edited by hab136
Link to comment
Share on other sites

1 hour ago, hab136 said:

Hello hab136,

I will gladly try it this evening. :D
Maybe there is a possibility to use the 'has' statement to search for all tanks or reactors that now use depletedfuel to change the resource.

Do you think this might be possible?

 

Greetings,

- Isabelle

 

1 hour ago, hab136 said:

It would be something like this.. but you should change PART[*] to limit it to the parts you want.  This assumes that DepletedUranium is already defined; if not then make a RESOURCE {} block just like the DepletedFuel one.


@PART[*]{
  @MODULE[RadioactiveStorageContainer] {
    %DangerousFuel = DepletedUranium
  }
}

@PART[*]{
  @MODULE[ModuleResourceConverter]
  {
   -%OUTPUT_RESOURCE[DepletedFuel]
   OUTPUT_RESOURCE
   {
     resourceName = DepletedUranium
     Ratio = 0.00000605
     DumpExcess = false
     FlowMode = NO_FLOW
    }
  }
}

 

Link to comment
Share on other sites

@Isabelle.V.Fuchs yes you should be able to do something like:

 

@PART:HAS[@MODULE[ModuleResourceConverter]:HAS[@OUTPUT_RESOURCE:HAS[#ResourceName[DepletedFuel]]]]
{
  -%OUTPUT_RESOURCE[DepletedFuel]
   OUTPUT_RESOURCE
   {
     resourceName = DepletedUranium
     Ratio = 0.00000605
     DumpExcess = false
     FlowMode = NO_FLOW
    }
}
Link to comment
Share on other sites

  • 4 weeks later...

Anyone know how to replace the sound of a engine using MM? i have tried this:

Spoiler

@PART[liquidEngine1-2]:AFTER[Squad]
{
     @AUDIO
    {
        @clip = mysounds/sounds/rumble_large
        @volume = 1.0 1.0
        @volume = 1.0 1.0
        @pitch = 1.0 1.0
        @pitch = 1.0 1.0
    }
}
 

and this

Spoiler

@PART[liquidEngine1-2]:AFTER[Squad]
{
    EFFECTS
    {
        Thrust
        {
            AUDIO
            {
            @clip = mysounds/sounds/rumble_large
            @volume = 1.0 1.0
            @volume = 1.0 1.0
            @pitch = 1.0 1.0
            @pitch = 1.0 1.0
            }
        }
    }
}

Im not great with MM but i figured something like this would work. I feel like i added the extra nodes in the second example for no reason

I dont really know what to change to be honest, i just want a few of my engines to have a deeper rumble than what Squad has provided and i have created some great sound fx with oscillating fans and protools

Edited by Galileo
Link to comment
Share on other sites

17 hours ago, Galileo said:

Anyone know how to replace the sound of a engine using MM?

@PART[liquidEngine1-2]:AFTER[Squad]
 {
     @EFFECTS
     {
         @Thrust
         {
             @AUDIO
             {
             @clip = mysounds/sounds/rumble_large
             @volume = 1.0 1.0
             @volume = 1.0 1.0
             @pitch = 1.0 1.0
             @pitch = 1.0 1.0
             }
         }
     }
 } 

 

Link to comment
Share on other sites

14 hours ago, sebi.zzr said:

@PART[liquidEngine1-2]:AFTER[Squad]
 {
     @EFFECTS
     {
         @Thrust
         {
             @AUDIO
             {
             @clip = mysounds/sounds/rumble_large
             @volume = 1.0 1.0
             @volume = 1.0 1.0
             @pitch = 1.0 1.0
             @pitch = 1.0 1.0
             }
         }
     }
 } 

 

thanks!

Link to comment
Share on other sites

  • 3 weeks later...

Make a copy of the HECS2 probe core, giving it a built-in 2000 EC battery.  It even adjusts the cost/mass to be higher as a result.

https://github.com/WuphonsReach/KSP-ScrapyardBob/blob/master/Squad/HECS2_ProbeCore.cfg

+PART[HECS2_ProbeCore]
{
    @name = SYB_Squad_HECS2_ProbeCore
    @author = ScrapyardBob
    @title = Probodobodyne HECS2 (SYB)
    @manufacturer = Scrapyard Bob
    @description = Heavier version of the standard Probodobodyne HECS2, with more battery capacity.

    @entryCost += 3000 // for battery upgrade
    @cost += 1760 // 880 (x2 batts)
    @mass += 0.1 // 0.05t (x2 batts)

    %RESOURCE[ElectricCharge]
    {
        // Add (2) Z1k batteries
        @amount += 2000
        @maxAmount += 2000
    }
}

 

Link to comment
Share on other sites

On ‎29‎.‎10‎.‎2016 at 9:04 PM, Jimbodiah said:

Remove flags from all parts

  Hide contents


@PART[*]:HAS[@MODULE[FlagDecal]]
{
    !MODULE[FlagDecal] {}
}

 

from 1.2.x the right syntax is

@PART[*]:HAS[@MODULE[FlagDecal],!name[flag]]:Final
{    
@MODULE[FlagDecal]
 {
  flagDisplayed = False
 }
}

 

Link to comment
Share on other sites

  • 2 weeks later...

I was wanting to add the new RCS sound effects of KSP 1.2 to how my old parts and command modules, how would it be?
 

@PART[*]:HAS[@MODULE[ModuleRCS]]:FINAL
{
MODULE
    {
      runningEffectName = running
    }
EFFECTS
    {
        running
            {
               AUDIO
                {
                   channel = Ship
                 clip = sound_rocket_mini
                 volume = 0.0 0.0
                 volume = 0.1 0.0
                 volume = 0.5 0.025
                 volume = 1.0 0.1
                 pitch = 0.0 0.75
                 pitch = 1.0 1.5
                 loop = true
                }
            }
    }
}

What is wrong?

Link to comment
Share on other sites

8 hours ago, thiagohdf said:

What is wrong?

You're missing:

@MODULE[ModuleRCS]
{
 @name = ModuleRCSFX
 runningEffectName = running
}

you also need to change:

@PART[*]:HAS[@MODULE[ModuleRCS],!MODULE[ModuleRCSFX]]:Final

so you won't patch existing modules twice.

 

Edited by sebi.zzr
Link to comment
Share on other sites

Ok thanks, in some parts worked, but in others only the audio effect is working. Cfg looks like this:

@PART[*]:HAS[@MODULE[ModuleRCS],!MODULE[ModuleRCSFX]]:Final
{
	@MODULE[ModuleRCS]
	{
		@name = ModuleRCSFX
                runningEffectName = running
	}
	EFFECTS
	{
        	running
	        {
               		AUDIO
                	{
                   		channel = Ship
                 		clip = sound_rocket_mini
                 		volume = 0.0 0.0
                 		volume = 0.1 0.0
                 		volume = 0.5 0.025
                 		volume = 1.0 0.1
                 		pitch = 0.0 0.75
                 		pitch = 1.0 1.5
                 		loop = true
                	}
			MODEL_MULTI_PARTICLE
			{
				modelName = Squad/FX/Monoprop_small
				transformName = RCSthruster
				emission = 0.0 0.0
				emission = 0.1 0.0
				emission = 1.0 1.0
				speed = 0.0 0.8
				speed = 1.0 1.0
				localRotation = -90, 0, 0
			}
            	}
    	}
}

It only ran on parts that are RCS blocks, but it did not works primarily on capsules and cokpits with rcs.
Directly from ModuleManager.ConfigCache, an example of a part where it did not work:

Spoiler

PART
{
// --- general parameters ---
	name = NoseCone
	module = Part
	author = Pete (Pak)
	
// --- asset parameters ---
	MODEL
	{
	model = Cormorant Aeronology/Assets/NoseCone
	}
	rescaleFactor = 1
// --- definition format is Position X, Position Y, Position Z, Up X, Up Y, Up Z	
	node_stack_bottom = 0.0, -0.07, 0.11, 0.0, -1.0, 0.0, 1
	
// --- node definitions ---
	TechRequired = experimentalAerodynamics
	entryCost = 25000
	cost = 3800
	category = Aero
	subcategory = 0
	title = CA - Forward Reaction Control System
	manufacturer = Cormorant Aeronology
	description = Full Nose Cone for the Shuttle Lifting Body comes equipped with 14 RCS thrusters and an ample amount of MonoPropellent

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
	attachRules = 1,0,1,1,0
	
// --- standard part parameters ---
	mass = 0.6
	dragModelType = default
	maximum_drag = 0.01
	minimum_drag = 0.01
	angularDrag = 0.1
	crashTolerance = 50
	maxTemp = 2800
	vesselType = Ship
	bulkheadProfiles = size2
	breakingForce = 50
	breakingTorque = 50

	RESOURCE
	{
		name = MonoPropellant
		amount = 300
		maxAmount = 300
	}
	
	MODULE
{
	name = ModuleRCSFX
	thrusterTransformName = RCSthruster
	thrusterPower = 2
	resourceName = MonoPropellant
	resourceFlowMode = STAGE_PRIORITY_FLOW
runningEffectName = running
	atmosphereCurve
 	{
   	 key = 0 275
  	 key = 1 125
         key = 4 0.001
 	}
}
EFFECTS
	{
        	running
	        {
               		AUDIO
                	{
                   		channel = Ship
                 		clip = sound_rocket_mini
                 		volume = 0.0 0.0
                 		volume = 0.1 0.0
                 		volume = 0.5 0.025
                 		volume = 1.0 0.1
                 		pitch = 0.0 0.75
                 		pitch = 1.0 1.5
                 		loop = true
                	}
			MODEL_MULTI_PARTICLE
			{
				modelName = Squad/FX/Monoprop_small
				transformName = RCSthruster
				emission = 0.0 0.0
				emission = 0.1 0.0
				emission = 1.0 1.0
				speed = 0.0 0.8
				speed = 1.0 1.0
				localRotation = -90, 0, 0
			}
            	}
    	}

	MODULE
	{
		name = ModuleReactionWheel
		PitchTorque = 45
		YawTorque = 20
		
		RESOURCE
		{
			name = ElectricCharge
			rate = 0.06
		}
}

 

What do you think?
Thanks.

Link to comment
Share on other sites

A patch to add fueled versions of each structural adapter. I (hopefully) balanced it pretty well.

//this adds new fuel filled adapters for ksp. should be decently balanced

//new 1.25 to 0.625 fueled adapter
+PART[adapterSmallMiniTall]:FINAL
{
	@name = adapterSmallMiniTallFueled
	@TechRequired = advFuelSystems
	@entryCost = 3000
	@cost = 200
	@category = FuelTank
	@title = FL-A10 Fuel Tank
	@description = We had some engineers installing a FL-A10 adapter when they came to the sudden realization that we were packing all that extra empty space for no reason!
	@mass = 0.70
	RESOURCE
	{
		name = LiquidFuel
		amount = 45
		maxAmount = 45
	}
	RESOURCE
	{
		name = Oxidizer
		amount = 55
		maxAmount = 55
	}
}

//2.5 meter adapter fuel tank
+PART[largeAdapter]:FINAL
{
	@name = largeAdapterFueled
	@TechRequired = advFuelSystems
	@entryCost = 7000
	@cost = 3500
	@category = FuelTank
	@title = Rockomax Brand Adapter Fueled
	@manufacturer = Rockomax Conglomerate
	@description =  When C7 designed an adapter for rockomax rocketry parts we immediately took legal action against them, but it is aparently perfectly legal to design periferals for someone else's product. So we beat them at their own game.
	@mass = 0.5
	RESOURCE
	{
		name = LiquidFuel
		amount = 360
		maxAmount = 360
	}
	RESOURCE
	{
		name = Oxidizer
		amount = 440
		maxAmount = 440
	}
}

//3.75 meter adapter fuel tank
+PART[Size3to2Adapter]:FINAL
{
	@name = Size3to2AdapterFueled
	@TechRequired = highPerformanceFuelSystems
	@entryCost = 10000
	@cost = 2750
	@category = FuelTank
	@title = Kerbodyne ADTP-2-3 Fuel Tank
	@manufacturer = Kerbodyne
	@description =  After Jeb's junkyard filled the FL-A10 adapter with fuel, some eggheads at kerbodyne came up with a great idea! Fill our adapter with fuel!
	@mass = 1.75
	RESOURCE
	{
		name = LiquidFuel
		amount = 1296
		maxAmount = 1296
	}
	RESOURCE
	{
		name = Oxidizer
		amount = 1584
		maxAmount = 1584
	}
}

 

Link to comment
Share on other sites

I am struggling with a MM cfg to disable all Strategia strategies. anybody have an example i can steal? :P if its possible?

I'm asking because i am writing my own strategies for GPP and i just want to use Strategia as the framework.

I understand the basics of Module Manager but not enough to just make the changes needed, I would rather just write my own and disable the default ones in Strategia

Link to comment
Share on other sites

  • 3 weeks later...

Since antenna "Class" seems to be a thing, and even appears new in the Delta V map (marked v1.2.1)...

I made this patch to add class designations to the stock antennae, like so:

9XeGqON.png

 

@PART[longAntenna]:FINAL {
	+description ^= :^:<color=orange>Class 1 Antenna.</color> :
}

@PART[SurfAntenna]:FINAL {
	+description ^= :^:<color=orange>Class 1 Antenna.</color> :
}

@PART[HighGainAntenna5]:FINAL {
	+description ^= :^:<color=orange>Class 2 Antenna.</color> :
}

@PART[mediumDishAntenna]:FINAL {
	+description ^= :^:<color=orange>Class 3 Antenna.</color> :
}

@PART[RelayAntenna5]:FINAL {
	+description ^= :^:<color=orange>Class 3 Antenna.</color> :
}

@PART[HighGainAntenna]:FINAL {
	+description ^= :^:<color=orange>Class 4 Antenna.</color> :
}

@PART[RelayAntenna50]:FINAL {
	+description ^= :^:<color=orange>Class 4 Antenna.</color> :
}

@PART[commDish]:FINAL {
	+description ^= :^:<color=orange>Class 5 Antenna.</color> :
}

@PART[RelayAntenna100]:FINAL {
	+description ^= :^:<color=orange>Class 5 Antenna.</color> :
}


 

Edited by tg626
Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...

Does anyone have an example of a Part Upgrade MM patch?

I'm trying to upgrade the RAPIER to use Liquid Hydrogen with Nertea's Kerbal Atomics for both open and closed cycles, but I'm afraid its a bit too ambitious for me. So far my attempts have not worked. 

This is what I have so far:

Spoiler

@PART[RAPIER]:NEEDS[KerbalAtomics,CommunityTechTree]
{
    @MODULE[*]:HAS[#engineID[ClosedCycle]]
    {
        showUpgradesInModuleInfo = true
        UPGRADES
        {
            UPGRADE
            {
                name__ = CR-7 Propellant Upgrade
                techRequired__ = expAircraftEngines                            
                maxThrust = 200    //    180
                PROPELLANT[LqdHydrogen]
                {
                    ratio = 1.5
                    DrawGauge = True
                }
                PROPELLANT[Oxidizer]
                {
                    ratio = 0.1
                }
                atmosphereCurve
                {
                    key = 0 375        // 305
                    key = 1 300        // 275
                    key = 9 0.001      // 0.001
                }
            }
        }
    }
}

For the time being, I am only trying to upgrade one part of the engine (Closed Cycle). Any help would be appreciated.

Cheers,

Link to comment
Share on other sites

21 hours ago, Stratickus said:

Does anyone have an example of a Part Upgrade MM patch?

 

Edited by sebi.zzr
http://forum.kerbalspaceprogram.com/index.php?/topic/147576-modders-notes-for-ksp-12/
Link to comment
Share on other sites

  • 2 weeks later...
On 3/14/2017 at 5:00 PM, sebi.zzr said:

 

Thanks. Ultimately it did not work. In the link you posted, it was noted that ModuleEngines and MultiModeEngine were not able to be upgraded, which was what I was trying to do.

@sebi.zzr as an aside, were you ever able to figure out usageReqMaskExternal = 8? I would like to use it, but keep getting the error "... requires a Scientist, but does not specify where. This module doesn't seem to be working properly."

I'm wondering if I am not using it correctly. I am more or less trying to do what it appears you were trying to accomplish by adding certain science experiments to command pods.

Cheers,

Link to comment
Share on other sites

5 hours ago, Stratickus said:

@sebi.zzr as an aside, were you ever able to figure out usageReqMaskExternal = 8? I would like to use it, but keep getting the error "... requires a Scientist, but does not specify where. This module doesn't seem to be working properly."

usageReqMaskExternal =(ExperimentUsageReqs)  //How the experiment can be triggered by EVA Kerbals.
usageReqMaskInternal =(ExperimentUsageReqs)  //How the experiment can be triggered by the parent Vessel.

ExperimentUsageReqs:

Name          Value     Notes 

Never          -1  Experiment can't be used at all  
Always          0  Experiment can always be used  
VesselControl   1  Experiment can be used if vessel is under control (probe or crew)  
CrewInVessel    2  Experiment can only be used if vessel is crewed.  
CrewInPart      4  Experiment can only be used if part contains crew.  
ScientistCrew   8  Experiment can only be used if crew is scientist.  

It applies to "ModuleScienceExperiment",hope this explains it.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...