Jump to content

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


sarbian

Recommended Posts

maxThrust is always defined. An engine will literally not do anything without it :wink: I've also never seen minThrust not set, but I suppose I could use a % there instead.

Thanks for the hint about using a variable. Is do you perhaps know if there's a guide about it anywhere, so I don't have to ask questions in the future?

Link to comment
Share on other sites

I see that there have been a few questions about PARTUPGRADE and the functionality. I have gotten it working and it shows up in Module Manager Config, but it doesn't actually change the upgrades to the correct nodes. Does anyone know if this actually works?

Link to comment
Share on other sites

Is there a way to copy a MODULE config from another part? Basically a functionality to "make this module like the module of that other part". For instance, copy a FSfuelSwitch config from one part to another. Without either having to manually copy-paste the rest of the part, or copy-paste the module.

I've only managed to copy a module from the same part with the "+MODULE[blah]" syntax. Basically I want something like this (which I couldn't make work in any variation):

+PART[foo]
{
	+MODULE[$../PART[bar]/MODULE[FSfuelSwitch]$]
	{
		// do something interesting here
	}
}

Would save a lot of manual copy paste, and then manual re-copy-paste whenever the other part changes.

Link to comment
Share on other sites

On 2/20/2017 at 9:21 PM, pap1723 said:

I see that there have been a few questions about PARTUPGRADE and the functionality. I have gotten it working and it shows up in Module Manager Config, but it doesn't actually change the upgrades to the correct nodes. Does anyone know if this actually works?

This doesn't really have anything to do with ModuleManager, but I'd recommend looking at Porkjet's Part Overhaul as an example:

 

On 2/23/2017 at 1:48 PM, jd284 said:

Is there a way to copy a MODULE config from another part? Basically a functionality to "make this module like the module of that other part". For instance, copy a FSfuelSwitch config from one part to another. Without either having to manually copy-paste the rest of the part, or copy-paste the module.

I've only managed to copy a module from the same part with the "+MODULE[blah]" syntax. Basically I want something like this (which I couldn't make work in any variation):

Would save a lot of manual copy paste, and then manual re-copy-paste whenever the other part changes.

Yes.  I think you would want something like this:

+PART[foo]:FOR[MyMod]
{
    @name = foo2

    #@PART[bar]/MODULE[FSfuelSwitch]
    {
        // Any edits you want to make
    }
}

The key here is #, which tells MM to find the node somewhere else and paste it in.

Link to comment
Share on other sites

28 minutes ago, blowfish said:

Yes.  I think you would want something like this:


+PART[foo]:FOR[MyMod]
{
    @name = foo2

    #@PART[bar]/MODULE[FSfuelSwitch]
    {
        // Any edits you want to make
    }
}

The key here is #, which tells MM to find the node somewhere else and paste it in.

Thanks, that worked. Seems obvious in hindsight...

Link to comment
Share on other sites

2 minutes ago, Sarxis said:

I get an error with CommunityTechTree.cfg.  I've modded it myself (carefully).  How would I go about hunting down what exactly the error is?  Would that show up in a log? 

It definitely shows up in the log.

Link to comment
Share on other sites

On 3/4/2017 at 0:13 PM, blowfish said:

It definitely shows up in the log.

Do you mean the KSP Log?  I honestly don't know where to start looking, or what exactly I'd be looking for in the Log.txt file.  It's quite big.

Link to comment
Share on other sites

28 minutes ago, Sarxis said:

Do you mean the KSP Log?  I honestly don't know where to start looking, or what exactly I'd be looking for in the Log.txt file.  It's quite big.

Yes.  I usually search for "error", which unless you have a lot of other issues should find it pretty quickly.

Link to comment
Share on other sites

16 minutes ago, blowfish said:

...which unless you have a lot of other issues should find it pretty quickly.

I don't know what my psychiatrist would have to say but I'll give it a try! :3

Link to comment
Share on other sites

hi, i will need your help again guys,

i would like to copy all the RESOURCE nodes from a Part1 to a Part2 like this,

Example of Part1:

Part1 //I don't know how many resource node it has.
{
...
	RESOURCE
	{
		name = resource1
		...
	}
	RESOURCE
	{
		name = resource2
		...
	}
	RESOURCE
	{
		name = resource3
		...
	}
	...
}

 

I expected this to copy all the resource nodes, i tried each of this syntax:

@PART[Part2]
{
#@PART[Part1]/RESOURCE[*]{} //copy only the 1st resource
#@PART[Part1]/RESOURCE[*],*{} //copy only the 1st resource
#@PART[Part1]/RESOURCE,*{} //copy only the 1st resource
}

