Jump to content

[1.12.x] IndicatorLights Community Extensions v1.6.2: Compatibility patches for IndicatorLights


Snark

Recommended Posts

6 hours ago, DStaal said:

Alt-F11 will reload Module Manager's database.  Possibly paired with an Alt-F12 to reload the main database.

Yeah, Alt+F11 is your friend.  That's generally all I need, don't require anything beyond that.  I've never used the NodeHelper thing, but my own workflow usually looks something like this:

  1. Jiggery-pokery in Blender with imported models to get the approximate position right
  2. Go to the VAB and see what's wrong
  3. Fudge the numbers a bit in the cfg file
  4. Exit VAB
  5. Alt+F11, "quick reload database"
  6. Repeat steps 2-5 until it looks right
  7. Done.
4 hours ago, VoidSquid said:

Tl;dr: anyone up to make that config for the K2-pod, let me know :)

Well, the thing is, it's tedious.  Which means nobody wants to do it, unless they themselves need it for some reason.

So your options are either do it yourself, or wait and hope that there's someone out there who also uses the K-2 pod, and wants indicator lights on it, and is more impatient than you and does it first.

IndicatorLights Community Extensions has been around for a couple of years now, and K-2 is an older mod, and you're the only person who's ever even asked about it.  So my guess is that if you wait for someone else to want it more than you do, you might be waiting a while.  ;)

So it probably comes down to "do you want it badly enough to put in a half-hour to figure it out and make it happen".

Link to comment
Share on other sites

I must be missing something very trivial here, but as soon as I cloned the MK1-2 pod configuration for mentioned K2 pod, only the indicator lights are rendered, the pod becomes invisible. 
Maybe related to the fact that this pod has no light functionality at all?
And what can I do about this issue?
 

Edited by VoidSquid
Link to comment
Share on other sites

