Jump to content

Need help with odd Syntax question


linuxgurugamer

Recommended Posts

I have a problem with a MM patch which is updating the kerbalEVA part.  Problem is that when Serenity/Breaking Ground is installed, there are two of each kerbalEVA part, because SQUAD is trying to add the experientID = ROCScience to the EVA Kerbal but seeing as no MM syntax exists in stock KSP, they end up adding the module as a brand new part

Syntax of what I have so far is:

 

@PART[kerbalEVA*]:NEEDS[!EVAEnhancements]:NEEDS[!Serenity]
{
    MODULE
    {
        name = ModuleTweakableEVA
    }
}
@PART[kerbalEVA*]:NEEDS[!EVAEnhancements]:NEEDS[Serenity]
{
    MODULE:NEEDS[MODULE[ModuleScienceExperiment, experimentID = ROCScience]]
    {
        name = ModuleTweakableEVA
    }
}

The part I need help with is the 5th line from the bottom:

MODULE:NEEDS[MODULE[ModuleScienceExperiment, experimentID = ROCScience]]

Essentially what needs to happen is that

IF Serenity is installed
AND the part contains a MODULE of type ModuleScienceExperiment,
AND inside the ModuleScienceExperiment is defined experimentID = ROCScience,

THEN add the new module

 

Thanks in advance

 

LGG
 

Edited by linuxgurugamer
Link to comment
Share on other sites

@PART[kerbalEVA*]:NEEDS[!EVAEnhancements&!SquadExpansion/Serenity]
{
	MODULE
	{
		name = ModuleTweakableEVA
	}
}

@PART[kerbalEVA*]:HAS[@MODULE[ModuleScienceExperiment]:HAS[#experimentID[ROCScience]]]:NEEDS[!EVAEnhancements&SquadExpansion/Serenity]
{
	MODULE
	{
		name = ModuleTweakableEVA
	}
}

Would that work?

Edited by Poodmund
Link to comment
Share on other sites

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