Jump to content

[WIP] [1.12.x] Kerbal Electric - Back to brighten up your explosions.


Fengist

Recommended Posts

On 10/26/2017 at 3:39 PM, captinjoehenry said:

I just want to say thanks for these lights!  This seems like the only mod that adds lights that worth anything as head lights among other things!  Keep up the great work.

Glad you like em.  More coming soonTM

 

Link to comment
Share on other sites

From the R&D Department - Mashed bugs!

Before

1oaTu10.png

After

5DkvagP.png

And, as is the case with all my lights... you pick the color or select from a preset.

uO7bfPQ.png

And... they even blink

The Details

Ok, so this was just a bit more tricky than I imagined.  When Slime Lights were requested I envisioned an emissive.  Welll... there's one problem with emissives.  Changing the color isn't all that easy as it's based on the texture.  So, this took some behind the scenes trickery.  Each of the parts is actually 3 parts.  The base and 2 lenses.  One lens is set to a diffuse shader and the other is set to an unlit shader.  Depending on whether the light is on or off, the lens with the proper shader gets enabled and the other disabled.  They all also have 1-3 point lights that match color with the lens so they have a slight glow.

There will be 4 parts.  A flat 3 section 1 meter slime light.  A single section that's about .7 meters and two that have a working title of control slime lights.  They're curved so they fit on most stock wings, rudders, etc.

When?

I'm putting in overtime hours this week so I don't have a lot of spare time to finish them up but hopefully within the week.

 

Link to comment
Share on other sites

On 10/15/2017 at 12:47 AM, AirShark said:

Have you thought about making low-visibility formation lights (a.k.a slime lights)? Those thin strips of yellow lights that glow green when turned on, often seen on fighter jets and other military aircraft?

Good idea.  See the post above.

Edited by Fengist
Link to comment
Share on other sites

On 2017. 09. 14. at 5:48 PM, VenDei said:

*facepalm* There IS a group of lights I'd love to see for ages in KSP, and I nearly forgot them: actual navigation lights.
2099091.jpg
Which would be red (port, or "looking forward, left") and green (starboard, or "looking forward, right"), and mounted to the side of a vehicle, shine directly forwards and in a sector of about 110° to the side. That would be a little bit more than right towards the side, and wouldn't even need to be overly precise - it's just that with current mods getting navigation lights to not illuminate towards the back is such a hassle. There is one light nearly like that, but it has too narrow a beam and just looks weird.

It would be nice to have something like this. Sometimes I use small batteries at the tip if the wings (portside disabled), but it's not the same...

 

*Never mind, overlooked the date :D

Edited by NotJebediah
Overlooked date
Link to comment
Share on other sites

On 11/2/2017 at 11:45 PM, Fengist said:

From the R&D Department - Mashed bugs!

Before

1oaTu10.png

After

5DkvagP.png

And, as is the case with all my lights... you pick the color or select from a preset.

uO7bfPQ.png

And... they even blink

The Details

Ok, so this was just a bit more tricky than I imagined.  When Slime Lights were requested I envisioned an emissive.  Welll... there's one problem with emissives.  Changing the color isn't all that easy as it's based on the texture.  So, this took some behind the scenes trickery.  Each of the parts is actually 3 parts.  The base and 2 lenses.  One lens is set to a diffuse shader and the other is set to an unlit shader.  Depending on whether the light is on or off, the lens with the proper shader gets enabled and the other disabled.  They all also have 1-3 point lights that match color with the lens so they have a slight glow.

There will be 4 parts.  A flat 3 section 1 meter slime light.  A single section that's about .7 meters and two that have a working title of control slime lights.  They're curved so they fit on most stock wings, rudders, etc.

When?

I'm putting in overtime hours this week so I don't have a lot of spare time to finish them up but hopefully within the week.

 

WOW! They are looking great! 

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 6 months later...
  • 5 weeks later...

Updated for KSP 1.4.x.  Click the download button in the OP.

Includes the 3 new 'SLIME' lights (see pictures in previous posts). Now your Kerbal can look just like a Top Gun graduate (Flat-top haircut optional)

Link to comment
Share on other sites

24 minutes ago, Cavscout74 said:

Glad to see this get updated!!! The old version was still working ok for me in 1.4.4, but I always like to have everything up to date.  Plus a few new lights are a bonus!! :cool:

I'm surprised it worked without the plugin being recompiled.

