Jump to content

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


sarbian

Recommended Posts

2 minutes ago, Neutrinovore said:

Hmm.  Trying to download 2.6.17, and the links on the front page and also in one of Sarbian's posts on the previous page don't do anything, they just open a blank page.  I am using the Microsoft Edge browser, I don't know if that makes any difference.  I'll try it on Internet Explorer.

Worked fine for me if you want can post you a dropbox link ?

Link to comment
Share on other sites

There is this thing I can't get out of my head:

Inside the ScienceDefs.cfg there are 11 EXPERIMENT_DEFINITIONs

4 of them look like this:

Spoiler

EXPERIMENT_DEFINITION
{
	id = someThing
	title = Some Thing
	baseValue = X
	scienceCap = X
	...
	
	RESULTS
	{
	...
	}
}

 

And 7 of them look like that:

Spoiler

EXPERIMENT_DEFINITION
{
	id = blaBla
	title = Bla Bla
	baseValue = X
	scienceCap = Y
	...
	
	RESULTS
	{
	...
	}
}

 

So since I wanted to do experiments only once, I used the following to match the baseValue and scienceCap:

	@EXPERIMENT_DEFINITION[*]
	{
	%baseValue = #$scienceCap$
	}

It works, no question. BUT the thing that bugs me out is that it adresses all the nodes, not just the 7 I wandt to adress. And I was unable to solve this problem. I've gone through the "Module Manager Handbook" and read nearly everything in the github reopsitory.

"Filtering by numbers" looked really promissing, but I was unable to make use of it. It's just not working with that kind of note.

The only "effort" I madei was to notice that if I can't filter it, the [*] is not required for the patch to work...

 

So now I hope, I'm just blind and didn't see the obvious and someone can point me the right way.

(Might add here my goal was to just write one patch, I know i can just write 7 patches and adress each of those EXPERIMENT_DEFINITIONS by refering to their name, but I really really really wanted to do this with a filter.)

Edited by maculator
Link to comment
Share on other sites

47 minutes ago, maculator said:

There is this thing I can't get out of my head:

Inside the ScienceDefs.cfg there are 11 EXPERIMENT_DEFINITIONs

4 of them look like this:

  Reveal hidden contents



EXPERIMENT_DEFINITION
{
	id = someThing
	title = Some Thing
	baseValue = X
	scienceCap = X
	...
	
	RESULTS
	{
	...
	}
}

 

And 7 of them look like that:

  Reveal hidden contents


EXPERIMENT_DEFINITION
{
	id = blaBla
	title = Bla Bla
	baseValue = X
	scienceCap = Y
	...
	
	RESULTS
	{
	...
	}
}

 

So since I wanted to do experiments only once, I used the following to match the baseValue and scienceCap:


	@EXPERIMENT_DEFINITION[*]
	{
	%baseValue = #$scienceCap$
	}

It works, no question. BUT the thing that bugs me out is that it adresses all the nodes, not just the 7 I wandt to adress. And I was unable to solve this problem. I've gone through the "Module Manager Handbook" and read nearly everything in the github reopsitory.

"Filtering by numbers" looked really promissing, but I was unable to make use of it. It's just not working with that kind of note.

The only "effort" I madei was to notice that if I can't filter it, the [*] is not required for the patch to work...

 

So now I hope, I'm just blind and didn't see the obvious and someone can point me the right way.

(Might add here my goal was to just write one patch, I know i can just write 7 patches and adress each of those EXPERIMENT_DEFINITIONS by refering to their name, but I really really really wanted to do this with a filter.)

I'm not sure why you want to exclude the first 4 experiments...

is it to just to save computing time or is there something I'm missing?

Link to comment
Share on other sites

Quote

I'm not sure why you want to exclude the first 4 experiments...

is it to just to save computing time or is there something I'm missing?

 

Every now and then I work on my personal MM cfg. For fun, understanding and making my KSP experience the way I want it

Let's just say I stumbled across this problem while experimenting and now I'm getting mad because I can't solve it.

(There is no real need to exclude the 4 Nodes exept my curiosity and desire to do so)

This is my personal cfg I use every time I play ksp, It started as a "copy/paste" from the githubtutorials and everytime I learned something new, or something occured on KSP wich I didnt like, I edited it:

Spoiler

//Unlock MechJeb for all command-parts at start:

	@PART[*]:HAS[@MODULE[ModuleCommand]]:NEEDS[MechJeb2]:FINAL
	{
		%MODULE[MechJebCore]
		{
			MechJebLocalSettings[*]
			{
				%unlockTechs = start
			}
		}
	}

//Full Science for returned experiments:

	@EXPERIMENT_DEFINITION
	{
		%baseValue = #$scienceCap$
	}
	
//Add decouplers to heatshields

	@PART[HeatShield*]
	{
		MODULE
		{
			name = ModuleDecouple
			ejectionForce = 40
			isOmniDecoupler = true
		}
	}

