Snark

[1.10] MissingHistory v1.8.1: Handy parts to complement Making History.

Recommended Posts

Posted (edited)

Redid the patches by UnanimousCoward for the most recent version of ReStock and ReStock plus. Also included a depreciated part remover, for those who don't want them in their advanced part filters (This will break crafts containing old parts).

ReStock Patch

Spoiler

//Patch for ReStock Texutures and Models by Noob. Written from the patch by UnanimousCoward

@PART[pointyNoseConeA_1p5]:AFTER[MissingHistory]:NEEDS[ReStock]{//depreciated part
    @MODEL {
        @model = ReStock/Assets/Structural/restock-nosecone-125-2
    }
}

@PART[pointyNoseConeB_1p5]:AFTER[MissingHistory]:NEEDS[ReStock]{//depreciated part
    @MODEL {
        @model = ReStock/Assets/Structural/restock-nosecone-125-2
    }
}

@PART[ServiceBay_187,ServiceBay_187_v2]:AFTER[ReStock]:NEEDS[MissingHistory]{//old version is depreciated
    @MODEL {
        @model = ReStock/Assets/Payload/restock-service-bay-125-1
    }

    //copied directly from restock-service-bays.cfg
    
    @MODULE[ModuleAnimateGeneric]
    {
        @animationName = DoorsOpen
    }
    @MODULE[ModuleSeeThroughObject]
    {
        @transformName = NewBay125
    }
    MODULE
    {
        name = ModulePartVariants
        useMultipleDragCubes = false
        baseVariant = Opaque
        VARIANT
        {
            name = Opaque
            displayName = #LOC_Restock_variant-service-bay-opaque
            primaryColor = #ffffff
            secondaryColor = #ffffff
            GAMEOBJECTS
            {
                ServiceBay125_Opaque = true
                ServiceBay125 = false
                ServiceBay125_Transparent = false
                FloorColliders = true
            }
        }
        VARIANT
        {
            name = Transparent
            displayName = #LOC_Restock_variant-service-bay-transparent
            primaryColor = #ffffff
            secondaryColor = #999999
            GAMEOBJECTS
            {
                ServiceBay125_Opaque = false
                ServiceBay125 = false
                ServiceBay125_Transparent = true
                FloorColliders = true
            }
        }
        VARIANT
        {
            name = Hollow
            displayName = #LOC_Restock_variant-service-bay-hollow
            primaryColor = #ffffff
            secondaryColor = #000000
            GAMEOBJECTS
            {
                ServiceBay125_Opaque = false
                ServiceBay125 = true
                ServiceBay125_Transparent = false
                FloorColliders = false
            }
        }
    }
    //end copied material
}

@PART[probeStack_1p5]:AFTER[MissingHistory]:NEEDS[ReStock]{
    @MODEL {
        @model = ReStock/Assets/Command/restock-drone-core-125-1
    }
}

@PART[reactionWheel_1p5]:AFTER[MissingHistory]:NEEDS[ReStock&!IndicatorLights]{
    @MODEL {
        @model = ReStock/Assets/Control/restock-reactionwheel-125-1
    }
}


@PART[solidBooster_1p5]:AFTER[MissingHistory]:NEEDS[ReStock]{
    @MODEL {
        @model = ReStock/Assets/Engine/restock-engine-srb-thumper-1
    }
}

@PART[xenonTank_1p5]:AFTER[MissingHistory]:NEEDS[ReStock]{
    @MODEL {
        @model = ReStock/Assets/FuelTank/restock-fueltank-xenon-125-1
    }
}

@PART[battery_1p5]:AFTER[MissingHistory]:NEEDS[ReStock&!IndicatorLights]{
    @MODEL {
        @model = ReStock/Assets/Electrical/restock-battery-125-1
    }
}

@PART[MediumOreTank]:AFTER[MissingHistory]:Needs[ReStock]{
    @MODEL {
        @model = ReStock/Assets/Resource/restock-oretank-125-1
    }
}

 

ReStock Plus Patch

Spoiler

//Patch for MissingHistory and ReStock by Noob. Written from the patch by UnanimousCoward
//just hides the MissingHistory Parts
@PART[liquidEngine303]:NEEDS[ReStockPlus]:AFTER[MissingHistory]{
  %TechHidden = True
  @category = none
  @subcategory = 0
}
@PART[liquidEngineT15]:NEEDS[ReStockPlus]:AFTER[MissingHistory]{
  %TechHidden = True
  @category = none
  @subcategory = 0
}
@PART[ServiceBay_187_v2]:NEEDS[ReStockPlus]:AFTER[MissingHistory]{
  %TechHidden = True
  @category = none 
  @subcategory = 0
}
@PART[MediumOreTank]:NEEDS[ReStockPlus]:AFTER[MissingHistory]{
  %TechHidden = True
  @category = none
  @subcategory = 0
}

 

Depreciated Part Remover (This will break crafts with old parts!)

Spoiler

//Missing History Obsolete Part Remover
//removes the hidden parts from missing history
!PART[pointyNoseConeA_1p5,pointyNoseConeB_1p5,Size3_Size2_Tank,nuclearEngineKANDL,ServiceBay_187]:NEEDS[MissingHistory]:AFTER[MissingHistory]{}

 

