Jump to content

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


Snark

Recommended Posts

What it does

Updates IndicatorLights for compatibility with third-party mods that either add new parts or modify existing stock ones.

Note: These are community-supplied patches. In most cases, the IndicatorLights author (Snark) hasn't personally verified that they work. Each patch includes a comment giving credit to the original author.

Don't see the mod you want? Contributions (e.g. via pull request on github) are welcome!

Download from SpaceDock
License:  MIT
Source code

 

How to install

Unzip the contents of "GameData" to your GameData folder, same as with most mods.

Note, requires that IndicatorLights also be installed in order to work:

Supported mods

Thank you to the community members who have contributed the following compatibility patches:

Miscellaneous enhancements:

  • Docking port direction indicators-- which way is up?  (Contributor: @Tonka Crash)

FAQ

  • Q: Can you add support for {my favorite mod} included?
  • A: Nope! Don't have the time. But if you want to write a patch for it, send it to me and I'll happily include it! :-)
  • Q: Hey, the patch for {one of the supported mods} has a bug in it! Will you fix it?
  • A: Probably not, unless it's trivially quick and easy to do. I (Snark) didn't write these patches, and in most cases haven't even tested them myself. I'm basically just a curator. Suggestion: Bring it up here in this thread, and ping the contributor of the patch that's giving you problems (they're listed above)-- maybe they'll have a solution.
  • Q: Why is this a separate mod, instead of just including it as part of IndicatorLights itself?
  • A: Easier for me to maintain, this way. Clear separation between "stuff I wrote" and "stuff other people wrote". Can have a separate (very permissive) license for this extensions mod, regardless of how IndicatorLights itself is licensed.
  • Q:  Okay, I'm convinced!  I want to help.  How can I add support for {my favorite mod} myself?
  • A:  Thank you, you're a pillar of the community!  :D  I've tried to make it as easy as possible for you, by documenting all the config in the modder's guide wiki for IndicatorLights, including a handy controller reference.  Also you can look at the existing config within IndicatorLights; it's liberally supplied with comments.  When you get something that works, just PM me and I'll work to get it added to the mod.  Thank you for your service!
  • Q:  Hmmm... figuring out how to place the indicator is hard.  Do I have to use special modeling tools or something?
  • A:  Not necessarily-- you can do it with just a text editor.  However, I've found that some judicious use of Blender at the outset can save a lot of trial and error.  See below for a description of what the process looks like.

 

How to add indicators to a part

  Reveal hidden contents

 

Gallery

Ven Stock Revamp

Ven Stock Revamp

 

Impossible Innovations

Impossible Innovations

 

MK1CabinHatch

MK1CabinHatch.png

 

MKS
MKSConstructionPorts.png

 

MSP-3000 Material Science Pod
MSP-3000.png

 

K2 Command Pod
K2Pod.png

Link to comment
Share on other sites

  On 10/10/2016 at 4:46 PM, Jiraiyah said:

Thanks for crediting me sir, I appreciate it, but honestly, I will go for more and more mods when I get time to do it and specially if I can find an easier way other than tweak/test/tweak :wink:

Expand  

Great, keep 'em coming!  :)

Yah, the tweak/test/tweak process of getting the indicators placed just so on the models is tedious.  When I'm doing it myself, I've found I can take some of the guesswork out of the process by using Blender, namely:

  1. import the part model into Blender
  2. delete out all the bits I don't want (mainly colliders)
  3. import the IndicatorLights mesh I plan on using (e.g. nubbinLamp or squareLamp or whatever)
  4. Use the Blender tools (mouse moves, and/or typing into the rotate/translate transform boxes) to place the mesh where I think it looks good
  5. Write down the numbers from the XYZ transform
  6. Go into the KSP config where I'm adding the meshes
  7. Put those numbers in

That gives me a bit of a "head start" on the tweaking process, but it's still far from perfect-- I usually end up needing to fine-tune the position anyway, and/or various complications can cause me to screw up (e.g. I drop a ball when juggling the difference of XYZ conventions between KSP and Blender, or the part uses a mesh scale in its config, or something).

So I almost always end up needing to do a few cycles of tweak/test/tweak for each part anyway... but using Blender up front at least helps me to reduce the number of cycles needed.  :wink:

Link to comment
Share on other sites