@VoidSquid You can post your IL.cfg and the stock K2.cfg (so we don't have to go find it) to see if we see something you missed. The IL setup has a pretty simple, but a couple gotchas.

Does the K2.pod use a "mesh = model" entry or a MODEL module. That's one area where slightly different syntax is needed. If it's mesh = syntax you have to have add a MODEL module in the IL patch to point to the K2 model.

The other is at the end of the file the mk1-2 pod there is a "Tweaks" sectiion that adds an excludedRenderer to ModuleColorChanger. If the K2 pod doesn't have lights it probably doesn't have a ModuleColorChanger module, so you don't need this tweak.

Does the K2 pod have a Crew Report science experiment? No science simplifies the syntax compared to the mk1-2pod.

You can also look in the ModuleManager.ConfigCache to find the K2 pod with all patches applied and see if your patch applied itself like you though it should.

Link to comment
Share on other sites

The K2 pod is maintened by LGG, the Github Repository is here https://github.com/linuxgurugamer/K2_Command_Pod 

The pod cfg: https://github.com/linuxgurugamer/K2_Command_Pod/blob/master/GameData/JFJohnny5/Parts/K2_CommandPod/K2Pod.cfg

The K2Pod.cfg uses this mesh:
mesh = K2Pod.mu

Yes, the pod has the Crew Report experiment, it's like the Mk1 pod, just a different model, 2 Kerbals, and accordingly different values for mass, monoprop, torque, EC, etc.
It doesn't have though any light funcionality.
 

As suggested by Snark, I copied the MK2pod.cfg, renamed it K2-pod.cfg (to avoid having 2 cfg files with the same name), and changed the first line from
@PART[Mk2Pod]:NEEDS[SquadExpansion] {
to 
@PART[K2Pod]:NEEDS[JFJOHNNY5] {

MM log says:
Applying update IndicatorLights/Parts/crewable/K2-pod/@PART[K2Pod]:NEEDS[JFJOHNNY5] to JFJohnny5/Parts/K2_CommandPod/K2Pod.cfg/PART

MM patch log says:
Applying update IndicatorLights/Parts/crewable/K2-pod/@PART[K2Pod]:NEEDS[JFJOHNNY5] to JFJohnny5/Parts/K2_CommandPod/K2Pod.cfg/PART

Edited by VoidSquid
Link to comment
Share on other sites

@VoidSquid From your link, I see the K2.pod uses the old style syntax to specify models mesh = K2Pod.mu and the Mk2Pod from Missing History uses the current syntax, so the IL config needs to account for this difference. 

In your K2-pod.cfg file you need to add :

   MODEL
   {
          model = JFJohnny5/Parts/K2_CommandPod/K2Pod
   }

This is similar to the IL configs for the old stock models like the cupola or hitchhiker. Without this entry KSP sees the MODEL statements the K2Pod patch adds for the indicators and ignores the mesh statement for the base model of the K2Pod and you get an invisible pod. Restating the model like above adds it back in.

Link to comment
Share on other sites

So, after some fiddling around, I think I'm quite happy with the result, here's the config file (K2-Pod.cfg):

Spoiler

// Adds occupancy indicators to the K2 command pod.

@PART[K2Pod]:NEEDS[JFJOHNNY5] {

    MODEL
       {
            model = JFJohnny5/Parts/K2_CommandPod/K2Pod
       }

    //-------------------------------------------------------------------------
    // INDICATOR MESHES
    //-------------------------------------------------------------------------

    MODEL
    {
        model = IndicatorLights/Meshes/squareLamp
        scale = 0.25, 1, 0.5
        position = -0.278, 0.18, -0.488
        rotation = 0, 33, 90
    }

    MODEL
    {
        model = IndicatorLights/Meshes/squareLamp
        scale = 0.25, 1, 0.5
        position = -0.28, 0.09, -0.49
        rotation = 0, 33, 90
    }

    //-------------------------------------------------------------------------
    // CONTROLLABLE EMISSIVES
    //-------------------------------------------------------------------------

    MODULE {
        name = ModuleControllableEmissive
        target = IndicatorLights/Meshes/squareLamp:0
        emissiveName = indicator0
    }

    MODULE {
        name = ModuleControllableEmissive
        target = IndicatorLights/Meshes/squareLamp:1
        emissiveName = indicator1
    }

    //-------------------------------------------------------------------------
    // CONTROLLERS
    //-------------------------------------------------------------------------

    MODULE {
        name = ModuleCrewIndicatorToggle
        toggleName = indicatorToggle
    }
    
    MODULE {
        name = ModuleCrewIndicator
        controllerName = crewController0
        toggleName = indicatorToggle
    }
    
    MODULE {
        name = ModuleCrewIndicator
        controllerName = crewController1
        toggleName = indicatorToggle
    }
    
    MODULE
    {
        name = ModuleScienceAvailabilityIndicator
        controllerName = availability0
        experimentID = crewReport
        lowValueColor = crewController0
        mediumValueColor = highValueColor
        highValueColor = blink(lowValueColor, 200, $Off, 200)
    }

    MODULE
    {
        name = ModuleScienceAvailabilityIndicator
        controllerName = availability1
        experimentID = crewReport
        lowValueColor = crewController1
        mediumValueColor = highValueColor
        highValueColor = blink(lowValueColor, 200, $Off, 200)
    }

    MODULE {
        name = ModuleScienceDataIndicator
        experimentID = crewReport
        emissiveName = indicator0
        dataColor = crewController0
        emptyColor = availability0
    }

    MODULE {
        name = ModuleScienceDataIndicator
        experimentID = crewReport
        emissiveName = indicator1
        dataColor = crewController1
        emptyColor = availability1
    }

    //-------------------------------------------------------------------------
    // TWEAKS
    //-------------------------------------------------------------------------

    // This pod uses a ModuleColorChanger to handle its cabin lights, set up
    // so that by default it takes control of *all* emissives on the part.
    // Need to tell it not to tinker with the meshes that we're adding here;
    // otherwise, the crew indicator will just turn on and off with the cabin
    // lights instead of actually working as a crew indicator.
    @MODULE[ModuleColorChanger] {
        excludedRenderer = IndicatorLights/Meshes/squareLamp(Clone)

        // As long as we're tinkering here anyay... let's fix a 1.2 bug. :-)
        // ModuleColorChanger breaks the thermal overlay for the crewed parts
        // that use it for cabin lights. We can fix this by telling it
        // to ignore various meshes *other* than the window. Can remove this
        // hack once Squad gets around to fixing ModuleColorChanger. In the
        // meantime, this makes it better, and I can enjoy waiting to see whether
        // anyone actually notices!
        excludedRenderer = capsule
        excludedRenderer = hatch
        excludedRenderer = flagTransform
        excludedRenderer = rung
        // ...Can remove the hack once Squad fixes ModuleColorChanger so it doesn't
        // break the thermal overlay.
    }
}

 

Screenshots:

Spoiler

screenshot7-png-Windows-Photo-Viewer-201

 

screenshot2-png-Windows-Photo-Viewer-201

 

Thanks for the help and your patience, guys, much appreciated :)

Edited by VoidSquid
Link to comment
Share on other sites

17 hours ago, Snark said:

Well, the thing is, it's tedious

Yes and no:
I've never done any modeling or modding, this is first time ever. Hence I'm not familiar with the file structure, syntax etc. etc., which as I learned from @Tonka Crash even has changed. This was the real tedious part for me.
The lights positioning itself, well, took about almost an hour, but that's perfectly fine for me, didn't perceive that as tedious.

Link to comment
Share on other sites

33 minutes ago, VoidSquid said:

The lights positioning itself, well, took about almost an hour, but that's perfectly fine for me, didn't perceive that as tedious.

So you've gotten it to work?

If so... mind sharing it here?  I can add it to the pack so that everyone can get the benefit.  :)

Link to comment
Share on other sites

7 minutes ago, VoidSquid said:

I did put the cfg in the post above under "spoilers" :) 

