Jump to content

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


sarbian

Recommended Posts

1 hour ago, Siconix said:

Hi all, I had a question about the "volume" parameter for RESOURCE_DEFINITION. What does this actually affect? I've tried changing it but I don't see anything changing in-game.

It's used by mods but not by stock. It was added to the stock class for modders to use

Link to comment
Share on other sites

@blowfish How do I calculate a square root?

 

Edit:

Now I have a really weird issue - there is no MM error, but a variable is calculated to "Infinity" for whatever reason.
This occurs to all parts this patch was tinkering with.
I have the intuition that it could be there are too many decimal digits?
But how to decrease the amount of digits, is there a math.round in MM to limit the amount of decimal digits?

This is the calculation:

			tempdeploy = #$/MODULE[ModuleParachute]/semiDeployedDrag$
			@tempdeploy /= #$/MODULE[ModuleParachute]/stowedDrag$
			@tempdeploy *= 9.8696044010893586188344909998762
			preDeployedDiameter = #$tempdeploy$
			@preDeployedDiameter *= #$/mass$

Using the values of a specific reference part the result should be 0.62723495983369873586332051204075
But in ModuleManager.ConfigCache it says

				preDeployedDiameter = Infinity

Fun fact is, the calculation part right after that works:

			@tempdeploy = #$/MODULE[ModuleParachute]/fullyDeployedDrag$
			@tempdeploy /= #$/MODULE[ModuleParachute]/semiDeployedDrag$
			@tempdeploy *= 9.8696044010893586188344909998762
			deployedDiameter = #$tempdeploy$
			@deployedDiameter *= #$/mass$

Using the same reference part the calculation gives the correct result of

				deployedDiameter = 68.9958455816896

 

Edited by Gordon Dry
Link to comment
Share on other sites

@Gordon Dry not sure about the Infinity issue, can you by chance edit it to output all the intermediate values as well?  That would help in figuring out where something is going wrong.

You can truncate with regex replacement.  I think you want something like @value ^= :(\.\d\d)\d+$:$1:

How does this work?  You're matching a period followed by two decimals, followed by one or more decimals, followed by the end of the string, and replacing it with the part you're capturing (the period and two decimals)

Disclaimer: I haven't tried this

Edited by blowfish
Link to comment
Share on other sites

Hello folks. I am failing to change the model for a part I created by cloning.

The original:

Spoiler

    MODEL
    {
        model = blah
    }

My patch:

Spoiler

    @MODULE[MODEL]
    {
        @model = foo
    }

I would like to edit rather than delete and create a new ie I do not want to do this:

Spoiler

-MODULE[MODEL] {}
MODULE
{
model = foo
}

Am I missing something simple?

I have the same problem when I try:

Spoiler

    @MODULE[INTERNAL]
    {
        @name = bar
    }

 

The other keys I seem to be able to edit with success, and delete those I do not want/need, be they under PART or in a MODULE. Just the model and INTERNAL that I fail with. There are no errors btw. But examining ModuleManager.ConfigCache I see the results.

Link to comment
Share on other sites

Is it possible to edit certain module key values via percentage? example would be editing any part with an engine module to increase/decrease max thrust by x%, or resource requirements, resource outputs for converters, EC generation, etc.

or is that more of a plugin thing?

Link to comment
Share on other sites

Can someone help ive been looking for a download button or link or something but cant find one and I need it for the KIS mod and dont anything on all this... math... tech... stuff yall are putting out there im just a sophomore

 

 

never mind found it

Edited by Killer_Garfin
Link to comment
Share on other sites

looking at the order patches run in.  I understand that they run in an alphabetical order, so naming can change the order of patches.  What is the sort order used for this?  as in, I see putting things like special characters or numbers can move something up in the list.  but what about moving things down?  what is the last character in the sort order?  anything beyond "z"?

Link to comment
Share on other sites

12 minutes ago, Bit Fiddler said:

looking at the order patches run in.  I understand that they run in an alphabetical order, so naming can change the order of patches.  What is the sort order used for this?  as in, I see putting things like special characters or numbers can move something up in the list.  but what about moving things down?  what is the last character in the sort order?  anything beyond "z"?

Look at the ascii character set

Link to comment
Share on other sites

11 minutes ago, Bit Fiddler said:

looking at the order patches run in.  I understand that they run in an alphabetical order, so naming can change the order of patches.  What is the sort order used for this?  as in, I see putting things like special characters or numbers can move something up in the list.  but what about moving things down?  what is the last character in the sort order?  anything beyond "z"?

It's however KSP decides they should be sorted (ModuleManager doesn't do this explicitly).  Probably ends up being whatever order things are in when each directory is listed.  You can check the log to see what order things ended up in.

In general though I'd say it's best not to depend on alphabetical order within a particular pass.  If you need patch X to run before patch Y, put them in different passes.

