Jump to content

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


sarbian

Recommended Posts

8 minutes ago, Electrocutor said:

@PART[*]:AFTER[Squad|VenStockRevamp]

This doesn't work; what I need is for this to always run, but if VenStockRevamp is installed, then it has to run after it. The above, however, only works when VenStockRevamp is installed.

Is there some kind of (optional) AFTER?

Just set it to run near the end, e.g. :FOR[zzz_MyMod] - this is pretty common in existing mods

Link to comment
Share on other sites

@PART[*]:FOR[zzzz_PorkjetStock]:HAS[#author[*Porkjet*]&!@MODEL[*]|@MODEL:HAS[#model[Squad*]]]

I'm looking for (author=*Porkjet* && (no MODEL node || MODEL.model=Squad*)); but this doesn't seem to work? on the syntax page it says that ORs have priority of order so that a|b&c|d would be ((a || b) && (c || d)), but this doesn't seem to actually be the case?

 

[Update]
Ignore. I think my test environment had gotten gummed up.

Edited by Electrocutor
Link to comment
Share on other sites

Hey guys, I would like to share "KSP_Module" define language to Notepad++.

I've created it to help me find errors in my CFG. This is not a real language, it is just a "language define" in Notepad++.

https://github.com/HaullyGames/Kerbalism/blob/DeploySystem/src/Deploy/Notepad%2B%2B_ModuleManagerLanguage(CFG).xml

Imagens:

https://drive.google.com/file/d/1UNQ-Yd320KKTt_VRKdSa6xUIVouzF7aK/view
https://drive.google.com/file/d/15hsvGEdkBsfIPd0yjKWe6IlZQjF0n6RC/view

File:

https://drive.google.com/file/d/1mIYOExr-sE_6xQkq9GVSbjS2UwtKjTC7/view

 

Oh, I forgot to say, if anyone has a better version or make an improvement, please share! :)

Edited by HaullyGames
Link to comment
Share on other sites

On 12/15/2017 at 12:57 PM, blowfish said:

If you're willing to run with 3.0.1 again, you could post KSP's log here and we can inspect it to see which mods have this issue.

3.0 and 3.0.1 do improve the speed of applying patches, and code changes in them pave the way for future improvements.

 

On 12/15/2017 at 12:59 PM, sarbian said:

Yes, we had was some problems. They will be fixed.

 

I've fixed what I'm aware of in my mods regarding 3.0.1, please let me know if you hear of any others.  I haven't had time to go through all of them proactively yet.

A suggestion for the future: 

First, I wasn't aware of the pre-release.  Not your fault, but for something like this, maybe being a little proactive and notifying major mod authors of the upcoming changes might help avoid some of the complaints.

Second, a suggestion for next time, or maybe even for 3.0.2.  I don't know how easy or difficult it would be:

When doing a release which changes syntax, or, in this case, tightens up the syntax checking, maybe have an interm release which would continue with the old behaviour, but notify the player of potential issues and ask them to notify the mod authors.  That might have alleviated some of the problems here, again, i don't know how difficult it would have been to implement this.

Anyway, thanks for all your work.

 

Link to comment
Share on other sites

Hello I encountered problem before 2 days and I was searching all the forum's topics and wikipedia of MM and KSP. Yet I haven'T found an answer to this. I made this patch where I'm doing my own engine module for engine but when I try the engine it says AirCombustion failed because of no fuel, intakes are okay and I even cheat propellant but the engine still refuse to work. I also had treshold on 0.01 instead of 0 but that didn't helped. Any ideas what's wrong with it?

 

https://pastebin.com/MvFtK9q0

Link to comment
Share on other sites

6 hours ago, Toonu said:

Hello I encountered problem before 2 days and I was searching all the forum's topics and wikipedia of MM and KSP. Yet I haven'T found an answer to this. I made this patch where I'm doing my own engine module for engine but when I try the engine it says AirCombustion failed because of no fuel, intakes are okay and I even cheat propellant but the engine still refuse to work. I also had treshold on 0.01 instead of 0 but that didn't helped. Any ideas what's wrong with it?

 

https://pastebin.com/MvFtK9q0

"No fuel" is not a stock message - do you have AJE installed?  If so, the engine configuration is completely different.

There's also a problem with how you're defining the curves - if you use %key multiple times, it will see that there's already a key there and only modify the first one.  For those things, better to just remove the curve entirely (if it already exists) and then recreate it.

A great way to debug what's going on is to find the part configuration in ModuleManager.ConfigCache.  That will tell you what it looks like after all the patches have been applied.

Link to comment
Share on other sites

1 hour ago, blowfish said:

"No fuel" is not a stock message - do you have AJE installed?  If so, the engine configuration is completely different.

