Crzyrndm Posted February 9, 2015 Share Posted February 9, 2015 This might work@PART[*]:HAS[#title[CHAKA*]] Quote Link to comment Share on other sites More sharing options...
lextacy Posted February 9, 2015 Share Posted February 9, 2015 This might work@PART[*]:HAS[#title[CHAKA*]]It worked ! Thank you much. Wondering what the # means ? Quote Link to comment Share on other sites More sharing options...
Crzyrndm Posted February 9, 2015 Share Posted February 9, 2015 (edited) 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 ) Edited February 9, 2015 by Crzyrndm Quote Link to comment Share on other sites More sharing options...
NathanKell Posted February 9, 2015 Share Posted February 9, 2015 # means has-key-of-this-name (#title[foo])~ means does not have the key (~breakingForce[])@ means has node of this name (i.e. @MODULE[foo])! means does not have a node of this name (!Model[]) Quote Link to comment Share on other sites More sharing options...
Akira_R Posted February 12, 2015 Share Posted February 12, 2015 Can per mod parsing be done on subnodes?For example:@PART[Thingy]{ [B] %EFFECTS:NEEDS[ThatOneMod]:AFTER[ThatOneMod][/B] { (stuff) } [B] %EFFECTS:NEEDS[!ThatOneMod][/B] { (differentstuff) }} Quote Link to comment Share on other sites More sharing options...
Crzyrndm Posted February 12, 2015 Share Posted February 12, 2015 https://github.com/sarbian/ModuleManager/wiki/Module%20Manager%20Syntax#mod-dependency-checkingNEEDS can go anywhere, AFTER I don't know about and there is no documentation on so the safest assumption would be top level only. Quote Link to comment Share on other sites More sharing options...
Akira_R Posted February 12, 2015 Share Posted February 12, 2015 https://github.com/sarbian/ModuleManager/wiki/Module%20Manager%20Syntax#mod-dependency-checkingNEEDS 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? Quote Link to comment Share on other sites More sharing options...
NathanKell Posted February 13, 2015 Share Posted February 13, 2015 It gets ignored.MM runs based on passes. The first pass that a patch fits, the patch is run and removed from the list.ConsiderNODE:FOR[bar]:AFTER[Foo]That will actually run on the Bar pass, before Foo is run. So only use one pass operator. Quote Link to comment Share on other sites More sharing options...
Zorbaq Posted February 13, 2015 Share Posted February 13, 2015 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.logI'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. Quote Link to comment Share on other sites More sharing options...
sarbian Posted February 13, 2015 Author Share Posted February 13, 2015 (edited) 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 February 13, 2015 by sarbian Quote Link to comment Share on other sites More sharing options...
Kerbas_ad_astra Posted February 14, 2015 Share Posted February 14, 2015 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. Quote Link to comment Share on other sites More sharing options...
sarbian Posted February 14, 2015 Author Share Posted February 14, 2015 Yes, this is the intended behavior. PART_REQUEST[xxxx] is nothing more than a short version of @PART_REQUEST:HAS[#name[xxxx]] Quote Link to comment Share on other sites More sharing options...
Kerbas_ad_astra Posted February 14, 2015 Share Posted February 14, 2015 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! Quote Link to comment Share on other sites More sharing options...
smjjames Posted February 14, 2015 Share Posted February 14, 2015 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? Quote Link to comment Share on other sites More sharing options...
NathanKell Posted February 14, 2015 Share Posted February 14, 2015 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." Quote Link to comment Share on other sites More sharing options...
smjjames Posted February 14, 2015 Share Posted February 14, 2015 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. Quote Link to comment Share on other sites More sharing options...
wreckreation Posted February 15, 2015 Share Posted February 15, 2015 (edited) 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 February 15, 2015 by wreckreation Quote Link to comment Share on other sites More sharing options...
NathanKell Posted February 16, 2015 Share Posted February 16, 2015 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) Quote Link to comment Share on other sites More sharing options...
Ricardo79 Posted February 16, 2015 Share Posted February 16, 2015 (edited) 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 February 16, 2015 by Ricardo79 Quote Link to comment Share on other sites More sharing options...
sarbian Posted February 16, 2015 Author Share Posted February 16, 2015 What you are getting is a stock bug that trigger for parts with 3+ resources and no modulesWhat value do you need to tweak ? It sound like something that the example cover. Quote Link to comment Share on other sites More sharing options...
Ricardo79 Posted February 16, 2015 Share Posted February 16, 2015 (edited) 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 = ionEngineR0module = Partauthor = Gary_Icemesh = model.muscale = 1rescaleFactor = 1node_stack_top = 0.0, 0.2135562, 0.0, 0.0, 1.0, 0.0, 0node_stack_bottom = 0.0, -0.1872844, 0.0, 0.0, 1.0, 0.0, 0TechRequired = electricsentryCost = 16800cost = 97500category = Propulsionsubcategory = 0title = PB-ION xenon 0.625m Electric Propulsion Systemmanufacturer = Gary_Icedescription = 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,0sound_loop = runningsound_stop = disengagesound_stop = engagesound_stop = flameout// --- standard part parameters ---mass = 0.05dragModelType = defaultmaximum_drag = 0.2minimum_drag = 0.2angularDrag = 2crashTolerance = 13maxTemp = 3600MODULE{ 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 February 16, 2015 by Ricardo79 Wrong turn... Quote Link to comment Share on other sites More sharing options...
Ricardo79 Posted February 16, 2015 Share Posted February 16, 2015 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 )@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/Size2LFBafter 547 patches applied.Loading tips still changing. Quote Link to comment Share on other sites More sharing options...
Zorbaq Posted February 17, 2015 Share Posted February 17, 2015 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 PARTSystem.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 PARTSystem.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 PARTSystem.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 PARTSystem.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 PARTSystem.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 Quote Link to comment Share on other sites More sharing options...
FreeThinker Posted February 17, 2015 Share Posted February 17, 2015 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 = 0when you first define it.Thanks for the help Quote Link to comment Share on other sites More sharing options...
sarbian Posted February 17, 2015 Author Share Posted February 17, 2015 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... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.