Jump to content

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


sarbian

Recommended Posts

On 10/24/2016 at 10:52 AM, ThePhoenixSol said:

Hey, how come this code wont delete the specified tech nodes?


!RDNode:HAS[#id[nuclearPropulsion|advMetalworks|largeVolumeContainment|composites|electronics|ionPropulsion|hypersonicFlight|nanolathing|advUnmanned|metaMaterials|veryHeavyRocketry|advScienceTech|advancedMotors|specializedElectrics|highPerformanceFuelSystems|experimentalAerodynamics|automation|aerospaceTech|largeUnmanned|experimentalScience|experimentalMotors|experimentalElectrics]] {}

as far as i can tell, with my very limited, and new knowledge of module manager, this SHOULD be working, but yet it doesnt.

@sarbian @Laguna

can someone please assist on this?

Link to comment
Share on other sites

Just now, Sigma88 said:

are you sure OR can be used there?

not 100% tbh... thats part of why im here, to be told if thats the issue or not XD

i woulda changed it to see if thats the issue... but idk what else would work in that situation, other than individually editing every single one as apposed to doing it all at once like i tried.

Link to comment
Share on other sites

3 hours ago, blowfish said:

Yeah, I don't think | will work there.  You'd need an individual #id[] for each of them (then at that level you can use | )

   well. i tried using that advice.... still didnt work..... tried doing it like below as well, but no luck either..... is there any way that this would work? or do i seriously have to do each node individually

	@RDNode:HAS[#id[nuclearPropulsion]|#id[advMetalworks]|#id[largeVolumeContainment]|#id[composites]|#id[electronics]|#id[ionPropulsion]|#id[hypersonicFlight]|#id[nanolathing]|#id[advUnmanned]|#id[metaMaterials]|#id[veryHeavyRocketry]|#id[advScienceTech]|#id[advancedMotors]|#id[specializedElectrics]|#id[highPerformanceFuelSystems]|#id[experimentalAerodynamics]|#id[automation]|#id[aerospaceTech]|#id[largeUnmanned]|#id[experimentalScience]|#id[experimentalMotors]|#id[experimentalElectrics]]
	{
		@pos = 0,0,0
		@hideEmpty = True
	}

 

Link to comment
Share on other sites

14 hours ago, ThePhoenixSol said:

is there any way that this would work?

Did you notice that all RDNode are inside a root node called TechTree ?

TechTree
{
	RDNode
	{
	...
	}
...
}

And your first form was the right one #id[nuclearPropulsion|advMetalworks|...]

Edited by sarbian
Link to comment
Share on other sites

15 hours ago, sarbian said:

Did you notice that all RDNode are inside a root node called TechTree ?


TechTree
{
	RDNode
	{
	...
	}
...
}

And your first form was the right one #id[nuclearPropulsion|advMetalworks|...]

yes i did, they are all in a "TechTree{}| its just there is a LOT of other code there, so i just included the broken part.

and ahh, so the first way was right. how come it didnt work then? :o

here is the cfg, if that helps any: https://drive.google.com/file/d/0Bxx6dPCywdQGaU5QR1VtYktHMWs/view?usp=sharing

note: the cfg is me trying the [#id[]|[]] method... also didnt work.... BUT when i did !RDNode rather than @RDNode like in the cfg, it returned errors that @pap1723 thinks may be cause by it trying to move them, but then when the parts that are still in the node are still in there, since i havent moved them yet. it freaks out and tried to revert.

will be testing that theory here shortly

Link to comment
Share on other sites

5 hours ago, sarbian said:

MM is not a transactional database :)

no idea what that means, ill assume i was just being dumb :P

yaaaaaaaay for looking here right before, and after bed... cause a tired brain is totally a smart one....not.

 

anyways @sarbian wanna weigh in on my issue? any ideas for what im doing wrong?

Link to comment
Share on other sites

I've been attempting to bootstrap a mod into working for 1.2, and the very first issue I've noticed is related to a modulemanager cfg. Modulemanager mentioned a list of errors from a specific cfg, and within the game's logs, every single error is of the same type - "Cannot parse variable search when editing key Cloudspack =" and then the filepath for what it was attempting to edit at the time.

So I've looked into the cfg, and it's relatively simple. It goes as follows:
 

Spoiler

@CLOUD_LAYER_PACK:HAS[#CloudsPack[*],#OPMClouds[*]]
{
    @CloudsPack -= #$@CLOUD_LAYER_PACK[MainCloudsPack]/CloudsPack$
}
@CLOUD_LAYER_PACK:HAS[~CloudsPack[0],#OPMClouds[*]]
{
    !CLOUD_LAYER,* {}
}


It seems that the error is occuring with the first case given - I can't say I understand fully what is going on (I am a bit ambiguous as to what "HAS" means, but I'm assuming it's some sort of conditional), I'm thinking that's the case since in all of the circumstances where the logs mentioned the second part being activated, there were no errors.
Can anybody provide any insight/advice?

Edited by Acetylcholine
Accuracy in how I'm presenting information
Link to comment
Share on other sites

15 minutes ago, Acetylcholine said:

I've been attempting to bootstrap a mod into working for 1.2, and the very first issue I've noticed is that the issue is modulemanager. Modulemanager mentioned a list of errors from a specific cfg, and within the game's logs, every single error is of the same type - "Cannot parse variable search when editing key Cloudspack =" and then the filepath for what it was attempting to edit at the time.

So I've looked into the cfg, and it's relatively simple. It goes as follows:
 

  Reveal hidden contents

@CLOUD_LAYER_PACK:HAS[#CloudsPack[*],#OPMClouds[*]]
{
    @CloudsPack -= #$@CLOUD_LAYER_PACK[MainCloudsPack]/CloudsPack$
}
@CLOUD_LAYER_PACK:HAS[~CloudsPack[0],#OPMClouds[*]]
{
    !CLOUD_LAYER,* {}
}


It seems that the error is occuring with the first case given - I can't say I understand fully what is going on (I am a bit ambiguous as to what "HAS" means, but I'm assuming it's some sort of conditional), I'm thinking that's the case since in all of the circumstances where the logs mentioned the second part being activated, there were no errors.
Can anybody provide any insight/advice?

just out of curiosity, why are you trying to revive that mod? it has been dead for ages now, and for good reasons

EDIT: unless the mod is not the one I am thinking about, in which case the mod you're talking about just stole cfgs from the mod I am thinking about

Edited by Sigma88
Link to comment
Share on other sites

2 minutes ago, Sigma88 said:

just out of curiosity, why are you trying to revive that mod? it has been dead for ages now, and for good reasons

Because I'm an idiot and I mixed up what tab I downloaded a link from. I think that solves the issue, that successfully pointed out to me that I had the incorrect OPM enhancement mod, though.

Edited by Acetylcholine
Link to comment
Share on other sites

On 10/25/2016 at 4:50 PM, Sigma88 said:

@PART:FOR[UDASoylent] {}

Thanks this works for me, I could override the description for stock parts and Soylent parts based on NEEDS[UDASoylent]. I checked ksp.log and saw many lines from the @PART:FOR so I added [RCSTank1-2] qualifier - I guess it really/probably doesn't make it any more 'efficient'.

Link to comment
Share on other sites

I have a problem where a patch is being included in another mod, which I need to overwrite with some changed settings.

Original patch:

@PART[aerocam]
{
	MODULE
	{
		name = JSIExternalCameraSelector
		cameraContainer = Cylinder_002
		rotateCamera = 0,0,0
		cameraIDPrefix = ExtCam
	}
}

Will this do that:

@PART[aerocam]:Final
{
	%MODULE[JSIExternalCameraSelector]
	{
		%name = JSIExternalCameraSelector
		%cameraContainer = Cylinder_002
		%rotateCamera = 0,0,0
		%cameraIDPrefix = ExtCam
	}
}

Thanks in advance

Edited by linuxgurugamer
Link to comment
Share on other sites

51 minutes ago, linuxgurugamer said:

I have a problem where a patch is being included in another mod, which I need to overwrite with some changed settings.

Original patch:


@PART[aerocam]
{
	MODULE
	{
		name = JSIExternalCameraSelector
		cameraContainer = Cylinder_002
		rotateCamera = 0,0,0
		cameraIDPrefix = ExtCam
	}
}

Will this do that:


@PART[aerocam]:Final
{
	%MODULE[JSIExternalCameraSelector]
	{
		%name = JSIExternalCameraSelector
		%cameraContainer = Cylinder_002
		%rotateCamera = 0,0,0
		%cameraIDPrefix = ExtCam
	}
}

Thanks in advance

Yes. That patch will make the changes or insert it if the module/fields don't already exist. Provided that the other mod is not also using Final.  FYI "FINAL" also works and doesn't look so out place. 

Edited by Tarheel1999
Link to comment
Share on other sites

Might I ask a question?
 

I am trying to make a patch where a new part is created and contains different science experiments, but I want those to only be available if the appropriate tree node has been unlocked.

+PART[oldthing] 
  name = newthing
  TechRequired = x
  etc

Module[science1]
{blabla}

Module[science2]
{blabla}

Module[science3]
{blabla}

Module[science4]
{blabla}

 

I have that working with a techtree node check on the entire part already (highest experiment node), but not per module so it unlocks as you progress through the tree. Is this even possible with MM?
 

Link to comment
Share on other sites

@Jimbodiah *I think* this is possible with the upgrade system (new to 1.2). Look at this thread / mod : 

The engine use the upgrade system, no idea if it will work for science experiment but you can look at theirs cfg and at Upgrades.cfg (engine folder too) for inspiration

 

Link to comment
Share on other sites

@Li0n  Thanks for the tip, I will check it out!

 

edit: I checked it out, but that is only the update functionality and I am not sure you can add complete modules in a part update. I made a config already but it does not seem to apply new modules, only change values that are already there. I was hoping there was a way to add modules with MM with the condition of a techtree node being unlocked. I'm scanning the entire thread if something similar came up in the past. Not even sure if it's possible in a base cfg file though.

Edited by Jimbodiah
Link to comment
Share on other sites

I need help with the following patch.  MM is throwing an error on the Input_Resource section of the patch.

MODULE{
		name = ModuleHabitation
		BaseKerbalMonths = #$/mass$ 
		@BaseKerbalMonths *= 10
		@BaseKerbalMonths -= #$/CrewCapacity$
		CrewCapacity = #$/CrewCapacity$
		BaseHabMultiplier = 0
		ConverterName = Habitat
		StartActionName = Start Habitat
		StopActionName = Stop Habitat		
		INPUT_RESOURCE{
			ResourceName = ElectricCharge
			Ratio = #$/BaseKerbalMonths$ 
			@Ratio *= .25
		}
	}

I'm assuming the problem has something to do with trying to use BaseKerbalMonths as the initial value. BaseKerbalMonths is defined in the section above.  Is my only option to redo the math in the section above for BaseKerbalMonths or is there another option? TIA

Link to comment
Share on other sites

11 hours ago, Kerbas_ad_astra said:

I think you need to say "Ration = #$../BaseKerbalMonths$", that is, tell MM to look up one level for the variable.  It's like traversing file directories.

I'll give it a try. I guess /CrewCapacity works because it is the "root directory"

Edit - That worked. Thanks.

Edited by Tarheel1999
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...