There's also a problem with how you're defining the curves - if you use %key multiple times, it will see that there's already a key there and only modify the first one.  For those things, better to just remove the curve entirely (if it already exists) and then recreate it.

A great way to debug what's going on is to find the part configuration in ModuleManager.ConfigCache.  That will tell you what it looks like after all the patches have been applied.

Yeah I figured some of it our and now I edit the kurves by @key,0 = X @key,1 = Y etc to do it right, engine now works correctly and fuel is determined by atmosphereCurve ISP number + ratios in propellants, right?

Link to comment
Share on other sites

4 hours ago, Toonu said:

Yeah I figured some of it our and now I edit the kurves by @key,0 = X @key,1 = Y etc to do it right, engine now works correctly and fuel is determined by atmosphereCurve ISP number + ratios in propellants, right?

More or less, yeah

Link to comment
Share on other sites

I have 

@PART[part1] {
	@description:NEEDS[!mod1&!mod2] = Long_string.
	@description:NEEDS[mod1&!mod2]  = Long_string. mod1_info.
	@description:NEEDS[!mod1&mod2]  = Long_string. mod2_info.
	@description:NEEDS[mod1&mod2]   = Long_string. mod1_info. mod2_info.
}

and it works. I want not duplicate  Long_string. Something like

@PART[part1] {
	@description = Long_string.
	+description:NEEDS[mod1] ^= :$: mod1_info.:
	+description:NEEDS[mod2] ^= :$: mod2_info.:
}

but this doesn't works. How do I fix that?

UPD. Solved. It was about extra spaces before ^=
And @description:NEEDS

Edited by flart
Link to comment
Share on other sites

5 hours ago, flart said:

I have 


@PART[part1] {
	@description:NEEDS[!mod1&!mod2] = Long_string.
	@description:NEEDS[mod1&!mod2]  = Long_string. mod1_info.
	@description:NEEDS[!mod1&mod2]  = Long_string. mod2_info.
	@description:NEEDS[mod1&mod2]   = Long_string. mod1_info. mod2_info.
}

and it works. I want not duplicate  Long_string. Something like


@PART[part1] {
	@description = Long_string.
	+description:NEEDS[mod1] ^= :$: mod1_info.:
	+description:NEEDS[mod2] ^= :$: mod2_info.:
}

but this doesn't works. How do I fix that?

You still want @description:NEEDS[mod1] ^=

As it is you're duplicating the description field and appending to the end.  If you find the part configuration in ModuleManager.ConfigCache you will probably see this.

Link to comment
Share on other sites

A little help, please

I'm writing a patch which should be applied to fuel cells, but I don't want to use the name.  So, it's looking for ModuleResourceConverter which has Electric Charge as an output resource, and not having engine modules, see below:

@PART[*]:HAS[!MODULE[ModuleEngines],!MODULE[ModuleEnginesFX],@MODULE[ModuleResourceConverter]:HAS[@OUTPUT_RESOURCE[ElectricCharge]]]
//@PART[*FuelCell*]
{
	MODULE
	{
		name = AYA_FuelCell
	}
}

But it's not working.  If I use the name, it works, but I don't want this to be tied to a part name.

Thanks in advance

Link to comment
Share on other sites

5 hours ago, linuxgurugamer said:

A little help, please

I'm writing a patch which should be applied to fuel cells, but I don't want to use the name.  So, it's looking for ModuleResourceConverter which has Electric Charge as an output resource, and not having engine modules, see below:

But it's not working.  If I use the name, it works, but I don't want this to be tied to a part name.

Thanks in advance

OUTPUT_RESOURCE doesn't use a name key. 

