Jump to content

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


sarbian

Recommended Posts

Sigh.  Spoke too soon.  ModuleManager is still awesome, of course, but after I fixed it so the rules get executed in the correct order (verified in the log), the modules and resource I deleted are still showing up in the VAB.

@PART[KKAOSS_Workshop]:NEEDS[ExtraplanetaryLaunchpads&PlanetaryBaseInc]:AFTER[PlanetarySurfaceStructures]
{
    -MODULE[ELWorkshop]
    -MODULE[ELConverter]
    -RESOURCE[RocketParts]

 

(Tried ! instead of - too, just for good measure, but no joy).

Derp:

!MODULE[ELWorkshop]

is bad

!MODULE[ELWorkshop] {}

is good.

Shame about not getting an error message, but I could have read the examples more carefully too...

Link to comment
Share on other sites

10 hours ago, cami said:

What is that supposed to mean? Should I use KSP 1.3.1 with MM 3.0.4 or MM 4.0.2, or do both work?

The 4.0.2 listed there is actually a backport (notice that the url is ModuleManager-RO rather than just ModuleManager).  It will work with KSP 1.3.1 but note that the regular 4.0.2 will not.

Link to comment
Share on other sites

On 4/13/2019 at 7:33 AM, blowfish said:

The 4.0.2 listed there is actually a backport (notice that the url is ModuleManager-RO rather than just ModuleManager).  It will work with KSP 1.3.1 but note that the regular 4.0.2 will not.

Awesome! You may want to make that a little more pronounced :-)

Link to comment
Share on other sites

41 minutes ago, linuxgurugamer said:

Anybody know what happens if the following is in a cfg file, but MM is NOT installed:

Pretty much nothing.  KSP will load it into the game database but with the :NEEDS part still in the name so nothing will ever look for it 

Link to comment
Share on other sites

I think I just came up with a bug in MM.

I have a mod, EVA Handrails Continued, which needs MM to run.  All of a sudden, it's not working, getting errors like this:

PartLoader: Compiling Part 'NEBULA/EVAHandRailsPack/handrail 2mR curved/handrail 2mR/EVA handrail curved 3mR'
 
PartCompiler: Cannot clone model 'NEBULA/handrail 2mR curved/model' as model does not exist

PartCompiler: Model was not compiled correctly
 

When I remove the MM dll, the models do get compiled properly.

Log files here:  https://www.dropbox.com/sh/t7uoksssesgahxe/AABTTxu7GMczgE4RSz6G05mPa?dl=0

The only change between the compiles is that MM was removed for the Good compile.

These logs are from a Windows, system, I saw the same errors on a Mac

Please don't say "remove the spaces".  The spaces are there, and have been there for a very long time.  For various reasons, they will be staying 

Link to comment
Share on other sites

@linuxgurugamer spaces have nothing to do with it.  A patch is pointing it to a model that doesn't exist, so of course it's complaining when MM is installed https://github.com/linuxgurugamer/EVAHandrailsPack/blob/46f943a02b4644463c1e9690a1b894f37b34df11/GameData/NEBULA/EVAHandRailsPack/nebulaEvaHandrailsPatch.cfg#L72 (should be NEBULA/EVAHandRailsPack/handle/model )

Link to comment
Share on other sites

2 minutes ago, linuxgurugamer said:

