Jump to content

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


sarbian

Recommended Posts

1 hour ago, Blackline said:

My mod has only one cfg, and in that i am cloning the stock batteries and give them new names, properties etc: +PART[*attery*]:HAS[@RESOURCE[ElectricCharge]]:FOR[VenStockRevamp]

  • if Ven* is not present, the cfg can run anytime during mm patchload
    • using AFTER would prevent my cfg from being run at all, so no RealBattery
    • using FOR somehow works without VEN, but i didn't check what happens if VEN is installed
  • if Ven IS present:
    • if i do nothing, my patch runs before (RealBattery is called before VenStockRevamp), i loose all models ingame, because VEN is path patching like this (although that path patching is done after my stuff ??? @PART[*]:FOR[zzzVSRPathPatch] ???) :
      • @MODEL,* {  @model ^= :^Squad/Parts/Electrical/z-100Battery/model:VenStockRevamp/Squad/Parts/Electrical/Batteries/model100:  }
    • if i use AFTER, it somehow works
    • currently no idea if FOR works with VEN

In everything i do, i'd love to take comments in how to improve, so don't hesitate giving feedback :-)

Not an expert, but I think you'd need to have two different sections

+PART[*attery*]:HAS[@RESOURCE[ElectricCharge]]:NEEDS[!VenStockRevamp]

For what you want if Ven's isn't there, then another section

@PART[*attery*]:HAS[@RESOURCE[ElectricCharge]]:AFTER[VenStockRevamp]

For what you want if Ven's is there.

Link to comment
Share on other sites

1 hour ago, Blackline said:

is this right then? 

@PART[*attery*]:HAS[@RESOURCE[ElectricCharge]]:[AFTER[VenStockRevamp]:NEEDS[VenStockRevamp]:]

No not like that, didn't realize that's what you meant

@PART[*attery*]:HAS[@RESOURCE[ElectricCharge]]:AFTER[VenStockRevamp]:NEEDS[VenStockRevamp]

You can also put the NEEDS before the phase; order doesn't matter there. But you can't nest them, no.

Link to comment
Share on other sites

NEEDS allows multiple conditions and also allows a linear AND/OR logic

AFTER allows only a single condition

 

Basically, NEEDS is design to set conditions of dependency for when to include the patch whereas AFTER is designed to set patch order.

Also, Ven's patch is named "zzzVSRPathPatch", not "VenStockRevamp".

Edited by Electrocutor
Link to comment
Share on other sites

1 hour ago, careermode100 said:

I am unable to download Module Manager 3.0.6 because somehow, there's a virus within the file.

Is there a way to get rid of the virus?

 

On 3/16/2018 at 10:59 PM, sarbian said:

Defender marked a bunch of KSP file as a virus : 

Update your definition manually and it should be gone: https://www.microsoft.com/en-us/wdsi/definitions

 

 

Link to comment
Share on other sites

Hi!

I'm trying to use this selector:

@PART[*]:HAS[@MODULE[ModuleDockingNode]:HAS[#nodeType[size0|size1|size2]]]

It does not work. The problem seems to be in "size0|size1|size2" part. Is this a bug, or OR is not supported in HAS values by design?

Link to comment
Share on other sites

54 minutes ago, Psycho_zs said:

Hi!

I'm trying to use this selector:


@PART[*]:HAS[@MODULE[ModuleDockingNode]:HAS[#nodeType[size0|size1|size2]]]

It does not work. The problem seems to be in "size0|size1|size2" part. Is this a bug, or OR is not supported in HAS values by design?

"nodeType" is inside "ModuleDockingNode" :wink: and why use that since you already selected all types with

@PART[*]:HAS[@MODULE[ModuleDockingNode]

 

Link to comment
Share on other sites

1 minute ago, sebi.zzr said:

"nodeType" is inside "ModuleDockingNode"

Yes it is, this syntax is correct from the hierarchal standpoint.

3 minutes ago, sebi.zzr said:

and why use that since you already selected all types

I want to select only stock-compatible docking ports.

Link to comment
Share on other sites

20 hours ago, FreeThinker said:

Question, is there anyway in MM to detect if an specific RESOURCE_DEFINITION is already defined?

In what context. Like create it if not exists or from another node/module, like add this module only if the specific "RESOURCE_DEFINITION" exists or something else?

Link to comment
Share on other sites

2 minutes ago, Warezcrawler said:

In what context. Like create it if not exists or from another node/module, like add this module only if the specific "RESOURCE_DEFINITION" exists or something else?

I like know if I can declare it without hurting any other mod resource definitions

Link to comment
Share on other sites

20 minutes ago, sebi.zzr said:

@PART[*]:HAS[@MODULE[ModuleDockingNode[@nodeType[size0|size1|size2]]]]

 

Whoa, how is that supposed to work?

7 minutes ago, sebi.zzr said:

@nodeType

nodeType is a value, so it should be #nodeType. Anyway, I've checked your syntax with both #nodeType and @nodeType.

I've also used "size1|size2" selector, but nodes with size0 were also affected, so something is wrong here.

Link to comment
Share on other sites

2 hours ago, Psycho_zs said:

I'm trying to use this selector:


@PART[*]:HAS[@MODULE[ModuleDockingNode]:HAS[#nodeType[size0|size1|size2]]]

It does not work. The problem seems to be in "size0|size1|size2" part. Is this a bug, or OR is not supported in HAS values by design?

 

57 minutes ago, Psycho_zs said:

I've also used "size1|size2" selector, but nodes with size0 were also affected, so something is wrong here.

How about this?

@PART[*]:HAS[@MODULE[ModuleDockingNode],[#nodeType[size0|size1|size2]]]

That way you get rid of the other HAS and replace it with AND.

Link to comment
Share on other sites

2 minutes ago, leatherneck6017 said:

How about this?


@PART[*]:HAS[@MODULE[ModuleDockingNode],[#nodeType[size0|size1|size2]]]

That way you get rid of the other HAS and replace it with AND.

nodeType is inside ModuleDockingNode. With this selector it would probe for it in root.

Link to comment
Share on other sites

3 minutes ago, Psycho_zs said:

nodeType is inside ModuleDockingNode. With this selector it would probe for it in root.

TBH, I've never had much success with using OR with MM. The last time it gave me a lot of trouble I just added individual selectors for what I was trying to do.

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