sarbian

[1.3.0] Module Manager 2.8.0 (May 26th 2017) - Better late than never

5125 posts in this topic

8 minutes ago, Errol said:

What would be the correct syntax for specifiying a mod that is a folder within a folder in game data for :AFTER[mod] or :BEFORE[mod]?

it's not possible, but if it's a situation like my mods, where more mods are in the same folder (in my case named Sigma) then it's very likely the mod author is using a :FOR[] tag somewhere to signal that his mod is installed.

so, to check if the mod is installed you would need to use :NEEDS[] with inside the name used in the :FOR[] from the mod you want to check if is installed.

 

for :AFTER[] and  :BEFORE[] it doesn't matter what folder the mod is in, it matters what tags that mod is using

so before you need to see when that mod applies its patches, and then you can choose what to put in your :BEFORE[] / :AFTER[] tags

keep in mind that, when using the same :BEFORE[] / :AFTER[], the patches are applied following alphabetical order of the folders in gamedata

Share this post


Link to post
Share on other sites

What are tags?

Share this post


Link to post
Share on other sites
2 minutes ago, Errol said:

What are tags?

:BEFORE[] :AFTER[] :FOR[]

whatever you want to call them

1 person likes this

Share this post


Link to post
Share on other sites

Ah, ok. 

So I can put a FOR[something] in one .cfg, and then use a NEED[something] in another to specific if something should happen? Correct? What I want to do is have two cfgs that get applied in a specific order, would the best way to do that be to simply name them alphabetically?

Share this post


Link to post
Share on other sites

Posted (edited)

2 minutes ago, Errol said:

Ah, ok. 

So I can put a FOR[something] in one .cfg, and then use a NEED[something] in another to specific if something should happen? Correct? What I want to do is have two cfgs that get applied in a specific order, would the best way to do that be to simply name them alphabetically?

if two cfgs are in the same folder and use the same :BEFORE[] / :FOR[] / :AFTER[] then they will applied in alphabetical order

the same works if they don't use any :BEFORE[]  / :FOR[] / :AFTER[]

(be careful that windows and linux use a different alphabetical order so try to use file names that are in the same order in both OS)

Edited by Sigma88

Share this post


Link to post
Share on other sites

How would I make a patch to delete all the tankType variables from this?

MODULE
	{
		name = ModuleB9PartSwitch
		moduleID = fuelSwitch
		switcherDescription = Tank Setup
		baseVolume = 14740.0

		SUBTYPE
		{
			name = Structural
			transform = STR
		}

		SUBTYPE
		{
			name = LFO
			tankType = B9_HX_LFO
			transform = LFO
		}

		SUBTYPE
		{
			name = MonoPropellant
			title = MonoProp
			tankType = B9_HX_MonoPropellant
			transform = RCS
		}

		SUBTYPE
		{
			name = Battery
			tankType = B9_HX_Battery
			transform = Capacitor
		}
	}

 

Share this post


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

How would I make a patch to delete all the tankType variables from this?

...

B9's MFT/RF patch does exactly that, take a look here

Share this post


Link to post
Share on other sites
1 minute ago, blowfish said:

B9's MFT/RF patch does exactly that, take a look here

Thank you. This is a much more elegant solution than deleting the entire module and adding a copy without tankType.

Share this post


Link to post
Share on other sites

@KerbMav  @Sigma88  Hey Sigma88!  I have updated the Porkjet configs with your method and it all works! I am playing through the hard career in 1.3 with USI+KIS/KAS+bells & whistles, all's fine. Thanks again!!

 

2 people like this

Share this post


Link to post
Share on other sites

Hi, 

One of my configs is not working, the part selector for the resources doesn't seem to work. 

 

@PART[*]:HAS[@RESOURCE[Food]]:FINAL
{

.... Do Stuff

}

if I select a part with a module it works but not RESOURCE? 

Geh

 

Share this post


Link to post
Share on other sites
18 minutes ago, genericeventhandler said:

Hi, 

One of my configs is not working, the part selector for the resources doesn't seem to work. 

 

@PART[*]:HAS[@RESOURCE[Food]]:FINAL
{

.... Do Stuff

}

if I select a part with a module it works but not RESOURCE? 

Geh

 

I'm not familiar with parts syntax.

If you show me an example of a part you want to target I can tell you why your patch doesn't work

Share this post


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

I'm not familiar with parts syntax.

If you show me an example of a part you want to target I can tell you why your patch doesn't work

I fixed it, there was another cfg that was interfering with this one, removing the Food resource. So all good now, thanks. 

 

1 person likes this

Share this post


Link to post
Share on other sites
@PART[*]:HAS[@MODULE[InterstellarFuelSwitch]]:NEEDS[ConfigurableContainers]
{
	@MODULE[InterstellarFuelSwitch]
	{
		@resourceAmounts ^= :^(\d+),:$1:
	}
	@description = #$MODULE[InterstellarFuelSwitch]/resourceAmounts$
} 

