Jump to content

[1.8.x-1.12.x] Module Manager 4.2.2 (June 18th 2022) - The Heatwave Edition


sarbian
 Share

Recommended Posts

Just now, linuxgurugamer said:

When you reinstalled your mods, how did you delete them?  Also, how did you do the install?  I've tried to replicate your install, but don't know what some of the mods listed in the file are.

I uninstalled all the mods on ckan except for my own custom mod and i just removed that. I installed KSP 1.11 through steam, I will try the EVE uninstall and see if that works

EDIT: After removing EVE and any mods that would use EVE (All i have installed is scatterer) module manager still doesnt apply any patches, its stuck at 0% and 0 patches

 

 

https://imgur.com/a/9hmQab7 

 

Mod folder

Edited by Adiri
Link to comment
Share on other sites

26 minutes ago, Adiri said:

I uninstalled all the mods on ckan except for my own custom mod and i just removed that. I installed KSP 1.11 through steam, I will try the EVE uninstall and see if that works

EDIT: After removing EVE and any mods that would use EVE (All i have installed is scatterer) module manager still doesnt apply any patches, its stuck at 0% and 0 patches

 

 

https://imgur.com/a/9hmQab7 

 

Mod folder

Ok, that's not good enough.  CKAN will not uninstall files it doesn't know about.

You have to open the game folder by hand, and manually delete the directories of the mods that you uninstalled.

Link to comment
Share on other sites

Just now, linuxgurugamer said:

You have to open the game folder by hand, and manually delete the directories of the mods that you uninstalled.

Alright, even after removing everything from the gamedata folder except Squad and Squad Expansion, after manually reinstalling module manager (4.2.1) and then reinstalling EVE and Scatterer with CKAN module manager still applies no patches, I dont know why this is

Link to comment
Share on other sites

I've got a small question for someone more skilled in MM-fu.

I'm working inside a ModuleB9PartSwitch and I need to check the part's config for a value, to inform if a SETUP should be applied.

This is a simplification of my current state:

@PART[*]
{
    BooleanToCheck = False
    
    // foo bar
    
    MODULE
    {
    	name = ModuleB9PartSwitch
        
        // foo bar
        
        SUBTYPE
        {
        	// foo bar
        }
        SUBTYPE // should only be applied if BooleanToCheck = True
        {
        	// foo bar
        }
    }
}
 

... so I'm wondering if there's an elegant solution. I'd be surprised if something like the below worked.