you know what would be nice? a way to tweak the config while ksp is running, and inside ksp somehow reloading that config to see the result :(

I know this is possible for the part config itself, but now that we are using module manager, well, that is out of the window, i wish module manager had a reload or something like that inside ksp

Edited by Jiraiyah
Link to comment
Share on other sites

  On 10/10/2016 at 5:11 PM, Jiraiyah said:

you know what would be nice? a way to tweak the config while ksp is running, and inside ksp somehow reloading that config to see the result :(

I know this is possible for the part config itself, but now that we are using module manager, well, that is out of the window, i wish module manager had a reload or something like that inside ksp

Expand  

Yes, I've often wished the same thing myself.

FWIW, among the features I'm adding in the imminent next release of IndicatorLights is a new debug console command, /il, which should take some of the sting out of debugging IndicatorLights config (e.g. "why doesn't this work").  It's not comprehensive yet, but it already has enough stuff in it to be useful, and I'll be adding additional functionality to it as I go along.  (My algorithm thus far has been: whenever I stub my toe on something I need to diagnose, and /il doesn't have enough info in it, add stuff to /il until it is informative enough to diagnose the current problem.  Repeat as needed.  Once I've released it, then I can continue to do the same with problems that other folks run into.)

Alas, one thing that I'd really like to be able to do, that I haven't been able to find any way of doing, is to allow the command to adjust the positions of meshes on the part.  i.e. allow the command to do something like /il part 3 mesh squareLamp:0 x+0.01.  Not sure if it's actually impossible, or if it's simply the case that I haven't been able to discover the necessary secret incantations yet.

Link to comment
Share on other sites

hmm something just popped up in my brain, how about this, a separate mod with two place holder models, a window that does something like what ksp gave us (move/rotate/scale) then a button to calculate those params related to parent? that should give us a good head start to tweak numbers for original patches and the players won't need to install this mod at all !!

Link to comment
Share on other sites

  • 2 weeks later...
  On 10/10/2016 at 5:11 PM, Jiraiyah said:

you know what would be nice? a way to tweak the config while ksp is running, and inside ksp somehow reloading that config to see the result :(

Expand  

Hi Jiraiyah,

Just wanted to point out that I've just added this feature to IndicatorLights in v1.2.2, which I just posted several hours ago.  It's now possible to use the IndicatorLights debug console UI to manually edit the color-source syntax of a light, "live", either in the vehicle editor or in flight, and instantly see the result on the ship.  Some caveats:

  • I haven't written the wiki docs for it yet, so thank you for your patience.  But it tries to be somewhat self-documenting, so if you just type /il help in the debug console and follow the prompts from there, it's reasonably straightforward.  I'll explain it better in the docs when I write them, but the process looks something like this:  (yeah, I know, not gonna win any awards for elegance, but it gets the job done)
    1. /il parts to list the IndicatorLights-enabled parts on the current ship, with a number next to each one
    2. choose the part you're interested in and note its number
    3. /il part <number> to show info for that part
    4. /il part <number> controllers to show a numbered list of all the IndicatorLights controllers on that part
    5. choose the controller you're interested in and note its number
    6. /il part <number> controller <number> to show info about that controller, including a list of all its IndicatorLights syntax fields
    7. /il part <number> controller <number> set <field_name> <color_source_syntax> to specify new syntax for that field
  • It's only a temporary override and will not persist with the ship or get saved to any .cfg files.  Any changes you make will get blown away the next time the ship is loaded.  So it's only a tool for experimenting with the syntax-- once you find a formula that you like, you'll need to copy it so you can then paste into whatever .cfg files are appropriate.
  On 10/10/2016 at 5:11 PM, Jiraiyah said:

i wish module manager had a reload or something like that inside ksp

Expand  

Turns out that it does!  :D Just recently found out about this:  you can press Alt+F11 when in the space center view.  It pops up a little debug UI dialog with a button on it that tells ModuleManager to re-load all the .cfg files.  It's not instant-- takes a while to load everything.  But it's still way faster than restarting KSP.

Link to comment
Share on other sites

  On 11/1/2016 at 2:50 PM, Snark said:

Hi Jiraiyah,

Just wanted to point out that I've just added this feature to IndicatorLights in v1.2.2, which I just posted several hours ago.  It's now possible to use the IndicatorLights debug console UI to manually edit the color-source syntax of a light, "live", either in the vehicle editor or in flight, and instantly see the result on the ship.  Some caveats:

  • I haven't written the wiki docs for it yet, so thank you for your patience.  But it tries to be somewhat self-documenting, so if you just type /il help in the debug console and follow the prompts from there, it's reasonably straightforward.  I'll explain it better in the docs when I write them, but the process looks something like this:  (yeah, I know, not gonna win any awards for elegance, but it gets the job done)
    1. /il parts to list the IndicatorLights-enabled parts on the current ship, with a number next to each one
    2. choose the part you're interested in and note its number
    3. /il part <number> to show info for that part
    4. /il part <number> controllers to show a numbered list of all the IndicatorLights controllers on that part
    5. choose the controller you're interested in and note its number
    6. /il part <number> controller <number> to show info about that controller, including a list of all its IndicatorLights syntax fields
    7. /il part <number> controller <number> set <field_name> <color_source_syntax> to specify new syntax for that field
  • It's only a temporary override and will not persist with the ship or get saved to any .cfg files.  Any changes you make will get blown away the next time the ship is loaded.  So it's only a tool for experimenting with the syntax-- once you find a formula that you like, you'll need to copy it so you can then paste into whatever .cfg files are appropriate.

Turns out that it does!  :D Just recently found out about this:  you can press Alt+F11 when in the space center view.  It pops up a little debug UI dialog with a button on it that tells ModuleManager to re-load all the .cfg files.  It's not instant-- takes a while to load everything.  But it's still way faster than restarting KSP.

Expand  

You know sir, i still am behind my words, putting a little time for in editor window to tweak stuff and then push the final numbers into memory or what ever can be more fruitful in long run, trust me, then you would see people start giving patches for your mod one after another

Link to comment
Share on other sites

  On 11/2/2016 at 9:06 AM, Jiraiyah said:

You know sir, i still am behind my words, putting a little time for in editor window to tweak stuff

Expand  

I'm sure that having a tool would indeed be useful... but it would be putting a lot of time in, not "a little", at least for me.  If someone else were to produce such a tool, I'm sure it would be handy, but there's no way that I'll ever be doing it myself.  I simply don't have the time or the inclination to go there.

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...
  • 2 months later...

Hey guys I've been putting in some work for this mod over the past few days. I use hundreds (literally) of mods and practically never use stock pods, but I love the crew indicators so I figured I might as well put 'em on what I use most and go from there. Snark's quick tutorial above regarding importing into blender and writing down the translation numbers was very helpful, but I feel like I've learned a few things to improve ont that method even further. Like I said, I use hundreds of mods, so the "tweak, reload, tweak, reload" process takes so long it is just unacceptable for more than once or twice, especially considering I plan to put these LEDs on just about every crewable part I touch. So here is the full, streamlined process including a few extra tips I've learned from trial and error, to help expedite the process and make it way more precise the first time you set the coordinates for the light meshes:

  Reveal hidden contents

R4mxYsl.jpg

^ Salamander Command Pod from @RoverDude's Modular Kolonization Systems mod.

Edited by smokytehbear
Link to comment
Share on other sites

Alright I made some major adjustments to the post above after discovering several of my points were less efficient than possible, or just plain incorrect. Hopefully I have not led anyone astray with the errors.

For progress on this actual mod:

Finishing up integration of lights for OPT's crewable parts. The few reaction wheels and SAS in that mod likely to be configured soon.

MKS Crew classes now identifiable thanks to Snark's infrastructure update with the main mod, will be given default colors (nearly) matching the color scheme used by DMagic's portrait stats mod so that they are identifiable by Crew LEDs. Specific colors to be tweaked on this part.

Barring any serious bugs, should see these soon available. Planned next step is to incorporate custom-colorable LEDs into the EVA handrails mod so Kerbonauts can find their grip and footing in the dark.

Link to comment
Share on other sites

  • 2 months later...

Continued from the main IndicatorLights thread:

  On 5/29/2017 at 5:52 PM, DStaal said:

Quick question: I was thinking about making indicator light configs for USI's 'construction ports' and wanted to know where you wanted them.  The parts themselves are a retexture of the stock docking ports, so the configs should be just 'copy the docking ports config and change the part name'. :wink:   (Which could obviously be done by adding it to the stock ports configs as well...)

Expand  

Well, I've never used the "construction ports" you mention, so I don't know what they do or how they work or what they look like.  So, "use your best judgment" is about all I can say.  You use the mod and I don't, so you'd have a better idea about what looks best, anyway.  :wink:

Out of curiosity, what functionality would the lights have?  Is this something that's already covered by one of the emissive-controller modules already implemented in IL?

Link to comment
Share on other sites

The parts are literally a retexture - same models as the stock docking ports, slightly desaturated texture so that they're visually distinguishable.  Why I think it'd be easy to do them.  :wink:

As for functionality - same as other docking ports: Some orientation indication, and docking state.  I may play around and see if I can cue a boolean indicator off of whether it's in angle-snap mode or not.  (They can be set to angle-snap into any angle, if desired.  It would be nice to know the state, as both docking ports must be in the same state to dock.)

Their main unique function - the ability to be 'compressed' out of existence, permanently joining the two vessels - isn't really something an indicator light would touch.

Link to comment
Share on other sites

  On 5/30/2017 at 12:22 PM, DStaal said:

The parts are literally a retexture - same models as the stock docking ports, slightly desaturated texture so that they're visually distinguishable.  Why I think it'd be easy to do them.  :wink:

As for functionality - same as other docking ports: Some orientation indication, and docking state.  I may play around and see if I can cue a boolean indicator off of whether it's in angle-snap mode or not.  (They can be set to angle-snap into any angle, if desired.  It would be nice to know the state, as both docking ports must be in the same state to dock.)

Expand  

Ah, okay.  So they actually do function as docking ports, using the same functionality as the stock docking ports?  e.g. they either use the stock PartModule for docking ports, or some custom module derived therefrom?

In that case, my suggestion would be to copy the indicators from the stock docking ports, as I added them.  Not only will that save you some work, it'll also give a consistent visual experience (e.g. if a player is used to the indicators on the stock docking ports, they won't have a visual "learning curve" to deal with these ones).

Perhaps you'll have some slightly changed "wiring" for the actual indicator behavior, but the physical placement seems like it might as well be the same.

Sounds like the "extra" thing that they add (other than the compress-out-of-existence thing) is that they have some sort of "angle-snap" mode.  Could you elaborate on that?  What does it do, exactly?  Got a link to the source code for whatever part module implements this?

Link to comment
Share on other sites

  On 5/30/2017 at 7:19 PM, Snark said:

Ah, okay.  So they actually do function as docking ports, using the same functionality as the stock docking ports?  e.g. they either use the stock PartModule for docking ports, or some custom module derived therefrom?

In that case, my suggestion would be to copy the indicators from the stock docking ports, as I added them.  Not only will that save you some work, it'll also give a consistent visual experience (e.g. if a player is used to the indicators on the stock docking ports, they won't have a visual "learning curve" to deal with these ones).

Perhaps you'll have some slightly changed "wiring" for the actual indicator behavior, but the physical placement seems like it might as well be the same.

Sounds like the "extra" thing that they add (other than the compress-out-of-existence thing) is that they have some sort of "angle-snap" mode.  Could you elaborate on that?  What does it do, exactly?  Got a link to the source code for whatever part module implements this?

Expand  

A quick test says that copying over the stock docking ports works - I had to change the line for the model replacement as well, but other than that no problem.  And yeah, what I wanted was a consistent visual experience - why I noticed it in the first place.  :wink:

The angle-snap is fairly straightforward - they offer a slider in the right-click menu that allows you to choose an angle for angle-snap docking (where they can only dock if at specific angles to each other) and a button to turn angle-snap docking on or off.  The slider is irrelevant as far as Indicator Lights go (well, if someone wanted a *really* complex implementation which lit up which angles are allowed, that might be fun - but that's more work than I think necessary), the only thing really relevant is the button to turn it on/off:  If it's off on both ports, they can dock at any angle to each other.  If it's on on both ports, they can dock at the specific angles selected.  If it's on on one, and off on the other, then they can't dock.

The part module is here: https://github.com/BobPalmer/Konstruction/blob/master/Source/Konstruction/Konstruction/ModuleWeldablePort.cs  - I'm assuming it's all in lines 82+83.

Link to comment
Share on other sites

  On 5/30/2017 at 7:39 PM, DStaal said:

The part module is here

Expand  

Hm.  Alas, he's not inheriting from ModuleDockingNode; he's just implementing his own, completely unrelated PartModule that just happens to own a DockingNode.

That means that none of the IndicatorLights PartModules for working with docking ports are going to be functional with this.

Not sure how you're going to get it to show any meaningful state, really.  :(

Link to comment
Share on other sites

  On 6/2/2017 at 7:36 PM, Snark said:

Hm.  Alas, he's not inheriting from ModuleDockingNode; he's just implementing his own, completely unrelated PartModule that just happens to own a DockingNode.

That means that none of the IndicatorLights PartModules for working with docking ports are going to be functional with this.

Not sure how you're going to get it to show any meaningful state, really.  :(

Expand  

The parts' configs do also have a ModuleDockingNode.  I'll have to try them out to see if my patch actually indicates state.

(I haven't been trying much at the moment - I still don't have access to 1.3, so I haven't wanted to be playing around with known-outdated stuff.)

Link to comment
Share on other sites

  On 6/2/2017 at 7:49 PM, DStaal said:

The parts' configs do also have a ModuleDockingNode.

Expand  

...Ah, okay.  Now I see what he's doing.

So, yes, this should work just fine.  You should be able to copy across the stock ports' config and they should work just fine as-is.

I don't see any way for you to interop with the angle snap status, though, since that's a custom attribute on the Konstruction module, which IndicatorLights doesn't know anything about.

Link to comment
Share on other sites

  On 6/2/2017 at 8:23 PM, Snark said:

I don't see any way for you to interop with the angle snap status, though, since that's a custom attribute on the Konstruction module, which IndicatorLights doesn't know anything about.

Expand  

Most of the UI parameters in Konstruction's ModuleWeldablePort manipulate existing parameters on stock ModuleDockingNode. In the case of the angle snap on/off button it's the ModuleDockingNode.snapRotation field, so if IndicatorLights was aware of this value (which is also used by other modded docking ports that force alignment) then it would work with Konstruction's ports too.

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