TranceaddicT Posted December 10, 2017 Share Posted December 10, 2017 9 minutes ago, DStaal said: NO! ':FOR' *creates* the mod, it's not a conditional. It should *never* be used by other mods who want to call a mod. It's main use is for things like the USI or WBI suites of mods, where multiple mods are in one folder, as it allows MM to reference those sub-mods that don't have either their own top-level folder or a .dll. That's not my understanding from the wiki. I thought :FOR is a part of the ordering pass (1st - no directive (aka LEGACY), 2nd - FIRST, 3rd - BEFORE/FOR/AFTER, 4th FINAL) in which MMConfigs are applied. To my understanding, using the :FOR directive means that a patch is applied IF the mod exists. This: +PART[MyPart] { name = MyNewPart } creates a new part called MyNewPart from MyPart all the time. Adding the :FOR directive like this: +PART[MyPart]:FOR[SomeMod] creates the part MyNewPart from MyPart ONLY if SomeMod is installed because otherwise, the patch will error and no new part is created. Am I off? Quote Link to comment Share on other sites More sharing options...
New Horizons Posted December 10, 2017 Share Posted December 10, 2017 (edited) 30 minutes ago, blowfish said: The simplest thing to do is just to upload your log. There's a lot in there, but myself and others who have experience doing this can find what we need to pretty quickly. Also worth making sure all your mods are up to date - many have been updated for this in the last few days. Whish I could. Here one cannot upload files. Maybe this works magically, without makiing all my files readable. https://www.dropbox.com/s/r0gytw9z7la8o36/KSP.log?dl=0 Edited December 10, 2017 by New Horizons Quote Link to comment Share on other sites More sharing options...
AngrybobH Posted December 10, 2017 Share Posted December 10, 2017 On 12/7/2017 at 9:07 AM, sarbian said: "This means that FOOBAR[*] will not select all nodes of type FOOBAR, but all nodes of type FOOBAR which have a defined "name" field. (If you want to select all FOOBAR nodes, use FOOBAR,*.)" I am trying to go through all my installed mods that have errors starting with GPOSpeedpump because it has a bunch of errors. The quote above leads me to believe that changing a [*] to a ,* would likely fix a line like: @PART[*]:HAS[@MODULE[InterstellarFuelSwitch],!MODULE[GPOSpeedPump]]:FOR[GPOSpeedFuelPump]:FINAL if I change it to: @PART,*:HAS[@MODULE[InterstellarFuelSwitch],!MODULE[GPOSpeedPump]]:FOR[GPOSpeedFuelPump]:FINAL Am I correct? Quote Link to comment Share on other sites More sharing options...
blowfish Posted December 10, 2017 Share Posted December 10, 2017 1 minute ago, New Horizons said: Whish I could. Here one cannot upload files. Do you have DropBox, Google Drive, OneDrive, or similar? Most people use one of those (and then share the file). Quote Link to comment Share on other sites More sharing options...
Galileo Posted December 10, 2017 Share Posted December 10, 2017 2 minutes ago, New Horizons said: Whish I could. Here one cannot upload files. Yes you can... upload to pastebin.com or upload your logs to Dropbox and share the link here.. how do you think anyone else does it? Quote Link to comment Share on other sites More sharing options...
blowfish Posted December 10, 2017 Share Posted December 10, 2017 Just now, AngrybobH said: I am trying to go through all my installed mods that have errors starting with GPOSpeedpump because it has a bunch of errors. The quote above leads me to believe that changing a [*] to a ,* would likely fix a line like: @PART[*]:HAS[@MODULE[InterstellarFuelSwitch],!MODULE[GPOSpeedPump]]:FOR[GPOSpeedFuelPump]:FINAL if I change it to: @PART,*:HAS[@MODULE[InterstellarFuelSwitch],!MODULE[GPOSpeedPump]]:FOR[GPOSpeedFuelPump]:FINAL Am I correct? @PART[*] works fine, because each PART node will always have a name value (or KSP will not compile the part). However, @PART:HAS[...] will work fine, you only need the ,* on subnodes, since by default it will only apply to the first one. The problem we found here was with EXPERIMENT_DEFINITION, since those don't have a name value. Quote Link to comment Share on other sites More sharing options...
New Horizons Posted December 10, 2017 Share Posted December 10, 2017 4 minutes ago, New Horizons said: Whish I could. Here one cannot upload files. Maybe this works magically, without makiing all my files readable to you fellow players. https://www.dropbox.com/s/r0gytw9z7la8o36/KSP.log?dl=0 Did it! Quote Link to comment Share on other sites More sharing options...
TranceaddicT Posted December 10, 2017 Share Posted December 10, 2017 3 minutes ago, New Horizons said: Did it! Those [ModuleManager] Error entries are related to the update of MM. They were there before but have now been exposed by the update. The respective mods need to modify their configuration files. Quote Link to comment Share on other sites More sharing options...
AngrybobH Posted December 10, 2017 Share Posted December 10, 2017 1 minute ago, blowfish said: @PART[*] works fine, because each PART node will always have a name value (or KSP will not compile the part). However, @PART:HAS[...] will work fine, you only need the ,* on subnodes, since by default it will only apply to the first one. The problem we found here was with EXPERIMENT_DEFINITION, since those don't have a name value. Ok. Thank you. I'm trying to do some of my own debugging which includes learning just about everything I need to know about modding this game. Any suggestions on why this file gets an error? // Interstellar Fuel Switch support @PART[*]:HAS[@MODULE[InterstellarFuelSwitch],!MODULE[GPOSpeedPump]]:FOR[GPOSpeedFuelPump]:FINAL { MODULE { name = GPOSpeedPump } } // Firespitter fuel switch support @PART[*]:HAS[@MODULE[FSfuelSwitch],!MODULE[GPOSpeedPump]]:FOR[GPOSpeedFuelPump]:FINAL { MODULE { name = GPOSpeedPump } } // B9 fuel switch support @PART[*]:HAS[@MODULE[ModuleB9PartSwitch],!MODULE[GPOSpeedPump]]:FOR[GPOSpeedFuelPump]:AFTER[zzz_CryoTanks]:FINAL { MODULE { name = GPOSpeedPump } } Quote Link to comment Share on other sites More sharing options...
TranceaddicT Posted December 10, 2017 Share Posted December 10, 2017 @AngrybobH It's probably the combination of the multiple directives. Use only one. Look for this error: "[ModuleManager] Error - more than one pass specifier on a node" Quote Link to comment Share on other sites More sharing options...
blowfish Posted December 10, 2017 Share Posted December 10, 2017 5 minutes ago, New Horizons said: Did it! Thanks! I see errors from RealPlume-StockConfigs and SETI. The RealPlume-Stock errors have been fixed in 1.0.1, so be sure to update. I've reported the SETI error in the thread but no response from the author yet (and can't make sense of which Github repositories correspond to what so I can't submit a fix myself). 2 minutes ago, AngrybobH said: Ok. Thank you. I'm trying to do some of my own debugging which includes learning just about everything I need to know about modding this game. Any suggestions on why this file gets an error? // Interstellar Fuel Switch support @PART[*]:HAS[@MODULE[InterstellarFuelSwitch],!MODULE[GPOSpeedPump]]:FOR[GPOSpeedFuelPump]:FINAL { MODULE { name = GPOSpeedPump } } // Firespitter fuel switch support @PART[*]:HAS[@MODULE[FSfuelSwitch],!MODULE[GPOSpeedPump]]:FOR[GPOSpeedFuelPump]:FINAL { MODULE { name = GPOSpeedPump } } // B9 fuel switch support @PART[*]:HAS[@MODULE[ModuleB9PartSwitch],!MODULE[GPOSpeedPump]]:FOR[GPOSpeedFuelPump]:AFTER[zzz_CryoTanks]:FINAL { MODULE { name = GPOSpeedPump } } :FOR[GPOSpeedFuelPump]:FINAL, :FOR[GPOSpeedFuelPump]:FINAL, :AFTER[zzz_CryoTanks]:FINAL are all specifying two passes. ModuleManager has only ever applied the patch in one pass, so it was previously meaningless (and now an error) to provide more than one. Quote Link to comment Share on other sites More sharing options...
New Horizons Posted December 10, 2017 Share Posted December 10, 2017 With other words: Things as this with two ":" are not allowed anymore? @PART[jx2LDA]:FOR[Kerbalism]:AFTER[JX2Antenna] Quote Link to comment Share on other sites More sharing options...
AngrybobH Posted December 10, 2017 Share Posted December 10, 2017 Ah. I think I get it now. Thank you for pointing me in the right direction. Quote Link to comment Share on other sites More sharing options...
blowfish Posted December 10, 2017 Share Posted December 10, 2017 Just now, New Horizons said: With other words: Things as this with two ":" are not allowed anymore? @PART[jx2LDA]:FOR[Kerbalism]:AFTER[JX2Antenna] Correct, any combination of more than one :FOR, :BEFORE, :AFTER, :FIRST, :FINAL is not allowed. But again, it wasn't really meaningful even in previous versions of MM, it would always use the first one and ignore any others. Quote Link to comment Share on other sites More sharing options...
DStaal Posted December 10, 2017 Share Posted December 10, 2017 33 minutes ago, TranceaddicT said: That's not my understanding from the wiki. I thought :FOR is a part of the ordering pass (1st - no directive (aka LEGACY), 2nd - FIRST, 3rd - BEFORE/FOR/AFTER, 4th FINAL) in which MMConfigs are applied. To my understanding, using the :FOR directive means that a patch is applied IF the mod exists. This: +PART[MyPart] { name = MyNewPart } creates a new part called MyNewPart from MyPart all the time. Adding the :FOR directive like this: +PART[MyPart]:FOR[SomeMod] creates the part MyNewPart from MyPart ONLY if SomeMod is installed because otherwise, the patch will error and no new part is created. Am I off? You are off. Yes, FOR is part of the ordering pass - but that's *because* it creates the mod in question. So you get patches BEFORE the mod, FOR the mod, and then AFTER the mod. Both of your statements will (attempt) to create the part MyPart all the time. (And will likely throw an error if SomeMod is not installed.) If you want to apply some patch only if SomeMod is installed, you would use ':NEEDS[SomeMod]'. Getting FOR and NEEDS mixed up is the *most* common error I've seen in MM patches, and the one most likely to cause unrelated or weird issues. (As it causes issues in *other* mods which are using everything correctly, but only in the presence of your mod and not the mod you're trying to conditionally depend on.) Quote Link to comment Share on other sites More sharing options...
DStaal Posted December 10, 2017 Share Posted December 10, 2017 2 minutes ago, New Horizons said: With other words: Things as this with two ":" are not allowed anymore? @PART[jx2LDA]:FOR[Kerbalism]:AFTER[JX2Antenna] Per my discussion with TranceaddicT - Try this instead, I believe this will work, and do what you likely actually intend: @PART[jx2LDA]:NEEDS[Kerbalism]:AFTER[JX2Antenna] Quote Link to comment Share on other sites More sharing options...
TranceaddicT Posted December 10, 2017 Share Posted December 10, 2017 11 minutes ago, DStaal said: You are off. Yes, FOR is part of the ordering pass - but that's *because* it creates the mod in question. So you get patches BEFORE the mod, FOR the mod, and then AFTER the mod. Both of your statements will (attempt) to create the part MyPart all the time. (And will likely throw an error if SomeMod is not installed.) If you want to apply some patch only if SomeMod is installed, you would use ':NEEDS[SomeMod]'. Getting FOR and NEEDS mixed up is the *most* common error I've seen in MM patches, and the one most likely to cause unrelated or weird issues. (As it causes issues in *other* mods which are using everything correctly, but only in the presence of your mod and not the mod you're trying to conditionally depend on.) Thank you. I've been conflating NEEDS/FOR for a long time. Wow, that just makes things so much better. Quote Link to comment Share on other sites More sharing options...
AngrybobH Posted December 10, 2017 Share Posted December 10, 2017 So this worked out and got rid of 3 errors and fixed some issues I had with GPO. I changed what I had posted before to: @PART[*]:HAS[@MODULE[InterstellarFuelSwitch],!MODULE[GPOSpeedPump]]:NEEDS[GPOSpeedFuelPump]:AFTER[InterstellarFuelSwitch] { MODULE { name = GPOSpeedPump } } // Firespitter fuel switch support @PART[*]:HAS[@MODULE[FSfuelSwitch],!MODULE[GPOSpeedPump]]:NEEDS[GPOSpeedFuelPump]:AFTER[FSfuelSwitch] { MODULE { name = GPOSpeedPump } } // B9 fuel switch support @PART[*]:HAS[@MODULE[ModuleB9PartSwitch],!MODULE[GPOSpeedPump]]:NEEDS[GPOSpeedFuelPump]:AFTER[zzz_CryoTanks] { MODULE { name = GPOSpeedPump } } It also makes more sense to me. Thanks again to @TranceaddicT , @blowfish, and indirectly @DStaal. Can you NEEDS twice or more? Quote Link to comment Share on other sites More sharing options...
TranceaddicT Posted December 10, 2017 Share Posted December 10, 2017 @AngrybobH, no need to thank me. I know how to spot errors and I know enough to get myself into MMHell ... just not out. Quote Link to comment Share on other sites More sharing options...
blowfish Posted December 10, 2017 Share Posted December 10, 2017 (edited) 21 minutes ago, AngrybobH said: Can you NEEDS twice or more? You can put more than one mod in a NEEDS block, separated by & or , (meaning and), or | (or), e.g. :NEEDS[mod1,mod2] Edited December 10, 2017 by blowfish Quote Link to comment Share on other sites More sharing options...
New Horizons Posted December 10, 2017 Share Posted December 10, 2017 I learned so much tonight. Thank you all! Now I can begin to reduce those warnings and then focus on real improvements of my heavily moded game folder. Quote Link to comment Share on other sites More sharing options...
sarbian Posted December 11, 2017 Author Share Posted December 11, 2017 On 10/12/2017 at 5:20 PM, maja said: Hi sarbian, did you have time to build a custom 2.8.1 or am I looking for something not done yet? Sorry about the delay Here is the 2.8 version with included -mm-dump command. https://www.dropbox.com/s/g78d7jggeoz0kwv/ModuleManager.2.8.withdump.dll?dl=0 Quote Link to comment Share on other sites More sharing options...
maja Posted December 11, 2017 Share Posted December 11, 2017 1 hour ago, sarbian said: Sorry about the delay Here is the 2.8 version with included -mm-dump command. https://www.dropbox.com/s/g78d7jggeoz0kwv/ModuleManager.2.8.withdump.dll?dl=0 No problem at all and thanks. I have a lot of other things to do too. I searched in the github and jenkins repo and when I didn't found anything I asked Quote Link to comment Share on other sites More sharing options...
Electrocutor Posted December 13, 2017 Share Posted December 13, 2017 so... is it designed behavior for any cloned parts to also be affected by future cfg edits to their parent? Test.cfg: +PART[fuelTank] { @name = TestFuelTank @title = TestFuelTank @mesh = Squad/Parts/FuelTank/fuelTankT400/model -mesh = DELETE -MODEL {} MODEL { model = Test/fuelTank } } ModuleManager.ConfigCache: UrlConfig { name = TestFuelTank type = PART parentUrl = Squad/Parts/FuelTank/fuelTankT400/fuelTankT400 PART { name = TestFuelTank ... MODEL { model = VenStockRevamp/Squad/Parts/Propulsion/T400Tank } } } Quote Link to comment Share on other sites More sharing options...
Sigma88 Posted December 13, 2017 Share Posted December 13, 2017 (edited) 20 minutes ago, Electrocutor said: so... is it designed behavior for any cloned parts to also be affected by future cfg edits to their parent? mm patches don't target cfgs, they target nodes. depending on how the patch is applied it may or may not apply to the cloned part. first of all the cloning happens at a certain time, so the part is cloned in the state it is at the moment of cloning. after the cloning, if a patch starts with: @PART it will affect all parts (included the clones) if it specifies the name for example: @PART[fuelTank] it will affect only the original "fuelTank" part and not the clone (since it has a different 'name' ) if it uses some different method like: @PART:HAS[#title[fuelTank]] it might still fail (like in this case) if your cloning process messed up the particular value the patch is looking for bottom line, if you want your cloned part to get all the patches of the original, just clone it at the end using :FINAL (for personal use) or :FOR[zzzzzzYourMod] (if you are releasing it with a mod) on the other hand, if you don't want your part to be affected by any other patch, I don't think there is a way to do that ( @sarbian / @blowfish please correct me if I'm wrong on this last point) Edited December 13, 2017 by Sigma88 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.