SUBTYPE:NEEDS[#$/BooleanToCheck$[True]]

 

Edited by Clamp-o-Tron
Link to comment
Share on other sites

You might want to look at OPT and OPT_Reconfig for examples.  It does something close to what you're trying to achieve.  And it also involves B9PartSwitch.  Look for "FeatureBiasA" and "FeatureBiasB" in the CFG files.

FeatureBiasA switches the variant fuel mixes.  FeatureBiasB switches between the variant ISPs (by switching atmosphereCurve profiles).

Link to comment
Share on other sites

9 hours ago, bcqJC said:

You might want to look at OPT and OPT_Reconfig for examples.  It does something close to what you're trying to achieve.  And it also involves B9PartSwitch.  Look for "FeatureBiasA" and "FeatureBiasB" in the CFG files.

FeatureBiasA switches the variant fuel mixes.  FeatureBiasB switches between the variant ISPs (by switching atmosphereCurve profiles).

Thanks, but I can't quite find what you're referring to. I've decided to go the alternate route (that probably should have been at the top of my head anyway) of simply applying each SUBTYPE in its own portion of the patch, all referencing the same ModuleB9PartSwitch, and using :HAS (the boolean has been moved to be inside ModuleB9PartSwitch).

Link to comment
Share on other sites

@bcqJC @Clamp-o-Tron To be exact, you want to look at OPT_Reconfig/OPT_01Tweak.cfg and Reconfig's extras configs which control them. 

  • "FeatureBiasA" decides whether to apply the B9PS engine/converter options to parts (granted Tweakscale's inability to reliably handle parts with such options).
  • "FeatureBiasB" (which leads into "Less Handwavium" and "No Handwavium") decides how much to nerf OPT parts (and may delete some engines) depending on how sensitive you are to OPT engines being OP.

What you're hoping to achieve probably looks like this:

Spoiler

%key to edit if it exists. This prevents repeat instances of the key when you make several passes while targeting parts.

// Opt-in phase
@PART:HAS[<params>] // target only the parts I'm interested in, by search criteria
{
	%MyFeatures = true // tag them on the whole for my mod
	%MyFeatureCategory = n // tag or sub-tag them into 1 of any number of categories
}
@PART[mod1Part*|mod2Part*] // target only the parts I'm interested in by name with wildcards
{
	%MyFeatures = true
	%MyFeatureCategory = n1
}
@PART[mod3Part*]:HAS[<params>] // target only the parts I'm interested in by increasingly specific criteria
{
	%MyFeatures = true
	%MyFeatureCategory = n2
}

// Default loadout
@PART:HAS[#MyFeatures[value],@MODULE[ModuleB9PartSwitch]]
{
	MODULE
	{
		name = ModuleB9PartSwitch
		moduleID = MyFeature // tag for my mod
		SUBTYPE // the generic options
		{
			// config
		}
		SUBTYPE // the generic options
		{
			// config
		}
	}
}

// Append the default loadout per category
@PART:HAS[#MyFeatureCategory[n],@MODULE[ModuleB9PartSwitch]]
{
	@MODULE[ModuleB9PartSwitch]:HAS[#moduleID[MyFeature]]
	{
		SUBTYPE // the specific option
		{
			// config
		}
	}
}
@PART:HAS[#MyFeatureCategory[n1],@MODULE[ModuleB9PartSwitch]]
{
	@MODULE[ModuleB9PartSwitch]:HAS[#moduleID[MyFeature]]
	{
		SUBTYPE // the specific option
		{
			// config
		}
	}
}
@PART:HAS[#MyFeatureCategory[n2],@MODULE[ModuleB9PartSwitch]]
{
	@MODULE[ModuleB9PartSwitch]:HAS[#moduleID[MyFeature]]
	{
		SUBTYPE // the specific option
		{
			// config
		}
	}
}

 

Try not to actually do this as tagging parts with false or other negative makes for very wasteful patching.

@PART[*]
{
    BooleanToCheck = False

 

Link to comment
Share on other sites

3 hours ago, JadeOfMaar said:
  • "FeatureBiasA" decides whether to apply the B9PS engine/converter options to parts (granted Tweakscale's inability to reliably handle parts with such options).

TweakScale's "inability" to reliably handle B9PS not rarely is/was due B9PS itself. Things are improving slowly, however, as not rarely I need to understand some third-parties modules and fix them myself.

That said, any report about problems involving TweakScale should be redirected to TweakScale's thread, please. I can only fix what I'm aware about, and complaining about on third-parties' thread is not exactly the best way of making me aware of a problem.

Edited by Lisias
tyops
Link to comment
Share on other sites

3 hours ago, Lisias said:

That said, any report about problems involving TweakScale should be redirected to TweakScale's thread, please. I can only fix what I'm aware about, and complaining about on third-parties' thread is not exactly the best way of making me aware of a problem.

Do pardon me if my statement came across as a complaint. I meant to speak matter-of-factly. I meant only to point it out.

Link to comment
Share on other sites

On 8/21/2021 at 4:20 PM, JadeOfMaar said:

Do pardon me if my statement came across as a complaint. I meant to speak matter-of-factly. I meant only to point it out.

Ow, well… English is not my native language, it's not unusual that I miss the tone and end up taking the words without context. Sorry by that.

But, sometimes, I think we should be a bit more explicit about how complicated (besides not rarely being "simple" to code) solving interactions between Modules can be - not to mention time consuming. Detecting the root cause of the problem I mentioned on my last post took me almost two weeks of heavy testing (and the fix was, virtually, an one-liner!!).

TweakScale is not exactly "hard" to code, once you know what you need to do. What takes a huge amount of time is figuring out exactly what you need to do (and fixing things, of course, because bugs - including mine! - are always around, misleading our researches), and - so important as, what you can not do. I don't dare to even consider that this is different for everybody else (B9PS is a pretty complicated piece of work, I can only wonder how hard was to make it tight!).

I hope this helps to understand how deep is this bunny's hole: making patches is just the first step - we need to consider how different Modules will behave once you patch them on the Part, including the ones that were already there before you patched the new ones - and, also, to remember that sometimes a bug may be hiding somewhere, waiting to bite you in the SAS - and this bug is not always on your side of the keyboard.

Edited by Lisias
(More) Grammars... (Sigh)
Link to comment
Share on other sites

  • 2 weeks later...

Hi again,

I've been having an issue for a little while now.   In my TechTrees, I have a patch that I am sure used to work, but doesn't now.
 

In the specifically in the TETRIX tech tree node setting pass I have these for all the nodes:

@TechTree
	{	// snip
		@RDNode:HAS[#id[advConstruction]]
			{	
				@pos = -2068,1140,-1
				@cost = 60
				!Parent,* {}
				Parent
					{	
						parentID = generalConstruction
						lineFrom = RIGHT
						lineTo = LEFT
					}
			}
		// snip
		@RDNode:HAS[#id[advMetalworks]]
			{	
				@pos = -1828,1140,-1
				@cost = 240
				!Parent,* {}
				Parent
					{	
						parentID = specializedConstruction
						lineFrom = RIGHT
						lineTo = LEFT
					}
			}
		// snip
	}

Then after that main patch I have:

@TechTree:NEEDS[NearFutureConstruction]
	{	
		@RDNode:HAS[#id[advConstruction]]
			{	
				@anyToUnlock = True
				Parent
					{	
						parentID = fuelSystems
						lineFrom = RIGHT
						lineTo = LEFT
					}
			}
		@RDNode:HAS[#id[advMetalworks]]
			{	
				@anyToUnlock = True
				Parent
					{	
						parentID = largeVolumeContainment
						lineFrom = RIGHT
						lineTo = LEFT
					}
			}
	}

But without Near Future Construction MM is patching the :NEEDS[NearFutureConstruction]

[LOG 05:33:10.559] Applying update AngleCanMods/TETRIXTechTree/TETRIXTechTree/@TechTree to Squad/Resources/TechTree.cfg/TechTree
[LOG 05:33:10.967] Applying update AngleCanMods/TETRIXTechTree/TETRIXTechTree/@TechTree:NEEDS[NearFutureConstruction] to Squad/Resources/TechTree.cfg/TechTree

So I added another patch as in the first tech tree patch with a :NEEDS[!NearFutureConstruction] below, 

@TechTree:NEEDS[!NearFutureConstruction]
	{	
		@RDNode:HAS[#id[advConstruction]]
			{	
				@pos = -2068,1140,-1
				@cost = 60
				!Parent,* {}
				Parent
					{	
						parentID = generalConstruction
						lineFrom = RIGHT
						lineTo = LEFT
					}
			}
		@RDNode:HAS[#id[advMetalworks]]
			{	
				@pos = -1828,1140,-1
				@cost = 240
				!Parent,* {}
				Parent
					{	
						parentID = specializedConstruction
						lineFrom = RIGHT
						lineTo = LEFT
					}
			}
	}

and this happens:

[LOG 05:56:13.045] Config(@TechTree) AngleCanMods/TETRIXTechTree/TETRIXTechTree/@TechTree
[LOG 05:56:13.045] Config(@TechTree:NEEDS[NearFutureConstruction]) AngleCanMods/TETRIXTechTree/TETRIXTechTree/@TechTree:NEEDS[NearFutureConstruction]
[LOG 05:56:13.046] Config(@TechTree:NEEDS[!NearFutureConstruction]) AngleCanMods/TETRIXTechTree/TETRIXTechTree/@TechTree:NEEDS[!NearFutureConstruction]

and:

[LOG 05:55:34.350] Deleting root node in file AngleCanMods/TETRIXTechTree/TETRIXTechTree node: @TechTree:NEEDS[!NearFutureConstruction] as it can't satisfy its NEEDS

[LOG 05:55:38.424] Applying update AngleCanMods/TETRIXTechTree/TETRIXTechTree/@TechTree to Squad/Resources/TechTree.cfg/TechTree
[LOG 05:55:38.891] Applying update AngleCanMods/TETRIXTechTree/TETRIXTechTree/@TechTree:NEEDS[NearFutureConstruction] to Squad/Resources/TechTree.cfg/TechTree

 

Installing NearFuture Construction doesn't change this at all.

Why is this happening?  

EDIT: Resolved the issue that has been plaguing me for a month or two!

In Simplex Resources there was a call of :FOR[NearFutureConstruction] to deal with a CryoFuel and B9PartSwitch issue.  I've changed that FOR (in Simplex Resources) to a NEEDS and the problem goes away.

So if another mod has a FOR whatever, the NEEDS whatever then gets applied I see. 

I think I have been told this before, but the FOR was in a separate mod!

Anywho, thank you!

Edited by theJesuit
Resolved
Link to comment
Share on other sites

  • 2 weeks later...

Hi!

I'm looking to finalise AngleCan Progression (where all costs are nullified except for World First Contracts, and Ore for future funding options through mining.

All is well, dealt with the Ore Tanks providing negative values (giving funds for launch when empty), and also the Fairings adding cost.

But I'm stuck with some B9PartSwitch MM patching.  specific case, the NF Construction mod, but this would apply for any B9PartSwitch configure mod.

@B9_TANK_TYPE[*]		// all tanks cost none.  T
		{	@tankCost = 0	}
	 
@PART[*]
	{	
		@MODULE[ModuleB9PartSwitch]
			{	
				@SUBTYPE[*]				// Universal subtype nerf doesn't work! 
					{
						@addedCost = 0
					}
			}
	}
@PART[*]
	{	
		@MODULE[ModuleB9PartSwitch]
			{	
				@SUBTYPE[Hollow]		// Per subtype works
					{
						@addedCost = 0
					}
			}
	}
	

Basically, I can't seem to universally remove costs.  Only when I specify the subtype does it seem to work.  This is evidenced above, where subtype[*] doesn't remove costs on same part, different transfroms/subtypes 

Help please!

Link to comment
Share on other sites

1 hour ago, theJesuit said:

Basically, I can't seem to universally remove costs.  Only when I specify the subtype does it seem to work.  This is evidenced above, where subtype[*] doesn't remove costs on same part, different transfroms/subtypes 

Try :

@SUBTYPE,*

And while you're at it, also do :

@MODULE[ModuleB9PartSwitch],*

So you don't only the target the first module if there are multiple ones.

Link to comment
Share on other sites

  • 2 weeks later...
10 hours ago, bghyt said:

Hi, i cannot download modal manager as your website is seemingly broken, i would use "insert image from url" but it is seemingly broken like accpting the TOS which took an hour alone
So here is an imgur link to what i get in Chrome, edge & even firefox on my phone image: https://i.imgur.com/kl2xs93.png i get this for both link's

The HTTP Certificate had expired. Click on Advanced and then tell Chrome you want to access the site nevertheless. You will have to use an Administrator password, if memory servers me well.

[My bad, you are using Chrome - what I said works on Safari and FireFox. Here you will find instructions about Firefox. If you can't use an alternative browser, clicking on my link below is your best option]

[My bad again - the certificate was said to be good, see below. It was a bork on some devices due am old CA (or something) from Let's Encrypt being revoked).

Alternatively, I keep a personal mirror here: https://github.com/net-lisias-ksp/ModuleManager/blob/Archive/Archive/KSP18/ModuleManager-4.2.1.zip - using the HTTPS certificate of github. This is the very same file available on the original URL, but you will have to take my word on it. :P  (don't download anything else from that repository, everything not on that specific folder is experimental, 99% of chances you don't want to use it).

— — 

On a side note, why such a important piece of software doesn't have a Nice Entry™ on SpaceDock and CurseForge is beyound me.

 

Edited by Lisias
Whoops.. :P
Link to comment
Share on other sites

3 hours ago, Lisias said:

The HTTP Certificate had expired. Click on Advanced and then tell Chrome you want to access the site nevertheless. You will have to use an Administrator password, if memory servers me well.

[My bad, you are using Chrome - what I said works on Safari and FireFox. Here you will find instructions about Firefox. If you can't use an alternative browser, clicking on my link below is your best option]

Alternatively, I keep a personal mirror here: https://github.com/net-lisias-ksp/ModuleManager/blob/Archive/Archive/KSP18/ModuleManager-4.2.1.zip - using the HTTPS certificate of github. This is the very same file available on the original URL, but you will have to take my word on it. :P  (don't download anything else from that repository, everything not on that specific folder is experimental, 99% of chances you don't want to use it).

— — 

On a side note, why such a important piece of software doesn't have a Nice Entry™ on SpaceDock and CurseForge is beyound me.

 

Thank you very much! I didn't know you had a  github (did i miss it in my rage? or was it not there XD) have a lovely day!

Link to comment
Share on other sites

5 hours ago, Lisias said:

The HTTP Certificate had expired.

It has not. The certificate is valid until the 3rd of December 2021 and has been updated on the 4th of September. If @bghyt has those errors then he has a problem on his device or his ISP is doing funny things.

Edited by sarbian
Link to comment
Share on other sites

8 minutes ago, sarbian said:

It has not. The certificate is valid until the 3rd of December 2021 and has been updated on the 4th of September. If @bghyt has those errors then he has a problem on his device or his ISP is doing funny things.

Yep, I just had notice that something got marvellously borked on some Certificate chain related to Let's Encrypt. This completely screwed up CKAN, by the way.

Since we are here, may I suggest to upload the latest MM binaries into your GitHub? This will prevent relying on unofficial channels for distributing it when borks like this one happens!

Link to comment
Share on other sites

  • 2 weeks later...

Hello everyone!

Is it possible to copy a sub-node from one node to another?
I have:

Spoiler
PART
{
	MODULE
	{
		name = ModuleEngines
		atmosphereCurve
		{
			key = 0 310
			key = 1 265
			key = 7 0.001
		}
	}
	MODULE
	{
		name = ModuleEngineConfigs
	}
}

I want:

Spoiler
PART
{
	MODULE
	{
		name = ModuleEngines
		atmosphereCurve
		{
			key = 0 310
			key = 1 265
			key = 7 0.001
		}
	}
	MODULE
	{
		name = ModuleEngineConfigs
		atmosphereCurve
		{
			key = 0 310
			key = 1 265
			key = 7 0.001
		}
	}
}

I tried this, but it gives nothing:

Spoiler
@MODULE[ModuleEngineConfigs]
{
	+/MODULE[ModuleEngines]/atmosphereCurve {}
}

The closest thing I've came up with:

Spoiler
@MODULE[ModuleEngineConfigs]
{
	atmosphereCurve
	{
		key = #$/MODULE[ModuleEngines]/atmosphereCurve/key,0$
		key = #$/MODULE[ModuleEngines]/atmosphereCurve/key,1$
		key = #$/MODULE[ModuleEngines]/atmosphereCurve/key,2$
		key = #$/MODULE[ModuleEngines]/atmosphereCurve/key,3$
		key = #$/MODULE[ModuleEngines]/atmosphereCurve/key,4$
	}
}

And it gives:

Spoiler
MODULE
{
	name = ModuleEngineConfigs
	atmosphereCurve
	{
		key = 0 310
		key = 1 265
		key = 7 0.001
		key = 7 0.001
		key = 7 0.001
	}
}
Link to comment
Share on other sites

5 hours ago, BIOZ said:

Hello everyone!

Is it possible to copy a sub-node from one node to another?
I have:

Copy whole atmosphereCurve!

The following patch worked for me:

@PART[JetEngine]
{
	MODULE
	{
		name = ModuleEngineConfig
		#/MODULE[ModuleEnginesFX]/atmosphereCurve { }
	}
}

It gave me the following on the MM ConfigCache:

UrlConfig
{
	parentUrl = Squad/Parts/Engine/jetEngines/jetEngineBasic.cfg
	PART
	{
		name = JetEngine
		module = Part
		author = Porkjet

		// yada yada yada...

		MODULE
		{
			name = ModuleEnginesFX
			engineID = Cruise

			// yada yada yada...

			atmosphereCurve
			{
				key = 0 10500 0 0
			}

			// yada yada yada...
		}

		// yada yada yada...

		MODULE
		{
			name = ModuleEngineConfig
			atmosphereCurve
			{
				key = 0 10500 0 0
			}
		}
		MODULE
		{
			name = ModulePartInfo
			originalPartName = JetEngine
		}
	}
}

The # is the copy command. The first "/" says to look for a subnode from the current "root" one (on my case, the JetEngine PART). And the rest is straightforward.

Cheers! :)

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.

 Share

×
×
  • Create New...