Jump to content

[1.12.x] IndicatorLights v1.8.3: Small, convenient, informative.


Snark

Recommended Posts

12 hours ago, putnamto said:

im playing on 1.5.1, will this work or do i somehow have to get an older version of the mod?

Edit, nvm got it from ckan

Glad you got it sorted out!

FWIW, I believe that the current version of IndicatorLights should work fine for KSP 1.5.1; I haven't changed any of the source code recently, so the mod's unchanged since before KSP 1.5.  All I've done in the last couple versions is to add support to some parts (or new/revamped versions of parts) that didn't have it before.  So I'm guessing you ought to be good to go.  ;)

Incidentally, just for future reference:  for any mod that's hosted on SpaceDock (as this one is), you can always get any previous version any time you like.  Just go to the mod's page on SpaceDock and click the "Changelog" tab.  All the old versions will be listed there (along with what KSP version they're for), with download link.

Link to comment
Share on other sites

3 hours ago, Snark said:

Glad you got it sorted out!

FWIW, I believe that the current version of IndicatorLights should work fine for KSP 1.5.1; I haven't changed any of the source code recently, so the mod's unchanged since before KSP 1.5.  All I've done in the last couple versions is to add support to some parts (or new/revamped versions of parts) that didn't have it before.  So I'm guessing you ought to be good to go.  ;)

Incidentally, just for future reference:  for any mod that's hosted on SpaceDock (as this one is), you can always get any previous version any time you like.  Just go to the mod's page on SpaceDock and click the "Changelog" tab.  All the old versions will be listed there (along with what KSP version they're for), with download link.

thanks!

Link to comment
Share on other sites

  • 3 weeks later...
4 hours ago, Tonka Crash said:

@Snark The Agent definition in IndicatorLights\Agencies\Agents.cfg needs title = Blinkenlights LLC added to clear an error message in the Logs.

Thanks for the heads up!

It's a small enough issue that I don't think it's worth spamming the IndicatorLights version history just to release a fix for that one thing.  But I'll roll it into the next release of the mod.

Link to comment
Share on other sites

@Snark Have you ever looked into @DMagic's Orbital Science mod?  I thought I might add science indicators to those, but the  ModuleScienceAvailabilityIndicator controller doesn't flash to indicate science is available. I think the problem is that DMagic experiments use a custom module DMModuleScienceAnimate instead of the stock ModuleScienceExperiment that the ModuleScienceAvailabilityIndicator uses.

The indicator will go on solid once science is collected and waiting for transmission like it should. I started by copying the configuration of the stock PresMat Barometer, which worked for another mod that used the stock ModuleScienceExperiment.

Link to comment
Share on other sites

1 hour ago, Tonka Crash said:

@Snark Have you ever looked into @DMagic's Orbital Science mod?

Nope.  I'm aware of its existence and I hear that it's awesome, but I've never actually used it myself.

1 hour ago, Tonka Crash said:

the  ModuleScienceAvailabilityIndicator controller doesn't flash to indicate science is available. I think the problem is that DMagic experiments use a custom module DMModuleScienceAnimate instead of the stock ModuleScienceExperiment that the ModuleScienceAvailabilityIndicator uses.

Yes, that would indeed be a total showstopper.  If that's how he's implementing it-- e.g. if his mod is just doing his own thing in his own custom code rather than using the KSP stock science-instrument behavior, and then he's got some bit at the end that goes and adds science points-- then yeah, there's no way IndicatorLights would have any way of knowing that his stuff is even a "science instrument" per se.

How bridgeable the gap might (or might not) be would depend on the exact details of how it's implemented.  Could be anywhere from "is possible to do with some config sleight-of-hand" to "could be made to work but would require custom code for the compatibility" to "nope, it's just too different, can't reasonably be made to work".

Link to comment
Share on other sites

1 minute ago, Snark said:

How bridgeable the gap might (or might not) be would depend on the exact details of how it's implemented.  

Would you be willing to take a look at some point? I know the [X] Science mod is one place that is able to display available science from both stock and DMagic instruments, so that might be a place to see how it's done. I use FORTRAN and a little C for work, but have never really worked with C# and I'm not at all familiar with the KSP API.

Link to comment
Share on other sites

52 minutes ago, Tonka Crash said:

Would you be willing to take a look at some point? I know the [X] Science mod is one place that is able to display available science from both stock and DMagic instruments, so that might be a place to see how it's done. I use FORTRAN and a little C for work, but have never really worked with C# and I'm not at all familiar with the KSP API.

Maybe, but given that I'm not in the habit of using the mod myself, it would be a significant time sink with little payoff for me personally in my own gameplay-- it's the sort of thing I'd be likely to say "yes, that's a good idea" and then keep not getting around to it for months or longer.  ;)

If someone could do any of the preliminary footwork to find the relevant code and an idea of a potential solution, thus greatly reducing the amount of work I'd need to do, then that would probably lower my "barrier to entry", as it were.

Link to comment
Share on other sites

IndicatorLights uses the stock ModuleScienceExperiment module for all of its functions. As that module is inadequate for what I need I use my own (most of which inherit from the stock module). Some of the information could be made available by casting the ModuleScienceExperiment as IScienceDataContainer (which all of my science modules implement) and using the interface methods instead of the class methods. But the interface does not have methods for all of the required information.

Orbital Science has a static API that makes it relatively easy to access this type of information through reflection, but it isn't trivial to setup that kind of thing.

ModuleScienceDataIndicatorBase would work by casting to the interface. ModuleScienceAvailabilityIndicator would require accessing the Orbital Science API to get the required information. I think ModuleScienceDataIndicator should work fine as is (assuming that its base class were altered to work correctly).

Edited by DMagic
Link to comment
Share on other sites

3 hours ago, DMagic said:

Orbital Science has a static API that makes it relatively easy to access this type of information through reflection, but it isn't trivial to setup that kind of thing.

ModuleScienceDataIndicatorBase would work by casting to the interface. ModuleScienceAvailabilityIndicator would require accessing the Orbital Science API to get the required information. I think ModuleScienceDataIndicator should work fine as is (assuming that its base class were altered to work correctly).

Thanks for the info!  So, just casting to the interface seems pretty straightforward, that's not a big time commitment for me.  Setting up to call a static API sounds like more of a time sink, so that would probably be a lower-priority item until/unless someone spoonfeeds me a solution.  (Not to mention that it would be useless anyway unless someone does all the spadework to equip all of DMagic's parts with indicator meshes.)

@DMagic, do you have any pointers to the relevant code bits if I wanted to call the static API?

Shall need to think on this.  On the one hand, it's a chunk of time-- on the other hand, DMagic Orbital Science is an immensely popular mod, so I imagine that adding compatibility there would be a significant win for potentially an awful lot of people.

Link to comment
Share on other sites

The API is here, you probably would only need to worry about the first few methods, as the rest concern asteroid science experiments, which is a bit more involved:

https://github.com/DMagic1/Orbital-Science/blob/master/Source/DMAPI.cs

 

X Science uses reflection to access some of these methods, you can see it here:

https://github.com/thewebbooth/KSP-X-Science/blob/master/X-Science/DMagic.cs

Link to comment
Share on other sites

  • 2 weeks later...
20 minutes ago, Trann said:

Does anyone have this working for 1.6?  Subject has been edited to suggest but I'm not having luck.

It's working fine for me in 1.6.1.  You have to provide more information before anyone can figure out what's wrong.  Please follow the red-labelled link in my signature for troubleshooting steps you should try as well as where to find the logs you'll need to post to get help.

Link to comment
Share on other sites

13 hours ago, Trann said:

Does anyone have this working for 1.6?  Subject has been edited to suggest but I'm not having luck.

Sure.  It works just fine for 1.6, also 1.6.1.  Indeed, it needed zero code changes with the KSP 1.6 release-- it worked fine in 1.5, continued working fine in 1.6 and 1.6.1.

Note that this is a pretty "high visibility" mod; it's been downloaded over 200K times on SpaceDock, plus I myself consider it a "must have, won't play without" mod (after all, there's a good reason I wrote it in the first place).  ;)  So if it were actually broken in 1.6, there would have been numerous loud complaints by now, even if I hadn't noticed it myself (which I would, immediately).

So my guess as to what's going on is that it may be some sort of installation issue on your end.  (It's always possible you may have stumbled into some hitherto-undiscovered bug, of course.  But I'd guess that the most fruitful place to start looking would be with your install.)

Any interesting-looking errors showing up in your log file?

Link to comment
Share on other sites

@Jacke @Snark Thanks; the last reference in this thread was 1.5 in December so I just wanted to be sure all was well before going through the diagnostic routes of digging up the logs and swapping mods in and out to find conflicts.  Looks like I have a project.

EDIT: a trivial issue.  I drag-and-dropped the latest version of ModuleManager but missed the GameData folder so it landed outside of it.  Sorry for the distraction.

Edited by Trann
Link to comment
Share on other sites

  • 4 weeks later...

Greetings! I was curious if there is a way to make this work with Restock? Docking ports and SAS units still have lights, but most of the parts seem to have been effected by its new meshes/models. How tough would it be to fix?

Link to comment
Share on other sites

7 hours ago, Avera9eJoe said:

Greetings! I was curious if there is a way to make this work with Restock? Docking ports and SAS units still have lights, but most of the parts seem to have been effected by its new meshes/models. How tough would it be to fix?

Patches need to be rewritten to move the lights when Restock is installed, no eta has been provided. It's not difficult, but it is very tedious. The other big change needed is to avoid loading the stock model if Restock is present. You end up with the old and new models merged over each other for each part in this case.

For myself I'm only using a subset of Restock parts to limit the impact on other mods. Of the parts I am using, I patched them myself as needed, it wasn't hard. To start I added :FIRST to all restock patches, so all it's model replacements are forced to happen before any other mod patches run. This was to potentially save time modifying every other mod that might need to happen after Restock, like Missing History. The Restock team don't seem to have given much thought in how to play nice with other mods. I did skip a lot of the Restock parts to because I was getting bored writing patches and wanted to actually spend some time playing yesterday.

Link to comment
Share on other sites

2 hours ago, Tonka Crash said:

Patches need to be rewritten to move the lights when Restock is installed, no eta has been provided. It's not difficult, but it is very tedious. The other big change needed is to avoid loading the stock model if Restock is present. You end up with the old and new models merged over each other for each part in this case.

For myself I'm only using a subset of Restock parts to limit the impact on other mods. Of the parts I am using, I patched them myself as needed, it wasn't hard. To start I added :FIRST to all restock patches, so all it's model replacements are forced to happen before any other mod patches run. This was to potentially save time modifying every other mod that might need to happen after Restock, like Missing History. The Restock team don't seem to have given much thought in how to play nice with other mods. I did skip a lot of the Restock parts to because I was getting bored writing patches and wanted to actually spend some time playing yesterday.

Ah I see, thank you for the good explanation

Link to comment
Share on other sites

10 hours ago, Avera9eJoe said:

Greetings! I was curious if there is a way to make this work with Restock?

Known issue, intention is to get it to work appropriately.  It's just a matter of scraping together the necessary time.

 

Link to comment
Share on other sites

1 hour ago, Snark said:

Known issue, intention is to get it to work appropriately.  It's just a matter of scraping together the necessary time.

 

I feel you, only yesterday did I update Spectra to proper 1.6.1 (or 1.5/1.6 at all for that matter)

Link to comment
Share on other sites

@Snark I've got a small suggestion. How about a spherical mesh shape for a light? To me it could eliminate needing to be precise about the orientation of lights. I've had to build spreadsheets to do the math, especially when the lights are on multiple surfaces of a part. A spherical light would be a lot like a nubbin light, but if you leave its scaling the same in all three axes who cares which way it's pointed, there would be no need to get it aligned correctly with a surface, just get it position coordinates right. 

Edited by Tonka Crash
Link to comment
Share on other sites

22 hours ago, Tonka Crash said:

 I've got a small suggestion. How about a spherical mesh shape for a light?

I've got it on my to-do list to eventually circle back around and add some part variants for the BL-01 indicator light, so people can have alternate sizes/shapes.  Will likely be a long time, though-- I'm fairly busy, and modeling is like pulling teeth for me, meaning that I'll need to have a lot of otherwise-completely-free-of-everything-including-just-playing-KSP time piled up, I mean days, and I don't anticipate that happening soon.

Thank you for the suggestion, though!  Will bear it in mind when the time eventually comes. :)