See my post (you ninja'd me).  MM is incorrectly rewriting the config

No, the patch I linked you to is rewriting the config.  ModuleManager doesn't do anything like that on its own.

Link to comment
Share on other sites

@PART[*]:HAS[@RESOURCE[MonoPropellant],!MODULE[KerbalEVA],!MODULE[ModuleCommand]]:FOR[ZZZ_REFUSE]
{
    // dry mass
    REFUSE_wet_mass = #$mass$

    // original liquid fuel mass
    temp_mass = #$@RESOURCE_DEFINITION[MonoPropellant]/density$
    @temp_mass *= #$RESOURCE[MonoPropellant]/maxAmount$
    @REFUSE_wet_mass += #$temp_mass$
    -temp_mass = delete
    !RESOURCE[MonoPropellant] {}

    // configure new propellants
    RESOURCE
    {
        name = HTP
        amount = #$@REFUSE_FuelTanksConfiguration/HTP_units_per_metric_tonne_of_wet_mass_for_HTP_tank$
        @amount *= #$../REFUSE_wet_mass$
        maxAmount = #$amount$
    }

    // adjust dry mass
    @mass = #$REFUSE_wet_mass$
    @mass *= #$@REFUSE_FuelTanksConfiguration/HTP_dry_to_wet_ratio$
}

Anyone understand why patching a simple mono-propellant tank produces a warning about variable not found in PartLoader:

[LOG 22:12:15.795] PartLoader: Compiling Part 'Squad/Parts/FuelTank/RCSFuelTankR25/RCSFuelTankR25/RCSFuelTank'
[WRN 22:12:15.800] [ShipConstruct for RCSFuelTank]: part cost (330.0) is less than the cost of its resources (811.4)
[WRN 22:12:15.801] PartLoader Warning: Variable REFUSE_wet_mass not found in Part
[LOG 22:12:15.808] PartLoader: Part 'Squad/Parts/FuelTank/RCSFuelTankR25/RCSFuelTankR25/RCSFuelTank' has no database record. Creating.
[LOG 22:12:15.809] DragCubeSystem: Creating drag cubes for part 'RCSFuelTank'

 

Link to comment
Share on other sites

@Someone2018 because the REFUSE_wet_mass value is left on the PART at the end, and KSP doesn't know what to do with that when compiling the part.  It's harmless but you could include a separate patch to remove it at the end (it would have to be a separate patch - all values are processed before all nodes so you wouldn't be able to use it in the RESOURCE node otherwise).

Link to comment
Share on other sites

1 hour ago, blowfish said:

@Someone2018 because the REFUSE_wet_mass value is left on the PART at the end, and KSP doesn't know what to do with that when compiling the part.  It's harmless but you could include a separate patch to remove it at the end (it would have to be a separate patch - all values are processed before all nodes so you wouldn't be able to use it in the RESOURCE node otherwise).

Oh, I have that patch, but since I tried with and without (and got the same warning) I removed it from the example.

@PART[*]:HAS[@REFUSE_wet_mass]:FINAL
{
    // cleanup
    -REFUSE_wet_mass = delete
}

Anything wrong with the way I clean up?

Link to comment
Share on other sites

3 minutes ago, Someone2018 said:

Oh, I have that patch, but since I tried with and without (and got the same warning) I removed it from the example.


@PART[*]:HAS[@REFUSE_wet_mass]:FINAL
{
    // cleanup
    -REFUSE_wet_mass = delete
}

Anything wrong with the way I clean up?

That should be :HAS[#REFUSE_wet_mass] since it's a value not a node

Link to comment
Share on other sites

could possibly try:

<br>

<p><p>

- since <color=><color> works

22 minutes ago, Nightside said:

When adding some text to a Part's description, is it possible to have the new text start on a new line?

could possibly try:

<br>

<p><p>

- since <color=><color> works

Link to comment
Share on other sites

Just now, Nightside said:

Interesting,

Unfortunately <br> didn't work in my test.

I had to futz with color to get it to work, had to include a space after the < and before the > or something like that.

I also tried for linebreaks - but got distracted. Somebody has to know. :) Am curious myself.

Link to comment
Share on other sites

9 minutes ago, zer0Kerbal said:

I had to futz with color to get it to work, had to include a space after the < and before the > or something like that.

I also tried for linebreaks - but got distracted. Somebody has to know. :) Am curious myself.

Thanks for the tip, its working! I think had the line break in the wrong place in string.

@PART[*]:FINAL { @description =  #$description$ <br> <color=#7F7F7F> [$name$]</color> }

Credit to @Tonka Crash for the content of this patch, I just wanted a line break too.

Link to comment
Share on other sites

2 minutes ago, Nightside said:

Thanks for the tip, its working! I think had the line break in the wrong place in string.


@PART[*]:FINAL { @description =  #$description$ <br> <color=#7F7F7F> [$name$]</color> }

Credit to @Tonka Crash for the content of this patch, I just wanted a line break too.

Glad to hear. :) You are welcome. Thank you for futzing and putzing so now I don't have to. *chuckle*

Link to comment
Share on other sites

Okay, I have come to realize I've probably been doing something stupid for years. Do I need to keep every different version of MM that comes with individual mods, or do I just need the latest version? I have like five different versions of MM (i.e. MM 3.1.0 - 4.0.2) in my GameData folder and basically I'm wondering if I can delete all of them aside from 4.0.2 and it be fine.

Link to comment
Share on other sites

25 minutes ago, Bioman222 said:

 I have like five different versions of MM (i.e. MM 3.1.0 - 4.0.2) in my GameData folder and basically I'm wondering if I can delete all of them aside from 4.0.2 and it be fine.

yeah.. delete all but latest. Pretty sure having multiples is not a problem, as it self-checks for newest installed version, and uses that one, IIRC...

caveat, tho... I guess *some* mods DO require specific version of MM... tho I dont recall coming across any vOv

Edited by Stone Blue
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...