Jump to content

[1.8.x-1.12.x] Module Manager 4.2.3 (July 03th 2023) - Fireworks season


sarbian

Recommended Posts

@sarbian:

This should be an easy one:

I made a clean install for 0.90 and decided to eliminate all but the most essential mods compared to my almost 80 mods for 0.25

The two I couldn't see myself playing this game without were Mechjeb and DPAI.

When I started the game there was a line above the loading screen saying something along the lines of "Module Manager: 6 patches applied, hidden patches 0"

Here's what I'm wondering:

Should I have installed MM? Did it automatically install itself, since the message makes it seem like it's already there? Would the two addons I've installed not work properly without me installing MM as well? What is the meaning of life?

I'd appreciate a reply.

Link to comment
Share on other sites

Well the DPAI mod has a Module Manager included in it's download... but its in the GameData folder in the zip so you would have seen it most likely :) idk really

Edited by Sippyfrog
Changed "it's" to "its" because grammar
Link to comment
Share on other sites

I was wondering;

Given a module that has two submodules named equally, but have no "name = " field, how do I edit those two submodules separately?


MODULE
{
name = RealChuteModule
caseMass = 0.1
timer = 0
mustGoDown = true
cutSpeed = 0.5
spareChutes = 5
secondaryChute = true

// Main chute
[SIZE=5][B]PARACHUTE[/B][/SIZE]
{
material = Nylon
capName = mains_packing_bag
parachuteName = RC_triple_canopy
preDeploymentAnimation = RC_triple_chute_semi_deploy
deploymentAnimation = RC_triple_chute_full_deploy
preDeployedDiameter = 2.5
deployedDiameter = 50
minIsPressure = false
[SIZE=5][B]minDeployment = 900[/B][/SIZE]
deploymentAlt = 700
cutAlt = -1
preDeploymentSpeed = 2
deploymentSpeed = 6
}

// Drogue chute
[SIZE=5][B]PARACHUTE[/B][/SIZE]
{
material = Kevlar
capName = cone
parachuteName = RC_canopy2
preDeploymentAnimation = RC_chute2_semi_deploy
deploymentAnimation = RC_chute2_full_deploy
preDeployedDiameter = 3
deployedDiameter = 6
minIsPressure = false
[SIZE=5][B]minDeployment = 30000[/B][/SIZE]
deploymentAlt = 2500
cutAlt = 1000
preDeploymentSpeed = 1
deploymentSpeed = 3
}
}

I want to edit only the second "PARACHUTE" field, but I had no success on my tries.


{
@MODULE[RealChuteModule]
{
@PARACHUTE[SIZE=5][B]:HAS[@parachuteName[RC_canopy2][/B][/SIZE]]
{
@minDeployment = 3000
@deploymentAlt = 2000
}
}
}
@PART[RC_cone_double]:Final

As expected, that didn't work. Using "@PARACHUTE[Kevlar]", "@PARACHUTE[RC_canopy2]" didn't work as well. So, my guess is that the field between brackets will always and only look for values on a "name =" field.

Looking on the MM wiki, at the example cases page didn't bring me any solution, so I (once again) shamefully came here.

Many thanks! :)

Edited by Kowgan
Link to comment
Share on other sites

I was wondering;

Given a module that has two submodules named equally, but have no "name = " field, how do I edit those two submodules separately?


MODULE
{
name = RealChuteModule
caseMass = 0.1
timer = 0
mustGoDown = true
cutSpeed = 0.5
spareChutes = 5
secondaryChute = true

// Main chute
[SIZE=5][B]PARACHUTE[/B][/SIZE]
{
material = Nylon
capName = mains_packing_bag
parachuteName = RC_triple_canopy
preDeploymentAnimation = RC_triple_chute_semi_deploy
deploymentAnimation = RC_triple_chute_full_deploy
preDeployedDiameter = 2.5
deployedDiameter = 50
minIsPressure = false
[SIZE=5][B]minDeployment = 900[/B][/SIZE]
deploymentAlt = 700
cutAlt = -1
preDeploymentSpeed = 2
deploymentSpeed = 6
}

// Drogue chute
[SIZE=5][B]PARACHUTE[/B][/SIZE]
{
material = Kevlar
capName = cone
parachuteName = RC_canopy2
preDeploymentAnimation = RC_chute2_semi_deploy
deploymentAnimation = RC_chute2_full_deploy
preDeployedDiameter = 3
deployedDiameter = 6
minIsPressure = false
[SIZE=5][B]minDeployment = 30000[/B][/SIZE]
deploymentAlt = 2500
cutAlt = 1000
preDeploymentSpeed = 1
deploymentSpeed = 3
}
}

