Jump to content

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


sarbian

Recommended Posts

@Ontresanas

first of all, you are applying your patch to

1- all the parts that have RESOURCE[SolidFuel]

2- all the parts that do not have RESOURCE[SolidFuel]

so basically, all the parts regardless of them having RESOURCE[SolidFuel]

so basically (2x) you don't need to specify it (unless you omitted the reason why you have those checks in there)

this should be enough:

@PART:HAS[@MODULE[ModuleEngines*],!MODULE[ModuleEngineFailure]]:Final
{
    MODULE
    {
        name = ModuleEngineFailure
        FailChance = 0.001
    }
}

note that:

1- I have removed the [*] after @PART because that's not really necessary

2- the patch will be applied to all parts that have at least one MODULE node with a name that starts with "ModuleEngines"

3- I removed the @ from @FailChance , you are adding a brand new module which will be empty, @ can only edit existing stuff. so you definitely need to remove it there.

4- I removed the ; from 0.001; module manager doesn't need a semicolon at the end of the string.

 

maybe the semicolon is the reason why you didn't see the correct value before

Link to comment
Share on other sites

18 minutes ago, Ontresanas said:

The reason I check for whether or not it has solid fuel is because the FailChance is different for the two blocks - for SRBs, it's 0.01, and for LFEs, it's 0.001.

Oh, I see :)

I missed that ;)

Did the fix work?

 

Edit: when I wrote my previous message I didn't see sarbian's answer :) I guess it took me so long to write everything that he had the time to answer you before me :D

Edited by Sigma88
Link to comment
Share on other sites

5 hours ago, dlrk said:

I'm getting a hang on startup/part loading after adding or removing any parts. The hang resolves if partdatabase.cfg and configcache.cfg are both removed and let rebuild.

Hanging log:

https://www.dropbox.com/s/1f9u4ap4q77z1pi/output_log%20%282%29.txt?dl=0

IntakeAir not found in resource database. Propellant Setup has failed.

Bizarre.  But if removing the config cache solves it, it's probably just a one-time thing.  Has it happened more than once after deleting the cache?

Link to comment
Share on other sites

Can I tell ModuleManager to apply some patch(es) only for .cfgs in single folder, not for entire GameData

Something like

@PART:HAS[@MODULE[ModuleCommand]]:PATH[Firesplitter/Parts/Command]
{
	Do something with all parts, that have ModuleCommand
	AND their .cfgs is IN GameData/Firesplitter/Parts/Command folder.
}

Good if you can find something unique, like PART[FS*] or #Author[Snjo], but Firesplitter here only as example.

 

How i can split parts from BDArmory and BDynamics PartPack, Adjustable Landing Gear.

I want to patch, for example, "TechRequired" in BDArmory parts only

All mods' part has identical author, All parts has different set of MODULEs, "name" hasn't stable segment like [BD*] or [baha_].

FOR affects only on the order of processing, but patch applied to all parts.

Now we can only enumerate the possibly names or modules, one by one:

PART:HAS[@MODULE[bahaTurret],@MODULE[RocketLauncher],@MODULE[ModuleRadar],@MODULE[bahaWeaponManager], ...]

Also, it will work until BahamutoD update mod, and add one more part or module. 

Patch, that use path, wil work independently to updates. When new parts will appear, MM can automatically apply changes to it too.

 

P,S. I'm not English, I'm sorry for the mistakes

Edited by Jenyaza
Link to comment
Share on other sites

On 1/8/2016 at 2:10 AM, dlrk said:

I'm getting a hang on startup/part loading after adding or removing any parts. The hang resolves if partdatabase.cfg and configcache.cfg are both removed and let rebuild.

Hanging log:

https://www.dropbox.com/s/1f9u4ap4q77z1pi/output_log%20%282%29.txt?dl=0

That s the log from the first launch after you removed a part ? If not I would need that to understand what is going on.

 

@Jenyaza  : good idea. I ll see how complex it is.

Edited by sarbian
Link to comment
Share on other sites

Ok, this makes no sense to me then... The new code I am adding for 2.6.17 should help to understand what is going on. It should be out tomorrow if I get enough time to finish it.

Link to comment
Share on other sites

2.6.17 is out with some quality of life change : 

  • Add a warning for users on build 1024
  • @nightingale proof
  • Log added/deleted/changed cfg files. Search for "[ModuleManager] Changes :" in the log

The last point was added to track down the cfg that changes after each restart and prevents the use of the cache. I am not yet sure how I will deal with that since a list of exception could have a really bad impact if misused.

 