Just getting into module manager patching, if y'all notice anything i can improve/missed, let me know.

Edited by A lazy noob
Forgot the old service bay_187 in the depreciated part remover

Share this post


Link to post
Share on other sites

@Snark I tested my career save in 1.10 this morning and found this. The 1.875m reaction wheel added by this mod appears to have broken - the model has reverted to 1.25m size (as you can see from the image comparing it with a 1.875m tank). As far as I can see all of its stats are the same.

O7DLLV3.png

It also has no reaction wheel status lights, but I'm inclined to think this isn't a fault of Indicator Lights as that mod was recently updated and every other part has its lights working fine. When I have time tomorrow I'll have to load up an install with only this mod and check whether this is a mod conflict or just 1.10 breaking Missing History - I didn't remember to do that today.

Edited by RealKerbal3x

Share this post


Link to post
Share on other sites
On 7/2/2020 at 10:10 AM, RealKerbal3x said:

I tested my career save in 1.10 this morning and found this. The 1.875m reaction wheel added by this mod appears to have broken - the model has reverted to 1.25m size (as you can see from the image comparing it with a 1.875m tank).

Argh.  Yep, I've observed the same thing myself, now.

Sigh... one more thing to track down.  I suspect it has something to do with the relative order of patches between this mod and IndicatorLights.

Technobabble about what I suspect is causing this, in spoiler.

Spoiler

The latest version of IndicatorLights that I just released, 1.7 (for KSP 1.10 compatibility) adds :FOR directives to all its patches, in order to be more "virtuous" about following ModuleManager best practices.

However, in time-honored tradition, I'm guessing that this somehow causes the reaction wheel config to trip up, likely something about the relative order of patches being applied.  :(

  I just now spent a few minutes futzing around trying to figure out how to cajole it back into working again, but no dice so far.  I expect the answer will be some combination of ModuleManager flags, but haven't yet hit on the magic combo.

Unless some kind soul out there can figure it out for me, solving this will have to wait at least a few days until I have more time to put into it.  Sorry for the inconvenience.  :(

Share this post


Link to post
Share on other sites

@RealKerbal3x @Snark Okay, It's looking like a mod interaction with something. Someone with the problem, please post a log and your MM.ConfigCache. 

I don't see a problem in my test environment which is a minimal setup. I even wiped and reinstalled the mods off CKAN after I did not see a problem.

Spoiler

000_ClickThroughBlocker
000_Toolbar
001_ToolbarControl
IndicatorLights
IndicatorLightsCommunityExtensions
KerbalChangeLog
MissingHistory
NodeHelper
Squad
SquadExpansion
VABReorienter
ZeroMiniAVC
ModuleManager.4.1.3.dll

 

cjXJEZi.jpg

Edited by Tonka Crash

Share this post


Link to post
Share on other sites
3 minutes ago, Tonka Crash said:

@RealKerbal3x @Snark Okay, It's looking like a mod interaction with something. Someone with the problem, please post a log and your MM.ConfigCache. 

I don't see a problem in my test environment which is a minimal setup. I even wiped and reinstalled the mods off CKAN after I did not see a problem.

  Reveal hidden contents


000_ClickThroughBlocker
000_Toolbar
001_ToolbarControl
IndicatorLights
IndicatorLightsCommunityExtensions
KerbalChangeLog
MissingHistory
NodeHelper
Squad
SquadExpansion
VABReorienter
ZeroMiniAVC
ModuleManager.4.1.3.dll

 

cjXJEZi.jpg

Will do. Do you want me to post my mod list too?

Share this post


Link to post
Share on other sites
Just now, RealKerbal3x said:

Will do. Do you want me to post my mod list too?

I can get that out of the log.  I prefer the KSP.log

Share this post


Link to post
Share on other sites
1 minute ago, Tonka Crash said:

I can get that out of the log.  I prefer the KSP.log

OK. I don't have time today, but I'll get round to it tomorrow :wink:

Share this post


Link to post
Share on other sites

@Snark @RealKerbal3x I was premature, CKAN for my machine finally showed a new version of IL and I'm now seeing the problem.

The fix is relatively simple, rewrite the entire IL half of the config and add a complete IL definition instead of assuming IL exists in the source part. 

The source part uses a mesh, so IL would add a model node and the full IL definition.  In the old version this happened before MH but once IL added :FOR directives this all moved.  The MH patch would try to apply scaling changes to the model node and light positions, but none of these nodes exist yet so these fail. The fix is to just add this info to the MH part definition. 

I create a PR for the fixed part

From the MM wiki:

  1. Nodes with no operator ('insert') are loaded by the KSP GameDatabase first.
  2. Patches for modname values in NEEDS, BEFORE, AFTER, LAST that don't exist are removed.
  3. All patches with :FIRST are applied.
  4. All patches without an ordering directive (:FIRST, :BEFORE, :FOR, :AFTER, :LAST, :FINAL) are applied. (This is where this reaction wheel is created)
  5. For each item in the Unicode-sorted list of modname values:
    • All patches with :BEFORE are applied
    • All patches with :FOR are applied (This is where IL is patching the source part)
    • All patches with :AFTER are applied
  6. All patches with :LAST are applied
  7. All patches with :FINAL are applied
Edited by Tonka Crash

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.