D'oh.  I shouldn't be posting before I've had my morning tea.  :sticktongue:

Thanks!  Just to confirm, the "JFJohnny5" folder you're referring to is coming from this mod here?

Link to comment
Share on other sites

Just now, VoidSquid said:

Yes.

Excellent!  I'll add this in as soon as I can.  Might be a little while since I've got IRL stuff keeping me busy, but thank you for contributing to the community!

Will post here once it's updated.

Link to comment
Share on other sites

Thanks :) 
I guess it's not urgent at all to add this in since I'm probably the only one using that mod, lol. Which is odd imo, why wouldn't people use a 2-Kerbal 1.25m pod? Career, rescue missions, etc. etc., it's so totally useful.
I hope I didn't make any stupid mistakes with that mod, let me know if I did please.

Edited by VoidSquid
Link to comment
Share on other sites

1 hour ago, VoidSquid said:

Thanks :) 
I guess it's not urgent at all to add this in since I'm probably the only one using that mod, lol. Which is odd imo, why wouldn't people use a 2-Kerbal 1.25m pod? Career, rescue missions, etc. etc., it's so totally useful.
I hope I didn't make any stupid mistakes with that mod, let me know if I did please.

For myself: I've found I like the looks and operations of the Brumby from MOLE better.  ;)  It's 1.875, but it's got a good RCS, docking, and parachute system as well, and you get the whole MOLE labs setup, allowing for some early space stations.  I also like the art a bit better, and I find it flys better during re-entry.  Later game I have a couple of Near Future pods in the 1.25m size - and of course there's an early Soyuz-inspired 2-person pod in Making History.  (Which has a 1.25m attachment point, but is really more 1.875 in size.)

So: There are other good choices that have come out, so the K-2 just isn't as unique or needed for it's niche compared to other options.

Link to comment
Share on other sites

I started with KSP 1.3.1., way back before we had MH and any oficial 1.875m parts (if I'm not mistaken). I like KISS - keep it simple and stupid, hence I went for this K2 pod (I'm aware of that Corvin pod, but are there others?).
That MOLE/Brumby you mentioned - I've never heard about before... :o 
It looks very nice, no doubt about, but for me, too much "integrated", too much stuff comes with it, so even if I had known it, I'd still go for K2 pod, clean 1.25m, just the essentials.

In the end, I love it that everyone of us has so many choices, can customize the game to the personal preferences :)

P.S.: not being a total rookie anymore, I'll check that MOLE thingy out, thanks for the tip!

Link to comment
Share on other sites