I seemed to have lost the latest code I was working on for the plugin and reverted to an older code. I then discovered the pan and tilt for the searchlight wasn't working.  So, I had to fix that. Let me know if you run into any more issues I missed.

Link to comment
Share on other sites

11 hours ago, Fengist said:

Updated for KSP 1.4.x.  Click the download button in the OP.

Includes the 3 new 'SLIME' lights (see pictures in previous posts). Now your Kerbal can look just like a Top Gun graduate (Flat-top haircut optional)

*chssst
"Roger that, Fengist. Ice-cool. Five by five."

Link to comment
Share on other sites

Ya know, I just realized I completely forgot to post pictures of Idiot Lights in the OP.

So, since I'm here, here's a brief description of how they work.

There's only one Idiot Light part, but you can configure it to monitor any resource in the game.

Step 1. Stick an idiot light on any part that contains a resource.
Step 2. Right click on the idiot light and click next or prev resource.  The name of the resource will change in the label at the top as you cycle through them.
Step 3. Stop on the resource that the part contains and... voila, the idiot light should start to glow.  If it doesn't then the tank has no resources in it (or the part is set to ship - more on that in a moment). Move the slider to increase or decrease the amount of the resource and you should see the lights change.
Step 4. (Optional) Idiot lights can give you a visual readout of the part they're on or, the amount of that resource for the entire ship.  Click on 'Toggle Resource Scope' to change that. (Note: IN THE EDITOR THE LIGHTS WILL BE OFF IF SET TO SHIP.  Reason being, the ship doesn't technically exist yet.)
Step 5. (Optional) Several different fonts are built in to KSP.  Idiot Lights can change the display font to any of those installed.  Simply click on the next/prev font button to change them. (Notice: Most of them look VERY similar.  I did not do that.)
Step 6. (Optional) If you change the color slide bars in the dialog box, the font will change colors. If you're so inclined, you can have purple fonts on your Idiot Light. (I did do that.)

Now, for the image below.  This shows the dialog for changing the idiot light.  Yes, all options can be changed in the editor or in flight.  Take note of the resources panel in the top right.  Those are the same resource volumes displayed in the next image.

The next image shows the Idiot Lights a bit more clearly.  All of the Idiot Lights on the left are reading the contents of the part they're attached to. The Idiot Lights on the structural panel are reading the resources ship wide.  So, you'll notice that the solid fuel (a small booster is in the back) is black.  That's because it's empty.  I burnt the fuel up.  The shipwide Idiot light for LF is green.  But, if you look at the two tanks on the left, one is almost empty (red).  The reason: the two tanks combined are greater than 60% full so, the shipwide Idiot Light reads green. 

One oxidizer tank is empty so it's lights are off.  The other is full so it's green.  But, the shipwide Idiot Light for Oxidizer is yellow.  It says you have between 30% and 60% oxidizer left.

Green = 60% - 100%
Yellow = 30% - 60%
Red = less than 30%
Off = Empty

So, if you've been itching for a reason to turn off the hud and fly by the seat of your pants, now you can see your resources at a glance.

And they're visible for a pretty decent distance.

Enjoy.


pOGjVrC.png

sUZGCGP.png

Link to comment
Share on other sites

  • 5 weeks later...

I really love the ambiance your mod adds.  However, I can't seem to move the spotlight at all.  The menu to tilt and rotate it comes up, but it doesn't tilt or rotate in the hangar or outside, and blinking lights also don't seem to respond to blinking.  I don't know much at all, but when looking at the part config, it says to use a pan and tilt animation, but I don't see those in the mod.  Are those stock animations it's calling to?   The installation was simple enough it's almost impossible I've messed it up.  Maybe these features just don't work with 1.4.5?   Any help is greatly appreciated.    Even without these features working, this is still an amazing mod, but I'd really like to be able to pan that light!

Edited by I Just Ate Your Grapes Bro
Link to comment
Share on other sites

12 hours ago, I Just Ate Your Grapes Bro said:

I really love the ambiance your mod adds.  However, I can't seem to move the spotlight at all.  The menu to tilt and rotate it comes up, but it doesn't tilt or rotate in the hangar or outside, and blinking lights also don't seem to respond to blinking.  I don't know much at all, but when looking at the part config, it says to use a pan and tilt animation, but I don't see those in the mod.  Are those stock animations it's calling to?   The installation was simple enough it's almost impossible I've messed it up.  Maybe these features just don't work with 1.4.5?   Any help is greatly appreciated.    Even without these features working, this is still an amazing mod, but I'd really like to be able to pan that light!