I'm trying to get this regex to pull a specific string from InterstellarFuelSwitch in parts like this (in this case I would want the description to be 756) but I end up getting the entire resourceAmounts string in the description

The expression works in regex testers so something about my usage of MM regex must be causing problems; help would be appreciated.

Share this post


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

@PART[*]:HAS[@MODULE[InterstellarFuelSwitch]]:NEEDS[ConfigurableContainers]
{
	@MODULE[InterstellarFuelSwitch]
	{
		@resourceAmounts ^= :^(\d+),:$1:
	}
	@description = #$MODULE[InterstellarFuelSwitch]/resourceAmounts$
} 

I'm trying to get this regex to pull a specific string from InterstellarFuelSwitch in parts like this (in this case I would want the description to be 756) but I end up getting the entire resourceAmounts string in the description

The expression works in regex testers so something about my usage of MM regex must be causing problems; help would be appreciated.

Values are always processed before notes so it will be copied to the description before you modify it.  Solution is to split into multiple patches.  Why are you modifying it in place though ... wouldn't you want to keep the correct resource amounts on the module?

1 person likes this

Share this post


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

Values are always processed before notes so it will be copied to the description before you modify it.  Solution is to split into multiple patches.  Why are you modifying it in place though ... wouldn't you want to keep the correct resource amounts on the module?

I'm working on a patch that extracts a resource amount from the module and uses that to calculate the part's volume for another new module, then delete the IFS module. Thank you for the help.

1 person likes this

Share this post


Link to post
Share on other sites

my game keeps crashing when it load model manager! I would give you the crash file but i dont know how to do that.

Share this post


Link to post
Share on other sites
29 minutes ago, PixelRunnerXFT said:

my game keeps crashing when it load model manager! I would give you the crash file but i dont know how to do that.

Please read here for instructions on how to find the output log.

1 person likes this

Share this post


Link to post
Share on other sites

I'm not sure if this is possible via MM, but I figured if it was, someone here would know how to do it.

I have added the various stock MODULE[ModuleEnviroSensor] to the Mk1 Command pod. I would like to edit the interface of the command pod via MM to make it more user friendly and change the Sensor Display buttons to read "Toggle Temperature Display, Toggle Pressure Display" etc. instead of the confusing multiple "Toggle Display."

Spoiler

1JWsQPI.png

 

I have looked at KSP documentation and tried out a few different patches, but none were successful.  https://kerbalspaceprogram.com/api/class_module_enviro_sensor.html

I'm not sure if a plugin is required to edit the part interface window.

Cheers,

Share this post


Link to post
Share on other sites

@Stratickus seeing as there is no public field for the Toggle Display, it's not possible to modify with MM. You're going to have to write a plugin

Share this post


Link to post
Share on other sites

Posted (edited)

1 hour ago, TheRagingIrishman said:

@Stratickus seeing as there is no public field for the Toggle Display, it's not possible to modify with MM. You're going to have to write a plugin

That's kinda what I figured. Does anyone by chance know if someone has already written a plugin for this?

Cheers,

Edited by Stratickus

Share this post


Link to post
Share on other sites

Hi, question.

Does MM have any sort of logging functionality?  I'd like to write out the stats of various engines after MM has done all it's patching work to a file.  Is that doable or will I need to write a plugin that does it?

Share this post


Link to post
Share on other sites
34 minutes ago, Maxsimal said:

I'd like to write out the stats of various engines after MM has done all it's patching work to a file

The MM cache file in gamedata has all the patched config, and the "dump" button of the UI (ALT F11 in the main menu or spacecentrer) will write patched cfg files in <KSP>/_MMCfgOutput

Share this post


Link to post
Share on other sites

@sarbian

Cool that dump was very useful.  I did it from the main menu and the game is now purple-screened and stuck on 'database reloading 100%' for the last 10 minutes, but that's not a big deal, of course, I'll just restart.

Share this post


Link to post
Share on other sites

Hello

KSP: 1.3.0 Windows 64bit (32bit also tried)

Problem: Crash to desktop after MM loading

Mods installed:

Module Manager 2.8.0

Raster Prop Monitor 0.28.0

FAR 0.15.8.1

KJR 3.3.2

Kopernicus 1.3.0.4

Modular Flight Integrator 1.2.4.0

Sigma Dimensions 0.8.0.0

Reproduction steps:

No reproduction.

I established that the simultaneous presence of these mods (excluding MM) crashes game at load screen, just after MM patching phase - that is why I suppose it might have sth to do with MM, but this can be wrong assumption, MM only changes cfg files afterall.

Tested on two PCs, 

Logs and specs:

https://we.tl/l94XRVOcal

 

please, thank you

Share this post


Link to post
Share on other sites

@Mein_Gott try updating Sigma Dimensions. 0.8.0.0 wasn't playing nicely with Kopernicus versions newer than 1.3.0-2. 

Also, your versions of RPM, FAR, and KJR are all for KSP 1.2.2, not KSP 1.3.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now