unfortunately, it only copy the 1st node :/

I also tried a workaround, by writing enough of this lines:

@PART[Part2]
{
#@PART[Part1]/RESOURCE,0{} 
#@PART[Part1]/RESOURCE,1{} 
#@PART[Part1]/RESOURCE,2{}
#@PART[Part1]/RESOURCE,3{}
#@PART[Part1]/RESOURCE,4{}
#@PART[Part1]/RESOURCE,5{}
...
}

but it copy the last resource as many times as the rest, with  my example above of 3 resources in Part1 and 6 lines of copy it will give:

Part2
{
...
	RESOURCE
	{
		name = resource1
		...
	}
	RESOURCE
	{
		name = resource2
		...
	}
	RESOURCE
	{
		name = resource3
		...
	}
	RESOURCE
	{
		name = resource3
		...
	}
	RESOURCE
	{
		name = resource3
		...
	}
	RESOURCE
	{
		name = resource3
		...
	}
	...
}

Did i missed something?
thank's

Edit: i have no KSP.log here, i will do and post it tomorrow... sorry :/

 

Edited by Skalou
Link to comment
Share on other sites

Here is the KSP.log and output_log.txt (not easy to find this one :/https://docs.unity3d.com/Manual/LogFiles.html) :

https://www.dropbox.com/sh/otqbr58bg58lsb9/AACeQdDVNFX2K9iFq7uGiFCAa?dl=0

I also included a minimod to test this things easily, available in the GameData of the dropbox link.

@Jenyaza, thank you, :wink: it could be a workaround, i will  probably have to deal with how to delete everything except the RESOURCE nodes.

Link to comment
Share on other sites

51 minutes ago, Alpha_Mike_741 said:

Probably an obvious question but ,for a config that is intended for a mod and should run after it. is this sensible ?


@PART[*]:NEEDS[RealismOverhaul]:AFTER[RealismOverhaul]
{
//Do stuff
}

 

More or less correct - that patch will run after any patches marked FOR[RealismOverhaul] .  But it's worth noting that RO has some patches on different passes, so it's worth looking into exactly what you want to overwrite and when it runs.

Also, NEEDS[RealismOverhaul] is unnecessary in this case.  AFTER implies it.

Link to comment
Share on other sites

Hello everyone. I am trying to delete certain parts via MM

This script does not seem to work.

!PART[MK2VApod|noseConeAdapter|decoupler1-2|shortDecoupler1-2|stackDecoupler1-2|stackSeparator|stackSeparatorMini|stackDecouplerMini|ShieldCapLarge|rocketNoseCone|standardNoseCone|WBI_PlasmaTV|WBI_PlasmaTV2|WBI_PlasmaTV3]:FINAL

Can someone please give me a hint?

 

Link to comment
Share on other sites

28 minutes ago, New Horizons said:

Hello everyone. I am trying to delete certain parts via MM

This script does not seem to work.

!PART[MK2VApod|noseConeAdapter|decoupler1-2|shortDecoupler1-2|stackDecoupler1-2|stackSeparator|stackSeparatorMini|stackDecouplerMini|ShieldCapLarge|rocketNoseCone|standardNoseCone|WBI_PlasmaTV|WBI_PlasmaTV2|WBI_PlasmaTV3]:FINAL

Can someone please give me a hint?

 

I don't remember if you can use the OR operator there,

if you can, you would need to add curly brackets at the end

!PART[MK2VApod|noseConeAdapter|decoupler1-2|shortDecoupler1-2|stackDecoupler1-2|stackSeparator|stackSeparatorMini|stackDecouplerMini|ShieldCapLarge|rocketNoseCone|standardNoseCone|WBI_PlasmaTV|WBI_PlasmaTV2|WBI_PlasmaTV3]:FINAL {}

like that

Link to comment
Share on other sites

Hi

I need a bit of help. I have a mod with the following animations:

 

	MODULE
	{
		name = ModuleAnimateGeneric
		animationName = Gear
		startEventGUIName = Deploy Gear
		endEventGUIName = Retract Gear
		actionGUIName = Toggle Gear
        evaDistance = 1.85
        layer = 1
	}

	MODULE
	{
		name = ModuleAnimateGeneric
		animationName = Drill
		startEventGUIName = Deploy Drill
		endEventGUIName = Retract Drill
		actionGUIName = Toggle Drill
        evaDistance = 1.85
        layer = 2
	}

	MODULE
	{
		name = ModuleAnimateGeneric
		animationName = Romap
		startEventGUIName = Deploy Antenna
		endEventGUIName = Retract Antenna
		actionGUIName = Toggle RoMap
        evaDistance = 1.85
		layer = 3
	}

However if DMagic is installed i want to replace them with other experiments. Like:

@PART[MacLuky.Rosetta.Philae]:NEEDS[DMagicOrbitalScience]
{
	MODULE
	{
		name = DMAsteroidScanner
		animationName = Romap
		//greenLight = greenAnim
		//yellowLight = yellowAnim

		experimentID = dmAsteroidScan
		rerunnable = True
		transmitValue = 1.0
		dataIsCollectable = True
		collectActionName = Take Data
		experimentResource = ElectricCharge
		resourceCost = 0.25
		usageReqMaskExternal = 8
	}

	MODULE
	{
		name = DMModuleScienceAnimate
		animationName = Drill

		experimentAnimation = true
		experimentWaitForAnimation = true
		waitForAnimationTime = 4
		oneWayAnimation = true

		startEventGUIName = Systems Check
		showStartEvent = true
		showEndEvent = false
		showEditorEvents = true

		customFailMessage = The drill is only suitable for surface based observations.

		experimentID = dmlaserblastscan

		experimentActionName = Collect Drill Data
		resetActionName = Discard Drill Data

		resourceExperiment = ElectricCharge
		resourceExpCost = 20

		useStaging = False
		useActionGroups = True
		hideUIwhenUnavailable = False
		rerunnable = True

		xmitDataScalar = 1.0

		dataIsCollectable = True
		collectActionName = Take Data
		interactionRange = 1.2
		externalDeploy = True
		usageReqMaskExternal = 8

		asteroidReports = True
		asteroidTypeDependent = True
	}
}

But I guess I should also disable the ModuleAnimateGeneric. How can I do that?

Link to comment
Share on other sites

1 hour ago, MacLuky said:

Hi

I need a bit of help. I have a mod with the following animations:

However if DMagic is installed i want to replace them with other experiments. Like:

But I guess I should also disable the ModuleAnimateGeneric. How can I do that?

!MODULE[ModuleAnimateGeneric]:HAS[#animationName[Romap]] {}

Or however else you want to identify the specific modules you want to remove

Link to comment
Share on other sites

Is there any way to make collapsible regions in the config files. I tried using empty brackets but module manager doesn't seem to be able to parse the files when they are formatted that way. Is there any symbol i can safely use as a opening and closing mark for code collapsing that will not interfere with module managers ability to read the config files

When your writing patches for something like Tweak Scale you generally end up with hundreds of parts to patch and it would be nice to have collapsible regions of code under section comments for sanity sake

If this doesn't exist consider this a feature request for a

@REGION node which acts as a organization container for part nodes like this

// Patches for Parts of type A
@REGION
{
	@PART[]
	{
	}
	
	@PART[]
	{
	}
}

// Patches for Parts of Type B
@REGION
{
	@PART[]
	{
	}
}

 

Edited by Mikeloeven
Link to comment
Share on other sites

52 minutes ago, Mikeloeven said:

Is there any way to make collapsible regions in the config files. I tried using empty brackets but module manager doesn't seem to be able to parse the files when they are formatted that way. Is there any symbol i can safely use as a opening and closing mark for code collapsing that will not interfere with module managers ability to read the config files

When your writing patches for something like Tweak Scale you generally end up with hundreds of parts to patch and it would be nice to have collapsible regions of code under section comments for sanity sake

If this doesn't exist consider this a feature request for a

@REGION node which acts as a organization container for part nodes like this


// Patches for Parts of type A
@REGION
{
	@PART[]
	{
	}
	
	@PART[]
	{
	}
}

// Patches for Parts of Type B
@REGION
{
	@PART[]
	{
	}
}

 

no, you can use different files, or put comments to separate the different sections

 

//////////// LIKE THIS /////////////////

Link to comment
Share on other sites

3 hours ago, Mikeloeven said:

Is there any way to make collapsible regions in the config files. I tried using empty brackets but module manager doesn't seem to be able to parse the files when they are formatted that way. Is there any symbol i can safely use as a opening and closing mark for code collapsing that will not interfere with module managers ability to read the config files

Wouldn't the answer to that be entirely dependent on what your editor considers a collapsible region?  I've worked with some that were hard coded to work with curly braces, and others that would let me specify multiple regrexs of my choosing per language.

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