Jump to content

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


sarbian

Recommended Posts

Hi MM gurus!

I can't see why this patch doesn't work (latest MM 4.2.1, KSP 1.12.2)

@PART[*]:HAS[!MODULE[ModuleCargoPart]]
    {    MODULE
            {    name = ModuleCargoPart    
                stackableQuantity = 1
                packedVolume = -1
            }
    }

Wanting to add the ability to all parts for kerbals to construct with them.   So, want to patch all parts that don't currently have ModuleCargoPart.

Thanks!

Link to comment
Share on other sites

4 hours ago, theJesuit said:

Hi MM gurus!

I can't see why this patch doesn't work (latest MM 4.2.1, KSP 1.12.2)

@PART[*]:HAS[!MODULE[ModuleCargoPart]]
    {    MODULE
            {    name = ModuleCargoPart    
                stackableQuantity = 1
                packedVolume = -1
            }
    }

Wanting to add the ability to all parts for kerbals to construct with them.   So, want to patch all parts that don't currently have ModuleCargoPart.

Thanks!

Try this one:

@PART[*]:HAS[!MODULE[ModuleCargoPart]]
{
	&MODULE[ModuleCargoPart]
	{
		stackableQuantity = 1
		packedVolume = -1
	}
}

I don't know why your patch didn't worked (I didn't tried to check it neither), but this is how I would write the patch (including the whitespacing) and it worked for me.

Link to comment
Share on other sites

1 hour ago, Lisias said:

 

I don't know why your patch didn't worked (I didn't tried to check it neither), but this is how I would write the patch (including the whitespacing) and it worked for me.

I don't know why.  I've had issues (and other people too) with any of the ! in both my TechTrees and also in Simplex Kerbalism as well.

Thanks for the suggestion - I'll give it a run tonight.

Link to comment
Share on other sites

9 hours ago, theJesuit said:

Hi MM gurus!

I can't see why this patch doesn't work (latest MM 4.2.1, KSP 1.12.2)

@PART[*]:HAS[!MODULE[ModuleCargoPart]]
    {    MODULE
            {    name = ModuleCargoPart    
                stackableQuantity = 1
                packedVolume = -1
            }
    }

Wanting to add the ability to all parts for kerbals to construct with them.   So, want to patch all parts that don't currently have ModuleCargoPart.

Thanks!

I tested here and appear to be working!

@PART[*]:HAS[!MODULE[ModuleCargoPart]]
{
	MODULE
	{
		name = ModuleCargoPartZZZ
		stackableQuantity = 1
		packedVolume = -1
	}
}

 

Link to comment
Share on other sites

1 hour ago, Dominiquini said:

I tested here and appear to be working!

@PART[*]:HAS[!MODULE[ModuleCargoPart]]
{
	MODULE
	{
		name = ModuleCargoPartZZZ
		stackableQuantity = 1
		packedVolume = -1
	}
}

 

Why does the ZZZ make a difference?

Link to comment
Share on other sites

41 minutes ago, theJesuit said:

Why does the ZZZ make a difference?

Sorry. I only added the ZZZ to find the added module on the MM cache! I only tested if the MM patch worked. I don't test nothing in game!

I copied the patch that I used, that is only different of yours regarding the formatting of the code!

Edited by Dominiquini
Link to comment
Share on other sites

6 hours ago, Dominiquini said:

Sorry. I only added the ZZZ to find the added module on the MM cache! I only tested if the MM patch worked. I don't test nothing in game!

I copied the patch that I used, that is only different of yours regarding the formatting of the code!

There isn't a module called ModuleCargoPartZZZ, so your patch (while being technically successful in that it added those lines to the part config) doesn't really do anything. Also I already do use PartVolume.

Edited by OrdinaryKerman
Link to comment
Share on other sites

2 hours ago, OrdinaryKerman said:

There isn't a module called ModuleCargoPartZZZ, so your patch (while being technically successful in that it added those lines to the part config) doesn't really do anything.

I know! I was only testing if the MM patch is applied! Modifying the name helps find it in the MM cache! The real patch should use 'ModuleCargoPart'!

* Anyway, you should use the KSP_PartVolume mod for this purpose!

 

Edited by Dominiquini
Link to comment
Share on other sites

18 hours ago, Lisias said:

Try this one:

@PART[*]:HAS[!MODULE[ModuleCargoPart]]
{
	&MODULE[ModuleCargoPart]
	{
		stackableQuantity = 1
		packedVolume = -1
	}
}

I don't know why your patch didn't worked (I didn't tried to check it neither), but this is how I would write the patch (including the whitespacing) and it worked for me.

I tried, and it didn't work.

I don't know why but something is very strange.  I think I completely clean install may be in order, ie. remove KSP and put back in.   It is patching but not showing up in game.

Link to comment
Share on other sites

Hi @sarbian and @JPLRepo,

Above I was confused as I wanted to add the ModuleCargoPart to everything, to be able to construct (with many kerbals helping, and the Exoskeleton Mod) bases out of other parts.

KSP seems to be pushing for ModuleCargoPart and ModuleInventoryPart to not be on the same part, even though the small command pods DO have this.   The Log produces a WRN:

This is a fresh download, KSP 1.12.2 from Steam, Expansions removed and nothing else install (not even MM):

[LOG 05:21:36.318] PartLoader: Compiling Part 'Squad/Parts/Cargo/CargoContainers/smallCargoContainer/smallCargoContainer'
[WRN 05:21:36.322] [Part]: Cannot have ModuleCargoPart and ModuleInventoryPart on same Part [smallCargoContainer'. Removed ModuleCargoPart
<snip>
[LOG 05:21:36.409] PartLoader: Compiling Part 'Squad/Parts/Cargo/StorageUnits/CargoStorageUnit/CargoStorageUnit'
[WRN 05:21:36.412] [Part]: Cannot have ModuleCargoPart and ModuleInventoryPart on same Part [CargoStorageUnit'. Removed ModuleCargoPart
[LOG 05:21:36.417] PartLoader: Compiling Part 'Squad/Parts/Cargo/StorageUnits/ConformalStorageUnit/ConformalStorageUnit'
[WRN 05:21:36.420] [Part]: Cannot have ModuleCargoPart and ModuleInventoryPart on same Part [ConformalStorageUnit'. Removed ModuleCargoPart
<snip>
[LOG 05:21:36.579] PartLoader: Compiling Part 'Squad/Parts/Command/mk1Cockpits/mk1Cockpit/Mark1Cockpit'
[WRN 05:21:36.585] [Part]: Cannot have ModuleCargoPart and ModuleInventoryPart on same Part [Mark1Cockpit'. Removed ModuleCargoPart
[LOG 05:21:36.593] PartLoader: Compiling Part 'Squad/Parts/Command/mk1Cockpits/mk1CrewCabin/MK1CrewCabin'
[WRN 05:21:36.597] [Part]: Cannot have ModuleCargoPart and ModuleInventoryPart on same Part [MK1CrewCabin'. Removed ModuleCargoPart
[LOG 05:21:36.604] PartLoader: Compiling Part 'Squad/Parts/Command/mk1Cockpits/mk1InlineCockpit/Mark2Cockpit'
[WRN 05:21:36.609] [Part]: Cannot have ModuleCargoPart and ModuleInventoryPart on same Part [Mark2Cockpit'. Removed ModuleCargoPart
[LOG 05:21:36.617] PartLoader: Compiling Part 'Squad/Parts/Command/mk1LanderCan/mk1LanderCan/landerCabinSmall'
[WRN 05:21:36.622] [Part]: Cannot have ModuleCargoPart and ModuleInventoryPart on same Part [landerCabinSmall'. Removed ModuleCargoPart
[LOG 05:21:36.630] PartLoader: Compiling Part 'Squad/Parts/Command/mk1pod_v2/mk1Pod_v2/mk1pod_v2'
[WRN 05:21:36.636] [Part]: Cannot have ModuleCargoPart and ModuleInventoryPart on same Part [mk1pod.v2'. Removed ModuleCargoPart
[LOG 05:21:36.645] PartLoader: Compiling Part 'Squad/Parts/Command/mk2CockpitInline/mk2CockpitInline/mk2Cockpit_Inline'

And the game loads with these parts DEFINITLY having the ModuleInventoryPart and the ModuleCargoPart .  Such as the mk1pod.v2 as an example above.

However, MM can't patch ModuleCargoPart onto parts that have ModuleInventoryPart. KSP is removing it post MM it seems.

But if I remove the ModuleInventoryPart, say rename it, KSP allows the ModuleCargoPart on former ModuleInventoryParts fine. 

But then if I rename back to ModuleInventoryPart, then KSP removes ModuleCargoPart.

So, this works, but the Inventory obviously is removed from everything!

@PART[*]:FINAL
	 {	 @MODULE[ModuleInventoryPart]
			 {	@name = SimplexModuleInv
			 }
	}

@PART[*]:HAS[!MODULE[ModuleCargoPart]]:FINAL
	{	MODULE
			{	name = ModuleCargoPart
				packedVolume = -1
			}
	}

but this doesn't:

@PART[*]:FINAL
	 {	 @MODULE[ModuleInventoryPart]
			 {	@name = SimplexModuleInv
			 }
	}

@PART[*]:HAS[!MODULE[ModuleCargoPart]]:FINAL
	{	MODULE
			{	name = ModuleCargoPart
				packedVolume = -1
			}
	}
	
@PART[*]:FINAL
	 {	 @MODULE[SimplexModuleInv]
			 {	@name = ModuleInventoryPart
			 }
	}

If I add the ModuleCargoPart manually to say the hitchhiker's cfg then it will throw a WRN in the log along with everything else, but it will still load with both modules.

I should add with those examples, ModuleCargoPart is being applied to say the large tanks, so the patch is working.

I don't know if this is a bug, a feature, or intentional.  Can you please advise?

 

Peace.

Link to comment
Share on other sites

3 hours ago, theJesuit said:

Hi @sarbian and @JPLRepo,

Above I was confused as I wanted to add the ModuleCargoPart to everything, to be able to construct (with many kerbals helping, and the Exoskeleton Mod) bases out of other parts.

KSP seems to be pushing for ModuleCargoPart and ModuleInventoryPart to not be on the same part, even though the small command pods DO have this.   The Log produces a WRN:

This is a fresh download, KSP 1.12.2 from Steam, Expansions removed and nothing else install (not even MM):

[LOG 05:21:36.318] PartLoader: Compiling Part 'Squad/Parts/Cargo/CargoContainers/smallCargoContainer/smallCargoContainer'
[WRN 05:21:36.322] [Part]: Cannot have ModuleCargoPart and ModuleInventoryPart on same Part [smallCargoContainer'. Removed ModuleCargoPart
<snip>
[LOG 05:21:36.409] PartLoader: Compiling Part 'Squad/Parts/Cargo/StorageUnits/CargoStorageUnit/CargoStorageUnit'
[WRN 05:21:36.412] [Part]: Cannot have ModuleCargoPart and ModuleInventoryPart on same Part [CargoStorageUnit'. Removed ModuleCargoPart
[LOG 05:21:36.417] PartLoader: Compiling Part 'Squad/Parts/Cargo/StorageUnits/ConformalStorageUnit/ConformalStorageUnit'
[WRN 05:21:36.420] [Part]: Cannot have ModuleCargoPart and ModuleInventoryPart on same Part [ConformalStorageUnit'. Removed ModuleCargoPart
<snip>
[LOG 05:21:36.579] PartLoader: Compiling Part 'Squad/Parts/Command/mk1Cockpits/mk1Cockpit/Mark1Cockpit'
[WRN 05:21:36.585] [Part]: Cannot have ModuleCargoPart and ModuleInventoryPart on same Part [Mark1Cockpit'. Removed ModuleCargoPart
[LOG 05:21:36.593] PartLoader: Compiling Part 'Squad/Parts/Command/mk1Cockpits/mk1CrewCabin/MK1CrewCabin'
[WRN 05:21:36.597] [Part]: Cannot have ModuleCargoPart and ModuleInventoryPart on same Part [MK1CrewCabin'. Removed ModuleCargoPart
[LOG 05:21:36.604] PartLoader: Compiling Part 'Squad/Parts/Command/mk1Cockpits/mk1InlineCockpit/Mark2Cockpit'
[WRN 05:21:36.609] [Part]: Cannot have ModuleCargoPart and ModuleInventoryPart on same Part [Mark2Cockpit'. Removed ModuleCargoPart
[LOG 05:21:36.617] PartLoader: Compiling Part 'Squad/Parts/Command/mk1LanderCan/mk1LanderCan/landerCabinSmall'
[WRN 05:21:36.622] [Part]: Cannot have ModuleCargoPart and ModuleInventoryPart on same Part [landerCabinSmall'. Removed ModuleCargoPart
[LOG 05:21:36.630] PartLoader: Compiling Part 'Squad/Parts/Command/mk1pod_v2/mk1Pod_v2/mk1pod_v2'
[WRN 05:21:36.636] [Part]: Cannot have ModuleCargoPart and ModuleInventoryPart on same Part [mk1pod.v2'. Removed ModuleCargoPart
[LOG 05:21:36.645] PartLoader: Compiling Part 'Squad/Parts/Command/mk2CockpitInline/mk2CockpitInline/mk2Cockpit_Inline'
 

And the game loads with these parts DEFINITLY having the ModuleInventoryPart and the ModuleCargoPart .  Such as the mk1pod.v2 as an example above.

However, MM can't patch ModuleCargoPart onto parts that have ModuleInventoryPart. KSP is removing it post MM it seems.

But if I remove the ModuleInventoryPart, say rename it, KSP allows the ModuleCargoPart on former ModuleInventoryParts fine. 

But then if I rename back to ModuleInventoryPart, then KSP removes ModuleCargoPart.

So, this works, but the Inventory obviously is removed from everything!

@PART[*]:FINAL
	 {	 @MODULE[ModuleInventoryPart]
			 {	@name = SimplexModuleInv
			 }
	}

@PART[*]:HAS[!MODULE[ModuleCargoPart]]:FINAL
	{	MODULE
			{	name = ModuleCargoPart
				packedVolume = -1
			}
	}
 

but this doesn't:

@PART[*]:FINAL
	 {	 @MODULE[ModuleInventoryPart]
			 {	@name = SimplexModuleInv
			 }
	}

@PART[*]:HAS[!MODULE[ModuleCargoPart]]:FINAL
	{	MODULE
			{	name = ModuleCargoPart
				packedVolume = -1
			}
	}
	
@PART[*]:FINAL
	 {	 @MODULE[SimplexModuleInv]
			 {	@name = ModuleInventoryPart
			 }
	}
 

If I add the ModuleCargoPart manually to say the hitchhiker's cfg then it will throw a WRN in the log along with everything else, but it will still load with both modules.

I should add with those examples, ModuleCargoPart is being applied to say the large tanks, so the patch is working.

I don't know if this is a bug, a feature, or intentional.  Can you please advise?

 

Peace.

From what I can tell,  the ones with it both are the ones where the packedVolume == -1, which means it can be manipulated, but can't be put into inventory.

My guess is the idea is that ModuleInventoryPart means it can contain other parts in inventory, but it can't be put into an inventory on another part

Link to comment
Share on other sites

3 hours ago, theJesuit said:

I don't know if this is a bug, a feature, or intentional.  Can you please advise?

MM does not do anything with the module loading. It edits the config before the game use that config to create the parts and modules. So you need to look at what is in the ModuleManager cache and check if it contains what you want.

The ModuleCargoPart and ModuleInventoryPart warning is not related to MM.The fact that it loads in one case and not the other may be related to the node order in memory or something even move arcane, and there is little that MM can do about that.

Link to comment
Share on other sites

1 hour ago, sarbian said:

MM does not do anything with the module loading. It edits the config before the game use that config to create the parts and modules. So you need to look at what is in the ModuleManager cache and check if it contains what you want.

The ModuleCargoPart and ModuleInventoryPart warning is not related to MM.The fact that it loads in one case and not the other may be related to the node order in memory or something even move arcane, and there is little that MM can do about that.

Patch is being loaded into the MM cache, but KSP is overruling after MM.  

Link to comment
Share on other sites

12 hours ago, linuxgurugamer said:

From what I can tell,  the ones with it both are the ones where the packedVolume == -1, which means it can be manipulated, but can't be put into inventory.

My guess is the idea is that ModuleInventoryPart means it can contain other parts in inventory, but it can't be put into an inventory on another part

Yea.  I'm putting a packedVolume = -1 in.

Just seems odd KSP it removes the patch added, but doesnt remove that module from parts where it is in the original cfgs like the mk1pod.

This works :
// Make all parts that don't have an inventory manipulable in EVA
@PART[*]:HAS[!MODULE[ModuleCargoPart],!MODULE[ModuleInventoryPart]]:FINAL
{
  MODULE
  {
    name = ModuleCargoPart
    packedVolume = -1
  }
}

// Parts that have a ModuleInventoryPart can have a ModuleCargoPart to make them 
// manipulable in EVA, but only if :
// - the ModuleCargoPart index is lower than the ModuleInventoryPart index.
// - the ModuleCargoPart can't be placed in inventories (packedVolume must be < 0)
@PART[*]:HAS[@MODULE[ModuleInventoryPart]:HAS[!MODULE[ModuleCargoPart]]]:FINAL
{
  // To achieve that, we duplicate the ModuleInventoryPart :
  +MODULE[ModuleInventoryPart] {}
  
  // Then change the first instance to be a ModuleCargoPart :
  @MODULE[ModuleInventoryPart],0
  {
    -* = delete
    name = ModuleCargoPart
    packedVolume = -1
  }
}

This has been brought to my attention.  Thanks @Gotmachine

 

Link to comment
Share on other sites

Further advice please - I have this working, but it is strange - please see the end of this post.

@PART[*]:HAS[!MODULE[ModuleCargoPart]]:FINAL
	{	
		MODULE
			{	name = ModuleCargoPart
				packedVolume = -1
			}
	}

@PART[*]:HAS[@MODULE[ModuleInventoryPart]:HAS[!MODULE[ModuleCargoPart]]]:FINAL
	{	
		+MODULE[ModuleInventoryPart] {}
		@MODULE[ModuleInventoryPart],0
			{	
				-* = delete
				name = ModuleCargoPart
				packedVolume = -1
			}
	}

For some reason, this results in two ModuleCargoParts being added to crewed parts (as they have inventories).

When I switch the patches around like this:

@PART[*]:HAS[@MODULE[ModuleInventoryPart]:HAS[!MODULE[ModuleCargoPart]]]:FINAL
	{	
		+MODULE[ModuleInventoryPart] {}
		@MODULE[ModuleInventoryPart],0
			{	
				-* = delete
				name = ModuleCargoPart
				packedVolume = -1
			}
	}

@PART[*]:HAS[!MODULE[ModuleCargoPart]]:FINAL
	{	
		MODULE
			{	
				name = ModuleCargoPart
				packedVolume = -1
			}
	}

Then crewed parts that originally had both ModuleCargoPart and ModuleInventoryPart such as the Mk1pod, and the cargo containers now have two ModuleCargoParts.

However if I do this then it all appears as it should. :

@PART[*]:HAS[@MODULE[ModuleInventoryPart]:HAS[!MODULE[ModuleCargoPart]]]:FINAL
	{	
		!MODULE[ModuleCargoPart]		{}
		+MODULE[ModuleInventoryPart]	{}
		@MODULE[ModuleInventoryPart],0
			{	-* = delete
				name = ModuleCargoPart
				packedVolume = -1
			}
	}

@PART[*]:HAS[!MODULE[ModuleCargoPart]]:FINAL
	{	
		MODULE
			{	
				name = ModuleCargoPart
				packedVolume = -1
			}
	}

The top patch seems to be ignoring the :HAS[!MODULE[ModuleCargoPart]]  Is that expected behaviour?  As I've noticed this occurring in my other mods.
 

 

Edited by theJesuit
additional information
Link to comment
Share on other sites

My mistake, the patch should be :

Spoiler
// Make all parts that don't have an inventory manipulable in EVA
@PART[*]:HAS[!MODULE[ModuleCargoPart],!MODULE[ModuleInventoryPart]]:FINAL
{
  MODULE
  {
    name = ModuleCargoPart
    packedVolume = -1
  }
}

// Parts that have a ModuleInventoryPart can have a ModuleCargoPart to make them 
// manipulable in EVA, but only if :
// - the ModuleCargoPart index is lower than the ModuleInventoryPart index.
// - the ModuleCargoPart can't be placed in inventories (packedVolume must be < 0)
@PART[*]:HAS[@MODULE[ModuleInventoryPart],!MODULE[ModuleCargoPart]]:FINAL
{
  // To achieve that, we duplicate the ModuleInventoryPart :
  +MODULE[ModuleInventoryPart] {}
  
  // Then change the first instance to be a ModuleCargoPart :
  @MODULE[ModuleInventoryPart],0
  {
    -* = delete
    name = ModuleCargoPart
    packedVolume = -1
  }
}

 

specifically, instead of :

@PART[*]:HAS[@MODULE[ModuleInventoryPart]:HAS[!MODULE[ModuleCargoPart]]]:FINAL

it must be :

@PART[*]:HAS[@MODULE[ModuleInventoryPart],!MODULE[ModuleCargoPart]]:FINAL

Otherwise, the second patch gets applied to parts that already have both modules (the "SEQ-X container module" parts for example), adding an extra ModuleCargoPart

Link to comment
Share on other sites

50 minutes ago, Adiri said:

Module Manager refuses to load any patches, even though I have mods (my own) with CFG's

 

First, please provide a Player.log, gives better (IMHO) information for issues like this.

Second, it looks like you are running KSP 1.10.1

MM is definitely having an error, it might be the wrong version for that version of KSP.

I'd create a new install, and only install the minimal mods, see if it works, then add a few at a time

 

Link to comment
Share on other sites

3 hours ago, linuxgurugamer said:

First, please provide a Player.log, gives better (IMHO) information for issues like this.

Second, it looks like you are running KSP 1.10.1

MM is definitely having an error, it might be the wrong version for that version of KSP.

I'd create a new install, and only install the minimal mods, see if it works, then add a few at a time

 

Alright I will try this, where can I find player.log?

Link to comment
Share on other sites

Just now, linuxgurugamer said:

I'm always amazed that no one bothers to read  the signatures:

Read this BEFORE asking for supporthttp://forum.kerbalspaceprogram.com/index.php?/topic/83212-how-to-get-support-read-first/

Alright sorry, I (wrongly) assumed that the log was the same. 

Even after updating to 1.11, and reinstalling my mods, module manager still refuses to work

 

Link to comment
Share on other sites

19 minutes ago, Adiri said:

Alright sorry, I (wrongly) assumed that the log was the same. 

Even after updating to 1.11, and reinstalling my mods, module manager still refuses to work

 

So it's getting an error which indicates to me that one of the mods you have installed is not the right one for the version of the game you are playing.  Which one, I can't say.

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.

You might want to check for misplaced DLLs, old DLLs, etc

 

Edit:  Looks like the error is in _BuildManager, which appears to be  part of EVE.  Try removing EVE and see if it loads.  Post a log file as well, maybe a successful load will be useful.  But this isn't a MM problem

Edited by linuxgurugamer
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...