Jognt Posted November 8, 2019 Share Posted November 8, 2019 (edited) 1 hour ago, maja said: Hi, I found in USI Tools two patches, that aren't for some reason applied. I tried to find a solution but to no avail, so I'm here The two patches are following: @PART[*]:HAS[!MODULE[USI_ModuleFieldRepair],@RESOURCE[Machinery|EnrichedUranium|DepletedFuel|Recyclables]]:FOR[USITools] { MODULE { name = USI_ModuleFieldRepair } } @PART[*]:HAS[!MODULE[USI_ModuleRecycleBin],@RESOURCE[MaterialKits]]:FOR[USITools] { MODULE { name = USI_ModuleRecycleBin } } If I omit the @RESOURCE part in the HAS block, then the patches are applied as intended. What's wrong there? You can’t use OR or | in a HAS block. Though it should work but be limited to only the first entry, in this case: Machinery. Edited November 8, 2019 by Jognt Quote Link to comment Share on other sites More sharing options...
maja Posted November 8, 2019 Share Posted November 8, 2019 (edited) 10 hours ago, Jognt said: You can’t use OR or | in a HAS block. Though it should work but be limited to only the first entry, in this case: Machinery. That may be it. The second one will not be working on the part I tried, because it doesn't have MaterialKits as I recall. I must test it more. Thanks EDIT: When I splitted it, it worked. I can continue in my game Edited November 8, 2019 by maja Quote Link to comment Share on other sites More sharing options...
DoktorKrogg Posted November 8, 2019 Share Posted November 8, 2019 13 hours ago, Jognt said: You can’t use OR or | in a HAS block. Is this explained on the wiki somewhere and I'm just not seeing it? Quote Link to comment Share on other sites More sharing options...
maja Posted November 8, 2019 Share Posted November 8, 2019 1 hour ago, DoktorKrogg said: Is this explained on the wiki somewhere and I'm just not seeing it? I tried to find that yesterday. If it is there, then I didn't saw that either. Quote Link to comment Share on other sites More sharing options...
Gordon Dry Posted November 8, 2019 Share Posted November 8, 2019 (edited) yelp! I use MM 4.1.1 which only got one small change about Firespitter warning message. So besides that it should be the same as MM 4.1.0, right? Now I got something weird, I guess my game is borked because of this (and other still unrecovered ones): I got NOT RP-0 (aka. RP-1) installed I got the part Utility_InfoDrive installed (solo, extracted from B9_Aerospace, worked for long time this way) I got a patch in my zFinal folder: @PART[Utility_InfoDrive]:NEEDS[B9_Aerospace,RP-0] { @TechRequired = unlockParts %RSSROConfig = true %RP0conf = true } @PART[Utility_InfoDrive]:NEEDS[B9_InfoDrive,RP-0] { @TechRequired = unlockParts %RSSROConfig = true %RP0conf = true } This patch worked until I went on hiatus 3 months ago. Now without RP-1 in my setup, the MM cache tells me this: UrlConfig { parentUrl = B9_InfoDrive/Parts/Utility_InfoDrive/Utility_InfoDrive.cfg PART { name = Utility_InfoDrive module = Part author = Snjo + bac9 mesh = model.mu scale = 1 node_attach = 0, 0.0, 0, 0.0, -1.0, 0.0 TechRequired = unlockParts ... RSSROConfig = true RP0conf = true ... So, what is wrong? Is the MM syntax logic totally changed? Does a comma in a NEEDS is no more an AND but an OR now? Edited November 8, 2019 by Gordon Dry Quote Link to comment Share on other sites More sharing options...
HansAcker Posted November 8, 2019 Share Posted November 8, 2019 28 minutes ago, Gordon Dry said: I got NOT RP-0 (aka. RP-1) installed The installation instructions for RP-1 say: Quote Download the RC Branch of RP-1 from here: https://github.com/KSP-RO/RP-0/tree/RC Inside the downloaded zip, navigate to the GameData folder and copy the RP-0 folder into your installed GameData folder. That would mean RP-1 is installed in a directory named "RP-0". The :NEEDS[...,RP-0] would still match because of this (or if there's any directory named "RP-0" anywhere in your GameData folder). 32 minutes ago, Gordon Dry said: This patch worked until I went on hiatus 3 months ago. Odd. Did you reinstall RP-1 since then? Quote Link to comment Share on other sites More sharing options...
New Horizons Posted November 8, 2019 Share Posted November 8, 2019 One little question form learnng baout how to read MM scripts. @PART[mk1pod_v2]:FOR[RealismOverhaul]:NEEDS[!ReStock] { } This is only executed, when ReStock ist isn't installed, right? Quote Link to comment Share on other sites More sharing options...
Gordon Dry Posted November 8, 2019 Share Posted November 8, 2019 @HansAcker for heaven's sake - that was not my question. I DID NOT install RP-0 aka RP-1 but the result of the MM patching is if I would have. Come on. Quote Link to comment Share on other sites More sharing options...
HansAcker Posted November 8, 2019 Share Posted November 8, 2019 21 minutes ago, Gordon Dry said: I DID NOT install RP-0 aka RP-1 but the result of the MM patching is if I would have. I see. I read "I got NOT RP-0 (aka. RP-1) installed" as "(NOT RP-0)" so as to mean "I got RP-1 installed". Still, if there's any directory named RP-0 anywhere, it would match. It certainly doesn't in my RP-0-less install, even though I copied the InfoDrive parts into B9_InfoDrive: Quote Mods by directory (sub directories of GameData): B9_InfoDrive Deleting root node in file test node: @PART[Utility_InfoDrive]:NEEDS[B9_InfoDrive,RP-0] as it can't satisfy its NEEDS Quote Link to comment Share on other sites More sharing options...
Gordon Dry Posted November 8, 2019 Share Posted November 8, 2019 (edited) @HansAcker I got the same in my MM log Deleting root node in file B9_InfoDrive/Parts/RO_RP-1_patch node: @PART[Utility_InfoDrive]:NEEDS[B9_Aerospace,RP-0] as it can't satisfy its NEEDS and this is the weirdness - that means that patch is ignored - so why then the MM cache looks like the patch was NOT ignored? btw there is ofc no RP-0 folder, just to make it clear. @HansAcker but the OTHER patch is not ignored, the 2nd one I listed above @PART[Utility_InfoDrive]:NEEDS[B9_InfoDrive,RP-0] { @TechRequired = unlockParts %RSSROConfig = true %RP0conf = true } So, this one is applied. But still - why? There is NO RP-0 existing at all, so this ALSO has to be ignored. @blowfish @sarbian could it be, that when in a NEEDS is an underscore _ that a following , is misinterpreted? I'm replacing the , with an & and try again. Edited November 8, 2019 by Gordon Dry Quote Link to comment Share on other sites More sharing options...
Gordon Dry Posted November 8, 2019 Share Posted November 8, 2019 ^nope, same result New question, slightly rephrased:@blowfish @sarbian could it be, that when inside a NEEDS is an underscore _ that a following comma , or ampersand & is misinterpreted? Now I'm trying again by switching the places inside that patch and using a comma again: @PART[Utility_InfoDrive]:NEEDS[RP-0,B9_Aerospace] { @TechRequired = unlockParts %RSSROConfig = true %RP0conf = true } @PART[Utility_InfoDrive]:NEEDS[RP-0,B9_InfoDrive] { @TechRequired = unlockParts %RSSROConfig = true %RP0conf = true } Quote Link to comment Share on other sites More sharing options...
blowfish Posted November 8, 2019 Share Posted November 8, 2019 There have been no recent changes to this functionality. And nothing in that logic cares about underscores. Post your full log and ConfigCache as usual and I will look at what's going on. Quote Link to comment Share on other sites More sharing options...
Gordon Dry Posted November 8, 2019 Share Posted November 8, 2019 Oh for sake of it - I found it. A bad malformed MM syntax at another place. I will inform the guy asap. (It got a FOR where it does not belong - outside of the mentioned mod - you know what I mean) Quote Link to comment Share on other sites More sharing options...
blowfish Posted November 8, 2019 Share Posted November 8, 2019 Just now, Gordon Dry said: Oh for sake of it - I found it. A bad malformed MM syntax at another place. I will inform the guy asap. (It got a FOR where it does not belong - outside of the mentioned mod - you know what I mean) yes, that's usually what it is (and the first thing I was going to look for in the logs) Quote Link to comment Share on other sites More sharing options...
Gordon Dry Posted November 8, 2019 Share Posted November 8, 2019 21 minutes ago, blowfish said: yes, that's usually what it is (and the first thing I was going to look for in the logs) The logs did not point me in the right direction. I needed to stumble upon it after some searching inside all *.cfg Quote Link to comment Share on other sites More sharing options...
Jognt Posted November 8, 2019 Share Posted November 8, 2019 (edited) 58 minutes ago, Gordon Dry said: The logs did not point me in the right direction. I needed to stumble upon it after some searching inside all *.cfg Well the log would tell you that both requirements have their passes fulfilled, which would tell you it got defined somewhere, which would tell you to do a quick search for what patch does its thing in the wrongly defined FOR pass, which would point you right where you'd need to look. 5 hours ago, maja said: I tried to find that yesterday. If it is there, then I didn't saw that either. 7 hours ago, DoktorKrogg said: Is this explained on the wiki somewhere and I'm just not seeing it? It's .. ehhh.. somewhere in this thread I think. I learned this the same way as you did, by asking in this thread why my patch wasn't working. Edit: I've edited the Wiki to add a line about using OR in HAS blocks and hope to god I did it properly. Edited November 8, 2019 by Jognt Quote Link to comment Share on other sites More sharing options...
blowfish Posted November 9, 2019 Share Posted November 9, 2019 5 hours ago, Gordon Dry said: The logs did not point me in the right direction. I needed to stumble upon it after some searching inside all *.cfg If there was a patch with :FOR[RP-0] it would have shown up in the log Quote Link to comment Share on other sites More sharing options...
NermNermNerm Posted November 11, 2019 Share Posted November 11, 2019 So there I was, minding my own business, trying to figure out how to do animations in blender/unity/ksp/etc and was trying to gain some wisdom from this video: And at 11:18, he's in the KSP and his part is not all that he hopes for, he goes to the Space Center view in KSP, there's a ModuleManager dialog there and lo, it contains a "Reload Database" button. He presses it and tada! The fixes he just applied outside of the game are now in force in his game. No restarting KSP required! I've never seen a ModuleManager dialog. How is this magic worked? The video is pretty old so maybe it used to be a thing & isn't anymore... Quote Link to comment Share on other sites More sharing options...
Sahadara Posted November 15, 2019 Share Posted November 15, 2019 Is there a way to edit all parts from a given mod? Say I wanted to scale up every part from one mod, how might I write a patch that scales them all by the same factor? Is this possible or would I need to specify each part in the patch? Sorry if this is in the wiki. I looked and couldn't seem to find it. Thanks for any help. Quote Link to comment Share on other sites More sharing options...
sarbian Posted November 15, 2019 Author Share Posted November 15, 2019 Version 4.1.2 Add an Exception interceptor to catch ReflectionTypeLoadException and properly blame broken DLLs Downloads : ModuleManager-4.1.2.zip ModuleManager.4.1.2.dll Quote Link to comment Share on other sites More sharing options...
Drew Kerman Posted November 16, 2019 Share Posted November 16, 2019 (edited) 3 hours ago, Sahadara said: Is there a way to edit all parts from a given mod? you'll have to look for a common identifier in the part configs. Some mods prefix the name field. There's also the author field. Maybe they are using their own manufacturer name, or a custom tag in the tags property. Maybe also all the MODEL paths are pointing to a specific mod folder you can use to ID the parts Edited November 16, 2019 by Drew Kerman Quote Link to comment Share on other sites More sharing options...
Sahadara Posted November 16, 2019 Share Posted November 16, 2019 So if I found a common identifier in all the parts, how would I then target all parts with that identifier? Sorry I'm very new to creating patches. Quote Link to comment Share on other sites More sharing options...
HansAcker Posted November 16, 2019 Share Posted November 16, 2019 8 minutes ago, Sahadara said: So if I found a common identifier in all the parts, how would I then target all parts with that identifier? By writing a suitable filter, probably including :HAS[...]. See the examples in the MM handbook and syntax description. Which common identifier do you try to target? Quote Link to comment Share on other sites More sharing options...
Sahadara Posted November 16, 2019 Share Posted November 16, 2019 1 minute ago, HansAcker said: By writing a suitable filter, probably including :HAS[...]. See the examples in the MM handbook and syntax description. Which common identifier do you try to target? Oh that's weird it didn't quote like I meant it to. I haven't found one yet I'll have to look. But thank you for the help! I'm just trying to figure out how to apply a patch to every part from a mod. Quote Link to comment Share on other sites More sharing options...
Jognt Posted November 17, 2019 Share Posted November 17, 2019 4 hours ago, HansAcker said: By writing a suitable filter, probably including :HAS[...]. See the examples in the MM handbook and syntax description. Which common identifier do you try to target? That technically depends on the thing you’re filtering for, but it’ll most likely involve a HAS block. I recommend you check the github wiki for the MM basics. It may be educational to check some simple CFGs for how basic MM patches look. Most mods have will have some. 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.