Ok, you had me for a second.  When I recompiled the mod for 1.4.x I didn't actually test the spotlight.  I did test the idiot lights which use the same plugin.  So, I downloaded the mod from Curse and installed it and, the spotlight rotated for me.

So, that pretty much eliminates what is always my first suspicion, that I screwed up.

What you're seeing in the .cfg is just information the plugin uses so that it knows that that part can use the pan and tilt and that's normal.  It's not exactly a stock animation as you would see in the .cfg the words AnimateGeneric.  It's all custom code.  The blinking is also controlled by the same plugin.  So it makes sense that if one doesn't work, the other won't either.  But, the lights turning on and off is also the same plugin so it doesn't make sense to me that part of it should work and another part won't.  But, it's entirely possible.

So, let's go with the assumption for now that it's your specific install that's having issues.  What I'd like you to do is to perform a quick test and allow me to take a look at the KSP log to see what might be causing the problem.  Let's try this:

  1. Fire up KSP.
  2. Go into the SPH or VAB and place any random part.
  3. Place a spotlight on it, right click the spotlight to bring up the UI.
  4. Click on the pan and tilt speed bars so that they are both around 50% green.
  5. Click on the 'pan/tilt' light button to open that UI.
  6. Try to pan and tilt.

If it doesn't pan or tilt, do the next steps.

  1. Exit KSP.
  2. Go to your KSP install directory.
  3. Open the KSP.log file with an editor like notepad.
  4. Select all of the text and copy it.
  5. In a browser, go to pastebin.com
  6. Paste the copied text in the box provided and select 'create new paste'
  7. Copy the URL that it sends you to.
  8. Quote this post and paste that URL here.  (make sure you quote this post or use an @fengist so that I get the notification.  I have 4 mods and about a half dozen threads I watch.  Quoting me or @ing me gets my attention the quickest.)

Forgive me if I oversimplified that process.

Edited by Fengist
Link to comment
Share on other sites

On 8/28/2018 at 6:26 AM, Fengist said:

Ok, you had me for a second.  When I recompiled the mod for 1.4.x I didn't actually test the spotlight.  I did test the idiot lights which use the same plugin.  So, I downloaded the mod from Curse and installed it and, the spotlight rotated for me.

So, that pretty much eliminates what is always my first suspicion, that I screwed up.

What you're seeing in the .cfg is just information the plugin uses so that it knows that that part can use the pan and tilt and that's normal.  It's not exactly a stock animation as you would see in the .cfg the words AnimateGeneric.  It's all custom code.  The blinking is also controlled by the same plugin.  So it makes sense that if one doesn't work, the other won't either.  But, the lights turning on and off is also the same plugin so it doesn't make sense to me that part of it should work and another part won't.  But, it's entirely possible.

So, let's go with the assumption for now that it's your specific install that's having issues.  What I'd like you to do is to perform a quick test and allow me to take a look at the KSP log to see what might be causing the problem.  Let's try this:

  1. Fire up KSP.
  2. Go into the SPH or VAB and place any random part.
  3. Place a spotlight on it, right click the spotlight to bring up the UI.
  4. Click on the pan and tilt speed bars so that they are both around 50% green.
  5. Click on the 'pan/tilt' light button to open that UI.
  6. Try to pan and tilt.

If it doesn't pan or tilt, do the next steps.

  1. Exit KSP.
  2. Go to your KSP install directory.
  3. Open the KSP.log file with an editor like notepad.
  4. Select all of the text and copy it.
  5. In a browser, go to pastebin.com
  6. Paste the copied text in the box provided and select 'create new paste'
  7. Copy the URL that it sends you to.
  8. Quote this post and paste that URL here.  (make sure you quote this post or use an @fengist so that I get the notification.  I have 4 mods and about a half dozen threads I watch.  Quoting me or @ing me gets my attention the quickest.)

Forgive me if I oversimplified that process.

I don't mind the steps being laid out so they're idiot proof ;).  Right now it's telling me that I need to pay in order to upload that file, I'm gonna do a fresh install and start early with this mod and see where it stops rotating/flashing and I'll report back, hopefully with a small enough ksp.log that I can actually post it.

Link to comment
Share on other sites

5 hours ago, I Just Ate Your Grapes Bro said:

I don't mind the steps being laid out so they're idiot proof ;).  Right now it's telling me that I need to pay in order to upload that file, I'm gonna do a fresh install and start early with this mod and see where it stops rotating/flashing and I'll report back, hopefully with a small enough ksp.log that I can actually post it.

Pay?  Pastebin?  No.  At the most it may make think it spam and ask you to enter a captcha.  

Link to comment
Share on other sites

6 hours ago, Fengist said:

Pay?  Pastebin?  No.  At the most it may make think it spam and ask you to enter a captcha.  

"You have exceeded the maximum paste size of 512 kilobytes per paste. PRO users don't have this limit!" This then takes me to a site to pay $30.  I assumed it'd be in poor taste, or almost impossible to read to paste a 3.3kb file across that many different files.

Link to comment
Share on other sites

2 hours ago, I Just Ate Your Grapes Bro said:

"You have exceeded the maximum paste size of 512 kilobytes per paste. PRO users don't have this limit!" This then takes me to a site to pay $30.  I assumed it'd be in poor taste, or almost impossible to read to paste a 3.3kb file across that many different files.

That must be new.  And 512 kb isn't... well...

Can you upload it to somewhere like dropbox or google cloud where I can download it and take a look?

 

 

Link to comment
Share on other sites

  • 3 weeks later...

Good mod, but completely broken.  Just spent 8 hours editing save files to get rid of everything associated with this mod.

Constant null reference spam:

 NullReferenceException: Object reference not set to an instance of an object ModuleKELight.ModuleKELight.FixedUpdate

Pan & tilt not functional either.

 

Edited by Val
Snipped unhelpful comment
Link to comment
Share on other sites

7 hours ago, Tazarak the Brutal said:

Good mod, but completely broken.  Just spent 8 hours editing save files to get rid of everything associated with this mod.

Constant null reference spam:

 NullReferenceException: Object reference not set to an instance of an object ModuleKELight.ModuleKELight.FixedUpdate

Pan & tilt not functional either.

 

 Thanks for the snip @Val, Good call.  I got the email of the original post.

@Tazarak the Brutal.

  1. It is rather difficult for a mod author to diagnose a problem when you give one generic error line from the logs and a "completely broken" description of the issue. That really tells me nothing.
  2. As of this reply, KE has 3,716 downloads on Curse. This is the first time I've heard of an issue with a nullRef.  While I am aware of an issue with the pan-tilt, no one has provided me with logs yet so I don't know what the exact issue is.  That tells me that, more than likely, this is a rare occurrence and was caused by the particular situation the spotlight is being used it in.  Again, not telling me what this situation is does NOT help in getting it fixed.
  3. This mod is still listed as a WIP - Work in Progress.  Even in the Curse listing it's noted as being a BETA.  It is NOT my intent to break your saves and it's definitely not my intent to have nullRef spam. But, there are risks when using any mod, not just a WIP.  Had you given me more details on the exact problem and pm'd me, used an @ or quoted me to get my attention, it's likely I could have come up with a patch, uploaded that patch to Curse and had it in your hands long before you finished your 8 hour editing stint.
  4. (Regarding the part that was snipped.) What exactly leads you to believe that a mod listed on CKAN is any less likely to have issues than a mod listed on Curse?  I've gotten nullRef spam from the stock game just a few weeks ago and it's definitely not on CKAN. (and when I did I reported it on the KSP bug tracker with a log snippet to point out the issue and a description of what I was doing to cause it.)

As it stands now, I have looked over the FixedUpdate code and nothing jumps out at me as a cause of this.  Since I have no way of determining what's broken, I don't know what to fix.  If anyone else is getting nullRef's... let me know!

For future reference with this (or any mod for that matter). PLEASE take the time to contact the author politely. Work with them to help them figure out what the issue is so that not only is it fixed for your particular circumstance so that you don't have to take an axe to your save games but also, so that it's fixed for everyone to enjoy.

 

Edited by Fengist
Link to comment
Share on other sites

7 hours ago, Tazarak the Brutal said:

Good mod, but completely broken.  Just spent 8 hours editing save files to get rid of everything associated with this mod.

Constant null reference spam:

 NullReferenceException: Object reference not set to an instance of an object ModuleKELight.ModuleKELight.FixedUpdate

Pan & tilt not functional either.

 

You should ALWAYS provide a log file.  It's fine to put a snippet into the post, but snippets are usually useless by themselves.

See my signature for a link to a post which describes in detail where the log files are and how to make them available to the author

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