Jump to content

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


sarbian

Recommended Posts

Is it possible to scale a model different amounts in different directions via a Module Manager config file?

I've tried

@rescaleFactor = 0.5

and that rescales everything but I'd like to just change one dimension.  Right now I'm trying

	@MODEL
	{
		@scale = 1.0, 0.74, 1.0 
	}

but that doesn't appear to have any effect.  Is this doable or does MM not support this kind of transform?

Link to comment
Share on other sites

35 minutes ago, AndreZero said:

Is it possible to scale a model different amounts in different directions via a Module Manager config file?

I've tried


@rescaleFactor = 0.5

and that rescales everything but I'd like to just change one dimension.  Right now I'm trying


	@MODEL
	{
		@scale = 1.0, 0.74, 1.0 
	}

but that doesn't appear to have any effect.  Is this doable or does MM not support this kind of transform?

One of two things could be wrong: (1) Most likely the original MODEL node doesn't include a scale value, in which case @scale will do nothing.  You want %scale (2) The part uses mesh=whatever.mu rather than a MODEL {} node.

Link to comment
Share on other sites

2 minutes ago, blowfish said:

One of two things could be wrong: (1) Most likely the original MODEL node doesn't include a scale value, in which case @scale will do nothing.  You want %scale (2) The part uses mesh=whatever.mu rather than a MODEL {} node.

Ok, so the model I'm trying mod has something like this in it's original cfg file

MODEL
{
	model = path/to/model
}
rescaleFactor = 1

I take that to mean it doesn't have the mesh=whatever.mu format but also doesn't have scale values.  That means I can't scale it in different directions, right?

Link to comment
Share on other sites

3 minutes ago, AndreZero said:

Ok, so the model I'm trying mod has something like this in it's original cfg file


MODEL
{
	model = path/to/model
}
rescaleFactor = 1

I take that to mean it doesn't have the mesh=whatever.mu format but also doesn't have scale values.  That means I can't scale it in different directions, right?

You can scale it, just replace @scale with %scale in your original code.  @ means edit if it already exists, % means create or edit.

Link to comment
Share on other sites

On 12/12/2015 16:43:44, Berlin said:

OK so I today I noticed quite a few of my command pods do not have aero/thermal re-entry effects. In my physics tab in the alt+f12 menu show that the ModuleManager physics is loaded an not physics.cfg. I can't seem to figure out how to set physics.cfg as the default. Is there a way to do it? I'm running the 64bit work around and have a ton of mods. I hope it's an easy fix and I won't have to go mod by mod to find the culprit. I'm not home currently so I can't post a log at the moment. any suggestions?

The MM file is always loaded and if no mods change value then is is the same as the stock one.

Link to comment
Share on other sites

I was having some weird results with one of my patches so I decided to write a test config and see what was going on.

this is the cfg (you only need to paste this into a cfg and load ksp)

Spoiler

TESTNODE
{
	name = testnode1
	SUBNODE
	{
		name = subnode1.1
	}
	SUBNODE
	{
		name = subnode1.2
	}
	SUBNODE
	{
		name = subnode1.3
	}
}
TESTNODE
{
	name = testnode2
	SUBNODE
	{
		name = subnode2.1
	}
	SUBNODE
	{
		name = subnode2.2
	}
	SUBNODE
	{
		name = subnode2.3
	}
}
TESTNODE
{
	name = testnode3
	SUBNODE
	{
		name = subnode3.1
	}
	SUBNODE
	{
		name = subnode3.2
	}
	SUBNODE
	{
		name = subnode3.3
	}
}
@TESTNODE,*
{
	asterisk = worked_here
}
@TESTNODE
{
	NOasterisk = worked_here
}
@TESTNODE,0
{
	counting = first
}
@TESTNODE,1
{
	counting = second
}
@TESTNODE,2
{
	counting = third
}
@TESTNODE
{
	@SUBNODE,*
	{
		asterisk = worked_here
	}
	@SUBNODE
	{
		NOasterisk = worked_here
	}
	@SUBNODE,0
	{
		counting = first
	}
	@SUBNODE,1
	{
		counting = second
	}
	@SUBNODE,2
	{
		counting = third
	}
}

 

and this is what the mm cache contained after loading it:

Spoiler

UrlConfig
{
	name = testnode1
	type = TESTNODE
	parentUrl = /test
	url = /test/testnode1
	TESTNODE
	{
		name = testnode1
		NOasterisk = worked_here
		SUBNODE
		{
			name = subnode1.1
			asterisk = worked_here
			NOasterisk = worked_here
			counting = first
		}
		SUBNODE
		{
			name = subnode1.2
			asterisk = worked_here
			counting = second
		}
		SUBNODE
		{
			name = subnode1.3
			asterisk = worked_here
			counting = third
		}
	}
}
UrlConfig
{
	name = testnode2
	type = TESTNODE
	parentUrl = /test
	url = /test/testnode2
	TESTNODE
	{
		name = testnode2
		NOasterisk = worked_here
		SUBNODE
		{
			name = subnode2.1
			asterisk = worked_here
			NOasterisk = worked_here
			counting = first
		}
		SUBNODE
		{
			name = subnode2.2
			asterisk = worked_here
			counting = second
		}
		SUBNODE
		{
			name = subnode2.3
			asterisk = worked_here
			counting = third
		}
	}
}
UrlConfig
{
	name = testnode3
	type = TESTNODE
	parentUrl = /test
	url = /test/testnode3
	TESTNODE
	{
		name = testnode3
		NOasterisk = worked_here
		SUBNODE
		{
			name = subnode3.1
			asterisk = worked_here
			NOasterisk = worked_here
			counting = first
		}
		SUBNODE
		{
			name = subnode3.2
			asterisk = worked_here
			counting = second
		}
		SUBNODE
		{
			name = subnode3.3
			asterisk = worked_here
			counting = third
		}
	}
}

 

