Jump to content

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


sarbian

Recommended Posts

I'm not saying that MM affects the length of load time, I'm just saying that MM reports the number of parts that are loading and *that* affects load time.

At the time that you see that report, Module Manager has already finished doing what it's going to do. (or shortly after you see the message)

Pretty much everything you see after is Squad loading textures and audio from disk and compiling the parts that have already been loaded and have already been operated on by Module Manager. (additionally, anything Module Manager has done to a part does not affect its compilation time)

Then there's other Mods that might load such as Active Texture Management which I find takes a while regardless of whether it has any uncached textures to deal with. Especially for those of us on notebooks, such as you have.

Edit: Slight correction: ATM does its work just after ModuleManager does, and looks like it finishes up before the message about how many configs MM has processed

Edited by Starwaster
Link to comment
Share on other sites

Okay, I'm looking for confirmation on my part.cfg.

This is the same config node running twice adding the AGExt node to all parts, but one should run if FAR is installed, the other if FAR is not installed.

I can not just use :FINAL as it looks like the modules FAR adds to :FINAL are conflicting with mine when I add with :FINAL so I need to run my config before FAR if it is installed. (I think, I'm still trying to narrow the issue down, but this post is asking about an MM .cfg) I also can not just use the :FIRST pass as I then conflict with RemoteTech's nodes that it adds in the :FIRST pass.

@PART[*]:FOR[AGExt]:NEEDS[!FerramAerospaceResearch]
{
MODULE
{
name = ModuleAGExtData
AGXData = Empty
AGXNames = Empty
AGXKeySet = 0
AGXActivated = 0
AGXLoaded = false
AGXGroupStates =
AGXGroupStateNames =
}
}

@PART[*]:BEFORE[FerramAerospaceResearch]:NEEDS[FerramAerospaceResearch]
{
MODULE
{
name = ModuleAGExtData
AGXData = Empty
AGXNames = Empty
AGXKeySet = 0
AGXActivated = 0
AGXLoaded = false
AGXGroupStates =
AGXGroupStateNames =
}
}

Does that look right?

D.

Edited by Diazo
Link to comment
Share on other sites

That only works if Ferram is using :FOR[FerramAerospaceResearch] to schedule his configs like a good little modder. And I dont know if it matters since you dont say what the nature of the conflict is, but he adds some modules via AddModule. Though I'm skeptical that any of the things he adds that way OR changes in his config would cause AGE problems...

Link to comment
Share on other sites

My current thought is that it is only the Modules that FAR adds on the FINAL pass are a problem, so in theory as long as I add mine in the :FOR[AGExt] pass I'm alright.

I don't know that for sure yet though and I am not aware of any method to ensure that my :FOR[AGext] pass happens before the :FOR[FAR] pass so I'm trying what you see in my previous post.

However, people here should be familiar with partModules. My current best lead on the problems I am experiencing is the following in the output_lot.txt


Part mediumDishAntenna cannot load module #4. It only has 4 modules defined

for every part on the vessel.

Now, as far as I can tell, my AGExt module is module #3 and loads correctly most of the time, but every so often everything resets, which is a symptom of my module not loading. Further investigation leads me to the fact that also installing FAR makes the problem significantly worse and I see FAR does stuff with it's modules in the :FINAL pass.

Which leads me to now.

Is anyone able to give me any hints about that error message beyond the fact that it means that KSP has found a partModule in the persistent.sfs file that is not present on the part in the part loader?

I've been assuming that when KSP hits this error it stop trying to load modules for that part and any modules later in the load sequence, even if valid, will not load.

The wildcard in all this is I can't actually prove it is an error in the partModule loading sequence that is causing my problems, but as it is the only error I'm seeing in the output_lot.txt it is what I am focusing on.

D.

Edited by Diazo
Link to comment
Share on other sites

Code:Part mediumDishAntenna cannot load module #4. It only has 4 modules defined

D.

That's not really an error. Everyone has those if they use a mod that adds PartModules in code via AddModule()

Edit: wow, quotation fail fails... not sure how that got munged

Edit 2: further info. It definitely does not stop it from loading, and even modules added that way function fine between game loads with persistence if they had persistent variables. (aside from MM save fixer occasionally deleting them which it needs to stop doing!!!! but that's another story)

Edited by Starwaster
Link to comment
Share on other sites

Edit 2: further info. It definitely does not stop it from loading, and even modules added that way function fine between game loads with persistence if they had persistent variables. (aside from MM save fixer occasionally deleting them which it needs to stop doing!!!! but that's another story)

It does? I have an unreleased mod I'm toying with that I was trying to do exactly that.

1) Add partmodule in code via .addModule() with persistent fields.

2) Save data.

3) Load data.