Link to comment
Share on other sites

  • 2 months later...

Hi gang,

I'm pleased to announce the release of IndicatorLights v1.5, now with KSP 1.7.1 and Breaking Ground support!  :)  Here's what's new:

Axis group bindings

turn%20signals.gif

I've updated the modules that control the BL-01 Indicator Light, so that it's compatible with the new "axis group" feature in KSP 1.7.1.  (This is a stock feature; Breaking Ground is not required).  You can now bind the BL-01 indicator to axis groups so that you can use it in novel and interesting ways.

For example, in the above video clip, I've bound the two lights you see to the "Wheel Steer" axis group.  Result:  functioning turn signals!

Another example of what you could do with the feature is use Breaking Ground's KAL-1000 robotic controller to control BL-01 lights.

(And if there are any modders out there, reading this and wondering "how did he do that?", I've written a brief modder's tutorial on axis group binding.)

 

Robotics support

robotics.png

If you happen to have Breaking Ground installed, then gotcha covered.  ;)

I've outfitted the KAL-1000 robotic controller with an indicator that lights up when the controller is actively playing its tracks.  It lights up green when playing forward, red when playing in reverse.

I have plenty of other ideas for ways to add indicators to other robotic parts, so I'm likely not done yet.  Stay tuned.

 

Other stuff

  • Update to the latest ModuleManager version, 4.0.2.
  • Fix a bug with the Blinkenlights LLC agent that was causing NREs in the log file. (Thanks to @Tonka Crash for pointing it out and supplying a fix!)

 

I'll update the player guide and modder's controller reference wiki pages as soon as I have some time, explaining how to use the new stuff.  In the meantime, enjoy!

Link to comment
Share on other sites

1 hour ago, Snark said:

snip

Awesome! Thanks a lot!! That's really cool stuff.

May I ask how Indicator Lights plays along with the Restock parts? Sorry, did not follow much lately.

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