the weird thing is that, while targetting a subnode with @SUBNODE will edit only the first such node, targetting a root node with @NODE seems to target all root nodes of that type.

on the contrary, using     ,*   ,0   ,1   ,2 ...  doesn't seem to work on root nodes but only on subnodes

is this intended behaviour? have it always been this way? I never noticed before

Link to comment
Share on other sites

Yep, that's how it works.

Root nodes are all accessed, and HAS for them supports |

Subnodes are indexed. @NODE or @NODE,0 applies to the first, @NODE,1 applies to the second, @NODE,* applies to all. HAS no longer supports |

You can combine: @NODE[foo],*:HAS[#bar[baz]]

Link to comment
Share on other sites

6 hours ago, NathanKell said:

Yep, that's how it works.

Root nodes are all accessed, and HAS for them supports |

Subnodes are indexed. @NODE or @NODE,0 applies to the first, @NODE,1 applies to the second, @NODE,* applies to all. HAS no longer supports |

You can combine: @NODE[foo],*:HAS[#bar[baz]]

Ok I didn't know it was intended :)

Thanks

Link to comment
Share on other sites

Quick question, 

Module manager is getting stuck while loading the game. It gets to Module Manager: Final and then completely stops. Sometimes deleting the .cache file seems to make it work, but that doesn't feel like a permanent solution. Not sure what's going on. 

Link to comment
Share on other sites

8 hours ago, Galaxyfalcon said:

Quick question, 

Module manager is getting stuck while loading the game. It gets to Module Manager: Final and then completely stops. Sometimes deleting the .cache file seems to make it work, but that doesn't feel like a permanent solution. Not sure what's going on. 

There's probably an exception in the output log somewhere.  If you can provide it, we can analyze.  If you don't know how, follow the first link in my signature.

Link to comment
Share on other sites

Would the below be correct to create a MM patch to remove Engine Ignitor modules from parts that have the module in their individual .cfg files?

I do not use EI and while I realize the errors are harmless I wish to remove the modules so as to reduce the errors that appear in my log file.

@PART
[*]:HAS[@MODULE[ModuleEngineIgnitor]]:Final
{
    !MODULE[ModuleEngineIgnitor]{}
}

Thank you for your input in advance.

Link to comment
Share on other sites

45 minutes ago, Aivoh said:

Would the below be correct to create a MM patch to remove Engine Ignitor modules from parts that have the module in their individual .cfg files?

I do not use EI and while I realize the errors are harmless I wish to remove the modules so as to reduce the errors that appear in my log file.


@PART
[*]:HAS[@MODULE[ModuleEngineIgnitor]]:Final
{
    !MODULE[ModuleEngineIgnitor]{}
}

Thank you for your input in advance.

you don't really need the has or the [*]

this should be enough

@PART:FINAL
{

	!MODULE[ModuleEngineIgnitor] {}

}

anyway, I don't see how removing that module would help lowering the MM error count.

Link to comment
Share on other sites

5 minutes ago, Sigma88 said:

anyway, I don't see how removing that module would help lowering the MM error count.

Not MM Error Counts, removing the Log.txt (Cannot find a PartModule of typename 'ModuleEngineIgnitor) errors..

For my own pleasure.

Thanks for the info :)

Edited by Aivoh
Link to comment
Share on other sites

9 hours ago, Gaiiden said:

Loading after a specific mod is :AFTER and loading after all mods is :FINAL

would this:

 @PART:FINAL
[*]:HAS[@MODULE[ModuleLiftingSurface]]:FINAL
{
    -MODULE[ModuleLiftingSurface],* { }
}

load after all other mods? or work?

Link to comment
Share on other sites

31 minutes ago, ABZB said:

Is there a way I can make a module I modify move to index 0?

what about this:

@PART
{
	#MODULE {}
	%MODULE
	{
		// your stuff here
	}
}

this should put the first module in last place, and your module in first place (I guess that's what you mean by index 0)

edit:

even better

@PART
{
	MODULE {}
	#MODULE {}
	%MODULE
	{
		// your stuff here
	}
}

this will also add an empty MODULE so that the #MODULE {} line wont give error if there are no MODULEs

Edited by Sigma88
Link to comment
Share on other sites

1 hour ago, Whitecold said:

Is there any way to access the EVA report / Surface Sample with module manager? I would like to modify specifically the xtransmit value, so you have to return reports to Kerbin for full science

You can find all the definitions in GameData/Squad/.../Sciencedefs.cfg

 

I can't quite remember the path, should be easy to find anyway.

Once you find that cfg you can look at its structure and write a mm patch to edit the values you want

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