Jump to content

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


sarbian

Recommended Posts

Sooo, unfortunately, :HAS doesn't work inside the @PART {} . Trying to use it to adjust only certain modules of the same type based on a parameter inside it:

@PART[*]:HAS[@MODULE[ModuleScienceExperiment]:HAS[#experimentID[temperatureScan]]]:FINAL
{
@MODULE[ModuleScienceExperiment]:HAS[#experimentID[temperatureScan]]
{
@xmitDataScalar = 1.0
}
}

@PART[*]:HAS[@MODULE[ModuleScienceExperiment]:HAS[#experimentID[barometerScan]]]:FINAL
{
@MODULE[ModuleScienceExperiment]:HAS[#experimentID[barometerScan]]
{
@xmitDataScalar = 1.0
}
}

@PART[*]:HAS[@MODULE[ModuleScienceExperiment]:HAS[#experimentID[seismicScan]]]:FINAL
{
@MODULE[ModuleScienceExperiment]:HAS[#experimentID[seismicScan]]
{
@xmitDataScalar = 1.0
}
}

@PART[*]:HAS[@MODULE[ModuleScienceExperiment]:HAS[#experimentID[gravityScan]]]:FINAL
{
@MODULE[ModuleScienceExperiment]:HAS[#experimentID[gravityScan]]
{
@xmitDataScalar = 1.0
}
}

While that works perfectly for the parts with only one ModuleScienceExperiment module, it falls apart on parts that have multiple one with different experimentIDs. Changes will only be applied to the first one.

Which is unfortunate because now I need to do it on a part-by-part basis. >.<

Edit: Node indexes start at 1, not 0, right?

Edited by phoenix_ca
Link to comment
Share on other sites

I tried searching for a bit but didn't find anything related to my question.

Is it possible, using MM patches, to create multiple parts out of one base part?

The reason I'm asking is because Advanced Jet Engine has replaced a lot of the engines from older versions with different engines. J79, for example, was changed to J93 and they both use the same B9 Turbo Jet engine part, so only one could work at a time. I've been keeping all the old engines because I personally don't see a reason for removing perfectly fine content.

My workaround has been to create duplicates of the B9 engine part inside its part.cfg and then applying MM patches to these duplicate parts.

Is there a way to avoid this, preferably without loading the part's models/textures multiple times into the game thus reducing available RAM?

Edited by MAKC
Link to comment
Share on other sites

$ duplicates.

If you want lots of AJE engines, grab my (still WIP) RftS Pack v3.

https://github.com/NathanKell/ReachingfortheStars/

I've added (using repainted B9 unless noted)

J79

J57

J58

Avon

Nene (with afterburner)

Derwent I (uses TVPP ramjet model)

Derwent V (uses rescaled FS Tailjet)

Early Russian jet (uses TVPP ramjet model)

J93 (uses NMB's MACE model)

SNECMA Atar 9k

D-30F6

Imaginary British turboramjet (uses NMB's MACE model)

Link to comment
Share on other sites

I tried searching for a bit but didn't find anything related to my question.

Is it possible, using MM patches, to create multiple parts out of one base part?

The reason I'm asking is because Advanced Jet Engine has replaced a lot of the engines from older versions with different engines. J79, for example, was changed to J93 and they both use the same B9 Turbo Jet engine part, so only one could work at a time. I've been keeping all the old engines because I personally don't see a reason for removing perfectly fine content.

My workaround has been to create duplicates of the B9 engine part inside its part.cfg and then applying MM patches to these duplicate parts.

Is there a way to avoid this, preferably without loading the part's models/textures multiple times into the game thus reducing available RAM?

If you use the +/$ "copy" operator to clone a part, it should do what you want. https://github.com/sarbian/ModuleManager/wiki/Module-Manager-Syntax#Copy___or_

It would be something like


+PART[foo]
{
name = bar
!MODULE[...] { }
MODULE {
...
}
// All of the changes you want to make to the copy
}

Edited by undercoveryankee
Link to comment
Share on other sites

Edit: Node indexes start at 1, not 0, right?

0 - based.

Also I suspect you can combine a lot of those patches:

@PART[*]:HAS[@MODULE[ModuleScienceExperiment]]:FINAL
{
@MODULE[ModuleScienceExperiment]:HAS[#experimentID[temperatureScan]]
{
@xmitDataScalar = 1.0
}

@MODULE[ModuleScienceExperiment]:HAS[#experimentID[barometerScan]]
{
@xmitDataScalar = 1.0
}

@MODULE[ModuleScienceExperiment]:HAS[#experimentID[seismicScan]]
{
@xmitDataScalar = 1.0
}

@MODULE[ModuleScienceExperiment]:HAS[#experimentID[gravityScan]]
{
@xmitDataScalar = 1.0
}
}

I think you can only have one HAS

Link to comment
Share on other sites

0 - based.

Ah. My confusion arose from the example in the second post, which uses 1. Might be useful to point this out.

I think you can only have one HAS

I doubt it, since all my other patches were working, unless there's something wacky happening. The same patches I gave examples of above work for all the devices that don't have multiple experiment modules.

You're right about the combining, definitely. It slipped my mind that @ would only apply if it matched that line.

Link to comment
Share on other sites

I am curious, I know that module Manager essentially rewrites the cfg files for parts after it loads, and I don't know much about how and such, but is there a way for Module Manager to spit out a recompiled cfg file for debugging purposes? I know what happens, and what it does or doesn't do correctly, but because there are sometimes so many different cfg files working on a part, I thought it would be REALLY mega handy to be able to see what the end result is as an actual file.... I am pretty sure you can't and I did a very brief search to see but didn't turn up anything in a VERY brief search... but anyways I figured I would ask, because, it cant hurt. thanks again guys !!!

Link to comment
Share on other sites

I am curious, I know that module Manager essentially rewrites the cfg files for parts after it loads, and I don't know much about how and such, but is there a way for Module Manager to spit out a recompiled cfg file for debugging purposes?

If you look in the database segment of the debugging window (Alt-F12 on windows) you'll find the config data for each part.

- - - Updated - - -

Can MM modify MODEL{} ? Would be useful to switch textures/models on existing parts, asking because it's not mentioned in the examples/first page.

Yes, anything can be modified.

Link to comment
Share on other sites

$ duplicates.

If you want lots of AJE engines, grab my (still WIP) RftS Pack v3.

https://github.com/NathanKell/ReachingfortheStars/

I've added (using repainted B9 unless noted)

J79

J57

J58

Avon

Nene (with afterburner)

Derwent I (uses TVPP ramjet model)

Derwent V (uses rescaled FS Tailjet)

Early Russian jet (uses TVPP ramjet model)

J93 (uses NMB's MACE model)

SNECMA Atar 9k

D-30F6

Imaginary British turboramjet (uses NMB's MACE model)

Ok those are in the next version. I've been waiting for MM duplicate for a long time.

Link to comment
Share on other sites

I need some help getting this to work.

Config here

I have no idea what I'm doing wrong.

EDIT I ahd no idea what i was doing, 4am comments are bad. So i'll repost ExplorerKlatt's code for his first part so Sarbian can give us his opinion. (the config was for the 2 Kethane converters, showing only the first as it's basically the same with some values changed)


@part[kethane_2m_converter]:FINAL
{
Module
{
name = KethaneConverter
InputRates
{
Kethane = 4.5
ElectricCharge = 12
}
OutputRatios
{
LiquidFuel = 1.53
}
}
MODULE
{
name = KethaneConverter
InputRates
{
Kethane = 5.5
ElectricCharge = 12
}
OutputRatios
{
Oxidizer = 1.87
}
}

MODULE
{
name = KethaneConverter
InputRates
{
Kethane = 4
ElectricCharge = 21
}
OutputRatios
{
MonoPropellant = 1.85
}
}

MODULE
{
name = KethaneConverter
InputRates
{
Kethane = 4
ElectricCharge = 8
}
OutputRatios
{
XenonGas = 2
}
}
}

Edited by Mokmo
Link to comment
Share on other sites

Can someone with more skillz tell me where I went wrong here? I got the configs to work with the Resupply module for Sumghai's Fustek parts, but none of the other modules are working.

Dropbox for all files.

@PART[FusTekResupplyModule]
{
RESOURCE
{
name = Food
amount = 1080
maxAmount = 1080
}
RESOURCE
{
name = Water
amount = 1080
maxAmount = 1080
}
RESOURCE
{
name = Oxygen
amount = 1080
maxAmount = 1080
}
RESOURCE
{
name = Waste
amount = 0
maxAmount = 1080
}
RESOURCE
{
name = WasteWater
amount = 0
maxAmount = 1080
}
RESOURCE
{
name = CarbonDioxide
amount = 0
maxAmount = 1080
}

}

@PART[KarmonyHabModule(Adapter)] 
{
RESOURCE
{
name = Food
amount = 40
maxAmount = 40
}
RESOURCE
{
name = Water
amount = 40
maxAmount = 40
}
RESOURCE
{
name = Oxygen
amount = 40
maxAmount = 40
}
RESOURCE
{
name = Waste
amount = 0
maxAmount = 40
}
RESOURCE
{
name = WasteWater
amount = 0
maxAmount = 40
}
RESOURCE
{
name = CarbonDioxide
amount = 0
maxAmount = 40
}

}

@PART[KarmonyStorModuleAdapter]
{
RESOURCE
{
name = Food
amount = 360
maxAmount = 360
}
RESOURCE
{
name = Water
amount = 360
maxAmount = 360
}
RESOURCE
{
name = Oxygen
amount = 360
maxAmount = 360
}
RESOURCE
{
name = Waste
amount = 0
maxAmount = 360
}
RESOURCE
{
name = WasteWater
amount = 0
maxAmount = 360
}
RESOURCE
{
name = CarbonDioxide
amount = 0
maxAmount = 360
}

}

@PART[KarmonyModule_Adapter]
{
MODULE
{
name = TacGenericConverter
converterName = Carbon Extractor
outputResources = Oxygen, 0.9, false, Waste, 2.218, true
}

MODULE
{
name = TacGenericConverter
converterName = Water Purifier
outputResources = Water, 0.9, false, Waste, 6.382, true
}

}

Edited by sharpspoonful
Link to comment
Share on other sites

Can someone with more skillz tell me where I went wrong here? I got the configs to work with the Resupply module for Sumghai's Fustek parts, but none of the other modules are working.

Dropbox for all files.

@PART[FusTekResupplyModule]
{
RESOURCE
{
name = Food
amount = 1080
maxAmount = 1080
}
RESOURCE
{
name = Water
amount = 1080
maxAmount = 1080
}

--snip--

Ok, I see your error after downloading the mod, the names are wrong, its "FusTekKarmonyStorModule" "FusTekKarmonyHabModule" "FusTekKarmonyHabModuleAdapter" "FusTekResupplyModule"

I will build a cfg file really quick and post it to my drive and then edit this post.

Ok, I THINK I got it the way you want it.

Here

I am not positive to which modules it was you were referring too that were the converters. I have applied the ones I thought it was, you can always change it if you need. The thing you need to make sure to do is open each of he files and get the name of the part in the entry like so.

PART {
name = FusTekKarmonyUtilModule

It is ALMOST always at the very begining after the part tag. so this ones full name is FusTekKarmonyUtilModule and Capitialization needs to be correct because FusTek is different from Fustek or fustek... Mind you I did not install fustek, nor did I check to see if it worked, but it should. If you need help feel free to ask again.

Edited by MrWizerd
Link to comment
Share on other sites

I tried searching for a bit but didn't find anything related to my question.

Is it possible, using MM patches, to create multiple parts out of one base part?

The reason I'm asking is because Advanced Jet Engine has replaced a lot of the engines from older versions with different engines. J79, for example, was changed to J93 and they both use the same B9 Turbo Jet engine part, so only one could work at a time. I've been keeping all the old engines because I personally don't see a reason for removing perfectly fine content.

My workaround has been to create duplicates of the B9 engine part inside its part.cfg and then applying MM patches to these duplicate parts.

Is there a way to avoid this, preferably without loading the part's models/textures multiple times into the game thus reducing available RAM?

I am not sure about using mm to duplicate parts, but if you duplicate the part file and just make sure the module and texture are pointing to there original directories, from what I understand it will only load the original mesh once. So if you have a part file in \\lll\parts\engine\engine1\ along with the texture and .mu and then dupicate the part in directory \\lll\parts\engine\engine2\ with just the "part.cfg" file and no mu or texture file. This way you will need to tell the cfg file in the new duplicated directory to point to the engine1 directory instead of the engine2 directory. It looks like undercoveryankee has figured out a way to do it the way you want, however, so this is mute, but if you wanted to make permanent files this would do it and keep you from having to load extra textures.

Link to comment
Share on other sites

err, what ? Those are not valid Mokmo. I can't access dropbox from here so I can't show how to write the good one.

Edited my post with the code from the first part. I'm curious how it would work with 4 instances of the same module.

Link to comment
Share on other sites

I am trying to make all parts have the ModuleAsteroid module, but when I load the game it says that there is an error, I have looked over the code a lot and haven't found an issue.

@PART[*]:HAS[!MODULE{ModuleAsteroid]]
{
MODULE
{
name = ModuleAsteroid
}
}

If anyone can help I would appreciate it.

never mind, after posting I realized the issue.

Link to comment
Share on other sites

I am trying to make all parts have the ModuleAsteroid module, but when I load the game it says that there is an error, I have looked over the code a lot and haven't found an issue.

@PART
[*]:HAS[COLOR=#FF0000][B][!MODULE{ModuleAsteroid]][/B][/COLOR]
{
MODULE
{
name = ModuleAsteroid
}
}

If anyone can help I would appreciate it.

You need a bracket on the Bolded red section of your code above change{ to [.

Link to comment
Share on other sites

i keep getting mod updates that include versions newer than here in actual module manager thread and it makes me nervous.

atm i have 2.1.3 installed, but 2.1.0 is on the front page.

where do the newer versions keep coming from?

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