@PART[*]:HAS[!MODULE[ModuleEngines*],@MODULE[ModuleResourceConverter]:HAS[@OUTPUT_RESOURCE:HAS[#ResourceName[ElectricCharge]]]]
{
	MODULE
	{
		name = AYA_FuelCell
	}
}

 

Link to comment
Share on other sites

I love MM for what it does, but it's syntax is, ummm, obscure?

Another, supposedly simple patch isn't working.  This one should add the module if ANY of the specified modules are in the mod.  Doesn't work, so what did I miss this time?:

@PART[*]:HAS[@MODULE[DMReconScope]|@MODULE[DMSIGINT]|@MODULE[DMAsteroidScanner]|@MODULE[DMModuleScienceAnimate]|@MODULE[DMSoilMoisture]|@MODULE[DMSolarCollector]|@MODULE[DMBathymetry]|@MODULE[DMBioDrill]|@MODULE[DMRoverGooMat]|@MODULE[DMSeismicSensor]|@MODULE[DMSeismicHammer]|@MODULE[DMXRayDiffract]|@MODULE[DMAsteroidScanner]|@MODULE[DMAnomalyScanner]]
{
	MODULE
	{
		name = AYA_Science
	}
}

 

Link to comment
Share on other sites

12 minutes ago, linuxgurugamer said:

I love MM for what it does, but it's syntax is, ummm, obscure?

Another, supposedly simple patch isn't working.  This one should add the module if ANY of the specified modules are in the mod.  Doesn't work, so what did I miss this time?:

 

Unfortunately AFAIK there is no way to do OR inside HAS. You could however use wildcards for this scenario since I don't think there are any DM* modules that are not science parts and if there were any that you wanted to exclude you could use a separate patch to remove the module after it was inserted by the generic patch.

@PART[*]:HAS[@MODULE[DM*]]
{
	...
}

 

Link to comment
Share on other sites

2 minutes ago, Aelfhe1m said:

Unfortunately AFAIK there is no way to do OR inside HAS. You could however use wildcards for this scenario since I don't think there are any DM* modules that are not science parts and if there were any that you wanted to exclude you could use a separate patch to remove the module after it was inserted by the generic patch.


@PART[*]:HAS[@MODULE[DM*]]
{
	...
}

 

Oh yuck!

Well, thanks for the answer

Link to comment
Share on other sites

https://www.dropbox.com/sh/9jzn4gyh7qrrfhw/AABvjBSlUUE9VAzxBujIBUxaa?dl=0

Please note my logfile, my .ckan modlist (I also run a manually-installed dev-version of KCT) and two images.  Here, the pertinent image is "MM errors.png".

~~~

Hi folks.  Two inter-related questions.  First, I've attempted to make heads or tails of ..\KSP_x64_Data\output_log.txt (sixty four megs) to see if there's a record of exactly how many MM patches were applies or attempted in my last game-load (in this image, it lists more than one hundred forty thousand, and it was WELL before the loading was complete) but I cannot seem to find this info.  Of course, it disappears from the screen when the game music begins to play, and since my load times are 10-15 minutes, I'm often away from the computer or at least alt-tabbed out when this happens, so I'm not "there" enough to grab the info when it's complete.  Is there a way to develop this info?

Also, in the image linked-to above, there are references to "errors" relating to specific .cfg's.  How do I further assess these as to how important they are, or at least identify that the error in question even is?  As you can see, I have a very large modlist, and a lot of the MM patches are quite long themselves.  I'm hoping to develop some navigational sense around this data so that I can bring coherent and useful questions to individual mod authors, or to at least ascertain for my own gameplay purposes how "important" any given "error" might be for me to invest the energy to investigate or even manually edit myself.

And with CKAN curation with only -- so far -- a single manual-installed mod, manual edits of MM patch configs would present its own slew of issues for me if I'm not super careful to at least educate myself on what I'm doing.

Any guidance or feedback would be appreciated, thanks.
Edited by MisterFister
Dropbox link to pertinent info.
Link to comment
Share on other sites

On 12/26/2017 at 6:46 AM, Aelfhe1m said:

To find the details of errors search the log for [ModuleManager] Error

hot damn this is just what I came here looking for :)

Anyone know what is going on here tho?

Quote

[LOG 13:51:24.781] [ModuleManager] Applying update KermangeddonIndustries/InlineBallutes/Patches/RealChute/@PART[InlineBallute*] to KermangeddonIndustries/InlineBallutes/Ballute062/PART
[ERR 13:51:24.783] [ModuleManager] Error - Cannot parse variable search when inserting new key caseMass = #$/../mass$

[LOG 13:51:24.784] [ModuleManager] Applying update KermangeddonIndustries/InlineBallutes/Patches/RealChute/@PART[InlineBallute*] to KermangeddonIndustries/InlineBallutes/Ballute125/PART
[ERR 13:51:24.784] [ModuleManager] Error - Cannot parse variable search when inserting new key caseMass = #$/../mass$

[LOG 13:51:24.785] [ModuleManager] Applying update KermangeddonIndustries/InlineBallutes/Patches/RealChute/@PART[InlineBallute*] to KermangeddonIndustries/InlineBallutes/Ballute250/PART
[ERR 13:51:24.785] [ModuleManager] Error - Cannot parse variable search when inserting new key caseMass = #$/../mass$

[LOG 13:51:24.786] [ModuleManager] Applying update KermangeddonIndustries/InlineBallutes/Patches/RealChute/@PART[InlineBallute*] to KermangeddonIndustries/InlineBallutes/Ballute375/PART
[ERR 13:51:24.787] [ModuleManager] Error - Cannot parse variable search when inserting new key caseMass = #$/../mass$

[LOG 13:51:24.787] [ModuleManager] Applying update KermangeddonIndustries/InlineBallutes/Patches/RealChute/@PART[InlineBallute*] to KermangeddonIndustries/InlineBallutes/Ballute500/PART
[ERR 13:51:24.788] [ModuleManager] Error - Cannot parse variable search when inserting new key caseMass = #$/../mass$

 

Link to comment
Share on other sites

2 hours ago, Drew Kerman said:

Anyone know what is going on here tho?

Quote

[LOG 13:51:24.781] [ModuleManager] Applying update KermangeddonIndustries/InlineBallutes/Patches/RealChute/@PART[InlineBallute*] to KermangeddonIndustries/InlineBallutes/Ballute062/PART
[ERR 13:51:24.783] [ModuleManager] Error - Cannot parse variable search when inserting new key caseMass = #$/../mass$

The #$/ part specifies the root of the current node. Then ../ tries to go up one level which doesn't exist.

Try replacing each #$/../mass$ with #$/mass$ (in this particular scenario #$../mass$ would also work since caseMass is defined in a child of the root node)

Link to comment
Share on other sites

13 minutes ago, Aelfhe1m said:

The #$/ part specifies the root of the current node. Then ../ tries to go up one level which doesn't exist.

Try replacing each #$/../mass$ with #$/mass$ (in this particular scenario #$../mass$ would also work since caseMass is defined in a child of the root node)

Yup that did it, thanks. I will inform the mod author

Link to comment
Share on other sites

Are the "&" and "|" characters intended to work in a patch's name filter?  e.g. is it OK to write "@PART[foo|bar]" to modify both the "foo" and "bar" parts with a single patch?  I ask because it seems to work, but I can't tell from the documentation whether that's an intentional feature, or a quirk that might change in future versions.  The text in the brackets is documented as being a "NodeNameWithWildcards", which doesn't sound like it's meant to be a boolean expression.  I know that "@PART[foo]" is equivalent to "@PART:HAS[#name[foo]]", so "@PART[foo|bar]" should be equivalent to "@PART:HAS[#name[foo|bar]]", but the former works and the latter doesn't.  This makes me think it might just be a quirk.

(The only thing the documentation specifically says can use "|" is a :NEEDS clause.  There are examples of :HAS clauses using commas for AND relationships, so I'd expect that they can use "|" for OR as well.  Based on that, I'd expect "@PART:HAS[#name[foo]|#name[bar]]" to work, but strangely it doesn't quite: only the "foo" part gets the patch.)

I'm testing with MM 3.0.1, btw.

Link to comment
Share on other sites

Why isn't this working?

 

@PART[LS_Tank_*|LifeSupportMiniPack]:NEEDS[TACLifeSupport]
{
    foodFactor = 0.000016927083333
    waterFactor = 0.000011188078704
    oxygenFactor = 0.001713537562385
	
	%amountSupplies = #$/RESOURCE[Supplies]/maxAmount$

	RESOURCE
    {
		name = Food

		amount = #$/amountSupplies$
		@amount *= #$/foodFactor$ 

		maxAmount = #$/amountSupplies$
		@maxAmount *= #$/foodFactor$ 
	}
	RESOURCE
    {
		name = Water

		amount = #$/amountSupplies$
		@amount *= #$/waterFactor$ 

		maxAmount = #$/amountSupplies$
		@maxAmount *= #$/waterFactor$ 
	}
	RESOURCE
    {
		name = Oxygen

		amount = #$/amountSupplies$
		@amount *= #$/oxygenFactor$ 

		maxAmount = #$/amountSupplies$
		@maxAmount *= #$/oxygenFactor$ 
	}
    !RESOURCE[Supplies] {}
    !amountSupplies = delete
    
    !foodFactor = delete
    !waterFactor = delete
    !oxygenFactor = delete
}

@PART[MulchMiniPack]:NEEDS[TACLifeSupport]
{
    wasteFactor = 0.000001539351852
    wasteWaterFactor = 0.000014247685185
    carbonDioxideFactor = 0.00148012889876
	
	%amountSupplies = #$/RESOURCE[Mulch]/maxAmount$

	RESOURCE
    {
		name = Waste

		amount = #$/amountMulch$
		@amount *= #$/wasteFactor$ 

		maxAmount = #$/amountMulch$
		@maxAmount *= #$/wasteFactor$ 
	}
	RESOURCE
    {
		name = WasteWater

		amount = #$/amountMulch$
		@amount *= #$/wasteWaterFactor$ 

		maxAmount = #$/amountMulch$
		@maxAmount *= #$/wasteWaterFactor$ 
	}
	RESOURCE
    {
		name = CarbonDioxide

		amount = #$/amountMulch$
		@amount *= #$/carbonDioxideFactor$ 

		maxAmount = #$/amountMulch$
		@maxAmount *= #$/carbonDioxideFactor$ 
	}
    !RESOURCE[Mulch] {}
    !amountMulch = delete
    
    !wasteFactor = delete
    !wasteWaterFactor = delete
    !carbonDioxideFactor = delete
}

 

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