Jump to content

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


sarbian

Recommended Posts

Not really sure myself, I think it's just so MM knows that it's not looking for "name = title[CHAKA{*}]", but the value matched to the title key in the PART node (I just grabbed the syntax from the second post :D)

Edited by Crzyrndm
Link to comment
Share on other sites

https://github.com/sarbian/ModuleManager/wiki/Module%20Manager%20Syntax#mod-dependency-checking

NEEDS can go anywhere, AFTER I don't know about and there is no documentation on so the safest assumption would be top level only.

That makes some sense.

If an AFTER check is used and the checked for mod is not present does the patch get added to the default MM pass or does it get ignored as if it was a NEEDS check?

Link to comment
Share on other sites

Hello. I'm regularry getting System.ArgumentOutOfRangeException: Argument is out of range. Parameter name: count.Parameter name can be other than count, but its most common one. This happens with 2.5.9 and 2.5.8 on heavy modded install: approx 8.7k config entries after processing. This error completely halts loading. If I remove some mods, game loads fine. Also, sometimes it loads fine without me doing anything. Also, it breaks on different configs every time and sometime I see only one error in log, while other times it may be 2 or 3... Can someone point me in the right direction to debug this issue? I already trimmed my mod install. Before this, I was getting OOM exceptions in MM, that corrupted config cache. Using KSP 0.90 win32.

Last KSP.log: https://dl.dropboxusercontent.com/u/5836960/KSP.log

I'm having similar problems; heavily modded KSP, completely random errors, each time different part configs bug out! Most of the time deleting MM cache helps though. Quite baffling behavior if you ask me.

Link to comment
Share on other sites

I just created a 2.5.10 with some debug code to understand what is going on with the error Net-burst reported. Please try it and search your log for "Exception while checking needs" and post the lines / log here.

Zorbaq : without log I can't be sure your issue is the same.

Edited by sarbian
Link to comment
Share on other sites

I've discovered an unexpected behavior when modifying Contracts.cfg. My patches weren't getting applied, and I think it's related to the fact that many of the nodes in that file (e.g. the PART_REQUEST nodes, which I was attempting to modify -- I'm trying to get alternate science parts, e.g. from DMagic Orbital Science and Lack's Stock Extension to satisfy stock satellite contracts) do not have a "name" field.

When no [name] field is entered, the patch is applied:


@Contracts
{
@Satellite
{
@PART_REQUEST:HAS[#Part[GooExperiment]]
{
Part = SXTProbeGooo
//patch is applied
}
}
}

When I include a [name] field, even

[*], the patch is not applied:


@Contracts
{
@Satellite
{
@PART_REQUEST[B][COLOR=#ff0000]
[*][/COLOR][/B]:HAS[#Part[GooExperiment]]
{
Part = SXTProbeGooo
//patch is not applied
}
}
}

I'm not sure if this is something that should be fixed on Module Manager's end (maybe check if name is "null", or whatever the result is if there's no name field defined, and then ignore any name field references in the patch if it is?) or just documented in the first posts and the GitHub wiki, but it was driving me crazy until I figured it out just now.

Link to comment
Share on other sites

I see -- however, in all of the documentation, NODE[name] is presented as normal, as if config nodes are "supposed" to have names, when it's "just" another field. I think I'll add a statement to the effect of what you've said to the wiki, so that it's clear that NODE

[*] is not the same as "select all NODEs" but rather "select all NODEs which have names." Thanks!

Link to comment
Share on other sites

Hm, I have absolutely no idea how to interpret the output log, but I've been having LOTS and LOTS of crashes, often at random times. I wonder if any of them have anything to do with Module Manager?

http://sta.sh/015f2zrm8l9l (several crashes)

http://sta.sh/012sk8fm5e2g (even more crashes)

Some of them don't have crash logs for some reason.

Also, what's the "mono_unity_liveness_has_parent_class + (bunch of numbers)" that I've seen in many of my crashes?

Link to comment
Share on other sites

ConfigNodes are not *supposed* to have names; it's just that some do, and so MM has some syntactic sugar for those cases (since they're some of the most-frequently patched things, like PARTs).

If you want to select all NODE use NODE,*

smjjames, since MM doesn't do anything once loading is complete, it seems unlikely it's to blame for "crashes, often at random times."

Link to comment
Share on other sites

ConfigNodes are not *supposed* to have names; it's just that some do, and so MM has some syntactic sugar for those cases (since they're some of the most-frequently patched things, like PARTs).

If you want to select all NODE use NODE,*

smjjames, since MM doesn't do anything once loading is complete, it seems unlikely it's to blame for "crashes, often at random times."

Okay, just trying to find answers to what's going on since people don't seem to be able to help in the support section.

Link to comment
Share on other sites

I'd like to use MM to add "ShowInMenu = False" to the Kethane settings.cfg file so if/when a new version comes out I don't have to edit the file by hand. Again.

But settings.cfg doesn't contain confignodes, it's just naked key/value pairs. So, can MM patch this file, and if so, how? Or am I just stuck with it.

I've searched through this thread, don't see anyone having asked this question before. If I missed it, my apologies. I've also read and reread sarbian's MM Syntax page on github, but nothing leaps out at me as being the obvious answer.

Clues, anyone?

Edited by wreckreation
Link to comment
Share on other sites

1. MM can't patch cfg files in PluginData since they're never loaded by the game.

2. Even if it's not in PluginData, it being in that form implies that Kethane loads it directly from disk, rather than checking GameDatabase, so MM patches wouldn't make a difference (same problem with FinePrint, before .90)

Link to comment
Share on other sites

Hello There,

First of all thank you for this awesome mod.

I do have a problem and don't know what causes it?

Symptoms: After I created a config file and put it into my folder inside the GameData. The given Jumbo tanks "icon" in the parts list just pops out when hovering the mouse over it.

The config:

@PART[fuelTank3-2] {

RESOURCE

{

name = XenonGas

amount = 2880

maxAmount = 2880

}

}

While this wasn't created all worked fine.

So what am I did wrong?

I do like to add more tanks but first I'd like to get rid of this annoying error.

Thanks.

Edited:

I'd like to create some alteration to parts about a tweakable electricity generator How am I supposed to do that?

Something like:

MODULE

{

name = ModuleGenerator

isAlwaysActive = true

isTweakable = true

OUTPUT_RESOURCE

{

name = ElectricCharge

rate = 15.0

minRate = 0.0

maxRate =15.0

}

}

So how can I do it? (without C# coding if it is possible)

Edited by Ricardo79
Link to comment
Share on other sites

As for the other question. I do like to reduce partcounts so I made some ion engine tweaks and make them generator as well.

"PART

{

name = ionEngineR0

module = Part

author = Gary_Ice

mesh = model.mu

scale = 1

rescaleFactor = 1

node_stack_top = 0.0, 0.2135562, 0.0, 0.0, 1.0, 0.0, 0

node_stack_bottom = 0.0, -0.1872844, 0.0, 0.0, 1.0, 0.0, 0

TechRequired = electrics

entryCost = 16800

cost = 97500

category = Propulsion

subcategory = 0

title = PB-ION xenon 0.625m Electric Propulsion System

manufacturer = Gary_Ice

description = By emitting ionized xenon gas through a small thruster port, the PB-ION can produce incredibly efficient propulsion, but with a downside of very low thrust and high energy usage. According to ISP Electronics sales reps, the rumours of this engine being powered by "dark magic" are largely exaggerated.

attachRules = 1,0,1,1,0

sound_loop = running

sound_stop = disengage

sound_stop = engage

sound_stop = flameout

// --- standard part parameters ---

mass = 0.05

dragModelType = default

maximum_drag = 0.2

minimum_drag = 0.2

angularDrag = 2

crashTolerance = 13

maxTemp = 3600

MODULE

{

name = ModuleEngines

thrustVectorTransformName = thrustTransform

exhaustDamage = False

ignitionThreshold = 0.1

minThrust = 0

maxThrust = 25

heatProduction = 0

PROPELLANT

{

name = ElectricCharge

ratio = 8

}

PROPELLANT

{

name = XenonGas

ratio = 1

}

atmosphereCurve

{

key = 0 15000

}

}

MODULE

{

name = FXModuleAnimateThrottle

animationName = colorAnimation

dependOnEngineState = True

responseSpeed = 0.5

}

MODULE

{

name = ModuleTestSubject

// nowhere: 0, srf: 1, ocean: 2, atmo: 4, space: 8

environments = 15

useStaging = True

useEvent = True

}

MODULE

{

name = ModuleGenerator

isAlwaysActive = true

OUTPUT_RESOURCE

{

name = ElectricCharge

rate = 15.0

}

}

RESOURCE

{

name = ElectricCharge

amount = 50

maxAmount = 50

}

RESOURCE

{

name = XenonGas

amount = 400

maxAmount = 400

}

}

"

But Id like to do the generators tweakable inside VAB about how much electricity they generate / sec (Much like a user can tweak the amount of fuels in tanks)

(Later on maybe adding resource to them for use... I really not decided it yet)

As for sure I'd like to add these tweaks and changes in separate cfg's so users can decide which ones they like and use...

Thank you for your answer and help too.

EDIT HERE:

THIS DOESN'T work without coding ;.;

I searched for the module wiki about and there is no such thing of maxRate for the generator module....

Edited by Ricardo79
Wrong turn...
Link to comment
Share on other sites

This is it. Thank you. I read that "stock bug" thing and added:

MODULE

{

name = ModuleSAS

}

And it is worked like charm.

Right now I try to figure out something about "wildcards"

I am try to do one step at a time. (so as my generator is not an issue yet :huh: )

@PART

[*]:HAS[@RESOURCE[LiquidFuel]]

{

RESOURCE

{

name = XenonGas

amount = #RESOURCE[LiquidFuel]:amount

maxAmount = #RESOURCE[LiquidFuel]:maxAmount

}

HAS[!MODULE

[*]]

{

MODULE

{

name = ModuleSAS

}

}

}

I came Up with this after searching on this forum...

But Always at the loading screen just halt at the NASAmission/parts/Size2LFB

after 547 patches applied.

Loading tips still changing.

Link to comment
Share on other sites

I just created a 2.5.10 with some debug code to understand what is going on with the error Net-burst reported. Please try it and search your log for "Exception while checking needs" and post the lines / log here.

Zorbaq : without log I can't be sure your issue is the same.

Here are some requested excerpts from logs:

output_log.2015-02-15

[ModuleManager] Exception while checking needs : NASAmission/Parts/Size3EngineCluster/part/Size3EngineCluster with a type of PART
System.NullReferenceException: Object reference not set to an instance of an object at (wrapper stelemref) object:stelemref (object,intptr,object) at ModuleManager.MMPatchLoader.CheckNeeds (.ConfigNode subMod, System.String url, System.Collections.Generic.List`1 path) [0x00000] in <filename unknown>:0 at ModuleManager.MMPatchLoader.CheckNeeds (System.Collections.Generic.List`1 excludePaths) [0x00000] in <filename unknown>:0

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

[ModuleManager] Exception while checking needs : Squad/Parts/FuelTank/RCSTankRadial/radialRCSTank/radialRCSTank with a type of PART
System.NullReferenceException: Object reference not set to an instance of an object at (wrapper stelemref) object:stelemref (object,intptr,object) at ModuleManager.MMPatchLoader.CheckNeeds (.ConfigNode subMod, System.String url, System.Collections.Generic.List`1 path) [0x00000] in <filename unknown>:0 at ModuleManager.MMPatchLoader.CheckNeeds (System.Collections.Generic.List`1 excludePaths) [0x00000] in <filename unknown>:0

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

output_log.2015-02-16

[ModuleManager] Exception while checking needs : KerbalEngineer/Parts/EngineerChip/part/EngineerChip with a type of PART
System.NullReferenceException: Object reference not set to an instance of an object at (wrapper stelemref) object:stelemref (object,intptr,object) at ModuleManager.MMPatchLoader.CheckNeeds (.ConfigNode subMod, System.String url, System.Collections.Generic.List`1 path) [0x00000] in <filename unknown>:0 at ModuleManager.MMPatchLoader.CheckNeeds (System.Collections.Generic.List`1 excludePaths) [0x00000] in <filename unknown>:0

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

[ModuleManager] Exception while checking needs : Squad/Parts/Command/advancedSasModuleLarge/advSasModuleLarge/asasmodule1-2 with a type of PART
System.NullReferenceException: Object reference not set to an instance of an object at (wrapper stelemref) object:stelemref (object,intptr,object) at ModuleManager.MMPatchLoader.CheckNeeds (.ConfigNode subMod, System.String url, System.Collections.Generic.List`1 path) [0x00000] in <filename unknown>:0 at ModuleManager.MMPatchLoader.CheckNeeds (.ConfigNode subMod, System.String url, System.Collections.Generic.List`1 path) [0x00000] in <filename unknown>:0 at ModuleManager.MMPatchLoader.CheckNeeds (System.Collections.Generic.List`1 excludePaths) [0x00000] in <filename unknown>:0

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

output_log.2015-02-17

[ModuleManager] Exception while checking needs : Squad/Parts/Command/inlineAdvancedStabilizer/inlineAdvancedStabilizer/advSasModule with a type of PART
System.NullReferenceException: Object reference not set to an instance of an object at (wrapper stelemref) object:stelemref (object,intptr,object) at ModuleManager.MMPatchLoader.CheckNeeds (.ConfigNode subMod, System.String url, System.Collections.Generic.List`1 path) [0x00000] in <filename unknown>:0 at ModuleManager.MMPatchLoader.CheckNeeds (System.Collections.Generic.List`1 excludePaths) [0x00000] in <filename unknown>:0

Generally the loading process halts later after yet another exception during the compilation of the part which experienced the need-checking error. For example, from the log with the excerpt above:


PartLoader: Compiling Part 'Squad/Parts/Command/inlineAdvancedStabilizer/inlineAdvancedStabilizer/advSasModule'

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

NullReferenceException: Object reference not set to an instance of an object
at System.Collections.Generic.GenericEqualityComparer`1[System.String].GetHashCode (System.String obj) [0x00000] in <filename unknown>:0 at System.Collections.Generic.Dictionary`2[System.String,System.Int32].TryGetValue (System.String key, System.Int32& value) [0x00000] in <filename unknown>:0 at PartLoader.ParsePart (.UrlConfig urlConfig, .ConfigNode node) [0x00000] in <filename unknown>:0 at PartLoader+.MoveNext () [0x00000] in <filename unknown>:0

Link to comment
Share on other sites

As I said earlier:

I don't know why you would need to go into the above node to go back into the node you already are.

That`s why I would replace

#$../MODULE[ModuleFuelTanks]/temp$

with

#$temp$

That's just the way it works in this example:

http://forum.kerbalspaceprogram.com/threads/55219-Module-Manager-2-3-5-%28Sept-14%29-Loading-Speed-Fix?p=1416253&viewfull=1#post1416253

(from https://github.com/sarbian/ModuleManager/wiki/Module%20Manager%20Syntax)

to be safe you could also use

%temp = 0

when you first define it.

Thanks for the help

Link to comment
Share on other sites

Ricardo79. No, you need tto use that to copy values

@PART[*]:HAS[@RESOURCE[LiquidFuel]]

{

RESOURCE

{

name = XenonGas

amount = #$../RESOURCE[LiquidFuel]/amount$

maxAmount = #$../RESOURCE[LiquidFuel]/maxAmount$

}

}

[code]

The HAS[!MODULE[*]] can't work and I see no way to write it in MM patch.

Zorbaq : you have an other problem and I am quite baffled by it. I'll build a version that will give me more information...

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