sarbian

[1.8.x-1.9.x] Module Manager 4.1.3 (November 30th 2019) - Right To Ludicrous Speed

Recommended Posts

16 hours ago, Sigma88 said:

I don't think OR have ever worked in HAS

And then I stumble across this variant.  Will it work?

@PART[*]:HAS[@MODULE[ModuleCommand|KerbalSeat]]:NEEDS[MechJeb2]:FINAL
{
     // code block
}

Tested it.  Nope!  In fact, it's worse.  The 1st code example above at least worked for ModuleCommand.  This one doesn't work for either ModuleCommand nor KerbalSeat.

Share this post


Link to post
Share on other sites

Hello, I need help in writing MM patch: you need to change the texture location folder of one existing part in one part. I make the adaptation for WindowsShine, the detail has several variants of the texture switchable in the game, if I replace the original textures with my own, then the patch works as it should, but I need the original textures to stay in place
, But modified in their own folder.  

Did so

Spoiler

 

@PART[*]

{
@MODULE

    {
        
        @textureRootFolder = New file path
        
    }
}

 

But it does not work

Edited by miromed

Share this post


Link to post
Share on other sites
2 hours ago, miromed said:

But it does not work

The '@' symbol means to access an existing data parameter or structure.  "@PART[*]" means parts with any name.  What MODULE do you want to change?  I couldn't figure out what MODULE(s) you wanted to change.  If it's named "wombat", then you need "@MODULE[wombat]".  '*" can be used too.

Share this post


Link to post
Share on other sites
40 minutes ago, Jacke said:

The '@' symbol means to access an existing data parameter or structure.  "@PART[*]" means parts with any name.  What MODULE do you want to change?  I couldn't figure out what MODULE(s) you wanted to change.  If it's named "wombat", then you need "@MODULE[wombat]".  '*" can be used too.

I understand that, for example, I cited the details without a name

Then here's the original file

Spoiler

PART
{
    name = size2CrewCabin
    module = Part
    author = blackheart612
    rescaleFactor = 1
    node_stack_top = 0.0, 1.875, 0.0, 0.0, 1.0, 0.0, 2
    node_stack_bottom = 0.0, -1.875, 0.0, 0.0, -1.0, 0.0, 2
    //node_attach = 1.25, 0.0, 0.0, 0.0, 0.0, 1.0, 1
    TechRequired = supersonicFlight
    entryCost = 2600
    cost = 10000
    category = Utility
    subcategory = 0
    title = Size 2 Crew Cabin
    manufacturer = Kerbal Standard
    description = If you thought that Hitchhikers were just not cutting it for carrying Kerbals, then you need a better 2.5m Cabin. Designed to take up to 16 Kerbals as long as you can afford the very cheap price for comfort and haulage.
    attachRules = 1,0,1,1,0
    mass = 2
    dragModelType = default
    maximum_drag = 0.1
    minimum_drag = 0.1
    angularDrag = 2
    crashTolerance = 40
    maxTemp = 1000
    skinMaxTemp = 2000
    vesselType = Ship
    CrewCapacity = 16
    bulkheadProfiles = size2
    noAutoEVAMulti = True
    tags = base contain outpost passenger statio (stor tour
    MODEL
    {
        model = AirplanePlus/Parts/Structure and Fuel/size2parts/size2cabin
        texture = size2tex1 , AirplanePlus/Parts/Structure and Fuel/size2parts/size2tex1
    }
    INTERNAL
    {
        name = s2cabinInternal
    }
    MODULE
    {
        name = ModuleScienceExperiment
        experimentID = crewReport
        experimentActionName = Crew Report
        resetActionName = Discard Crew Report
        reviewActionName = Review Report
        useStaging = False
        useActionGroups = True
        hideUIwhenUnavailable = True
        rerunnable = True
        xmitDataScalar = 1.0
        usageReqMaskInternal = 5
        usageReqMaskExternal = -1
    }
    MODULE
    {
        name = ModuleScienceContainer
        reviewActionName = Review Stored Data
        storeActionName = Store Experiments
        evaOnlyStorage = True
        storageRange = 1.5
    }
    MODULE
    {
        name = ModuleAnimateGeneric
        animationName = s2light
        defaultActionGroup = Light
        actionGUIName = Toggle Lights
        startEventGUIName = Lights On
        endEventGUIName = Lights Off
    }

    MODULE
    {
        name = ModuleDataTransmitter
        antennaType = INTERNAL
        packetInterval = 1.0
        packetSize = 2
        packetResourceCost = 12.0
        requiredResource = ElectricCharge
        antennaPower = 5000
        optimumRange = 2500
        packetFloor = .1
        packetCeiling = 5
    }
    
MODULE
{
    name = FStextureSwitch2
    moduleID = 1
    //showListButton = True
    nextButtonText = Next Paint
    prevButtonText = Previous Paint
    statusText = Current Paint
    textureRootFolder = AirplanePlus\Parts\Structure and Fuel\
    textureNames = size2parts\size2tex1;size2parts\size2tex2;size2parts\size2tex3
    objectNames = cabin
    textureDisplayNames = Standard;Striped;End
    switchableInFlight = false
    repaintableEVA = false
    debugMode = false
    showInfo = false
}
}
 

My patch

Spoiler

@PART[size2CrewCabin]
{
@MODULE
    {
        @textureRootFolder = WindowShine\Default\AirplanePlus\Parts\Structure and Fuel\
        @textureNames = size2parts\size2tex1;size2parts\size2tex2;size2parts\size2tex3
    }
}

 

UDP: I realized my mistake had to be specified @MODULE[FStextureSwitch2] The first time I write something like this, and with the English language tight) Thank you.

