Jump to content

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


sarbian

Recommended Posts

7 hours ago, Aelfhe1m said:

You've got the :NEEDS[] in the wrong place. It should be after the part list not before it. Also use an @ to edit TechRequired since it should already exist in all parts.


// Parts

@PART[AdjustableRailScaleable|dockingwasher_stdScaleable|dockingwasher_freeScaleable|GantryLargeScaleable|GantryLargeScaleableVariant|IRHingeClosedScaleable2|IRHingeOpenScaleable|IRHingeTallScaleable|IRHingeTallNDScaleable|IRPistonScaleable|IR_RotatronScaleable|IR_Rotatronmk2Scaleable|IR_RotatronVTOLScaleable|TelescopeFullAScaleable]:NEEDS[MagicSmokeIndustries]
{
	@TechRequired = IR
}

 

I Tried this, like @Mike12222222222222 said, and nothing

2 hours ago, linuxgurugamer said:

Check the ModuleManager.ConfigCache to see that it actually does.

 I would suggest making the install as minimal as possible, and carefully examine the GameData/ModuleManager.ConfigCache to see the final result. Compare it with what you did in stock, and look for differences.

 

I did this and as far as I can tell, its doing something, but it does not appear to be doing what my mod makes it do as far as i can tell.... here is a link to download the cache file, so you guys could look at it, as maybe its doing something and i just dont see it.

https://goo.gl/cjNw2z

Link to comment
Share on other sites

1 hour ago, ThePhoenixSol said:

I Tried this, like @Mike12222222222222 said, and nothing

I did this and as far as I can tell, its doing something, but it does not appear to be doing what my mod makes it do as far as i can tell.... here is a link to download the cache file, so you guys could look at it, as maybe its doing something and i just dont see it.

https://goo.gl/cjNw2z

Looking at the cache all the TechRequired fields seem to be mixed values but the names match the patch in your post so it should affect them. It might be ordering between your patch and other patches. Try adding :FINAL after :NEEDS and see if that helps.

Link to comment
Share on other sites

48 minutes ago, Aelfhe1m said:

Looking at the cache all the TechRequired fields seem to be mixed values but the names match the patch in your post so it should affect them. It might be ordering between your patch and other patches. Try adding :FINAL after :NEEDS and see if that helps.

that didnt work either :/

Link to comment
Share on other sites

I'd like to make MiniISRU a bit more useful but have issue getting down in its structure to ratio. This changes the mass but ratio remains unchanged. What's wrong in my code?

