Jump to content

[1.8.x-1.12.x] Module Manager 4.2.3 (July 03th 2023) - Fireworks season


sarbian

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
        }
    }
}
	

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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]] { }

 

Link to comment
Share on other sites

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     
    }
}

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

@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 by Gordon Dry
Link to comment
Share on other sites

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>.

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...