Edit : And of course it includes the change from 2.6.15/16

  • @key,* = xxx applies to all presents key value
  • @key[1] += 1 will apply the math to the 2nd component in a comma separated vector.  "key = 0,1,0,1" will be " key = 0,2,0,1"

  • @key[1, ] += 1 will apply the math to the 2nd component in a space separated vector.  "key = 0 1 0 1" will be " key = 0 2 0 1"

  • @key[*] += 1 will add 1 to all elements of the vector.  "key = 1,2,3,4" will be changed to "key = 2,3,4,5"

  • @key,*[1, ] += 1 will do it on all the key

Edited by sarbian
Link to comment
Share on other sites

1 hour ago, sarbian said:
  • @key,*[1, ] += 1 will do it on all the key

fixed that for you :)

also, 

@key[*] += 1 // will add 1 to all elements of the vector  >  "key = 1,2,3,4" will be changed to "key = 2,3,4,5"

 

--

 

thank you for adding these features! It really helped me a lot :D

Edited by Sigma88
Link to comment
Share on other sites

Module Manager affects load time so can someone tell me if this one loads slower

Spoiler

	@PART[*]:HAS[@RESOURCE[Ablator]]:Final
	{
		MODULE
			{
				name = ModuleDecouple
				isOmniDecoupler = true
				ejectionForce = 0
			}
	}

 

then this one

Spoiler

		@PART[HeatShield*]:Final
	{
		MODULE
			{
				name = ModuleDecouple
				isOmniDecoupler = true
				ejectionForce = 0
			}
	}

 

 

 

Link to comment
Share on other sites

Seems roughly the same to me. I mean, I didn't time them by the clock, but neither seems noticeably or significantly slower fhan the other. The second one may be slower by a few seconds, but that could be margin of error for all I know.

Edit: Actually, yeah, the second one seems a bit slower.

Edited by smjjames
Link to comment
Share on other sites

Its not really a mod, more something for my personal flavour, I just added the decoupler-module to the heatshields since I like to drop them with style when they did their job.

And I thought the first one isnt "clean" because the way I see it it searches every PART and selects the ones wich have the RESOURCE ABLATOR.

I dont know. I also dont think it makes a difference, both work, the first one is more mod compatible, I just thought the second one "looks" cleaner. But Im a ModuleManager noob^^ Its just my kind of ocd.

Link to comment
Share on other sites

8 minutes ago, maculator said:

Its not really a mod, more something for my personal flavour, I just added the decoupler-module to the heatshields since I like to drop them with style when they did their job.

And I thought the first one isnt "clean" because the way I see it it searches every PART and selects the ones wich have the RESOURCE ABLATOR.

I dont know. I also dont think it makes a difference, both work, the first one is more mod compatible, I just thought the second one "looks" cleaner. But Im a ModuleManager noob^^ Its just my kind of ocd.

unless there are some parts that have the resource Ablator but are not heat shields, I would go with the first one.

I can't imagine loading time being a big factor either way, mostly because once you have run the game once, all patches will be loaded from the cache anyways.

unless you keep messing with the cfgs, in which case it will reload every patch, and even if you do so... I can't see the difference become noticeable for such a small patch.

I may be wrong tho :)

Link to comment
Share on other sites

1 hour ago, Sigma88 said:

unless there are some parts that have the resource Ablator but are not heat shields

For now, only shields has Ablator. But even if some part would have it too, we can easily disable Decoupler staging in editor, and not use right-click menu in flight.

Not the best idea, but it will work 

Link to comment
Share on other sites

I've done it with this

@PART[*]:HAS[@RESOURCE[Ablator]]:Final

works just fine. The only problem I have now is that on some rockets the shield decouples when I activate the seperator wich I attached right under it, they are two seperate stages but somehow it gets messed up.

(I was writing a question here when I noticed that brackets do matter :D, now I can do the thing I wanted to do the whole evening! I love MM)


Well forgett what I just said:

Spoiler

//___________________________    
//Science Parts am Anfang:
//___________________________

    @PART[*]:HAS[#category[Science],!MODULE[ModuleScienceLab],!MODULE[ModuleResourceScanner],!MODULE[ModuleOrbitalSurveyor],!MODULE[ModuleDataTransmitter]]
    {
        TechRequired = start
    }


 

This doesnt work for the Scienc-Lab wich definitly has a MODULE called "ModuleScienceLab" and also the Antennas wich have a MODULE "ModuleDataTransmitter" refuse to stay where they belong in the techtree They all moved to the startnode

EDIT #3:

The code I posted above does work, I just had to start a new game!

 

 

Edited by maculator
ARGH!
Link to comment
Share on other sites

Hmm.  Trying to download 2.6.17, and the links on the front page and also in one of Sarbian's posts on the previous page don't do anything, they just open a blank page.  I am using the Microsoft Edge browser, I don't know if that makes any difference.  I'll try it on Internet Explorer.

Update:  Nope, IE does the same thing, the link just leads to a blank page.  Looks like the link is broken, at least for me.  FYI.

:)

 

Edited by Neutrinovore
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...