Edited by miromed

Share this post


Link to post
Share on other sites

In advance I apologize if this problem has already been considered, with my bad English browsing 200 pages of the topic is hell.

There is MM patch

Spoiler

@PART[HL_Aero_Cockpit]:HAS[!MODULE[TRR_Reflection]]:NEEDS[TextureReplacerReplaced]
{
    %MODULE[TRR_Reflection]
    {
%name = TRR_Reflection
%shader = ShaderNG/TR_Reflective_Emissive_Alpha
%colour = 0.5 0.5 0.5
%interval = 4
%meshes = 
    }
}

It should specify the name Meshes as: Merged Exterior. How to do this if the name meshes has a space

Share this post


Link to post
Share on other sites
9 hours ago, ssss222 said:

NEXT UPG MM MOD FIX 1.3 GAME CRASH BUG

no. MM doesn't cause any crashes, outdated mods cause crashes

Share this post


Link to post
Share on other sites
9 hours ago, ssss222 said:

NEXT UPG MM MOD FIX 1.3 GAME CRASH BUG

This is just a bunch of words in a row but it doesn't make any sense

It's like saying

SPACECRAFT BANANA RUNNING 42 TOTAL ANSWER

Edited by Sigma88

Share this post


Link to post
Share on other sites
5 minutes ago, Sigma88 said:

SPACECRAFT BANANA RUNNING 42 TOTAL ANSWER

After applying the fix, my FPS doubled. Thank you.

Share this post


Link to post
Share on other sites
6 hours ago, Sigma88 said:

This is just a bunch of words in a row but it doesn't make any sense

It's like saying

SPACECRAFT BANANA RUNNING 42 TOTAL ANSWER

I feel like the chutes could have opened a little earlier. I slipped right off the runway

Spoiler

Space-Shuttle-Banana-23116.jpg

I said this ship is bananas!

Spoiler

WmmeweyD1d-7.png

B-A-N-A-N-A-S!

Edited by Galileo

Share this post


Link to post
Share on other sites
1 hour ago, Galileo said:

I feel like the chutes could have opened a little earlier. I slipped right off the runway

  Hide contents

Space-Shuttle-Banana-23116.jpg

 

Somehow I feel your post should be @Vanamonde approved.... :)

Edited by Jacke

Share this post


Link to post
Share on other sites

I'm pulling my hair out trying to figure out MM formatting, and need some help.  I don't understand the vernacular at all.  