Link to comment
Share on other sites

  • 4 weeks later...

Hello all.

A quick question. I am trying to give a part from the Making history expansion a new place in the tech tree. Now all other parts go to their new place in the tech tree. But not that one part from Making History. See the cfg file:

 

@PART[parachuteSingle]:FINAL
{
	@TechRequired = startx
}
@PART[trussPiece1x]:FINAL
{
	@TechRequired = startx
}
@PART[kv1Pod]:FINAL
{
	@Techrequired = startx
}

It is the kv1Pod (that's the name of the config file). It simply wont move to it's new place. All other non Making History parts DO move (there are many more parts I moved around then the ones in the example. Is there some extra thing needed to make it move? I tried different versions for the partname and none worked (KV1Pod, Kv1Pod and kv1Pod).

Regards for any answer

Link to comment
Share on other sites

5 hours ago, waerth said:

Hello all.

A quick question. I am trying to give a part from the Making history expansion a new place in the tech tree. Now all other parts go to their new place in the tech tree. But not that one part from Making History. See the cfg file:

 


@PART[parachuteSingle]:FINAL
{
	@TechRequired = startx
}
@PART[trussPiece1x]:FINAL
{
	@TechRequired = startx
}
@PART[kv1Pod]:FINAL
{
	@Techrequired = startx
}

It is the kv1Pod (that's the name of the config file). It simply wont move to it's new place. All other non Making History parts DO move (there are many more parts I moved around then the ones in the example. Is there some extra thing needed to make it move? I tried different versions for the partname and none worked (KV1Pod, Kv1Pod and kv1Pod).

Regards for any answer

Your TechRequired has a baby r, but it needs a big R.

Link to comment
Share on other sites

Is there a syntax to prevent patches from being applied to a mod without modifying each foreign mod? I'm looking at the KOOSE pods and it's silly the number of toggles that are in the right click menu of the parts. I'm running about 70 mods and a good number of these are applying patches to the KOOSE parts that aren't really relevant to an escape pod. I'd like to be able to put together a patch in the KOOSE mod to tell other mods to skip it. The best I can come up with is deleting modules after they've been applied as part of a set of :FINAL patches in my personal mods.

Edited by Tonka Crash
Link to comment
Share on other sites

40 minutes ago, Tonka Crash said:

Is there a syntax to prevent patches from being applied to a mod without modifying each foreign mod? I'm looking at the KOOSE pods and it's silly the number of toggles that are in the right click menu of the parts. I'm running about 70 mods and a good number of these are applying patches to the KOOSE parts that aren't really relevant to an escape pod. I'd like to be able to put together a patch in the KOOSE mod to tell other mods to skip it. The best I can come up with is deleting modules after they've been applied as part of a set of :FINAL patches in my personal mods.

Your solution is probably the best way. 

Otherwise there is this, although I haven't tried it in 1.4.5

 

Link to comment
Share on other sites

I've been trying to modify the afterburning jet to use a new resource, but I can't figure out how to get both ModuleEngineFX modules. I've managed to get one of them with this, but not both.

@PART[turboJet]:FINAL
{
	@MODULE[ModuleEnginesFX]
	{
		@PROPELLANT[LiquidFuel]
		{
			@name = AP1
		}
	}
}

 

Link to comment
Share on other sites

15 minutes ago, FungusForge said:

I've been trying to modify the afterburning jet to use a new resource, but I can't figure out how to get both ModuleEngineFX modules. I've managed to get one of them with this, but not both.

Try this:

@PART[turboJet]:FINAL
{
	@MODULE[ModuleEnginesFX],*
	{
		@PROPELLANT[LiquidFuel]
		{
			@name = AP1
		}
	}
}

By adding the  ,*  , you will adress every module with the same name. You can also use numbers to adress them separately, i.e. @MODULE[ModuleEnginesFX],0 for the first module, and @MODULE[ModuleEnginesFX],1 for the second.

Edited by 4x4cheesecake
Link to comment
Share on other sites

35 minutes ago, 4x4cheesecake said:

By adding the  ,*  , you will adress every module with the same name. You can also use numbers to adress them separately, i.e. @MODULE[ModuleEnginesFX],0 for the first module, and @MODULE[ModuleEnginesFX],1 for the second.

Thank you!

Link to comment
Share on other sites

  • 3 weeks later...

There is this MM issue with CC / Kerbalism again, since I use KSP 1.4.5:

@JH4C says

Quote

That filepath would appear to suggest the issue occurs while MM is processing a file supplied by Kerbalism; it's certainly not a file that's included in CC, and I don't have that error when I load my game (which does not include Kerbalism.) As such, you might have better luck asking in the Kerbalism thread.

@PiezPiedPy says:

Quote

its not a CC error as CC is not referenced in that exception. Could be an MM issue

 

I'm not sure where to start to eliminate this issue ...

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