Jump to content

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


sarbian

Recommended Posts

25 minutes ago, sebi.zzr said:

@5thHorseman,why do you struggle so much,just remove resource definition.If there is no definition the resource not exist.


!RESOURCE_DEFINITION[Ore]
{
}

 

I'll try that. It was actually the ultimate goal but I thought (incorrectly?) that just removing the resource definition without also taking care of planetary resources, tank resources, etc would cause problems.

Of course, it can't cause much more problems than I'm having now - considering I've all but thrown in the towel on it due to the fact that the bugginess seems part of the stock game. In that if I remove Ore from the stock ore.cfg and put something else in instead, it fails in the same way as it did with ModuleManager.

EDIT: Nope @sebi.zzr that has the same effect that removing the GLOBAL_RESOURCE had: It does in fact remove ore from the planets but it does not allow (or removes, I can't tell) all other resources I try to add as well.

It really does seem that when it comes to planetary crusts, it's ore or nothing.

Edited by 5thHorseman
Link to comment
Share on other sites

24 minutes ago, 5thHorseman said:

In that if I remove Ore from the stock ore.cfg and put something else in instead, it fails in the same way as it did with ModuleManager.

I see.Well if this is only for your use,you could remove "ore.cfg" from resource folder,because MM can't find "GLOBAL_RESOURCE".

Link to comment
Share on other sites

2 hours ago, Sigma88 said:

@5thHorseman

sorry, forgot about the curly brackets


!GLOBAL_RESOURCE:HAS[#ResourceName[Ore]]:FINAL {}

this *should* work

 

I totally agree that it should. But it doesn't. The only thing I've got to work consistently is to set all the "distribution" parameters to zero.

In the original config. A Module Manager config won't cut it.

Seriously there's something wonky here I just don't know what it is.

Link to comment
Share on other sites

11 minutes ago, 5thHorseman said:

I totally agree that it should. But it doesn't. The only thing I've got to work consistently is to set all the "distribution" parameters to zero.

In the original config. A Module Manager config won't cut it.

Seriously there's something wonky here I just don't know what it is.

have you checked the cache to see if the module gets actually deleted?

Link to comment
Share on other sites

Just looking for confirmation on what I THINK I have already discovered

!MODULE[ModuleEngine*] {}

and

!MODULE[ModuleEngine*]

{}

Are not the same.  The First Example will delete any module that starts with the name ModuleEngine, the second will do nothing?    My currently MMed engines all are showing two engines in KSP at the moment using the 2nd set of code.  

TIA!

Link to comment
Share on other sites

6 hours ago, Sigma88 said:

have you checked the cache to see if the module gets actually deleted?

I checked that yesterday and the patch don't get applied,because MM don't see "GLOBAL_RESOURCE".There is no such parameter in cache.

Link to comment
Share on other sites

@Sigma88 The second patch has a blank line:

!MODULE[ModuleEngine*]
<----- Blank line
{} 

MM will fail to compile that patch. I am assuming that that is the actual way that the patch is written and not:

!MODULE[ModuleEngines*]
{
}

@Pappystein And a bit of a failure on my part: the first patch will delete only the first ModuleEngines(FX/RF) that MM will find in the config. In order to delete all engine modules then you need to use a second wildcard:

!MODULE[ModuleEngines*],*{}

 

Edited by Phineas Freak
Link to comment
Share on other sites

3 minutes ago, Phineas Freak said:

@Sigma88 The second patch has a blank line:


!MODULE[ModuleEngine*]
<----- Blank line
{} 

MM will fail to compile that patch.

@Pappystein And a bit of a failure on my part: the first patch will delete only the first ModuleEngines(FX/RF) that MM will find in the config. In order to delete all engine modules then you need to use a second wildcard:


!MODULE[ModuleEngines*],*{}

 

 

7 minutes ago, Sigma88 said:

@Pappystein

I'm not sure about what @Phineas Freak said but regarding your first example it won't delete all modules with that name

Only the first one

 

Maybe if you use that code to delete root nodes it will delete all of them, but I am not sure

Thanks again to both of you for answering.   I am currently only deleting a singular ModuleEngines* so the original code is OK.  I will keep the second argument in mind for the future though!   I am trying to make a patch for Bluedog_DB to give me several variants of the Delta Upper stage powered by their actual fuels.   I have the engines working with the old code but Mechjeb and all other similar mods do not detect ISP because the first engine is the stock LF engine module I am trying to delete.

Edited by Pappystein
Link to comment
Share on other sites

Does ! exclamation mark blacklisting work on # nodes?

I want to write a patch which adds a node_attach line if it is not present.

@PART[*]:HAS[!#node_attach[*],MODULE[ModuleKISItem]]:FOR[KIS]
{
   node_attach = 0.0, -0.1, 0.0, 0.0, -1.0, 0.0, 1
}

 

Link to comment
Share on other sites

11 minutes ago, Enceos said:

Does ! exclamation mark blacklisting work on # nodes?

I want to write a patch which adds a node_attach line if it is not present.


@PART[*]:HAS[!#node_attach[*],MODULE[ModuleKISItem]]:FOR[KIS]
{
   node_attach = 0.0, -0.1, 0.0, 0.0, -1.0, 0.0, 1
}

 

You have to use ~ (which means "does not have")

:HAS[~XXX[123]]

Edited by Sigma88
Link to comment
Share on other sites

12 minutes ago, Enceos said:

@Sigma88 MM takes neither ~ nor ~# in my case. During loading it says that it found an error in my config. I tried all kinds of combinations but to no avail.

@PART:HAS[~node_attach[*]] {}

this means "any PART that does NOT have any node_attach"

Link to comment
Share on other sites

17 minutes ago, Sigma88 said:

ah yes

you are missing an @

@MODULE instead of just MODULE

I got rusty, how could I miss such a thing :) thank you, man!

EDIT: @Sigma88 Lol, strange things happen. MM still doesn't like the patch with the module check. I'm trying to feed him this:

EDIT2: forget it :) an extra space after the comma was killing it for me.

Edited by Enceos
Link to comment
Share on other sites

7 hours ago, Enceos said:

Does ! exclamation mark blacklisting work on # nodes?

I want to write a patch which adds a node_attach line if it is not present.


@PART[*]:HAS[!#node_attach[*],MODULE[ModuleKISItem]]:FOR[KIS]
{
   node_attach = 0.0, -0.1, 0.0, 0.0, -1.0, 0.0, 1
}

 

You should use needs instead of for. 

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