I think I need/want to modify existing .cfg files for two different mods, as part of my suit pack.  I want to modify mods TextureReplacerReplaced, and CommunityTraitIcons.  

  1. I have built a bunch of suits and have a config that works for TexutreReplacerReplacer, but I need my config to overwrite the TextureReplacerReplacer default config, and at the same time not screw up anyone else's TRR config for any pack they distribute.  
    1. My suit pack will be in folder "Cetera" with subfolders "Suits" and "Default" (GameData/Cetera/Suits, GameData/Cetera/Default)
    2. TRR's default config example is here.  It is in the GameData/TextureReplacerReplaced folder.
    3. My Config file so far is here.  My config file is named CeteraSuits.cfg, and is in the GameData/Cetera/ directory.
  2. As part of my suit pack, I want to integrate matching icons into the PortraitStats/CommunityTraitIcons mods.  
    1. I have created new icons to be used.  They are in folder GameData/Cetera/Icons.
    2. I have created a new config file, CeteraIcons.cfg, example here.  It is in the GameData/Cetera directory.
    3. My config needs to overwrite/modify the CTI config here.  This config is in the GameData/CommunityTraitIcons directory.
    4. If I copy and paste the contents of my icons folder and config into the CTI folder and remove the CTI files, everything works.  I can't get anything to work from my own mod folder, however.

I believe I specifically need help with the @ commands in MM, and the AFTER: commands, and how to name my configs something that MM then knows.  None of my patches apply to a part, though, and I've not found an example of something like what I'm trying to do, nor have I been able to figure this out after a great many attempts via trial and error.  

Would anyone have time to be able to guide me through this step by step?

Share this post


Link to post
Share on other sites
55 minutes ago, Cetera said:

As part of my suit pack, I want to integrate matching icons into the PortraitStats/CommunityTraitIcons mods.  

// @ at beginning to specify we want to edit an existing config node
// :NEEDS is there to stop an error in the log if CTI is not installed
// :AFTER will make sure the patch's changes occur after CTI has set up the node 
//     if there are multiple mods all using the same :AFTER clause then they will be
//     applied in alphabetic order with last one winning
@CommunityTraitIcons:NEEDS[CommunityTraitIcons]:AFTER[CommunityTraitIcons] 
{

	// repeat this block for each trait
	@Trait[Pilot] // edit the node "Trait" with content "name = Pilot"
	{
		@color = 0.588235294,0.070588235,0.031372549,1 // replace existing color value with new value
		@icon = Cetera/Icons/pilotIcon // replace existing icon path with new path
	}

	// other traits here
}

 

Share this post


Link to post
Share on other sites
4 minutes ago, Aelfhe1m said:

// @ at beginning to specify we want to edit an existing config node
// :NEEDS is there to stop an error in the log if CTI is not installed
// :AFTER will make sure the patch's changes occur after CTI has set up the node 
//     if there are multiple mods all using the same :AFTER clause then they will be
//     applied in alphabetic order with last one winning
@CommunityTraitIcons:NEEDS[CommunityTraitIcons]:AFTER[CommunityTraitIcons] 
{

	// repeat this block for each trait
	@Trait[Pilot] // edit the node "Trait" with content "name = Pilot"
	{
		@color = 0.588235294,0.070588235,0.031372549,1 // replace existing color value with new value
		@icon = Cetera/Icons/pilotIcon // replace existing icon path with new path
	}

	// other traits here
}

 

Ahhhhhh...

Just like that, the light goes on, and I see and comprehend.  Thank you!  Let me whip this up and see how it works.

Share this post


Link to post
Share on other sites

So with TRR, since it doesn't have nodes with "name = something" sections, do I need to do an @ at the front of each setting?  

Share this post


Link to post
Share on other sites

@Cetera Here's the config for TRR:

Spoiler


// define your suit pack
TextureReplacerReplaced
{
	Folders
	{
		Default = Cetera/Default/
		Suits = Cetera/Suits/
	}
}

