Jump to content

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


sarbian

Recommended Posts

MM 2.8.1 breaks the game on my extremely heavily modded install, that is, at least sometimes on launch, the vessel doesn't work, because at least some modules don't get patched, plus the date is set to Y999 D499 5:59:59. Switching back to 2.8.0 fixes it.

The log is 4 MB large, so here is a Google Drive link: https://drive.google.com/open?id=0B7ucLuOwxKVYN2JyOERsdms5ZEU

 

Also, feature request:

Could MM move the cache, checksum and similar files to some folder in GameData? I may be alone with this, but the bunch of files at the end of my GameData folder do bother me...

Link to comment
Share on other sites

1 hour ago, APlayer said:

plus the date is set to Y999 D499 5:59:59

I've seen that happen too, but it doesn't seem to hurt anything, and I haven't seen any reason to think it's related to MM.  Note that it's the mission elapsed time that's shown that way, not the universal time — I suspect the MET is really -1 somehow, but instead of showing a negative number it's "wrapping around" and showing the largest possible time instead.

Link to comment
Share on other sites

1 hour ago, APlayer said:

Switching back to 2.8.0 fixes it.

Which proves that the problem is not in MM given the changed between 2.8.0 and 2.8.1. 

You have exception from other mods in your log. I won't spent time looking into problem that do not exists.

Link to comment
Share on other sites

3 hours ago, sarbian said:

Which proves that the problem is not in MM given the changed between 2.8.0 and 2.8.1. 

If so, I presume it is some mod compatibility issues somehow dependent on the MM version... Could anyone give me a hint on what to look for in the log to see which mod breaks things?

Link to comment
Share on other sites

I simply rolled back yesterday's mod updates and it seems to have fixed the issues. I probably shouldn't have done this, now that I think of it, but I have also removed the file from Google Drive, that's why you couldn't see it.

I'm sorry for the disturbance, the error was on my end.

Link to comment
Share on other sites

Does anyone happen to know if anything changed in the way certain patches are applied between 1.2.2 and 1.3? My specific problem is that I'm trying to set up a patch so that all my different mod-added ISRU units get counted for contracts where a base or station needs one. The way it used to be, simply having

