ensou04

[WIP] Rocket Sound Enhancement Dev Thread

Recommended Posts

@linuxgurugamer here it is. i am definitely missing something here

@PART[*]:HAS[!MODULE[ModuleWheelBase],!MODULE[KerbalEVA],!MODULE[ShipEffectsCollisions]]
{	
	MODULE
	{
		name = ShipEffectsCollisions
	}
}

 

Share this post


Link to post
Share on other sites

@ensou04 sorry if this is a stoopid question, but have you tried three seperate patches, instead of all three, in one?
I'm prolly not understanding the MM logic there, but to me it looks like *all* three of those module conditions need to be met at once, for patch activation? vOv

Like, you have NOT/AND... not NOT/OR

EDIT: yeah... I figured OR needed to be in there somewheres.. I asked in Discord, and someone respectable confirmed you need to replace " , " with " | " ... comma is AND... " | " is OR...

Edited by Stone Blue

Share this post


Link to post
Share on other sites
12 minutes ago, Stone Blue said:

@ensou04 sorry if this is a stoopid question, but have you tried three seperate patches, instead of all three, in one?
I'm prolly not understanding the MM logic there, but to me it looks like *all* three of those module conditions need to be met at once, for patch activation? vOv

Like, you have NOT... not NOT/OR

TBH thats probably why, because i have no idea how MM works. as i understood it as "filter out parts that contains Any of these modules"
so i'll try that now and see what happens :D
In hindsight i need sleep, if i separate them: then the first one will run and add the module to the next modules that are supposed to be blacklisted. 

Edited by ensou04

Share this post


Link to post
Share on other sites
1 minute ago, ensou04 said:

TBH thats probably why, because i have no idea how MM works. as i understood it as "filter out parts that contains Any of these modules"
so i'll try that now and see what happens :D

'K .. make sure you catch my edit in there...:P

 

Share this post


Link to post
Share on other sites

caught it just now, thanks :D also hope you caught my edit lol

UPDATE:
ok so i did just that, there were no errors but,  the collision module still gets applied to the kerbals. i'll just deal with it later

@PART[*]:HAS[!MODULE[ModuleWheelBase]|!MODULE[KerbalEVA]|!MODULE[ShipEffectsCollisions]]
{	
	MODULE
	{
		name = ShipEffectsCollisions
	}
}

 

Edited by ensou04

Share this post


Link to post
Share on other sites
2 hours ago, ensou04 said:

caught it just now, thanks :D also hope you caught my edit lol

UPDATE:
ok so i did just that, there were no errors but,  the collision module still gets applied to the kerbals. i'll just deal with it later

This is from EVA Enhancements:


@PART[kerbalEVA*]:HAS[@MODULE[ModuleScienceExperiment]:HAS[~experimentID[ROCScience]]]
{
	MODULE
	{
		name = EVAEnhancements
	}
}

and this is from DeadlyReentry:

@PART[*]:HAS[@MODULE[KerbalEVA]]
{
..... do something here
}

 

Edited by linuxgurugamer

Share this post


Link to post
Share on other sites
3 hours ago, Stone Blue said:

EDIT: yeah... I figured OR needed to be in there somewheres.. I asked in Discord, and someone respectable confirmed you need to replace " , " with " | " ... comma is AND... " | " is OR...

However, I was very wrong. OR statements can only be used in NEEDS not in HAS or anything else. 

Share this post


Link to post
Share on other sites

@ensou04 I believe what you're looking to do looks like this:

// Tag parts, in succession, for each module you disagree with.
// Can't use OR boolean anywhere except in :NEEDS
@PART:HAS[@MODULE[ModuleWheelBase]]
{    
	%RSENoFX = True // % prefix means create if not exist, edit if exist. This prevents the key repeating later on in parts that have other blacklisted modules
}

@PART:HAS[@MODULE[KerbalEVA]]
{    
	%RSENoFX = True
}

// Do the actual operation on all parts that don't have this key.
// The :AFTER is only there to provide an opportunity for other modders to tag their own parts (if ever needed) before this operation happens.
@PART:HAS[~RSENoFX[*]]:AFTER[RocketSoundEnhancement]
{    
	%MODULE[ShipEffectsCollisions] {}
	@RSENoFX = Done // change this key's value to prevent infinite loops
}

 

Edited by JadeOfMaar

Share this post


Link to post
Share on other sites

@JadeOfMaar thanks! it worked but it still ignored Kerbals for some reason , the wheels blacklist works just fine. so I just did @PART[kerbalEVA*] as a temporary fix,  its not elegant but that worked a treat. Kerbals don't sound like dumpsters now. lets just hope there's no real parts that has kerbalEVA in its name

EDIT:
i missed this, maybe i should have tried this as well:

@PART[*]:HAS[@MODULE[KerbalEVA]]
{
..... do something here
}
Edited by ensou04

Share this post


Link to post
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.