Psycho_zs Posted March 26, 2018 Share Posted March 26, 2018 1 minute ago, leatherneck6017 said: I just added individual selectors for what I was trying to do That's what I ended up with for now: Quote Link to comment Share on other sites More sharing options...
Eleusis La Arwall Posted March 26, 2018 Share Posted March 26, 2018 1 hour ago, Psycho_zs said: That's what I ended up with for now: An interesting problem. I couldn't find a solution to filter the same key for various exact matches, so I came up with a patch that adds a new key with identical values for all matches: @PART[*]:HAS[@MODULE[ModuleDockingNode]:HAS[#nodeType[size?]]]:BEFORE[stockSizeDockingPortPatch] { @MODULE[ModuleDockingNode]:HAS[#nodeType[size0]],*{stockSizeDockingPort = true} @MODULE[ModuleDockingNode]:HAS[#nodeType[size1]],*{stockSizeDockingPort = true} @MODULE[ModuleDockingNode]:HAS[#nodeType[size2]],*{stockSizeDockingPort = true} } @PART[*]:HAS[@MODULE[ModuleDockingNode]:HAS[#stockSizeDockingPort[true]]]:FOR[stockSizeDockingPortPatch] { @MODULE[ModuleDockingNode],* { // If you want X degrees wide margin, use cos(0.5*X) as captureMinRollDot // 0.5 degrees = 0.99999048 // 1 degree = 0.99996192 // 2 degrees = 0.9998477 // 3 degrees = 0.99965732 // 5 degrees = 0.99904822 %captureMinRollDot:NEEDS[!DockRotate] = 0.99996192 // more relaxed version to use with DockRotate %captureMinRollDot:NEEDS[DockRotate] = 0.99904822 %snapRotation = true %snapOffset = 30 } } @PART[*]:HAS[@MODULE[ModuleDockingNode]:HAS[#stockSizeDockingPort[*]]]:FINAL { @MODULE[ModuleDockingNode],*{!stockSizeDockingPort = true} } ( stockSizeDockingPort is key I made up, not a real one.) I'd really like to see a more elegant solution. Quote Link to comment Share on other sites More sharing options...
blowfish Posted March 26, 2018 Share Posted March 26, 2018 (edited) Or does not work in a :HAS block (only a :NEEDS block) It's something I would like to work on eventually, but the code is not currently in a state where I would feel comfortable making that change without potentially breaking something else. Edited March 26, 2018 by blowfish Quote Link to comment Share on other sites More sharing options...
leatherneck6017 Posted March 26, 2018 Share Posted March 26, 2018 1 hour ago, blowfish said: Or does not work in a :HAS block (only a :NEEDS block) It's something I would like to work on eventually, but the code is not currently in a state where I would feel comfortable making that change without potentially breaking something else. Interesting. Well thanks for the definitive answer. Quote Link to comment Share on other sites More sharing options...
Apaseall Posted March 30, 2018 Share Posted March 30, 2018 I have an question. Say the there is a mod. Now I want to add a patch to that mod. Straight forward. Now say the mod does something like this: Spoiler BLAH:NEEDS[MOD1|MOD2|MOD3|MOD4|MOD5|MOD6|MOD7] { name = Foo name1 = value1 name2 = value2 name3 = value3 name4 = value4 name5 = } @BLAH[Foo]:NEEDS[MOD1|MOD2|MOD3|MOD4|MOD5|MOD6|MOD7] { @name5 ^= :$: name5a value5a;: } @BLAH[Foo]:NEEDS[MOD1] { @name5 ^= :$: name5b value5b; name5c value5c; name5d value5d; name5e value5e;: } Normally I would do something like: Spoiler @BLAH[Foo] { %name5 ^= :$: name5f value5f; name5g value5g; name5h value5h;: } Now say I have MOD8? If I have both MOD1 and MOD8 I would: Spoiler @BLAH[Foo]:NEEDS[originatingMOD&MOD8]:AFTER[MOD8] { %name5 ^= :$: name5f value5f; name5g value5g; name5h value5h;: } If I do not have or cannot be sure that I have any of MOD1-7, I tried: Spoiler %BLAH[Foo]:NEEDS[originatingMOD&MOD8]:AFTER[MOD8] { %name1 = value1 %name2 = value2 %name3 = value3 %name4 = value4 %name5 ^= :$: name5f value5f; name5g value5g; name5h value5h;: } Which threw me an error, "Error - replace command (%) is not valid on a root node:" I am thinking that what I could do is test to see if BLAH[Foo] does not exist and create it. Then I can do my @BLAH[Foo] since either BLAH[Foo] was created by originatingMOD or just now by my patch. Does my question make sense? Am I correct in my approach to the solution? How do I write the test? Forgive me if this is something trivial, I am learning about patches but this is a new issue for me. Quote Link to comment Share on other sites More sharing options...
Warezcrawler Posted March 30, 2018 Share Posted March 30, 2018 4 minutes ago, Apaseall said: I have an question. Say the there is a mod. Now I want to add a patch to that mod. Straight forward. Now say the mod does something like this: Reveal hidden contents BLAH:NEEDS[MOD1|MOD2|MOD3|MOD4|MOD5|MOD6|MOD7] { name = Foo name1 = value1 name2 = value2 name3 = value3 name4 = value4 name5 = } @BLAH[Foo]:NEEDS[MOD1|MOD2|MOD3|MOD4|MOD5|MOD6|MOD7] { @name5 ^= :$: name5a value5a;: } @BLAH[Foo]:NEEDS[MOD1] { @name5 ^= :$: name5b value5b; name5c value5c; name5d value5d; name5e value5e;: } Normally I would do something like: Reveal hidden contents @BLAH[Foo] { %name5 ^= :$: name5f value5f; name5g value5g; name5h value5h;: } Now say I have MOD8? If I have both MOD1 and MOD8 I would: Reveal hidden contents @BLAH[Foo]:NEEDS[originatingMOD&MOD8]:AFTER[MOD8] { %name5 ^= :$: name5f value5f; name5g value5g; name5h value5h;: } If I do not have or cannot be sure that I have any of MOD1-7, I tried: Hide contents %BLAH[Foo]:NEEDS[originatingMOD&MOD8]:AFTER[MOD8] { %name1 = value1 %name2 = value2 %name3 = value3 %name4 = value4 %name5 ^= :$: name5f value5f; name5g value5g; name5h value5h;: } Which threw me an error, "Error - replace command (%) is not valid on a root node:" I am thinking that what I could do is test to see if BLAH[Foo] does not exist and create it. Then I can do my @BLAH[Foo] since either BLAH[Foo] was created by originatingMOD or just now by my patch. Does my question make sense? Am I correct in my approach to the solution? How do I write the test? Forgive me if this is something trivial, I am learning about patches but this is a new issue for me. Seem that you have made a complicated case. I usually use :NEEDS to test if one or several relevant mods exist or not, depending of what I want to achieve. That way you can have a create node, and a modify node based on which case you are hitting. Quote Link to comment Share on other sites More sharing options...
Apaseall Posted March 30, 2018 Share Posted March 30, 2018 Thanks for the reply @Warezcrawler hmm I immediately thought something like: Spoiler BLAH[Foo]:NEEDS[originatingMOD&!MOD1|!MOD2|!MOD3|!MOD4|!MOD5|!MOD6|!MOD7] But I doubt if that will work as it wants to manipulate BLAH[Foo]. I wonder if I can move up a step like: Spoiler originatingMOD[BLAH]:HAS[!Foo]:NEEDS[originatingMOD] { BLAH { name = Foo name1 = value1 name2 = value2 name3 = value3 name4 = value4 name5 = } } Any ideas on if that would work? Currently in the game I want to mod, so cannot or don't want to test it ASAP lol. Quote Link to comment Share on other sites More sharing options...
Electrocutor Posted April 1, 2018 Share Posted April 1, 2018 I'd completely forgotten about the rainbow poptart kitty. Quote Link to comment Share on other sites More sharing options...
snkiz Posted April 1, 2018 Share Posted April 1, 2018 this is what I see in my mind when I read the release name https://goo.gl/images/tjKcSc Quote Link to comment Share on other sites More sharing options...
HaydenTheKing Posted April 2, 2018 Share Posted April 2, 2018 (edited) . Edited April 2, 2018 by HaydenTheKing redundent Quote Link to comment Share on other sites More sharing options...
HaydenTheKing Posted April 2, 2018 Share Posted April 2, 2018 Where do I find 3.0.3.dll? I'm trying to update my game to 1.3.1? Quote Link to comment Share on other sites More sharing options...
sarbian Posted April 2, 2018 Author Share Posted April 2, 2018 34 minutes ago, HaydenTheKing said: Where do I find 3.0.3.dll? I'm trying to update my game to 1.3.1? The last one for 1.3 is https://ksp.sarbian.com/jenkins/job/ModuleManager/138/artifact/ModuleManager.3.0.4.dll Quote Link to comment Share on other sites More sharing options...
HaydenTheKing Posted April 2, 2018 Share Posted April 2, 2018 2 hours ago, sarbian said: The last one for 1.3 is https://ksp.sarbian.com/jenkins/job/ModuleManager/138/artifact/ModuleManager.3.0.4.dll Thanks!! Quote Link to comment Share on other sites More sharing options...
Apaseall Posted April 2, 2018 Share Posted April 2, 2018 (edited) To answer my own question, read back a few posts, this appears to be the solution: Spoiler @originatingMOD:HAS[!BLAH[Foo]]:NEEDS[originatingMOD&MOD8]:AFTER[MOD8] { BLAH { name = Foo name1 = value1 name2 = value2 name3 = value3 name5 = } } @BLAH[Foo]:NEEDS[originatingMOD&MOD8]:AFTER[MOD8] { @name5 ^= :$: name5f value5f; name5g value5g; name5h value5h;: } The original question goes something like this; How to write a patch to add additional name value pairs to name5. In this case I am adding support for MOD8 which did not exist or was not supported when originatingMOD was written/updated. I do not want to bother the originatingMOD author, hence writing my own patch. The problem is that in the originatingMOD the node BLAH[Foo] is only created if its own :NEEDS are satisfied. Again MOD8 is not tested in originatingMOD, so BLAH[Foo] is not created for MOD8. Thus depending on which other mods were present, when my patch runs there may or may not be BLAH[Foo]. My solution is to check if BLAH[Foo] exists, create it if it does not and then add the additional name value pairs to name5. The observant will note that this is not a PART. No dll for originatingMOD exists. :FOR is not used in the originatingMOD. BLAH only exists in terms of BLAH[something1], BLAH[something2] etc. BLAH is not a sub node, other than being a .cfg file named BLAHs in the folder originatingMOD. For the curious, here is the ModuleManager.ConfigCache entry: Spoiler UrlConfig { name = Foo type = BLAH parentUrl = originatingMOD/BLAHs BLAH { name = Foo name1 = value1 name2 = value2 name3 = value3 name5 = name5f value5f; name5g value5g; name5h value5h;: } } This appears to be of the same format and structure of the preexisting unmodified entries for other BLAH[something1], BLAH[something2] etc. Feel free to tell me if I am making an incorrect assumption, going about this in an inappropriate way or anything else. Edited April 2, 2018 by Apaseall Quote Link to comment Share on other sites More sharing options...
nickicool Posted April 5, 2018 Share Posted April 5, 2018 On 02.04.2018 at 2:10 PM, sarbian said: The last one for 1.3 is https://ksp.sarbian.com/jenkins/job/ModuleManager/138/artifact/ModuleManager.3.0.4.dll Hi friends! I play on 1.3.1 with 130mods and MM-2.8.1. I some mods updated, and in archive i find new MM-3.0.4. If i used this new version, on load screen module manages show errors. Is this mean, all installed mods, for correct working, needs updated for MM-3.0.4? Quote Link to comment Share on other sites More sharing options...
JadeOfMaar Posted April 5, 2018 Share Posted April 5, 2018 13 minutes ago, nickicool said: Hi friends! I play on 1.3.1 with 130mods and MM-2.8.1. I some mods updated, and in archive i find new MM-3.0.4. If i used this new version, on load screen module manages show errors. Is this mean, all installed mods, for correct working, needs updated for MM-3.0.4? The entire time, MM has been quiet about bad syntax. From 3.0, MM stopped being quiet. That's all. The modding community particularly needs a siren to blow at it for the misuse or :FOR, and attempts to use :BEFORE and :AFTER in the same patch config. Quote Link to comment Share on other sites More sharing options...
nickicool Posted April 5, 2018 Share Posted April 5, 2018 4 hours ago, JadeOfMaar said: The entire time, MM has been quiet about bad syntax. From 3.0, MM stopped being quiet. That's all. The modding community particularly needs a siren to blow at it for the misuse or :FOR, and attempts to use :BEFORE and :AFTER in the same patch config. Are you telling me that I can not be afraid that something will stop working just because of using the MM-3.0.4 instead of the MM-2.8.1? Even if there were error messages like this? Screenshot https://yadi.sk/i/qJKTrhuQ3U94fu Quote Link to comment Share on other sites More sharing options...
TranceaddicT Posted April 5, 2018 Share Posted April 5, 2018 3 minutes ago, nickicool said: Are you telling me that I can not be afraid that something will stop working just because of using the MM-3.0.4 instead of the MM-2.8.1? Even if there were error messages like this? Screenshot https://yadi.sk/i/qJKTrhuQ3U94fu The errors were there in 2.8.x; you just didn't know about them. Since you weren't afraid of what was happening in MM-2.8.x, when you didn't see the errors, you don't need to be ANY MORE afraid of the additional information revealed by MM-3.x. Quote Link to comment Share on other sites More sharing options...
Starwaster Posted April 6, 2018 Share Posted April 6, 2018 (edited) @nickicool To put it even more bluntly than @TranceaddicT, using an older version of MM is the equivalent of burying your head in the sand and pretending the errors don't exist. The errors are still there in 2.8 even if you don't see them. The correct solution is for the problematic configs to be corrected. Something that wasn't possible before you knew about the errors. Go forth now and report the errors to SETIRebalance. (check first that they aren't already aware of the problem in case it's already been fixed) You're welcome Edited April 6, 2018 by Starwaster Quote Link to comment Share on other sites More sharing options...
Dr Farnsworth Posted April 8, 2018 Share Posted April 8, 2018 My computer is not liking the .3.0.6.dll at all. Windows defender is saying that it has the "Trojan:Win32/Critet.BS" malware in it. Please advise. Quote Link to comment Share on other sites More sharing options...
leatherneck6017 Posted April 8, 2018 Share Posted April 8, 2018 4 minutes ago, Dr Farnsworth said: My computer is not liking the .3.0.6.dll at all. Windows defender is saying that it has the "Trojan:Win32/Critet.BS" malware in it. Please advise. On 3/16/2018 at 2:59 PM, sarbian said: Defender marked a bunch of KSP file as a virus : Update your definition manually and it should be gone: https://www.microsoft.com/en-us/wdsi/definitions Quote Link to comment Share on other sites More sharing options...
Dr Farnsworth Posted April 8, 2018 Share Posted April 8, 2018 12 minutes ago, leatherneck6017 said: Wow, that was a fast reply! Thank you Leatherneck. Quote Link to comment Share on other sites More sharing options...
Kwebib Posted April 10, 2018 Share Posted April 10, 2018 (edited) All the custom patches I have that use @PART are working, but for some reason I can't get edits to EXPERIMENT_DEFINITION to work. For testing purposes, I've tried this and it doesn't work: @EXPERIMENT_DEFINITION[*]:HAS[#id[temperatureScan]]:FINAL { @baseValue = 4000 @scienceCap = 4000 } The thermometer still gives the stock science value. Any ideas? Edited April 10, 2018 by Kwebib Quote Link to comment Share on other sites More sharing options...
maja Posted April 10, 2018 Share Posted April 10, 2018 1 hour ago, Kwebib said: All the custom patches I have that use @PART are working, but for some reason I can't get edits to EXPERIMENT_DEFINITION to work. For testing purposes, I've tried this and it doesn't work: @EXPERIMENT_DEFINITION[*]:HAS[#id[temperatureScan]]:FINAL { @baseValue = 4000 @scienceCap = 4000 } The thermometer still gives the stock science value. Any ideas? Try to remove "[*]" from the patch. Quote Link to comment Share on other sites More sharing options...
Mark Kerbin Posted April 10, 2018 Share Posted April 10, 2018 On 4/8/2018 at 3:38 PM, Dr Farnsworth said: My computer is not liking the .3.0.6.dll at all. Windows defender is saying that it has the "Trojan:Win32/Critet.BS" malware in it. Please advise. You good now? I can advise further if you need. 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.