@Contracts
{
	@Base
	{
		@PART_REQUEST:HAS[#Part[ISRU,MiniISRU]]
		{
                        Part = CompactISRU
		}              
	}	
	@Station
	{
		@PART_REQUEST:HAS[#Part[ISRU,MiniISRU]]
		{
                        Part = CompactISRU
		}          
        }
}

would make it count, but now it isn't. I've tried with and without an @Title entry, and with and without an @Crew_Request entry and am still a bit stuck. Once I know how, I'd like to just make a general MM patch to catch all of my ISRU units, so a base that doesn't need to make LF/O or monoprop, but is making LH2 or some other sort of thing can still complete contracts in my career game.  Thanks!

Link to comment
Share on other sites

what could stop b9 pwings,( the latest from Crzyrndm (0.40.13))  from working between 2.8.0 and 2.8.1, cause it works in 2.8.0 but not with 2.8.1

I mentioned it on the b9 pwing thread as well. 

Edit,
I edited my post on the b9 thread as well but someone i got both to work, i'm just not sure how.

 

Edited by Grease1991
Link to comment
Share on other sites

2 minutes ago, blowfish said:

I have PWings 0.40.13 and MM 2.8.1 installed (both via CKAN) and they seem to work fine.  Are you sure it's not something else?  I don't think I've seen a log from anyone experiencing the issue.

I guess it hadn't updated for you in time but i edited my post to say that it worked the 2nd time, i'm retrying my heavily modded install now

 

Link to comment
Share on other sites

I want to add something at the end of a key, specifically resources to a FuelSwitch config.

@PART[*]:HAS[@RESOURCE[Ore],#category[FuelTank],MODULE[InterstellarFuelSwitch],!MODULE[ProceduralPart]]:AFTER[SimpleConstruction] {
	@MODULE[InterstellarFuelSwitch]
	{
		@resourceGui = Ore;Metal;RocketParts;Uraninite;rich.Uranium;depl.Uranium
		@resourceNames = Ore;Metal;RocketParts;Uraninite;EnrichedUranium;DepletedUranium
		@resourceAmounts = #$../RESOURCE[Ore]/maxAmount$;$../RESOURCE[Ore]/maxAmount$;$../RESOURCE[Ore]/maxAmount$;$../RESOURCE[Ore]/maxAmount$;$../RESOURCE[Ore]/maxAmount$;$../RESOURCE[Ore]/maxAmount$
	}
}

But without reusing the full lines.
I am currently guessing:

@resourceGui = #$resourceGui$;Uraninite;rich.Uranium;depl.Uranium
@resourceNames = #$resourceNames$;Uraninite;EnrichedUranium;DepletedUranium
@resourceAmounts = #$resourceAmounts$;$../RESOURCE[Ore]/maxAmount$;$../RESOURCE[Ore]/maxAmount$;$../RESOURCE[Ore]/maxAmount$

Also, can I write all this in one single line to comment it out all at once like so?

// @resourceGui = #$resourceGui$;Uraninite;rich.Uranium;depl.Uranium @resourceNames = #$resourceNames$;Uraninite;EnrichedUranium;DepletedUranium @resourceAmounts = #$resourceAmounts$;$../RESOURCE[Ore]/maxAmount$;$../RESOURCE[Ore]/maxAmount$;$../RESOURCE[Ore]/maxAmount$

Or would I have to use some kind of divider/are the line breaks necessary?

Link to comment
Share on other sites

Can anyone see why this doesn't work? This is my first attempt at an MM patch, so I assume I'm missing something probably obvious. Using MM 2.8.1 and KSP 1.3.

@PART[*]:HAS[@MODULE[ModuleReactionWheel]] {

	@MODULE[ModuleReactionWheel] {
	
	-PitchTorque = 0
	-YawTorque = 0
	@RollTorque /= 5
	}
}

The goal is to divide the roll torque by 5, and remove the pitch and yaw torque. The roll torque change applies as I expect it to, but the pitch and yaw torque values don't get deleted and have the parts original values. If I use

@PitchTorque = 0
@YawTorque = 0

the values are set to zero, which would be suitable, but I'd rather see them gone, more so to understand why it's no doing what I expected it to.

Thanks

Edited by strudo76
Link to comment
Share on other sites

@strudo76 Depending on how a particular module (ModuleReactionWheel in this case) is coded then no value may simply get assigned a default value (that may in turn depend on some other parameter's value). Disabling those parameters from being in the right click menu usually requires a code change in the module unless the module author already has special code to handle optional parameters and treated those parameters as optional.

You can check whether your patch is changing the config by looking inside the ModuleManager.ConfigCache file in GameData to see what the post patching values are. How the values are handled after the config is read by the module is out of MM's hands.

Link to comment
Share on other sites

4 minutes ago, Aelfhe1m said:

@strudo76 Depending on how a particular module (ModuleReactionWheel in this case) is coded then no value may simply get assigned a default value (that may in turn depend on some other parameter's value). Disabling those parameters from being in the right click menu usually requires a code change in the module unless the module author already has special code to handle optional parameters and treated those parameters as optional.

You can check whether your patch is changing the config by looking inside the ModuleManager.ConfigCache file in GameData to see what the post patching values are. How the values are handled after the config is read by the module is out of MM's hands.

Checking ConfigCache file is incredibly handy, thanks for the tip. I can see in there that the values I'm deleting are in fact being deleted. So what you're saying is that since I'm deleting that key value, the missing value is being supplied by the default value of the base module (in this case the standard Squad module), correct? Guess I'll have to leave them at zero then and be satisfied with the result.

Thanks for your help.

Link to comment
Share on other sites

Just now, strudo76 said:

So what you're saying is that since I'm deleting that key value, the missing value is being supplied by the default value of the base module (in this case the standard Squad module), correct?

Yes

Link to comment
Share on other sites

[Worked Around] Prevent cloning a node when node already exists?

Scatterer saves any changes to its atmo.cfg files when someone makes changes in-game, or if Module Manager introduces some patches. What I want to do is add a node if the node doesn't exist, but not add the node if it does. But adding the node through a patch plus Scatterer saving the new node seems to grow this particular config file with every launch, adding more clones of this node. I want to avoid that.

Specifically, in Scatter_Atmosphere {} I want to clone Atmo[Kerbin] to Atmo[Bin] if Atmo[Bin] doesn't exist:

@Scatterer_atmosphere:NEEDS[scatterer]:HAS[!Atmo[Bin]]
{
	+Atmo[Kerbin] 
	{ 
		@name = Bin 
	} 
} 

I'd do something similar in Scatterer_ocean. This should add a clone of Atmo {} or Ocean {} named "Bin" and it does. But because Scatterer writes its node changes to its config files on exit, Atmo[Bin] exists in Kerbin.cfg on the next launch. For some reason, I can't instruct Module Manager to not do this if the node already exists.

What step am I missing in my HAS[] check?

The other alternative is to just have a clone of Atmo[Kerbin] in place already, but then I'm copying from Blackrack's work, which is subject to the GNU GPL. The project I forked from uses a different license.

[18 JUL 2017] This ended up working around the problem:

@Scatterer_atmosphere:NEEDS[scatterer]:FOR[AlienSpacePrograms]
{
	!Atmo:HAS[#name[Bin]]{}
	+Atmo[Kerbin]
	{
		@name = Bin
	}
}

This deletes and recreates Atmo[Bin] on every launch. The same thing worked for Ocean[Bin]. While this still ends up writing to atmo.cfg on exit, at least it doesn't grow in size anymore. Galileo's Stock Visual Enhancements does this, which is where I got the clue from.

Edited by Gordon Fecyk
Found a workaround
Link to comment
Share on other sites

I have a question regarding adding a general item that is not related to a part, but is dependent on a mod being installed.

I have some resource definition being added in mod A, and want to check if mod B is installed and add more resources if it is.

 

So Mod A has a cfg file with this in it:


FUELTYPE
{
    name = FuelA
    ...
}

FUELTYPE
{
    name = FuelB
    ...
}
eof


Now I made a patch in a seperate cfg file like this:

NEEDS[ModB]
{
    FUELTYPE
    {
        name = FuelC
        ...
    }
}

 

But that doesn't work ofcourse :)     Can anyone tell me how to add a definition conditionally but not related to a part?
 

Link to comment
Share on other sites

I made my tons of MM patches in years...

... suddenly, in one of the most large of them, applying patches on loading KSP, it shown 1 error (probably a typo somewhere in this huge chunk of MM patch I designed)...

How can I find a log (if there is any) indicating the line not working/the part not upgraded??

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