Jump to content

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


sarbian

Recommended Posts

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?

Link to comment
Share on other sites

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
Link to comment
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
		}
	}

 

Link to comment
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

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

Link to comment
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?

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

Link to comment
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,

Link to comment
Share on other sites

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
Link to comment
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?

Link to comment
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

Link to comment
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

Link to comment
Share on other sites

5 minutes ago, Mein_Gott said:

@Merkov thanks

updated sigma, reverted KSP to 1.2.2, no change :(

but regarding mods being for 1.2.2 - individual mods work alone and the game starts. its when they are together (lets say - pick any 3 from my list) the crash occurs

You have a mix of mods for 1.2.2 and 1.3.  You need to make sure all the versions are consistent.  1.2.2 mods will crash 1.3 and the reverse.

Link to comment
Share on other sites

@Merkov @blowfish thank you for help, everything works now, every single mod had to be exactly for current kps version, or else it crashed. might sound obvious, but Its suprising to me, since it never was a case, from my previous ksp experience, when mixing versions was a common practice

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