I want to edit only the second "PARACHUTE" field, but I had no success on my tries.


{
@MODULE[RealChuteModule]
{
@PARACHUTE[SIZE=5][B]:HAS[@parachuteName[RC_canopy2][/B][/SIZE]]
{
@minDeployment = 3000
@deploymentAlt = 2000
}
}
}
@PART[RC_cone_double]:Final

As expected, that didn't work. Using "@PARACHUTE[Kevlar]", "@PARACHUTE[RC_canopy2]" didn't work as well. So, my guess is that the field between brackets will always and only look for values on a "name =" field.

Looking on the MM wiki, at the example cases page didn't bring me any solution, so I (once again) shamefully came here.

Many thanks! :)

You might try

@PART[RC_cone_double]:Final
{
@MODULE[RealChuteModule]
{
@PARACHUTE,0
{
@minDeployment = 900
@deploymentAlt = 700
}
@PARACHUTE,1
{
@minDeployment = 3000
@deploymentAlt = 2000
}
}
}

EDIT-

@foo,0 = <...> finds the first one (this is the same as @foo = <...>)
@foo,1 = <...> finds the second one, @foo,2 = <...> finds the third, and so on.

Edited by Mecripp2
Link to comment
Share on other sites

@MeCripp: Of course!! How did I forget about that? Thank you very much! :D

This code also works