// override only the default values that you need to change 
@TextureReplacerReplaced:AFTER[TextureReplacerReplaced]
{
	// each value to be overridden starts with an @
	@isCompressionEnabled = never
	// added values don't have an @ at the start of the line
	generateMipmaps = /Cetera
	
	// just omit any lines from @Default that you don't want to change
	
	visorReflectionColour = 

	// updating a node so start with an @
	@CustomKerbals
	{
		// another mod may have added the gang of four already so
		// start each line with % which means "add or edit"
		%Jebediah Kerman 	=	M DEFAULT OrangePilot
		%Bill Kerman			=	M GENERIC OrangeEng
		%Bob Kerman			=	M GENERIC OrangeScience
		%Valentina Kerman	=	F GENERIC PurplePilot
	}

	// see above
	@ClassSuits
	{
		%Pilot			= RedPilot
		%Engineer		= YellowEngineer
		%Scientist		= BlueScience
		%Kolonist		= Kolonist
		%Miner			= Miner
		%Technician		= Technician
		%Mechanic		= Mechanic
		%Biologist		= GreenBiologist
		%Geologist		= PinkGeologist
		%Farmer			= BrownFarmer
		%Medic			= RedMedic
		%Quartermaster	= Quartermaster
		%Scout			= Scout
		%Tourist		= DEFAULT
	}
}

 

 

Share this post


Link to post
Share on other sites
6 minutes ago, Aelfhe1m said:

@Cetera Here's the config for TRR:

Oh, man, thank you so much.  This all makes a LOT more sense now.  I couldn't understand what a node was before, as I couldn't find a definition that made sense (or at least that I understood) in this thread, the wiki, and lots of searching.  Your comments seriously make all the difference.  I sincerely appreciate the time and guidance you've given me.

Share this post


Link to post
Share on other sites

@iadaboth and @sarbian both deserve a lot for making this mod, practically all KSP mods use this mod and likely wouldn't exist without it, this mod is the heart of the KSP modding community, you guys deserve to be on the KSP Dev team and/or paid heavily by the entire community for making so many great mods possible. How Module Manager isn't stock yet eludes me. On behalf of the entire KSP community, I would just like to say, a personal thank you :) 

Anyone know what happened to ialdabaoth? I can't even find the tag for his account when I put the @

Share this post


Link to post
Share on other sites
2 minutes ago, The-Doctor said:

@iadaboth and @sarbian [...], you guys deserve to be [...] paid heavily by the entire community

Here's one place where you can do just that:

On 10/25/2013 at 8:01 AM, sarbian said:

btn_donate_SM.gif

 

Share this post


Link to post
Share on other sites

Sorry if this is a duplicate issue.  I have searched everywhere and can not find an answer.  I have always played with Remotetech and in a new playthrough wanted to try CommNet.  I have scrubbed remotetech  from everywhere i can find, but MM patches for it are still being applied.  So many of the antennas are not functional because the Commnet Module, ModuleDataTransmitter, is being replaced with the Remotetech Module, ModuleRTAntenna.  The link below is a shared folder on my google drive that contains my output.log, MM cache file, an example cfg of an antenna and an example patch that should not be getting applied.  It lists :Needs[Remotetech] properly from what i can tell but I may be missing somethign syntax wise.

https://drive.google.com/drive/folders/0B3tLMNmF1UxvVXVnOF9Tcy14N1E?usp=sharing

Thanks.

Share this post


Link to post
Share on other sites
16 minutes ago, terminalmonky said:

Sorry if this is a duplicate issue.  I have searched everywhere and can not find an answer.  I have always played with Remotetech and in a new playthrough wanted to try CommNet.  I have scrubbed remotetech  from everywhere i can find, but MM patches for it are still being applied.  So many of the antennas are not functional because the Commnet Module, ModuleDataTransmitter, is being replaced with the Remotetech Module, ModuleRTAntenna.  The link below is a shared folder on my google drive that contains my output.log, MM cache file, an example cfg of an antenna and an example patch that should not be getting applied.  It lists :Needs[Remotetech] properly from what i can tell but I may be missing somethign syntax wise.

https://drive.google.com/drive/folders/0B3tLMNmF1UxvVXVnOF9Tcy14N1E?usp=sharing

Thanks.

One of your other mods probably has a line with with ':FOR[Remotetech]' instead of the ':NEEDS' that they meant to use; it's a common problem.  You'll need to figure out which mod, and change/remove the line.  (And probably tell the mod maintainer.)

Share this post


Link to post
Share on other sites

@terminalmonky - I did a quick search of your output_log and @DStaal is correct. The problem is from the OPT Legacy mod (pinging @stali79):

Quote

Config(@PART[OPTantenna]:FOR[RemoteTech]) OPT_Legacy/MM_Patches/OPT_RT/@PART[OPTantenna]:FOR[RemoteTech]

 

Share this post


Link to post
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.