2 hours ago, VoidSquid said:

Which is odd imo, why wouldn't people use a 2-Kerbal 1.25m pod? Career, rescue missions, etc. etc., it's so totally useful.

I started playing soon after Making History came out, so the MH Mk2 Pod has always been the standard 2 man pod to me, but lately I've been using the Palici pod from Missing History more since it can take a standard Clamp-O-Tron. 2 Kerbals in a smaller capsule didn't make much sense to me.

Link to comment
Share on other sites

Kinda off topic: just avoided another mishap like this
 

On 5/27/2019 at 11:45 AM, VoidSquid said:

Tourist contract for a Minmus landing, everything as usual, like the umpteen times before. After landing back at Kerbin, I'm wondering, why hasn't the contract completed?

Forgot to load the tourists...

thanks to IL :)

Two questions:
@Tonka Crash: where can I find info about the mentioned old and new syntax you mentioned? I found this https://wiki.kerbalspaceprogram.com/wiki/CFG_File_Documentation#PARTS_Configuration_Files but I still don't fully understand the thing about about old and new syntax.
@Snark: Tonka Crash and you helped me a lot with my silly K2 pod issue, so I'd like to give a bit back: is there some other part that needs IL config and nobody was willing to do the work? I might find some time... :) 

Link to comment
Share on other sites

@VoidSquid There are two ways to specify the model, they are discussed on that wiki page in the Model Parameters section

  1. mesh = modelname  - This is a single line entry that's deprecated, so it's only found on older parts.
  2. MODEL node - This is allows more flexibility than the mesh syntax like being able to rescaling or rotating the model. Multiple MODEL nodes can exist for a part. If one is found it overrides any mesh statements.

As far as adding lights to other parts, do you have any other mods you use that are missing lights? Those are where I started. For your K2 light, if you send it to LinuxGuruGamer he's usually is pretty good about updating mods. I did a set for Taurus HCV that's now included with that mod.

Link to comment
Share on other sites

13 minutes ago, Tonka Crash said:

they are discussed on that wiki page in the Model Parameters section 

I'll check that, thanks :) 

14 minutes ago, Tonka Crash said:

do you have any other mods you use that are missing lights

Nope. But maybe others have?

Link to comment
Share on other sites

On 6/3/2019 at 8:46 AM, VoidSquid said:

@Snark: Tonka Crash and you helped me a lot with my silly K2 pod issue, so I'd like to give a bit back: is there some other part that needs IL config and nobody was willing to do the work? I might find some time... :) 

Well, I'll tell ya, there's one thing that I know would be in high demand.  Be warned that it would be a huge job, but by the same token, would be an extremely valuable service to the community and I expect hundreds, if not thousands, of users might benefit (dunno the numbers):  ReStock.

ReStock re-does all the models for all of the stock parts.  Which is great, and gorgeous... but alas, it unavoidably breaks all the IndicatorLights meshes that I've painstakingly added to the stock parts.  ReStock is hugely popular, and IndicatorLights is also pretty popular, so there's a sizable community of folks in the overlap between the two, who would like to be able to use both.  But they can't, because right now the mods are completely incompatible.

Making them compatible would require a big investment of effort.  If you'd like to get a feel for the size of the effort, take a look at the patch (here, in this mod) for Ven's Stock Revamp-- whoever takes on ReStock would be solving essentially the exact same problem.  The Ven's patch gives a blueprint for what the config would look like, but what's needed would be to supply new numbers (position, rotation, perhaps scale) for all the various indicator meshes.

I'm not asking you to do it, because I wouldn't wish that particular task on anyone, since I'm not willing to take it on myself.  So I absolutely wouldn't blame you (or anyone) for being a bit leery.  ;)

But if someone wanted to take one for the team and go down in legend and song for making these two mods play nice together, that's the one big "compatibility hole" that I'm currently aware of.  Just sayin', is all.

Link to comment
Share on other sites

Hey Snark, issue here, as you said, it's not one but many and many moar parts... and it makes no sense to do just one or two, it's either none or all. A bit too much for my taste, hope you don't mind.
I'd like to do one or the part, but not such a whole huge package.
 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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