Jump to content

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


sarbian

Recommended Posts

EDIT: Never mind, I made some edits using this but apparently parts save their state in the VAB. If you load a ship that used those parts before you applied the patch, they still won't have the patch applied. So it works, it just looked like it wasn't.

Edited by Hyomoto
Link to comment
Share on other sites

I'm trying to add a KASModuleGrab to any part under 1 ton. Is this the right config for this?

@PART[*]:HAS[#mass < 1]
{
MODULE
{
name = KASModuleGrab
evaPartPos = (0.0, 0.0, -0.09)
evaPartDir = (0, 0, -1)
storable = true
storedSize = 5
attachOnPart = True
attachOnEva = False
attachOnStatic = True
attachSendMsgOnly = False
}
}

Is there documentation for the config files?

Thanks.

Link to comment
Share on other sites

I'm trying to add a KASModuleGrab to any part under 1 ton. Is this the right config for this?

@PART[*]:HAS[#mass < 1]
{
MODULE
{
name = KASModuleGrab
evaPartPos = (0.0, 0.0, -0.09)
evaPartDir = (0, 0, -1)
storable = true
storedSize = 5
attachOnPart = True
attachOnEva = False
attachOnStatic = True
attachSendMsgOnly = False
}
}

Is there documentation for the config files?

Thanks.

@ SnappingTurtle I try'ed to add the grab to scansat and now, I can grab in all.

https://dl.dropboxusercontent.com/u/72893034/KAS_Grab_ScanSat.cfg

Link to comment
Share on other sites

I've been Playing around with MM as a way to refine modules for personal use. So far (after two days of derping) I've managed to successfully add mechjeb to all command modules. Now, I'd like to add an electric use cost for using the mechjeb module, just as the ar202 model it comes with by default has.

My MM edit code:

@PART[*]:HAS[@MODULE[ModuleCommand],!MODULE[MechJebCore]]:Final
{
MODULE
{
name = MechJebCore

RESOURCE
{
name = ElectricCharge
rate = 0.005
}
}
}

To me, this would make sense, adding an electric charge rate resource to the mechjebcore module i've added to the existing pods, but in practice, they don't use any electricity, even though they DO successfully have mechjeb added. The mechjeb part has electriccharge defined under MODULE name = CommandModule, and that definitely works (If I add the mechjeb PART to a command pod part, it uses electricity, but the pod itself without any mechjeb parts doesn't) is there some restriction on the TYPES of module names which can use resources? or is each part limited to one usage rate per resource? or am I just doing something dumb again?

Link to comment
Share on other sites

I've been Playing around with MM as a way to refine modules for personal use. So far (after two days of derping) I've managed to successfully add mechjeb to all command modules. Now, I'd like to add an electric use cost for using the mechjeb module, just as the ar202 model it comes with by default has.

My MM edit code:

@PART[*]:HAS[@MODULE[ModuleCommand],!MODULE[MechJebCore]]:Final
{
MODULE
{
name = MechJebCore

RESOURCE
{
name = ElectricCharge
rate = 0.005
}
}
}

To me, this would make sense, adding an electric charge rate resource to the mechjebcore module i've added to the existing pods, but in practice, they don't use any electricity, even though they DO successfully have mechjeb added. The mechjeb part has electriccharge defined under MODULE name = CommandModule, and that definitely works (If I add the mechjeb PART to a command pod part, it uses electricity, but the pod itself without any mechjeb parts doesn't) is there some restriction on the TYPES of module names which can use resources? or is each part limited to one usage rate per resource? or am I just doing something dumb again?

You can't just stick something that says RESOURCE{<whatever>} in any old module you want. The module has to have been coded to make use of that. Every single parameter you see in a MODULE node is there because the module is written (in its C# code) to recognize and make use of it.

If you want parts with MechJeb modules to consume power then you should set the existing amount (for any command pods that consume power) to whatever you want or if the part's ModuleCommand does not use power then add the RESOURCE node to it or if it does not have a ModuleCommand and you want it to consume power then add a ModuleGenerator that generates a negative amount of ElectricCharge.

Link to comment
Share on other sites

Ah, I see. Thanks for the answer! is there a list of vanilla modules and their valid parameters, or a way to dig for that information myself?

Not aware of such a list. Looking at all the part configs will reveal a lot but some are unused. Using visual studio you can see everything but the code itself.

Link to comment
Share on other sites

I am having an issue with modulemanager 1.5.6 its destroying my soyuz rockets in orbit if you switch back to the space centre and then back to the ship in orbit it destroys itself its also producing flames and RCS in the VAB I am using it to apply mechjeb

JtI3NYd.jpg?1

I have been having this weird bug for a while so I did a minimal install the only DLL's present are

MechJeb2.dll build 168

LandingEngine.dll Bobcat Soviet Pack

Cleverbobcat.dll latest version

ModuleManager 1.5.6

Any help greatly appreciated

By removing MM ship in orbit no longer explodes

Edited by Virtualgenius
Link to comment
Share on other sites

It's not MM but a patch file you have somewhere that change some value. Since you have smoke effect you most likely have the particule effect config or something related.

MM does not do anything after the game is loaded.

Link to comment
Share on other sites

I think I get how I'm supposed to create a cfg for this, but I don't know where I'm supposed to put them or how they are supposed to be named. Can someone please enlighten me? I tried to run a few searches, but the config and where terms are "too common" in the module manager threads :/

Link to comment
Share on other sites

I think I get how I'm supposed to create a cfg for this, but I don't know where I'm supposed to put them or how they are supposed to be named. Can someone please enlighten me? I tried to run a few searches, but the config and where terms are "too common" in the module manager threads :/

You can name the cfg anything you want and, I just made a fold in KSP/GameData to put all my or downloaded cfg in it.

For ModuleManager or KSP isn't looking for the name of the file but whats in it like

@PART[*]:HAS[@MODULE[ModuleCommand],!MODULE[KASModuleContainer]]:Final

{

MODULE

{

name = KASModuleContainer

maxSize = 40

}

}

it's look for @part, This one if you have KAS installed makes you commandpod's have 40 space in pod :)

Edited by Mecripp2
Link to comment
Share on other sites

Alright, I have most of what I wanted working, but I'm stuck at one specific point. I'm trying to add the resrouce ore directly to the kethane extractor module.

This is how I have done it manually before attempting to use Module Manager, what I've added is in bold:


MODULE
{
name = KethaneExtractor
PowerConsumption = 8
Resource
{
Name = Kethane
Rate = 1.25
}
[B] Resource
{
Name = Ore
Rate = 0.25
}[/B]
HeadTransform = shaftSmall_geo
TailTransform = drillMotor_geo
}

This works fine and will extract the resource Ore at the same time as Kethane, or one or the other depending on what's available at your location. I haven't be able to figure out how to add that information into that node at that location using Module Manager without adding a duplicate of the entire node. This ends up adding a second deploy drill button and probably doubles the power consumption. Any suggestions on how to get the resource applied in the location I want?

Upate Edit: Dammit! I figured it out. Kethane uses "Resource" instead of "RESOURCE". I thought it was capitalized in the examples given because it needed to be.

Edited by Vladthemad
Link to comment
Share on other sites

Alright, working with parts with multiple modules is rather confusing or possibly incomplete. The page 1 instructions give three-ish methods for modifying multi-module parts, neither of which seem to be working.

- @NODENAME,2 {} let you select the third node of that name. Be careful when you delete or add node as the index will change.

@PART[B9_Cockpit_MK2_Nosecone_ASAS]:Final
{
@description = LOLOLOLOLOLOLOL
@mass = 0.4

@MODULE,0[ModuleScienceExperiment] // Seismic
{
@experimentActionName = SEISMIC
}

@MODULE,1[ModuleScienceExperiment] // Barometer
{
@experimentActionName = BAROMETRIC
}

@MODULE,2[ModuleScienceExperiment] // Gravity
{
@experimentActionName = GRAVITATION
}

@MODULE,3[ModuleScienceExperiment] // Temperature
{
@experimentActionName = THERMICS
}
}

result: names of experiment actions are not changed (I just did this name change as a simple test to see if i could get the indexing working properly). but the earlier @description and @mass changes DO take effect

if there are two or more variables called foo, you can refer to them like this:

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


@PART[B9_Cockpit_MK2_Nosecone_ASAS]:Final
{
@description = LOLOLOLOLOLOLOL
@mass = 0.4

@MODULE[ModuleScienceExperiment,0] // Seismic
{
@experimentActionName = SEISMIC
}

@MODULE[ModuleScienceExperiment,1] // Barometer
{
@experimentActionName = BAROMETRIC
}

@MODULE[ModuleScienceExperiment,2] // Gravity
{
@experimentActionName = GRAVITATION
}

@MODULE[ModuleScienceExperiment,3] // Temperature
{
@experimentActionName = THERMICS
}
}

Result: same as above, mass and description changes properly, experimentActionName remains the same

for nodes, instead of using a numeric index to identify between multiple nodes, you search by its <tag = ...> line. So if you do

@NODE[foo,bar] {...}

This sounds like it is designed to work only if there is a "tag = foo" declared within the node. These parts are from another author's stuff, and they haven't included "tag = foo" on any parts. I was thinking I could just use MM to add the "tag" flag, but to do that, I somehow need to be able to modify individual subnodes again, which I obviously can't get working.

Haaaaalp!

Also, major awesome thanks for ModuleManager in the first place. Fantastic original work, fantastic extension to it, and I love what it lets us tweakery folks do!

Link to comment
Share on other sites

Alright, working with parts with multiple modules is rather confusing or possibly incomplete. The page 1 instructions give three-ish methods for modifying multi-module parts, neither of which seem to be working.

@PART[B9_Cockpit_MK2_Nosecone_ASAS]:Final
{
@description = LOLOLOLOLOLOLOL
@mass = 0.4

@MODULE,0[ModuleScienceExperiment] // Seismic
{
@experimentActionName = SEISMIC
}

@MODULE,1[ModuleScienceExperiment] // Barometer
{
@experimentActionName = BAROMETRIC
}

@MODULE,2[ModuleScienceExperiment] // Gravity
{
@experimentActionName = GRAVITATION
}

@MODULE,3[ModuleScienceExperiment] // Temperature
{
@experimentActionName = THERMICS
}
}

I've had success using limited wildcards to work with specific modules. To do what you're looking for, try:


@PART[B9_Cockpit_MK2_Nosecone_ASAS]:Final
{
@description = LOLOLOLOLOLOLOL
@mass = 0.4

@MODULE[*]:HAS[#experimentID[seismicScan]] // Seismic
{
@experimentActionName = SEISMIC
}
}

And so forth. I've technically only tested that a level further abstract (@PART[*]:HAS[@MODULE[ModuleScienceExperiment]:HAS[#experimentID[seismicScan]]]), but something like that ought to work.

Link to comment
Share on other sites

Sarbian, I've been meaning to ask: is there a way to clone a part with MM?

Suppose I wanted to make a radial drogue chute. I could make my own droguePart.cfg in the radial folder and change the name, description, scale, and parachute module. But if MM supported cloning, I might could do something like:


%PART:FROM[parachuteRadial]
{
name = parachuteRadialDrogue
// etc
}

I think I remember reading something about that in The Days of Yore, but couldn't find anything about it in my cursory look through this thread or your up-front docs. Thanks!

Link to comment
Share on other sites

That's one of the many variations I tried. While it would be nice if it worked that way, it doesn't. I'm having a hard time following the the code, but I figure I'll start here and work backwards: https://github.com/sarbian/ModuleManager/blob/master/moduleManager.cs#L417

Did you get this working?

I tried Both of these and both do not work.. any tips?


@PART[RAPIER]:Final
{
@MODULE[ModuleEnginesFX,AirBreathing]
{
@maxThrust = 210
}
@MODULE[ModuleEnginesFX,ClosedCycle]
{
@maxThrust = 195
}
}

and


@PART[RAPIER]:Final
{
@MODULE[ModuleEnginesFX]:HAS[#engineID[AirBreathing]]
{
@maxThrust = 210
}
@MODULE[ModuleEnginesFX]:HAS[#engineID[ClosedCycle]]
{
@maxThrust = 195
}
}

Tried this and it does work thought if anything adds another "MODULE" to the Rapier I think it may break it.

@PART[RAPIER]:Final
{
@description = NabbTech Certified! The R.A.P.I.E.R. (Reactive Alternate-Propellant Intelligent Engine for Rockets) is a joint venture between C7 Aerospace and the Rockomax Conglomerate. Designed to fill a gap in the design requirements for sustainable single stage to orbit aircraft, this engine combines the best of rocket and air-breathing thrust technology.
@mass = 1.80
// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
@attachRules = 1,1,1,1,0

//!MODULE[ModuleEnginesFX] {}
@MODULE,2
{
@maxThrust = 210
}
@MODULE,1
{
@maxThrust = 195
}




}

Edited by Nabbs1
added info
Link to comment
Share on other sites

hello again

i was hoping i could put this in as i keep forgetting to put the dam part on but it does not work. did i miss some thing or is Protractor not supported?

@PART[Mark1-2Pod]

{

MODULE

{

name = ProtractorModule

}

}

Edited by MissMolly
Link to comment
Share on other sites

hello again

i was hoping i could put this in as i keep forgetting to put the dam part on but it does not work. did i miss some thing or is Protractor not supported?

@PART[Mark1-2Pod]{

MODULE

{

name = ProtractorModule

}

}

Try this

Here are the files if they don't work you have something wrong.

https://www.dropbox.com/s/c4cyk26bx4pupij/ADD_Protractor_MARK1_2.cfg

https://www.dropbox.com/s/fy4c8tzwv5a4zt5/Add_Protractor_ALLCOMMANDPODs.cfg

Pick just 1 and put it in the KSP/GameData folder.

@PART[*]:HAS[@MODULE[ModuleCommand]:HAS[!MODULE[ProtractorModule]]]:Final

{

MODULE

{

name = ProtractorModule

}

}

EDIT and does he have ModuleManager in the KSP/GameData and only 1

Edited by Mecripp2
Link to comment
Share on other sites

Try this

@PART[*]:HAS[@MODULE[ModuleCommand]:HAS[!MODULE[ProtractorModule]]]:Final

{

MODULE

{

name = ProtractorModule

}

}

If his example isn't working for him, neither will yours. Make sure you have the latest version of ModuleManager and Protractor, and that both are installed correctly.

Link to comment
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.

×
×
  • Create New...