saabstory88 Posted August 29, 2014 Share Posted August 29, 2014 (edited) Greetings,Are other logical operators, besides simple boolean equivalence, currently implemented inside of the :HAS function when searching for parts to patch? Let me clarify, I am looking to search for parts with specific ranges of vacuum ISP. I would prefer not to have to create a 450+ section configuration file for this task, but i understand is this is simply what will have to be done. I am working on a sort of "Real Fuels Lite", for lack of a better term, simply matching only a couple types of imaginary fuels (and oxidizers) with specific ranges of ISP, just to make things more interesting than stock, but still have the ability to do relatively simple orbital refueling. Obviously, because I am only looking to break this up into three or four ranges of ISP performance, it would be convenient to only have to write a couple segments of code, instead of 450+, which would make the tweaking process much faster. Thanks! Edited August 29, 2014 by saabstory88 Quote Link to comment Share on other sites More sharing options...
NathanKell Posted August 29, 2014 Share Posted August 29, 2014 Nope, only equivalence is tested. Quote Link to comment Share on other sites More sharing options...
saabstory88 Posted August 29, 2014 Share Posted August 29, 2014 Nope, only equivalence is tested.Thanks! And thanks for the inspiration, I have very much enjoyed your work. Quote Link to comment Share on other sites More sharing options...
saabstory88 Posted August 30, 2014 Share Posted August 30, 2014 (edited) Having a bit of a snag searching for components to patch. I have tried the following configuration, with no matches, and no patches applied. Searching for all liquid fuel engines with an vac isp (key=0 390) of 390, of which I know at least one exists in the stock game. I am assuming I have made a syntax error, can someone give me direction on this?I am using the latest release: 2.3.1My code:@PART[*]:HAS[@MODULE[ModuleEngines]:HAS[@atmosphereCurve[0?390]]]:HAS[@MODULE[ModuleEngines]:HAS[@PROPELLANT[LiquidFuel]]]:FOR[MoreRealisticFuels]Log snippet:[LOG 20:57:55.080] [ModuleManager] Checking NEEDS.[LOG 20:57:55.103] [ModuleManager] :FIRST (default) pass[LOG 20:57:55.105] [ModuleManager] :BEFORE[ASSEMBLY-CSHARP] pass[LOG 20:57:55.106] [ModuleManager] :FOR[ASSEMBLY-CSHARP] pass[LOG 20:57:55.107] [ModuleManager] :AFTER[ASSEMBLY-CSHARP] pass[LOG 20:57:55.108] [ModuleManager] :BEFORE[MODULEMANAGER.2.3.1] pass[LOG 20:57:55.109] [ModuleManager] :FOR[MODULEMANAGER.2.3.1] pass[LOG 20:57:55.110] [ModuleManager] :AFTER[MODULEMANAGER.2.3.1] pass[LOG 20:57:55.111] [ModuleManager] :BEFORE[MOREREALISTICFUELS] pass[LOG 20:57:55.112] [ModuleManager] :FOR[MOREREALISTICFUELS] pass[LOG 20:57:55.242] [ModuleManager] :AFTER[MOREREALISTICFUELS] pass[LOG 20:57:55.243] [ModuleManager] :BEFORE[NASAMISSION] pass[LOG 20:57:55.244] [ModuleManager] :FOR[NASAMISSION] pass[LOG 20:57:55.244] [ModuleManager] :AFTER[NASAMISSION] pass[LOG 20:57:55.245] [ModuleManager] :BEFORE[SQUAD] pass[LOG 20:57:55.245] [ModuleManager] :FOR[SQUAD] pass[LOG 20:57:55.246] [ModuleManager] :AFTER[SQUAD] pass[LOG 20:57:55.247] [ModuleManager] :FINAL pass[LOG 20:57:55.249] [ModuleManager] ModuleManager: 0 patches applied, 0 hidden items Edited August 30, 2014 by saabstory88 Clarity Quote Link to comment Share on other sites More sharing options...
Mecripp Posted August 30, 2014 Share Posted August 30, 2014 (edited) Think you need something like this @PART[*]:HAS[ @MODULE[ModuleEngines] , @atmosphereCurve[0?390] ] ]:HAS[@MODULE[ ModuleEngines] , @PROPELLANT[LiquidFuel]]]:FOR[MoreRealisticFuels] Or @PART[*]:HAS[ @MODULE[ModuleEngines]:HAS[ @atmosphereCurve[0?390] ] ]:HAS[@MODULE[ ModuleEngines]:HAS[ @PROPELLANT[LiquidFuel] ] ]:FOR[MoreRealisticFuels]EDIT- by look at the examples Search for module with a specific configurationAll PART who have a ModuleEngines using XenonGas as a propelant (space for clarity)Code:@PART[*]:HAS[ @MODULE[ModuleEngines]:HAS[ @PROPELLANT[XenonGas] ] ]{ ...(stuff)}Combine searchAll PART who have a ModuleEngines and have a SolidFuel ressource (space added for clarity)Code:@PART[*]:HAS[ @MODULE[ModuleEngines] , @RESOURCE[solidFuel] ] { ...(stuff)} Edited August 30, 2014 by Mecripp2 Quote Link to comment Share on other sites More sharing options...
saabstory88 Posted August 30, 2014 Share Posted August 30, 2014 (edited) I must be misunderstanding something even more basic. I created the following, to do a basic swap of resource types in the stock tanks (obviously this is not the final version of this file). This is the file in its entirety. It does not function as I would expect.Edit: I went ahead and checked, I can successfully make changes using the @PART[*] command with no arguments. However, this is not ultimately what I would like to do. KSP.log and Player.log do not show anything which helps me debug this.Permutations:@PART[*]:HAS[RESOURCE[LiquidFuel]]:AFTER[Squad]:FOR[MoreRealisticFuels]{ @RESOURCE[LiquidFuel] { @name = LiquidH2 } @RESOURCE[Oxidizer] { @name = LiquidO2 }}@PART[*]:HAS[RESOURCE[LiquidFuel]]:AFTER[Squad]{ @RESOURCE[LiquidFuel] { @name = LiquidH2 } @RESOURCE[Oxidizer] { @name = LiquidO2 }}@PART[*]:HAS[RESOURCE[LiquidFuel]]:FOR[MoreRealisticFuels]{ @RESOURCE[LiquidFuel] { @name = LiquidH2 } @RESOURCE[Oxidizer] { @name = LiquidO2 }}This is still a no go. Edited August 30, 2014 by saabstory88 Clarity Quote Link to comment Share on other sites More sharing options...
Mecripp Posted August 30, 2014 Share Posted August 30, 2014 If your wanting to change name @PART[*]{ //!RESOURCE[LiquidFuel] {} //!RESOURCE[Oxidizer] {} @RESOURCE[LiquidFuel] { @name = LiquidH2 } @RESOURCE[Oxidizer] { @name = LiquidO2 }} should work. Quote Link to comment Share on other sites More sharing options...
saabstory88 Posted August 30, 2014 Share Posted August 30, 2014 (edited) Aha! Missing the @. Ok, so I guess it's time to go back and try to tackle the ISP thing again.If your wanting to change name should work. Edited August 30, 2014 by saabstory88 Quote Link to comment Share on other sites More sharing options...
NathanKell Posted August 30, 2014 Share Posted August 30, 2014 Because you're missing the @HAS[@RESOURCE[LiquidFuel]]when applied thus@PART[*]:HAS[@RESOURCE[LiquidFuel]]will apply only to PARTs that at the time the patch is run have a RESOURCE node of name LiquidFuel. Quote Link to comment Share on other sites More sharing options...
Mecripp Posted August 30, 2014 Share Posted August 30, 2014 And this one didn't work ? @PART[*]:HAS[ @MODULE[ModuleEngines] , @atmosphereCurve[0?390] ] ]:HAS[@MODULE[ ModuleEngines] , @PROPELLANT[LiquidFuel] ] ]:FOR[MoreRealisticFuels] Quote Link to comment Share on other sites More sharing options...
saabstory88 Posted August 30, 2014 Share Posted August 30, 2014 (edited) With fixed brackets, no error, no success:@PART[*]:HAS[@MODULE[ModuleEngines]:HAS[@atmosphereCurve[0?390]]]:HAS[@MODULE[ModuleEngines],@PROPELLANT[LiquidFuel]]:FOR[MoreRealisticFuels]These variations were also not successful:@PART[*]:HAS[@MODULE[ModuleEngines]:HAS[@atmosphereCurve[*]:HAS[#key[0?390]]]]@PART[*]:HAS[@MODULE[ModuleEngines]:HAS[@atmosphereCurve[*]#key[0?390]]]Original post:No, MM reports an error, but it did not log it in either the KSP.log or the Player.logFull code:@PART[*]:HAS[@MODULE[ModuleEngines],@atmosphereCurve[0?390]]]:HAS[@MODULE[ModuleEngines],@PROPELLANT[LiquidFuel]]]:FOR[MoreRealisticFuels]{ @MODULE[ModuleEngines] { @PROPELLANT[LiquidFuel] { @name = LiquidH2 @ratio = 1 } @PROPELLANT[Oxidizer] { @name = LiquidO2 @ratio = 4 } }}And this one didn't work ? Edited August 30, 2014 by saabstory88 Update Quote Link to comment Share on other sites More sharing options...
saabstory88 Posted August 30, 2014 Share Posted August 30, 2014 So, taking this from another tack, would it be possible to grab the value from "key", and write it as a new value, of say ISP, in the header of the PART config instead of below atmosphereCurve, and then run a second .cfg to filter by that number instead, which would be available with a simple "@PART[*]:HAS[iSP[0?390]]"? Quote Link to comment Share on other sites More sharing options...
Mecripp Posted August 30, 2014 Share Posted August 30, 2014 Have you try'ed @PART[*]:HAS[@MODULE[ModuleEngines],@atmosphereCurve[0?390]:FOR[MoreRealisticFuels]]{ @MODULE[ModuleEngines] { @PROPELLANT[LiquidFuel] { %name = LiquidH2 %ratio = 1 } @PROPELLANT[Oxidizer] { %name = LiquidO2 %ratio = 4 } }} Quote Link to comment Share on other sites More sharing options...
NathanKell Posted August 30, 2014 Share Posted August 30, 2014 Folks, while suggesting things is helpful, unless you know it works I suggest testing it yourself before proposing it. Quote Link to comment Share on other sites More sharing options...
Mecripp Posted August 30, 2014 Share Posted August 30, 2014 My bad sorry Quote Link to comment Share on other sites More sharing options...
NathanKell Posted August 30, 2014 Share Posted August 30, 2014 No problem, it's clear you're trying help and that's awesome. It's just...it's quicker to test yourself and see, rather than post, the other person tests, etc. Quote Link to comment Share on other sites More sharing options...
saabstory88 Posted August 30, 2014 Share Posted August 30, 2014 Well I certainly appreciate the help. This sort of selection may not even be supported by the current version of MM. That's ok. I've migrated to a tech level dependent version of fuel selection, which also sets the peak isp based on the fuel source. It might be ok for the first version. Anyway, much appreciated, as this is my first day playing with MM. I will move further development to a dedicated post.Thanks! Quote Link to comment Share on other sites More sharing options...
sarbian Posted August 30, 2014 Author Share Posted August 30, 2014 @atmosphereCurve[0?390] will not work since it try to find an atmosphereCurve whose "name" is "0 390".@atmosphereCurve[]:HAS[#key[0?390]] would get what you want but would not work since the ? does not work here. I might have to fix that ... Quote Link to comment Share on other sites More sharing options...
taniwha Posted August 31, 2014 Share Posted August 31, 2014 I have created a tool to help check the validity of Module Manager configs: ModuleManager config checker. Quote Link to comment Share on other sites More sharing options...
sarbian Posted August 31, 2014 Author Share Posted August 31, 2014 Official release of Version 2.3.3 Module Manager is now integrated with the loading screen. You'll see the info message a bit later in the loading process.Fix the /= and -= operator (the argument where inverted) Quote Link to comment Share on other sites More sharing options...
RedAV8R Posted August 31, 2014 Share Posted August 31, 2014 (edited) Official release of Version 2.3.3 Module Manager is now integrated with the loading screen. You'll see the info message a bit later in the loading process.Fix the /= and -= operator (the argument where inverted)FYI, this loading later is breaking things like RealFuels which modifies some resources like SolidFuel or XenonGas to a different density.I never tried 2.3.2, but 2.3.1 working fine, 2.3.3 has broke the way in which RealFuels does it's thing. Edited August 31, 2014 by RedAV8R Quote Link to comment Share on other sites More sharing options...
JeffreyCor Posted August 31, 2014 Share Posted August 31, 2014 2.3.3 seems to take a LOT longer for loading than 2.3.1 did. Quote Link to comment Share on other sites More sharing options...
Nori Posted September 1, 2014 Share Posted September 1, 2014 2.3.3 seems to take a LOT longer for loading than 2.3.1 did. I've been noticing that. Seems to get stuck during the end of loading at the For After and Before passes. Quote Link to comment Share on other sites More sharing options...
ozraven Posted September 1, 2014 Share Posted September 1, 2014 (edited) I believe I've also found a bug in 2.3.3 vs. 2.3.1. The :HAS[~setting[]] seems to be misapplied:// Add tech tree support to parts that don't have it.@PART[*]:HAS[~TechRequired[]]{ TechRequired = advMetalworks}It seems to match nearly every part in 2.3.3, regardless of the TechRequired setting. I can provide a log if needed, but in my haste to fix the problem I reset my logs.I also stumbled across another problem that I just wanted to share: The stock ModuleScienceLab module requires a containerModuleIndex setting that refers to the zero-based index of the module collection where it must find ModuleScienceContainer. This should be nice and safe for parts that define these modules in their original .cfg, but should someone want to add ModuleScienceLab capabilities to other modules via MM, then care must be taken to keep this reference valid. (Maybe MM can check/fix this up on the Final pass?) The problem manifests in-game in the VAB/SPH by the right-click/tweakables menus no longer working for any part and in the log by something like:[ModuleScienceLab]: No Container Module found at index 0NullReferenceException: Object reference not set to an instance of an object at ModuleScienceLab.updateModuleUI () [0x00000] in <filename unknown>:0 at ModuleScienceLab.onPartActionUI (.Part p) [0x00000] in <filename unknown>:0 at EventData`1[Part].Fire (.Part data) [0x00000] in <filename unknown>:0 at UIPartActionWindow.CreatePartList () [0x00000] in <filename unknown>:0 at UIPartActionWindow.Setup (.Part part, DisplayType type, UI_Scene scene) [0x00000] in <filename unknown>:0 at UIPartActionController.CreatePartUI (.Part part, DisplayType type, UI_Scene scene) [0x00000] in <filename unknown>:0 at UIPartActionController.SelectPart (.Part part, Boolean allowMultiple) [0x00000] in <filename unknown>:0 at UIPartActionController.HandleMouseClick (UnityEngine.Camera cam, Boolean allowMultiple) [0x00000] in <filename unknown>:0 at UIPartActionController+.MoveNext () [0x00000] in <filename unknown>:0(Filename: Line: -1) Edited September 1, 2014 by ozraven Clarification and ModuleScienceLab information. Quote Link to comment Share on other sites More sharing options...
cremasterstroke Posted September 1, 2014 Share Posted September 1, 2014 Hi Sarbian, not sure if this is better posted here or in the RSS thread (so I x-posted in both ): I've experienced a small bug with Real Solar System and the newer versions of Module Manager. With version 2.2.2 the various launch sites on Earth show up fine. [spoiler=]However with 2.3.x they disappear - in fact the buttons to toggle them don't show up either [spoiler=]In the output logs 0 launch sites are being loaded with 2.3.x, while the normal 22 are loaded with 2.2.2. Link to logs: using version 2.2.2 and version 2.3.3My GameData folder: [spoiler=]. All mods are latest versions AFAIK, RSS is version 7.2. 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.