@PART[RC_cone_double]:FINAL
{
@MODULE[RealChuteModule]
{
@PARACHUTE:HAS[#parachuteName[RC_canopy2]]
{
@minDeployment = 3000
@deploymentAlt = 2000
}
}
}

Link to comment
Share on other sites

Or


@PART
[*]:HAS[@MODULE[RealChuteModule]]
{
@MODULE[RealChuteModule],*
{
@PARACHUTE:HAS[#material[Nylon]],*
{
@minDeployment = 3000
@deploymentAlt = 700
//@preDeploymentSpeed = 2
//@deploymentSpeed = 4
}
}
@MODULE[RealChuteModule],*
{
@PARACHUTE:HAS[#material[Kevlar]],*
{
@minDeployment = 7300
@deploymentAlt = 7000
@cutAlt = 3100
//@preDeploymentSpeed = 1
//@deploymentSpeed = 1
}
}
}

Link to comment
Share on other sites

Can someone explain why this code is being funky? Im trying to change the ISP to 320 atmosphere and 350 vac. The game is listing both vac and atm at 320 only. Its ignoring my value of "350". I changed the thrust to 750 as you can see it works just fine. Im getting the hang of MM finally , but this one is making me pull hairs.

@PART[Kosmos_Angara_RD-33NK]

{

@MODULE

{

name = ModuleEngines

@maxThrust = 750

@heatProduction = 200

@atmosphereCurve

{

@key = 0 350

@key = 1 320

}

}

}

Link to comment
Share on other sites

Can someone explain why this code is being funky? Im trying to change the ISP to 320 atmosphere and 350 vac. The game is listing both vac and atm at 320 only. Its ignoring my value of "350". I changed the thrust to 750 as you can see it works just fine. Im getting the hang of MM finally , but this one is making me pull hairs.

You have to place the name of a part, module, ... between [ ]

@PART[Kosmos_Angara_RD-33NK]
{
@MODULE[ModuleEngines]
{
@maxThrust = 750
@heatProduction = 200

@atmosphereCurve
{
@key = 0 350
@key = 1 320
}
}
}

Link to comment
Share on other sites

So much help! I'm so grateful to have you guys as part of the community. :)

Yeah, my last attempt was ":HAS[@parachuteName[RC_canopy2]", when the correct form was ":HAS[#parachuteName[RC_canopy2]". D'oh.

By the way, what's the "#" command rough meaning? I couldn't find it on the wiki as well. But i didn't exactly looked that hard as well.

@Sarbian: Although that code isn't for me, here's a curiosity: I tried that code yesterday, but I forgot to put the last "0", and my command looked like this:

@key,0 = 350

With this, I broke KSP. Nevertheless, it's all fixed now. And I sincerely feel I'm not being thankful enough. :)

@Starwaster: That code is from DeadlyReentry, right?

Edited by Kowgan
Link to comment
Share on other sites

Hello,i'm trying to add MODULE[TRReflection] to all crewed pods with no success,i get no error but patch is not applied.

@PART[*]:HAS[#minimumCrew[*],~minimumCrew[0],~MODULE[TRReflection]]:FINAL
{
%MODULE[TRReflection]
{
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%meshes = Windows
}
}

i have also tried

@PART[*]:HAS[[#minimumCrew[*],~minimumCrew[0]],~MODULE[TRReflection]]:FINAL

@PART[*]:HAS[#minimumCrew[*],~minimumCrew[0]]:FINAL

@PART[*]:HAS[#minimumCrew[*]]:FINAL

@PART[*]:HAS[#minimumCrew[]]:FINAL

@PART[*]:HAS[#minimumCrew[1]|#minimumCrew[2]|#minimumCrew[3]|#minimumCrew[4],~MODULE[TRReflection]]:FINAL

i deleted ModuleManager.ConfigCache everytime when i changed *cfg but with no positive effect.

I'm using MM 2.5.6 and 32bit KSP on x64 WIN7.Thank you for help.

Link to comment
Share on other sites

Checking if the module is not already here is done with "!". And if the module is not here you can just add it, no need to %. And with % you would need to use name = anyway.

And no need to delete the cache. If you change a cfg the cache is not used.


@PART[*]:HAS[#minimumCrew[*],~minimumCrew[0],!MODULE[TRReflection]]:FINAL
{
MODULE
{
name = TRReflection
shader = Reflective/Bumped Diffuse
colour = 0.5 0.5 0.5
meshes = Windows
}
}

Link to comment
Share on other sites

Checking if the module is not already here is done with "!". And if the module is not here you can just add it, no need to %. And with % you would need to use name = anyway.

And no need to delete the cache. If you change a cfg the cache is not used.


@PART[*]:HAS[#minimumCrew[*],~minimumCrew[0],!MODULE[TRReflection]]:FINAL
{
MODULE
{
name = TRReflection
shader = Reflective/Bumped Diffuse
colour = 0.5 0.5 0.5
meshes = Windows
}
}

I'm sorry to bother you,but it's not working.

EDIT:I managed to solve my problem:

@PART[*]:HAS[#CrewCapacity[*],!MODULE[TRReflection]]:FINAL
{
MODULE
{
name = TRReflection
shader = Reflective/Bumped Diffuse
colour = 0.5 0.5 0.5
meshes = Windows
}
}

thank you for help.Regards.

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

You have to place the name of a part, module, ... between [ ]

@PART[Kosmos_Angara_RD-33NK]
{
@MODULE[ModuleEngines]
{
@maxThrust = 750
@heatProduction = 200

@atmosphereCurve
{
@key = 0 350
@key = 1 320
}
}
}

And you need to specify the key number or MM will overwrite the sameone twice.


@key,0 = 0 350
@key,1 = 1 320

you both are awesome for helping ! the codes work! Will not using the

:Final
break anything? It feels like an akward code.
Link to comment
Share on other sites

I want to edit the GameData/Squad/Agencies/Agents.cfg - and I think that ModuleManager can't handle spaces - if I remove all spaces from the name, it works :(

Where there is a space in the name use ? in it's place.

EDIT- like you might see C7 Aerospace Division you would write your patch to look like @PART[C7?Aerospace?Division]

EDIT- And like Kowgan post it might be fast if you could post your patch that way someone might see if there is something missing or wrong.

Edited by Mecripp2
Link to comment
Share on other sites

Ive seen a situation where the US probe pack released a MM_config to use Remote Tech 2. In there they used a % and ! sign.

!MODULE[ModuleDataTransmitter] {}

%MODULE[ModuleRTAntenna] {

%IsRTActive = true

%Mode0OmniRange = 0

%Mode1OmniRange = 40000000 //20 000 km

%Mode0DishRange = 0

%Mode1DishRange = 350000000000 //200 Mm

%DishAngle = 100

%EnergyCost = 0.001

%TRANSMITTER {

%PacketInterval = 0.18

%PacketSize = 2

%PacketResourceCost = 0.01

}

}

Im guessing the !MODULE means that is what we are replacing. The %MODULE[ModuleRTAntenna] is what we are replacing with?

Link to comment
Share on other sites

Im guessing the !MODULE means that is what we are replacing. The %MODULE[ModuleRTAntenna] is what we are replacing with?

The config is saying "remove [ModuleDataTransmitter]" and then it says "add in (or edit if it's already there) a module called [ModuleRTAntenna] with the following configuration:"

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