sarbian

[1.4.0-1.7.x] Module Manager 4.0.3 (August 9th 2019) - Right To Ludicrous Speed

Recommended Posts

@NermNermNerm PlanetaryBaseInc is alphabetically before PlanetarySurfaceStructures

Just to clarify, let's say your mod list is mod1, mod2, mod3.  The order of patches will be:

  • :FIRST
  • legacy (no pass)
  • :BEFORE[mod1]
  • :FOR[mod1]
  • :AFTER[mod1]
  • :BEFORE[mod2]
  • :FOR[mod2]
  • :AFTER[mod2]
  • :BEFORE[mod3]
  • :FOR[mod3]
  • :AFTER[mod3]
  • :FINAL

Share this post


Link to post
Share on other sites
Posted (edited)

@blowfish

Ah, took me a sec to internalize that, but yeah, I get it.

ModuleManager is so awesome.

Edited by NermNermNerm

Share this post


Link to post
Share on other sites

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

Share this post


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

Share this post


Link to post
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 :-)

Share this post


Link to post
Share on other sites

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


KCT_FUEL_RESOURCES:NEEDS[RealFuels]
{
    fuelResource = AK20
    fuelResource = AK27
    fuelResource = Aerozine50
    fuelResource = Aniline
}

 

Share this post


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

Share this post


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

Share this post


Link to post
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 )

Share this post


Link to post
Share on other sites
Posted (edited)

Ok, I know what's happening, and it's definitely  NOT ModuleManager.

(deleted)

Edited by linuxgurugamer

Share this post


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

Share this post


Link to post
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'

 

Share this post


Link to post
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).

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites

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

Share this post


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

Share this post


Link to post
Share on other sites
23 minutes ago, zer0Kerbal said:

could possibly try:

<br>

<p><p>

- since <color=><color> works

could possibly try:

<br>

<p><p>

- since <color=><color> works

Interesting,

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

Share this post


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

Share this post


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

Share this post


Link to post
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*

Share this post


Link to post
Share on other sites

Am I overlooking the obvious? No discussion around MM not being available for 1.7.0 yet. Can't say as I have ever seen a delay in MM being available for a new release.

Share this post


Link to post
Share on other sites

The current version works fine as far as I know. And I am 9600km from my hone for a few more days, so it can wait. 

Share this post


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

Share this post


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