Apaseall Posted October 22, 2018 Share Posted October 22, 2018 2 hours ago, Starwaster said: Only if he's putting it in a mod. I like to avoid using :FINAL if I can help it. With some thought, or trial and error I can usually find out a suitable :AFTER[]. Saves the 'race to the end' thing. Quote Link to comment Share on other sites More sharing options...
coyotesfrontier Posted October 23, 2018 Share Posted October 23, 2018 I'm wondering how I'd be able to transform an engine to run on LiquidHydrogen/Oxidizer instead of LiquidFuel/Oxidizer. The config I'm currently using doesn't seem to be working: https://pastebin.com/6EVKsvAC. Any help would be much appreciated. Quote Link to comment Share on other sites More sharing options...
blowfish Posted October 23, 2018 Share Posted October 23, 2018 1 hour ago, coyotesfrontier said: I'm wondering how I'd be able to transform an engine to run on LiquidHydrogen/Oxidizer instead of LiquidFuel/Oxidizer. The config I'm currently using doesn't seem to be working: https://pastebin.com/6EVKsvAC. Any help would be much appreciated. Your patch looks correct to me (although @name = Oxidizer is unnecessary since it's already Oxidizer). Maybe look at the log and ModuleManager.ConfigCache to make sure the patch is being applied properly. I can help you interpret those if you post them. Quote Link to comment Share on other sites More sharing options...
coyotesfrontier Posted October 23, 2018 Share Posted October 23, 2018 28 minutes ago, blowfish said: Your patch looks correct to me (although @name = Oxidizer is unnecessary since it's already Oxidizer). Maybe look at the log and ModuleManager.ConfigCache to make sure the patch is being applied properly. I can help you interpret those if you post them. Thanks for the response. I edited the config to remove the unnecessary atmosphere and oxidizer brackets, as you recommended. Here's the two parts of my KSP.log: https://pastebin.com/X9z5rfX0 https://pastebin.com/MDem99y1 And here's my Module Manager config cache: https://www.dropbox.com/s/iuq2vpjb7xwotrr/ModuleManager.ConfigCache?dl=0 Quote Link to comment Share on other sites More sharing options...
blowfish Posted October 23, 2018 Share Posted October 23, 2018 2 minutes ago, coyotesfrontier said: Thanks for the response. I edited the config to remove the unnecessary atmosphere and oxidizer brackets, as you recommended. Here's the two parts of my KSP.log: https://pastebin.com/X9z5rfX0 https://pastebin.com/MDem99y1 And here's my Module Manager config cache: https://www.dropbox.com/s/iuq2vpjb7xwotrr/ModuleManager.ConfigCache?dl=0 Ah, just something minor. Your patch explicitly requires ModuleEnginesFX but the part actually has regular old ModuleEngines. If you're feeling too lazy to figure out which one is the correct one (or if it might change based on what other mods are installed), you can always use ModuleEngines* where the * will match anything (or nothing) Quote Link to comment Share on other sites More sharing options...
coyotesfrontier Posted October 23, 2018 Share Posted October 23, 2018 19 hours ago, blowfish said: Ah, just something minor. Your patch explicitly requires ModuleEnginesFX but the part actually has regular old ModuleEngines. If you're feeling too lazy to figure out which one is the correct one (or if it might change based on what other mods are installed), you can always use ModuleEngines* where the * will match anything (or nothing) Thank you! That appears to have fixed it. https://imgur.com/FV7Uk62 Quote Link to comment Share on other sites More sharing options...
therealcrow999 Posted October 30, 2018 Share Posted October 30, 2018 (edited) Edit: Found solution. Edited October 30, 2018 by therealcrow999 Quote Link to comment Share on other sites More sharing options...
TranceaddicT Posted October 30, 2018 Share Posted October 30, 2018 2 hours ago, therealcrow999 said: Edit: Found solution. You were missing the @s, weren't you. Quote Link to comment Share on other sites More sharing options...
therealcrow999 Posted October 30, 2018 Share Posted October 30, 2018 18 minutes ago, TranceaddicT said: You were missing the @s, weren't you. I was missing a bunch. Been ages. Here is working one: ///Stock Nylon/// @PART[parachuteLarge]:HAS[@MODULE[RealChuteModule]]:Final { @MODULE[RealChuteModule] { @PARACHUTE,Nylon { %deploymentAlt = 1000 } } } @PART[parachuteSingle]:HAS[@MODULE[RealChuteModule]]:Final { @MODULE[RealChuteModule] { @PARACHUTE,Nylon { %deploymentAlt = 1000 } } } @PART[parachuteRadial]:HAS[@MODULE[RealChuteModule]]:Final { @MODULE[RealChuteModule] { @PARACHUTE,Nylon { %deploymentAlt = 1000 } } } ///RealChute Nylon/// @PART[RC_*]:HAS[@MODULE[RealChuteModule]]:Final { @MODULE[RealChuteModule] { @PARACHUTE,Nylon { %deploymentAlt = 1000 } } } Quote Link to comment Share on other sites More sharing options...
JohnMcLane Posted October 31, 2018 Share Posted October 31, 2018 Hello Everyone, need some help. Spoiler @PART[*]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG[LR91-AJ-5]],!MODULE[TestFlightInterop]]:BEFORE[zTestFlight] { TESTFLIGHT { name = LR91-AJ-5 ratedBurnTime = 180 // Titan II SLV and Titan 23G. ignitionReliabilityStart = 0.9 ignitionReliabilityEnd = 0.95 cycleReliabilityStart = 0.93 cycleReliabilityEnd = 0.983 ignitionDynPresFailMultiplier = 0.1 techTransfer = LR91-AJ-3:30 } } I try to get rid of the "ignitionDynPresFailMultiplier = 0.1" or change the number to 1. Made a cfg in my own config folder in Gamedata. I tried: Spoiler @PART[*]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG[LR91-AJ-5]],!MODULE[TestFlightInterop]]:BEFORE[zTestFlight] { TESTFLIGHT { !ignitionDynPresFailMultiplier = 0.1 } } @PART[*]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG[LR91-AJ-5]],!MODULE[TestFlightInterop]]:BEFORE[zTestFlight] { TESTFLIGHT { %ignitionDynPresFailMultiplier = 1 } } and @PART[*]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG[LR91-AJ-5]]:Final { TESTFLIGHT { %ignitionDynPresFailMultiplier = 1 } } all three of them give me MM.errors on the loadingScreen. Somebody an idea? Thanks Quote Link to comment Share on other sites More sharing options...
Starwaster Posted October 31, 2018 Share Posted October 31, 2018 19 minutes ago, JohnMcLane said: Hello Everyone, need some help. Hide contents @PART[*]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG[LR91-AJ-5]],!MODULE[TestFlightInterop]]:BEFORE[zTestFlight] { TESTFLIGHT { name = LR91-AJ-5 ratedBurnTime = 180 // Titan II SLV and Titan 23G. ignitionReliabilityStart = 0.9 ignitionReliabilityEnd = 0.95 cycleReliabilityStart = 0.93 cycleReliabilityEnd = 0.983 ignitionDynPresFailMultiplier = 0.1 techTransfer = LR91-AJ-3:30 } } I try to get rid of the "ignitionDynPresFailMultiplier = 0.1" or change the number to 1. Made a cfg in my own config folder in Gamedata. I tried: Hide contents @PART[*]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG[LR91-AJ-5]],!MODULE[TestFlightInterop]]:BEFORE[zTestFlight] { TESTFLIGHT { !ignitionDynPresFailMultiplier = 0.1 } } @PART[*]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG[LR91-AJ-5]],!MODULE[TestFlightInterop]]:BEFORE[zTestFlight] { TESTFLIGHT { %ignitionDynPresFailMultiplier = 1 } } and @PART[*]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG[LR91-AJ-5]]:Final { TESTFLIGHT { %ignitionDynPresFailMultiplier = 1 } } all three of them give me MM.errors on the loadingScreen. Somebody an idea? Thanks It would help to know what the error was you saw (that's why we ask for logs) instead of having to guess. But there are a few things wrong here that can be addressed. In all three examples you did not put a @ in front of TESTFLIGHT. Also, TESTFLIGHT is a (supposed to be) named node so you need to either specify which TESTFLIGHT you mean (@TESTFLIGHT[name]) or do @TESTFLIGHT,* to patch all of them. (failure to use @ means you are ADDING a new TESTFLIGHT node instead of patching any) Also, don't use :BEFORE. Use AFTER[zTestFlight] or :FINAL to ensure that your patch occurs after the ones that are adding the field you want to remove. And, your last patch is missing a ] so it needs to be @PART[*]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG[LR91-AJ-5]]]:Final Quote Link to comment Share on other sites More sharing options...
tjsnh Posted November 1, 2018 Share Posted November 1, 2018 I've played around with this on my own for .. quite a while now .. and read, and re-read, the documentation (though I may be blind). I'm trying to remove some requirements from a tech node and can't figure out how. Specifically, I want to remove the requirements from generalConstruction and replace them with only needing "start" tech. Here is the stock code out of the tech tree: RDNode { id = generalConstruction title = #autoLOC_501040 //#autoLOC_501040 = General Construction description = #autoLOC_501041 //#autoLOC_501041 = New equipment to help out in keeping things stable, especially useful when the size of the spacecraft defies the current bounds of sanity. cost = 45 hideEmpty = False nodeName = node3_generalConstruction anyToUnlock = True icon = RDicon_construction-general pos = -1946,1355,0 scale = 0.6 Parent { parentID = stability lineFrom = RIGHT lineTo = LEFT } Parent { parentID = generalRocketry lineFrom = RIGHT lineTo = LEFT } } I've been able to ADD a requirement no problem, but I can't figure out how to REMOVE those existing "parents".Using the same syntax to remove modules from a part didn't work. Before anyone suggests it, I can't just leave them in and leave "anyToUnlock = True" because it won't show up correctly on the tech tree and breaks other things since I've removed stability and generalRocketry from the tree with another patch. So rather than go through the 50 things I tried and how they all didn't work, I'll just ask straight up - what is the normal syntax to remove those parents from generalconstruction? Quote Link to comment Share on other sites More sharing options...
blowfish Posted November 1, 2018 Share Posted November 1, 2018 43 minutes ago, tjsnh said: I've played around with this on my own for .. quite a while now .. and read, and re-read, the documentation (though I may be blind). I'm trying to remove some requirements from a tech node and can't figure out how. Specifically, I want to remove the requirements from generalConstruction and replace them with only needing "start" tech. Here is the stock code out of the tech tree: Spoiler RDNode { id = generalConstruction title = #autoLOC_501040 //#autoLOC_501040 = General Construction description = #autoLOC_501041 //#autoLOC_501041 = New equipment to help out in keeping things stable, especially useful when the size of the spacecraft defies the current bounds of sanity. cost = 45 hideEmpty = False nodeName = node3_generalConstruction anyToUnlock = True icon = RDicon_construction-general pos = -1946,1355,0 scale = 0.6 Parent { parentID = stability lineFrom = RIGHT lineTo = LEFT } Parent { parentID = generalRocketry lineFrom = RIGHT lineTo = LEFT } } I've been able to ADD a requirement no problem, but I can't figure out how to REMOVE those existing "parents".Using the same syntax to remove modules from a part didn't work. Before anyone suggests it, I can't just leave them in and leave "anyToUnlock = True" because it won't show up correctly on the tech tree and breaks other things since I've removed stability and generalRocketry from the tree with another patch. So rather than go through the 50 things I tried and how they all didn't work, I'll just ask straight up - what is the normal syntax to remove those parents from generalconstruction? It would look something like !PARENT:HAS[#parentID[stability]] { } Quote Link to comment Share on other sites More sharing options...
JohnMcLane Posted November 1, 2018 Share Posted November 1, 2018 8 hours ago, Starwaster said: In all three examples you did not put a @ in front of TESTFLIGHT. Also, TESTFLIGHT is a (supposed to be) named node so you need to either specify which TESTFLIGHT you mean (@TESTFLIGHT[name]) or do @TESTFLIGHT,* to patch all of them. (failure to use @ means you are ADDING a new TESTFLIGHT node instead of patching any) That was it, forgot about that Testflight was a node an didnt add an @ before the testflight. @PART[*]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG[LR91-AJ-5]],!MODULE[TestFlightInterop]]:AFTER[zTestFlight] { @TESTFLIGHT { %ignitionDynPresFailMultiplier = 1 } } Quote Link to comment Share on other sites More sharing options...
bakbal Posted November 2, 2018 Share Posted November 2, 2018 Is there a way to add something to the name/title of a part? I want to add liftless wing panels, so i can construct hulls or strucutes without screwing the CoL. I plan on doing this by modyfing parts that have ModuleLiftingSurface, do I need to define each of them in different patches or can I add NoLift behind the name and the title? Quote Link to comment Share on other sites More sharing options...
Starwaster Posted November 2, 2018 Share Posted November 2, 2018 2 hours ago, bakbal said: Is there a way to add something to the name/title of a part? I want to add liftless wing panels, so i can construct hulls or strucutes without screwing the CoL. I plan on doing this by modyfing parts that have ModuleLiftingSurface, do I need to define each of them in different patches or can I add NoLift behind the name and the title? @name ^= :$:NoLift: That's regular expression text munging. Read about it here: https://github.com/sarbian/ModuleManager/wiki/Module-Manager-Syntax (search for text regexp) for other examples of ways you can mung the text. Quote Link to comment Share on other sites More sharing options...
Gordon Dry Posted November 3, 2018 Share Posted November 3, 2018 How do I add a string to a string, like with @description ^= :$:blah: but instead of "blah" I want to add a string. I cannot use the $ because it's part of the regex insert syntax. Quote Link to comment Share on other sites More sharing options...
blowfish Posted November 3, 2018 Share Posted November 3, 2018 3 hours ago, Gordon Dry said: How do I add a string to a string, like with @description ^= :$:blah: but instead of "blah" I want to add a string. I cannot use the $ because it's part of the regex insert syntax. Not sure I follow. Could you try explaining that again? Start with what you want to accomplish. Quote Link to comment Share on other sites More sharing options...
Gordon Dry Posted November 3, 2018 Share Posted November 3, 2018 (edited) @blowfish I got a patch to add engine spool delay - which works well. Now I want to add the delay in seconds to the description text of an engine. I have 4 patch blocks, for Oxidizer/MonoPropellant and for ModuleEngines/ModuleEnginesFX This is one of them as example - adds the following to the description text: Quote <color=yellow>Engine spool up delay #$spoolUpDelay$ seconds.</color> @PART[*]:HAS[@MODULE[ModuleEnginesFX]:HAS[@PROPELLANT[Oxidizer],#useEngineResponseTime[True]]]:NEEDS[!RealismOverhaul]:FINAL { @description ^= :$: <color=yellow>Engine spool up delay : %spoolUpDelay = 1 @spoolUpDelay /= #$/MODULE[ModuleEnginesFX]/engineAccelerationSpeed$ @spoolUpDelay ^= :(.\d\d)\d+$:$1: // cut after two decimal places @description ^= :$:#$spoolUpDelay$: @description ^= :$: seconds.</color>: } ^ which says Quote Engine spool up delay #$spoolUpDelay$ seconds. in yellow font in VAB. Edited November 3, 2018 by Gordon Dry Quote Link to comment Share on other sites More sharing options...
blowfish Posted November 3, 2018 Share Posted November 3, 2018 4 minutes ago, Gordon Dry said: @blowfish I got a patch to add engine spool delay - which works well. Now I want to add the delay in seconds to the description text of an engine. I have 4 patch blocks, for Oxidizer/MonoPropellant and for ModuleEngines/ModuleEnginesFX This is one of them as example - adds the following to the description text: @PART[*]:HAS[@MODULE[ModuleEnginesFX]:HAS[@PROPELLANT[Oxidizer],#useEngineResponseTime[True]]]:NEEDS[!RealismOverhaul]:FINAL { @description ^= :$: <color=yellow>Engine spool up delay : %spoolUpDelay = 1 @spoolUpDelay /= #$/MODULE[ModuleEnginesFX]/engineAccelerationSpeed$ @spoolUpDelay ^= :(.\d\d)\d+$:$1: // cut after two decimal places @description ^= :$:#$spoolUpDelay$: @description ^= :$: seconds.</color>: } Ok I see. As far as I can tell there's no way to do variable searches in regex replacements. I think what you can do is just use everything as variables though. Might even be able to it in on statement (haven't tested this) @description = #$description$ <color=yellow>Engine spool up delay $spoolUpDelay$ seconds.</color>. Quote Link to comment Share on other sites More sharing options...
Gordon Dry Posted November 3, 2018 Share Posted November 3, 2018 Simple like that - hahaha. I hope it works, though Quote Link to comment Share on other sites More sharing options...
bakbal Posted November 3, 2018 Share Posted November 3, 2018 20 hours ago, Starwaster said: @name ^= :$:NoLift: That's regular expression text munging. Read about it here: https://github.com/sarbian/ModuleManager/wiki/Module-Manager-Syntax (search for text regexp) for other examples of ways you can mung the text. Ok, thank you Quote Link to comment Share on other sites More sharing options...
Agustin Posted November 3, 2018 Share Posted November 3, 2018 Which version is right to use with KSP 1.4.5? Quote Link to comment Share on other sites More sharing options...
Lisias Posted November 3, 2018 Share Posted November 3, 2018 Just now, Agustin said: Which version is right to use with KSP 1.4.5? The latest (3.1) works fine. I'm using it for some time now, no issues. Quote Link to comment Share on other sites More sharing options...
Electrocutor Posted November 4, 2018 Share Posted November 4, 2018 Is there an available syntax to copy a sub-node from a different parent? PartTemplate { name = template MODULE { name = stuff var = value } } @PART[thisone] { +@PartTemplate[template]/MODULE[stuff] { @var = value2 } } 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.