Jump to content

Module Manager Syntax Help


CoriW

Recommended Posts

Hello, I currently use the kOS mod and I've created a module manager config to add a kOS processor to all probe cores via these lines.

	@PART[*]:HAS[@MODULE[ModuleCommand],!MODULE[kOSProcessor],#CrewCapacity[0]]:NEEDS[kOS]:AFTER[kOS]
{
    MODULE
    {
        name = kOSProcessor
        diskSpace = 60000
        ECPerBytePerSecond = 0
        ECPerInstruction = 0.000004
    }
}
	

However I also want to remove the parts that come with the kOS mod from the Tech Tree and change their category to none so they do not appear at all in the VAB. I want to write a single check but can't for the life of me figure out the syntax to specify multiple parts names in one pass. The following are the two things I've tried and neither have worked successfully.

	@PART[*]:HAS[#name[Cherry?Light]|#name[KAL9000]|#name[KR-2042]|#name[kOSMachine0m]|#name[kOSMachine1m]|#name[kOSMachineRad]]:NEEDS[kOS]:AFTER[kOS]
{
    @TechRequired = unassigned
    @category = none
}
	

	@PART[Cherry?Light|KAL9000|KR-2042|kOSMachine0m|kOSMachine1m|kOSMachineRad]:NEEDS[kOS]:AFTER[kOS]
{
    @TechRequired = unassigned
    @category = none
}
	

I'm sure I'm just missing some basic syntax thing, but all help is appreciated, thanks!

Link to comment
Share on other sites

@CoriW

Here is a MM patch I use to 'ghost' parts:

Spoiler

@PART[AKI?GolfClub]:NEEDS[SurfaceExperimentPack]:FINAL
{
	!TechRequired = DELETE
	!entryCost = DELETE
	category = -1
}

// zer0Kerbal

 

I take it [Cherry?Light] has a space in the part name?

@PART[Cherry?Light|KAL9000|KR-2042|kOSMachine*]:NEEDS[kOS]:FINAL

I would suggest dividing up different mod parts into separate patches.

also - add  -mm-dump to the KSP Command line - creates a directory ( Game/_MMCfgOutput )  that has all the resulting part.cfg files (resulting means after all MM patches applied). If you use CKAN there is an option for it (Settings/KSP Command-line). Once it dumps you can see exactly how your patches have been applied.

 

Link to comment
Share on other sites

20 hours ago, zer0Kerbal said:

@CoriW

Here is a MM patch I use to 'ghost' parts:

  Hide contents


@PART[AKI?GolfClub]:NEEDS[SurfaceExperimentPack]:FINAL
{
	!TechRequired = DELETE
	!entryCost = DELETE
	category = -1
}

// zer0Kerbal

 

I take it [Cherry?Light] has a space in the part name?

@PART[Cherry?Light|KAL9000|KR-2042|kOSMachine*]:NEEDS[kOS]:FINAL

I would suggest dividing up different mod parts into separate patches.

also - add  -mm-dump to the KSP Command line - creates a directory ( Game/_MMCfgOutput )  that has all the resulting part.cfg files (resulting means after all MM patches applied). If you use CKAN there is an option for it (Settings/KSP Command-line). Once it dumps you can see exactly how your patches have been applied.

 

Hey so I tried your code, and I've noticed something that I think has been throwing me off this whole time. It seems to be applying the patch correctly, but only removing the parts from the tech tree that I haven't yet unlocked.. However parts I have unlocked remain visible in the tech tree. Is that normal?

Link to comment
Share on other sites

4 minutes ago, CoriW said:

Hey so I tried your code, and I've noticed something that I think has been throwing me off this whole time. It seems to be applying the patch correctly, but only removing the parts from the tech tree that I haven't yet unlocked.. However parts I have unlocked remain visible in the tech tree. Is that normal?

could try the following variant patch

Spoiler

    @TechRequired = Unresearchable
    @category = none

 

Link to comment
Share on other sites

21 minutes ago, zer0Kerbal said:

could try the following variant patch

  Hide contents

    @TechRequired = Unresearchable
    @category = none

 

Unfortunately still can't seem to get rid of the ones I've already unlocked. Strange. Perhaps I'll just end up having to straight up delete the parts from GameData. Doing an MM patch is just seeming to be more trouble than it's worth at this point.

Link to comment
Share on other sites

1 minute ago, CoriW said:

Unfortunately still can't seem to get rid of the ones I've already unlocked. Strange. Perhaps I'll just end up having to straight up delete the parts from GameData. Doing an MM patch is just seeming to be more trouble than it's worth at this point.

ever consider using Janitor's Closet?

Link to comment
Share on other sites

3 minutes ago, zer0Kerbal said:

ever consider using Janitor's Closet?

Yeah I'm running probably around 40 - 50 parts mods, so it's a must. I suppose removing the part's isn't really a clutter issue, more of just that it kinda bugs me to keep the parts around when I've rendered them useless lol.

Link to comment
Share on other sites

Just now, CoriW said:

Yeah I'm running probably around 40 - 50 parts mods, so it's a must. I suppose removing the part's isn't really a clutter issue, more of just that it kinda bugs me to keep the parts around when I've rendered them useless lol.

am the same way. is part of the reason I just created a cck for OrbitalTug for its 8 parts. :P

Link to comment
Share on other sites

1 minute ago, zer0Kerbal said:

am the same way. is part of the reason I just created a cck for OrbitalTug for its 8 parts. :P

Sounds like something I would do lol.

Anyways on the note of my original issue, I ultimately did end up just deleting the parts straight out of GameData, I figure if I update the mod I'll remember to re-delete the parts. Thanks for the help, fly safe.

Link to comment
Share on other sites

  • 1 year later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.

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