// Make mini ISRU useful
@PART[MiniISRU]
{
	@mass *= 2
	@MODULE[ModuleResourceConverter],*
	{
		@INPUT_RESOURCE:HAS[#ResourceName[Ore]]
		{
			@ratio *= 0.1
		}
	}
	
	@MODULE[ModuleCoreHeat]
	{
		@MaxCoolant *= 2
	}
	
}

 

Link to comment
Share on other sites

16 hours ago, Raphaello said:

I'd like to make MiniISRU a bit more useful but have issue getting down in its structure to ratio. This changes the mass but ratio remains unchanged. What's wrong in my code?


// Make mini ISRU useful
@PART[MiniISRU]
{
	@mass *= 2
	@MODULE[ModuleResourceConverter],*
	{
		@INPUT_RESOURCE:HAS[#ResourceName[Ore]]
		{
			@ratio *= 0.1
		}
	}
	
	@MODULE[ModuleCoreHeat]
	{
		@MaxCoolant *= 2
	}
	
}

 

Ratio should have a capital R.

Edited by Aelfhe1m
Link to comment
Share on other sites

1 hour ago, Aelfhe1m said:

Ratio should have a capital R.

OMG, I was banging my head against a wall for almost an hour... anyway I learnt more things in the process :) Now I need to calculate the values right to avoid creating something overpowered.

Thanks!

Edited by Raphaello
Link to comment
Share on other sites

  • 2 weeks later...

So this doesn't work:

// get rid of EVA parts in the Utility tab
@PART[*]:HAS[#category[Utility],#tags[cck-eva-items]]
{
  @category = none
}

I'm guessing there's no support for searching within the tags key? I didn't see anything about it anywhere in the wiki and a search of the thread for "tags" didn't come up with anything either. My intuition on how it would work is that when given a value for the tags key, MM would search within the string of tags for a match. A patch like this

@PART[*]:HAS[#category[Utility],#tags[cck-eva-items,!KIS,props]]

Could search the tags list for multiple matches, perhaps also using ! to exclude some tags.

Any plans to have something like this in MM, or am I just doing it wrong? Yea I just thought to edit a part.cfg to only have "cck-eva-items" for its tags key and the patch applied to that part, so def no search support withing the tags key.

 

Edited by Drew Kerman
Link to comment
Share on other sites

Just now, Drew Kerman said:

are there any docs on that? I recall now seeing people do stuff like that to append tags and prepend titles to descriptions but I didn't see any docs for it

Well appending and prepending is different.  In this case there are only two special characters to remember, * (which matches any number of characters) and ? which matches any one character.

I believe the other thing you're thinking of is this:

@value ^= :expression:replacement:

This is used to replace, append, or remove some part of the value.  The expression is a regular expression, which is far too complicated to explain here, but there are plenty of guides online.

Link to comment
Share on other sites

Sorry if it's a dumb question, but is there a way to move nodes around?

I have a prop file in which I want to insert a new node at a specific location, is that doable? :/

Edit: Nvm, found it! Search for 'insert' on the wiki. Thank you Sarbian you rock! :D

Edited by dueb
Link to comment
Share on other sites

I looked at the wiki and honestly maybe I'm missing it but I couldn't find a way to check if a parameter is positive, or a way to check if something is missing.. I'm wanting to mess around with some old parts that may not have proper internals and automatically add the placeholder internal with a mm file if one is needed. Is there a way to do this?

Link to comment
Share on other sites

14 hours ago, DigitalProeliator said:

I looked at the wiki and honestly maybe I'm missing it but I couldn't find a way to check if a parameter is positive, or a way to check if something is missing.. I'm wanting to mess around with some old parts that may not have proper internals and automatically add the placeholder internal with a mm file if one is needed. Is there a way to do this?

greater than zero:

@NODE:HAS[#key[>0]] {}

 

missing:

@NODE:HAS[~key[]] {}

 

but I suspect this is what you want:

@NODE:HAS[~key[>0]] {}

which means:

either "key" is missing or it exist but it's not a number greater than zero

Link to comment
Share on other sites

On 1/28/2017 at 1:51 PM, ThePhoenixSol said:

Can anyone help me with this? i got the node working, but yet i cant seem to get the parts to move into the node. i have done this with all the stock tree, and a couple mods up to this point. And I cant seem to find the issue with how im doing it to infernal robotics. 


@TechTree:NEEDS[MagicSmokeIndustries]
{
	@RDNode:HAS[#id[largeUnmanned]]
	{
		@id = IR
		@title = Infernal Robotics
		@description = Mechanics have been a thing for a while, so why not use them with rockets?.
		@cost = 20
		@hideEmpty = False
		@nodeName = node44_IR
		@anyToUnlock = False
		@icon = RDicon_robotics
		@pos = -1500,800,0
		@scale = 0.6
		!Parent,* {}
		Parent
		{
			parentID = science3
			lineFrom = TOP
			lineTo = BOTTOM
		}
}

// Parts

@PART:NEEDS[MagicSmokeIndustries][AdjustableRailScaleable|dockingwasher_stdScaleable|dockingwasher_freeScaleable|GantryLargeScaleable|GantryLargeScaleableVariant|IRHingeClosedScaleable2|IRHingeOpenScaleable|IRHingeTallScaleable|IRHingeTallNDScaleable|IRPistonScaleable|IR_RotatronScaleable|IR_Rotatronmk2Scaleable|IR_RotatronVTOLScaleable|TelescopeFullAScaleable]
{
	TechRequired = IR
}

 

I haven't messed around with the Infernal Robotics stuff yet, but what I am guessing is that they are putting their parts into a node. I would add an AFTER to make sure that the patch is not applied until after Infernal Robotics patches, so essentially it will overwrite them.

 

@PART:NEEDS[MagicSmokeIndustries]:AFTER[MagicSmokeIndustries]

Link to comment
Share on other sites

1 hour ago, pap1723 said:

I haven't messed around with the Infernal Robotics stuff yet, but what I am guessing is that they are putting their parts into a node. I would add an AFTER to make sure that the patch is not applied until after Infernal Robotics patches, so essentially it will overwrite them.

 

@PART:NEEDS[MagicSmokeIndustries]:AFTER[MagicSmokeIndustries]

That doesn't look right. You don't specify what parts to grab. The problem with the line that you're trying to fix is that it was not syntactically correct.

@PART[AdjustableRailScaleable|dockingwasher_stdScaleable|dockingwasher_freeScaleable|GantryLargeScaleable|GantryLargeScaleableVariant|IRHingeClosedScaleable2|IRHingeOpenScaleable|IRHingeTallScaleable|IRHingeTallNDScaleable|IRPistonScaleable|IR_RotatronScaleable|IR_Rotatronmk2Scaleable|IR_RotatronVTOLScaleable|TelescopeFullAScaleable]:NEEDS[MagicSmokeIndustries]

 

Link to comment
Share on other sites

18 minutes ago, Starwaster said:

That doesn't look right. You don't specify what parts to grab. The problem with the line that you're trying to fix is that it was not syntactically correct.


@PART[AdjustableRailScaleable|dockingwasher_stdScaleable|dockingwasher_freeScaleable|GantryLargeScaleable|GantryLargeScaleableVariant|IRHingeClosedScaleable2|IRHingeOpenScaleable|IRHingeTallScaleable|IRHingeTallNDScaleable|IRPistonScaleable|IR_RotatronScaleable|IR_Rotatronmk2Scaleable|IR_RotatronVTOLScaleable|TelescopeFullAScaleable]:NEEDS[MagicSmokeIndustries]

 

That doesnt quite make sense to me.... how would i go about fixing it?... seeing the comparisons would make it easier to understand

2 hours ago, pap1723 said:

I haven't messed around with the Infernal Robotics stuff yet, but what I am guessing is that they are putting their parts into a node. I would add an AFTER to make sure that the patch is not applied until after Infernal Robotics patches, so essentially it will overwrite them.

 

@PART:NEEDS[MagicSmokeIndustries]:AFTER[MagicSmokeIndustries]

i tried that, and no luck sadly.

Link to comment
Share on other sites

@ThePhoenixSol In your original part patch you had:

@PART:NEEDS[MagicSmokeIndustries][partName01|partName02|partName03...]

This is syntactically wrong, as MM expects:

@PART[partName01|partName02|partName03...]:NEEDS[MagicSmokeIndustries]

As @Starwaster pointed out. The part names go in between the PART and the NEEDS/FOR/AFTER checks.

Link to comment
Share on other sites

Just now, Phineas Freak said:

@ThePhoenixSol In your original part patch you had:


@PART:NEEDS[MagicSmokeIndustries][partName01|partName02|partName03...]

This is syntactically wrong, as MM expects:


@PART[partName01|partName02|partName03...]:NEEDS[MagicSmokeIndustries]

As @Starwaster pointed out. The part names go in between the PART and the NEEDS/FOR/AFTER checks.

well, i have tried both ways, and it doesnt work no matter where i place it, so that doesnt appear to be the issue.

and something to note, i have used :NEEDS before the part list, and it works....

Link to comment
Share on other sites

6 minutes ago, ThePhoenixSol said:

well, i have tried both ways, and it doesnt work no matter where i place it, so that doesnt appear to be the issue.

The fact that the patch might not work for various reasons (typos, mod loading order etc) does not mean that there was not a problem with it's syntax...

You have a patch that modifies the tech tree. Where is that patch placed? Directly under the GameData folder or inside a custom one?

Link to comment
Share on other sites

Just now, Phineas Freak said:

The fact that the patch might not work for various reasons (typos, mod loading order etc) does not mean that there was not a problem with it's syntax...

You have a patch that modifies the tech tree. Where is that patch placed? Directly under the GameData folder or inside a custom one?

im not saying its not a syntax issue, i was merely saying that specific type of syntax issue was not the problem. All my patches go under a custom folder.

For core mod: GameData/Sol Mods/Sensible Tech Tree

For mod support: GameData/Sol Mods/Sensible Tech Tree/Mod Support

for the case of this patch, the node that is edited is done through the mod support cfg, as to keep all that centralized

Link to comment
Share on other sites

We have:

  • MagicSmokeIndustries (target mod)
  • Sol Mods (custom mod)

So the mod order is good. Can you test if the the tech tree patch loads as a semi-final MM config?

@TechTree:FOR[zzzSolMods]:NEEDS[MagicSmokeIndustries]
{
	@RDNode:HAS[#id[largeUnmanned]]
	{
		@id = IR
		@title = Infernal Robotics
		@description = Mechanics have been a thing for a while, so why not use them with rockets?.
		@cost = 20
		@hideEmpty = False
		@nodeName = node44_IR
		@anyToUnlock = False
		@icon = RDicon_robotics
		@pos = -1500,800,0
		@scale = 0.6
		!Parent,* {}
		Parent
		{
			parentID = science3
			lineFrom = TOP
			lineTo = BOTTOM
		}
}

 

Link to comment
Share on other sites

6 hours ago, Phineas Freak said:

We have:

  • MagicSmokeIndustries (target mod)
  • Sol Mods (custom mod)

So the mod order is good. Can you test if the the tech tree patch loads as a semi-final MM config?


@TechTree:FOR[zzzSolMods]:NEEDS[MagicSmokeIndustries]
{
	@RDNode:HAS[#id[largeUnmanned]]
	{
		@id = IR
		@title = Infernal Robotics
		@description = Mechanics have been a thing for a while, so why not use them with rockets?.
		@cost = 20
		@hideEmpty = False
		@nodeName = node44_IR
		@anyToUnlock = False
		@icon = RDicon_robotics
		@pos = -1500,800,0
		@scale = 0.6
		!Parent,* {}
		Parent
		{
			parentID = science3
			lineFrom = TOP
			lineTo = BOTTOM
		}
}

 

im not sure how i would go about testing that, nor do i quite understand what it is..... and would me making my own personal folder be "1 Sol Mods" for easier access in gamedata effect it? as i now believe it may with how you just replied....

Link to comment
Share on other sites

Two quick questions, since the reference in the second post doesn't cover working with variables.

I want to be able to target multiple engines, and set them to have a minimum thrust level equal to half of their maximum thrust. For this purpose, can I do the following?

@PART[engines engines engines]
{
    @MODULE[ModuleEnginesFX]
    {
        @minThrust = #maxThrust$
        @minThrust *= 0.5
    }
}

What I want to know is: 1.) is this the correct way to write the value for maxThrust into the minThrust field? I cribbed this off of some MM snippet I saw elsewhere, I have no idea if it's correct or not. And 2.) if I change minThrust twice in the same config like this, is it guaranteed to always apply in the correct order? Or should I split it into two separate configs, ordered by passes?

Link to comment
Share on other sites

47 minutes ago, Streetwind said:

Two quick questions, since the reference in the second post doesn't cover working with variables.

I want to be able to target multiple engines, and set them to have a minimum thrust level equal to half of their maximum thrust. For this purpose, can I do the following?


@PART[engines engines engines]
{
    @MODULE[ModuleEnginesFX]
    {
        @minThrust = #maxThrust$
        @minThrust *= 0.5
    }
}

What I want to know is: 1.) is this the correct way to write the value for maxThrust into the minThrust field? I cribbed this off of some MM snippet I saw elsewhere, I have no idea if it's correct or not. And 2.) if I change minThrust twice in the same config like this, is it guaranteed to always apply in the correct order? Or should I split it into two separate configs, ordered by passes?

1)

you missed a $

it's supposed to be    @minThrust = #$maxThrust$

 

2)

the order will always be the one in the cfg, so no need to split it in multiple parts

 

3)

keep in mind that if "minThrust" is not already defined this patch will not do anything

and also, if maxthrust is not defined you will get a "MM error" which is annoying, so you might want to put some failsafes in

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