I could add the part module and save data, but the load process never triggered, the data always reset to the defaults I assigned when creating a new partmodule so I believed it was hitting the error above, not loading my module from the persistence file (as the error says "cannot load") and then because the module was missing, my mod was adding it back in with the default values. I've since switched to using a ScenarioModule to save my data and don't have the code any more but I could not get it to work.

On the save fixer sometimes deleting values, is there some place with more details? That would explain exactly what I am seeing if 2 of my 7 persistent fields were having their data wiped (and so reset to defaults when I check for their presence).

D.

Link to comment
Share on other sites

It does? I have an unreleased mod I'm toying with that I was trying to do exactly that.

1) Add partmodule in code via .addModule() with persistent fields.

2) Save data.

3) Load data.

I could add the part module and save data, but the load process never triggered, the data always reset to the defaults I assigned when creating a new partmodule so I believed it was hitting the error above, not loading my module from the persistence file (as the error says "cannot load") and then because the module was missing, my mod was adding it back in with the default values. I've since switched to using a ScenarioModule to save my data and don't have the code any more but I could not get it to work.

On the save fixer sometimes deleting values, is there some place with more details? That would explain exactly what I am seeing if 2 of my 7 persistent fields were having their data wiped (and so reset to defaults when I check for their presence).

D.

Not just fields, the entire module. and only if something changed (module order change or removal/addition) and triggers the save game fixer. since modules added with addmodule are technically dynamic, save fixer does not preserve them. they are deleted, forcing the mod to re-add them with default values. there was some discussion on this earlier, a few pages back.

that behavior is not changing anytime soon so I was forced add my modules via config. (it was for Ioncross life support mod)

Link to comment
Share on other sites

Alright, thanks for the heads up.

As only some of my values, and not the entire module, are affected, it sounds like the save fixer is a red-herring for my current issue but I'll go find the previous discussion and read up on it.

D.

Link to comment
Share on other sites

Alright, thanks for the heads up.

As only some of my values, and not the entire module, are affected, it sounds like the save fixer is a red-herring for my current issue but I'll go find the previous discussion and read up on it.

D.

If it does turn out to be relevant, maybe adding the module to the prefab instead of the part might be a solution. if that's possible

Link to comment
Share on other sites

Looking for a little help please.

I've been working on a set of configs to convert the TACLS 1 unit = 1 crew member day system to match realistic units and values. Anyway, I've come to the part where I'm needing to make the config change the TAC generic converters that other authors have added to their mods and I've run into an issue. Certain mods have included more than one converter in their parts (FusTek Utility module, for example), with each doing a different conversion, but not necessarily in any specific order, creating a need for me to have MM search for some identifier in each and then apply the appropriate changes. The problem is that I can only ever seem to get it to recognize the first module, while the second is almost always ignored. I've tried indexing the modules in the MM config, but for some reason that forces the first module to be skipped and the edits of the second module to be applied to everything.

Anyway, if someone could give me some guidance on how to go about building this edit, I would appreciate it. Here is an example of the nodes that are giving me the troubles:


MODULE
{
name = TacGenericConverter
converterName = Carbon Extractor
conversionRate = 16
inputResources = CarbonDioxide, 1, ElectricCharge, 2000
outputResources = Oxygen, 1.8, false, Waste, 4.436, true
}

MODULE
{
name = TacGenericConverter
converterName = Water Purifier
conversionRate = 8
inputResources = WasteWater, 1, ElectricCharge, 1000
outputResources = Water, 0.9, false, Waste, 6.382, true
}

I'm looking for a way to access the second module without needing its index position as other mods have these in a different order, so that won't work always. I've tried several permutations including things like:


@PART[*]:HAS[~tag[RealTACLS],@MODULE[TacGenericConverter]]:FINAL
{
@MODULE[TacGenericConverter]:HAS[#converterName[Water?Purifier]]
{
stuff
}
}

This one results in the first module being affected, but not the second, no matter what the converterName field contains. The ~tag[RealTACLS] is so I can build the ability to completely skip a part if I've already tagged it as done, or if me or another author has written a part specifically for this unit system.


@PART[*]:HAS[~tag[RealTACLS],@MODULE[TacGenericConverter]]:FINAL
{
@MODULE[TacGenericConverter]:NEEDS[#converterName[Water?Purifier]]
{
stuff
}
}

The result here is that nothing is affected, even though the second node clearly has the converterName Water Purifier.


@PART[*]:HAS[~tag[RealTACLS],@MODULE[TacGenericConverter]]:FINAL
{
@MODULE[TacGenericConverter],0
{
stuff
}

@MODULE[TacGenericConverter],1
{
stuff
}
}

For some reason this applied the edits from the second module to all of the modules.

There are several more that I've tried, but no matter what, I can either only affect the first module, or the edit applies what should go to the second module to everything. Is there any way to actually accomplish what I want here?

Thanks.

Link to comment
Share on other sites

Hi i'm looking for some help :)

so in the engine thrust controller plugin (one that simulates realistic SRB thrust changes), it basically causes all LES (launch escape systems) to not work, so does anyone know how to add a module manager line to the existing ones that negates all parts with "tower" in there name? (since most LES parts include the word tower such as "launch escape tower" or "escape tower", etc.)

Here is the existing code:

@PART[*]:HAS[@RESOURCE[SolidFuel],!MODULE[ModuleSRBThrust]]
{
!MODULE[ModuleEngineThrustController] {}

MODULE
{
name = ModuleEngineThrustController
minimumThrustPercent = 0.01
canAdjustAtAnytime = false
showItemInList = false
}

MODULE
{
name = ModuleSRBThrust
resourceName = SolidFuel
useTimeCurve = false
thrustCurve
{
key = 0.00 0.01
key = 0.02 0.25
key = 0.15 0.48
key = 0.35 0.65
key = 0.55 0.72
key = 0.65 0.81
key = 0.70 0.90
key = 0.78 0.81
key = 0.80 0.90
key = 1.0 1.00
}
}
}

Link to comment
Share on other sites

What exactly does it mean when it says "Hidden"?

It means that some configs are not activating because they have unmet :NEEDS[]

It's normal.

SpacedInvader/Sippyfrog, I'll take a look at your configs and offer feedback later today

Link to comment
Share on other sites

It means that some configs are not activating because they have unmet :NEEDS[]

It's normal.

SpacedInvader/Sippyfrog, I'll take a look at your configs and offer feedback later today

I figured it was normal, I just was curious. (I thought maybe it was some backward compatibility "legacy" part or something). Thanks for the clarification

Link to comment
Share on other sites

I have a question. I am trying to make an MM patch to change the science transmit scalar for purely number-based experiments. I has always bugged me that transmitting the temperature or the air pressure is not a 100% transmit when the qualitative evaluation of a crew report is. So this is what I tried to do with my patch:

@PART[*]:HAS[@MODULE[ModuleEnviroSensor]]
{
@ModuleScienceExperiment
{
xmitDataScalar = 1
}
}

As I understand it, that should make it scan through all of the parts for any part that has the ModuleEnviroSensor (the ones I want to change are the only ones with this module like the thermometer, barometer, etc.) and replace the line xmitDataScalar with the value 1 rather than what it natively has. I also tried it @xmitDataScalar = 1 since the wiki syntax page suggests that the @ is the operator to edit rather than insert, but neither worked.

Any ideas?

Link to comment
Share on other sites

Hokay..had to reload alot of my mods, and now when I boot up KSP, ALL my parts are deleted by Save Game Fixer

Any way to fix this?? I DO have a backup of my save, but that doesn't mater much if all my parts are gone...

Hmm..seems I didn't install NF, but that should not have effected ALL my parts, right?


[LOG 21:12:52.320] AddonLoader: Instantiating addon 'SaveGameFixer' from assembly 'ModuleManager.2.1.5'
[LOG 21:12:52.325] [SaveGameFixer] Elected unopposed version= 2.1.5.0 at C:\games\ksp-win-0-23-0\KSP_win\GameData\ModuleManager.2.1.5.dll
[LOG 21:12:52.406] Save Game: default
[LOG 21:12:52.408] Craft file: default\Ships\VAB\Advanced Science Probe (NFT).craft
[LOG 21:12:52.410] Part: capacitorInlineMed
[WRN 21:12:52.412] Part "capacitorInlineMed" has been deleted.
[LOG 21:12:52.414] Part: xenonTankRadial
[WRN 21:12:52.415] Part "xenonTankRadial" has been deleted.
[LOG 21:12:52.417] Part: xenonTankRadial
[WRN 21:12:52.419] Part "xenonTankRadial" has been deleted.
[LOG 21:12:52.420] Part: xenonTankRadial

Edited by Pondafarr
Link to comment
Share on other sites

Is there a way to via module manager remove parts, instead of changing partfiles to disable those parts?

I tried "-PART[Partname]" as well as "-PART[Partname] {}", but that didn't do anything. Also postfixed :FINAL, but that didn't work either.

Link to comment
Share on other sites

Is there a way to via module manager remove parts, instead of changing partfiles to disable those parts?

I tried "-PART[Partname]" as well as "-PART[Partname] {}", but that didn't do anything. Also postfixed :FINAL, but that didn't work either.

I think you can't delete a part, but you can disable them. But i can be wrong.

Link to comment
Share on other sites

I am not sure, but I think RT2 did something to make a specific functionality of a part only become available after a certain tech was researched.

1. Can this be added to anything in a part.cfg, e.g. could I edit a cockpit to only contain monoprop after RCS has become available?

2. Can other values change with rising tech levels? (e.g. mass, amount of power stored)

Link to comment
Share on other sites

rynak: PART is a node like any other node. Therefore delete it with !PART {}

However, there's nor reason to, since you don't gain any performance or memory savings from doing so, and making its category -1 serves the same purpose of removing it from the part list.

KerbMav: if you write a plugin to add that functionality, sure (RT2 has that because Cilph wrote it into the RT2 plugin).

Link to comment
Share on other sites

I am not sure, but I think RT2 did something to make a specific functionality of a part only become available after a certain tech was researched.

1. Can this be added to anything in a part.cfg, e.g. could I edit a cockpit to only contain monoprop after RCS has become available?

2. Can other values change with rising tech levels? (e.g. mass, amount of power stored)

Are you talking about MJ it did that can't think of anything in RT2 that does that.

Link to comment
Share on other sites

I am not sure, but I think RT2 did something to make a specific functionality of a part only become available after a certain tech was researched.

1. Can this be added to anything in a part.cfg, e.g. could I edit a cockpit to only contain monoprop after RCS has become available?

2. Can other values change with rising tech levels? (e.g. mass, amount of power stored)

I knew it was possible because MechJeb and RT2 use it, but I don't know how they do it. I would like to apply this at parts. It will also be usefull by other mods.

Can someone help me with this?

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