//Unlock science-parts at start

	@PART[*]:HAS[#category[Science],!MODULE[ModuleScienceLab],!MODULE[ModuleResourceScanner],!MODULE[ModuleOrbitalSurveyor],!MODULE[ModuleDataTransmitter]]
	{
		%TechRequired = start
	}
	
//No overspeeddamage for roverwheels:

	@PART[*]:HAS[@MODULE[ModuleWheel],!MODULE[ModuleLandingGear]]
	{
		%PhysicsSignificance = 1
		@MODULE[ModuleWheel]
		{
			%impactTolerance = 1000
			%overSpeedDamage = 1000
		}
	}
	
//Unlock a set of wheels for the start:

	@PART[roverWheel1]
	{
		%TechRequired = start
	}
	

 

 

Link to comment
Share on other sites

9 minutes ago, maculator said:

 

Every now and then I work on my personal MM cfg. For fun, understanding and making my KSP experience the way I want it

Let's just say I stumbled across this problem while experimenting and now I'm getting mad because I can't solve it.

(There is no real need to exclude the 4 Nodes exept my curiosity and desire to do so)

This is my personal cfg I use every time I play ksp, It started as a "copy/paste" from the githubtutorials and everytime I learned something new, or something occured on KSP wich I didnt like, I edited it:

  Reveal hidden contents



//Unlock MechJeb for all command-parts at start:

	@PART[*]:HAS[@MODULE[ModuleCommand]]:NEEDS[MechJeb2]:FINAL
	{
		%MODULE[MechJebCore]
		{
			MechJebLocalSettings[*]
			{
				%unlockTechs = start
			}
		}
	}

//Full Science for returned experiments:

	@EXPERIMENT_DEFINITION
	{
		%baseValue = #$scienceCap$
	}
	
//Add decouplers to heatshields

	@PART[HeatShield*]
	{
		MODULE
		{
			name = ModuleDecouple
			ejectionForce = 40
			isOmniDecoupler = true
		}
	}

//Unlock science-parts at start

	@PART[*]:HAS[#category[Science],!MODULE[ModuleScienceLab],!MODULE[ModuleResourceScanner],!MODULE[ModuleOrbitalSurveyor],!MODULE[ModuleDataTransmitter]]
	{
		%TechRequired = start
	}
	
//No overspeeddamage for roverwheels:

	@PART[*]:HAS[@MODULE[ModuleWheel],!MODULE[ModuleLandingGear]]
	{
		%PhysicsSignificance = 1
		@MODULE[ModuleWheel]
		{
			%impactTolerance = 1000
			%overSpeedDamage = 1000
		}
	}
	
//Unlock a set of wheels for the start:

	@PART[roverWheel1]
	{
		%TechRequired = start
	}
	

 

 

as far as I know there is no way to exclude the first 4 nodes based on the fact that baseValue is equal to scienceCap

the only way I know to check if two parameters are equal to each other is to subtract one to the other, like so:

@EXPERIMENT_DEFINITION
{
	@baseValue -= #$scienceCap$
}
@EXPERIMENT_DEFINITION:HAS[#baseValue[0]]
{
	this node has baseValue = scienceCap
}
@EXPERIMENT_DEFINITION:HAS[#baseValue[<0]]
{
	this node has baseValue < scienceCap
}
@EXPERIMENT_DEFINITION:HAS[#baseValue[>0]]
{
	this node has baseValue > scienceCap
}

this only works with numbers and it's not very useful for your problem, since you don't really need to know whether one parameter is higher, lower or the same as the other. you just need to override the baseValue to be equal to the science cap, and your cfg is already doing that correctly.

you may want to add a check for the absence of "scienceCap" but I'm not sure that you will ever need such a check anyways

Link to comment
Share on other sites

Okay, so I'm quite a noob with module manager. But I think

@baseValue -= #$scienceCap$

would make it possible to sort the 4 nodes out. However it would also change their value wouldn't it? Wich would cause huge problems since those values define how much science points you earn for completing the experiment.

I really hoped it would work like this:

@EXAMPLE,*

But I didnt manage to do it.

The problem is: I have 11 EXPERIMENT_DEFINITIONs wich I apperantly can't adress individually (exept one patch for each)

:HAS

doesn't work either for my problem since it just kicks out all but 1 of them because those 4 have nothing unique in common.

I also dindn't manage to find a way to add filters. Because each filter kicks out a group but its impossible to say "keep the nodes wich have a value of 5 and the ones with a value of 10 ..." it always kicks out everything with a value /=5 and then the ones with /=10, wich leaves me with a total of 0 adressed nodes. :(

 

So I guess I just have to admit defeat and either accept 4 senseless patches or 7 unique patches.

Thanks for the help and sorry If my english wasn't the best.

Link to comment
Share on other sites

29 minutes ago, maculator said:

Okay, so I'm quite a noob with module manager. But I think


@baseValue -= #$scienceCap$

would make it possible to sort the 4 nodes out. However it would also change their value wouldn't it? Wich would cause huge problems since those values define how much science points you earn for completing the experiment.

I really hoped it would work like this:


@EXAMPLE,*

But I didnt manage to do it.

The problem is: I have 11 EXPERIMENT_DEFINITIONs wich I apperantly can't adress individually (exept one patch for each)


:HAS

doesn't work either for my problem since it just kicks out all but 1 of them because those 4 have nothing unique in common.

I also dindn't manage to find a way to add filters. Because each filter kicks out a group but its impossible to say "keep the nodes wich have a value of 5 and the ones with a value of 10 ..." it always kicks out everything with a value /=5 and then the ones with /=10, wich leaves me with a total of 0 adressed nodes. :(

 

So I guess I just have to admit defeat and either accept 4 senseless patches or 7 unique patches.

Thanks for the help and sorry If my english wasn't the best.

yes it will change the value, you just need to roll back the change doing

@baseValue += #$scienceCap$

but as I already said, that would be silly for your problem....

 

also, even if you find a way to check if basevalue is equal to science cap and ignore those nodes, the patch will probably take more time than the one you have right now.

because it will have to:

1- check if the values are equal

2- edit the value

as opposed to:

1- edit the value

 

and since there is no quick way to check if values are equal, that kind of patch will take a lot more time to execute

or at least that is my understanding of it

 

I think you should consider yourslf lucky that you have such a simple solution, for some of my mods I had to do very weird checks that I would have gladly avoided if there was an easier way to do them :D

Edited by Sigma88
Link to comment
Share on other sites

19 hours ago, MeCripp said:

Worked fine for me if you want can post you a dropbox link ?

Well, yes, thank you.  :)  I just checked again, approximately 24 (or 19, whatever... ) hours later, and the links are still broken.  So yes, if it's not too much trouble, I'd appreciate an alternate link to the latest version.  Again, much thanks!

:D

Link to comment
Share on other sites

5 hours ago, MeCripp said:

Alrighty, excellent, thank you greatly sir!  Ehm, or perhaps Madam, lol, sorry for not knowing which right this second. :confused:

Anyway, yep, your link worked great, and I've already got it downloaded.  Greatly appreciated.  Have some rep!

Uhhh... how do I give reputation points on this new forum?

Edited by Neutrinovore
Link to comment
Share on other sites

@Neutrinovore My site uses HTTP 2.0. If you have one of those "awesome" antivirus that try to scans your https traffic (like bitdefender or ESET) it may fail. If you use one of those two then have a look at that post on Mozilla forum to get instruction on who to temporally disable it. I would welcome the feedback

I will not explain what I think of product that break the certificate trust chain since the profanity would get me an instant ban

Edit : better if I include the link to the post :D

Edited by sarbian
Link to comment
Share on other sites

54 minutes ago, ThaZeus said:

What does database reloading mean? Because I hit a button and my KSP is stuck at database reloading 80% and all of the stock parts have ceased to exist.

It reloads all the parts, effects, configs, etc.  If it's stuck then something's probably throwing an exception - please provide logs if you want us to investigate.

Link to comment
Share on other sites

Try this

	@PART[radPanelEdge]
	{
		@MODULE[ModuleActiveRadiator] // @(Edit), not %(Edit_or_Create)
		{
			RESOURCE	// you add new node (resource). [] is for search existing nodes
			{
				name = MonoPropellant
				rate = 0.0002
			}
		}
	}

 

Edited by Jenyaza
Where is point in this patch?
Link to comment
Share on other sites

Thanks alot I noticed it too ... I was stupid

But now I have a new "problem" I want to make a part generate constant heat but there are so many factors wich could do it (or don't) and I cant seem to find anything explaining how to do it..

I want a part (for test reasons) to produce a coonstant overheat.

Link to comment
Share on other sites

56 minutes ago, maculator said:

Thanks alot I noticed it too ... I was stupid

But now I have a new "problem" I want to make a part generate constant heat but there are so many factors wich could do it (or don't) and I cant seem to find anything explaining how to do it..

I want a part (for test reasons) to produce a coonstant overheat.

Look at MODULE[ModuleCoreHeat] or RTG,it's everything explained there.

Link to comment
Share on other sites

3 minutes ago, Warzouz said:

How would you do to reduce drag of a part with Module Manager ?

Are those data obsolete ?

    dragModelType = default
    maximum_drag = 0.2
    minimum_drag = 0.2
    angularDrag = 2

Those are indeed obsolete.  The only way to actually reduce drag would be give the part a custom drag cube, which is quite difficult.

P.S. this isn't really MM related.

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