Jump to content

[1.1.3] Idiot Lights - Because Kerbals are Stoopid r0.0.1


Fengist

Recommended Posts

Well, I can't claim the idea, just a working solution.  I was digging through some ancient forum threads last nite for ideas and came across a light a guy made to track his battery.  He claimed he was going to release it but he used a plugin from another mod and wanted to get permission.  Apparently, he never got it.

So, today I sat down and tried to figure out how in gods name you could get 12 emissive animations working on one part.  I have a few bruises from the effort, but it works pretty well.

Thanks to that guy who's idea I stole... whoever you are (I couldn't find that thread again if I tried).

Link to comment
Share on other sites

1 hour ago, The Optimist said:

It would be nice to have a chain of 10 lights, each representing 10% of a resource, which turn off as you consume the resource depicted.

Yea well... allow me to explain what it took to get this working.

First, in my modelling software (Wings 3D).  I had to create the model and unwrap it.  Then in Fireworks, I created the silly texture.  Then, back in Wings I applied the textures and exported the main box.  Then, each one of those little lights had to have it's own texture created and each one of those had to be exported.  In Unity, the main box was imported and then, each one of those little lights textures was imported.  Then, an animation was created for each one of those little lights to put it's emissive value on a curve.  Then, each one of those animations had to be exported to text and, I had to go into Delphi and create a Windows program that would load up each one of those animation text files and convert every occurrence of two values that KSP seems to hate in any animation.  Then, the whole works had to be written to a KSP model.  Then, Visual Studio had to be fired up and both a partmodule and a number of other functions created in order to cycle through every part on a vessel, check for resources, grab the total, grab the max possible resource, divide that into a percentage and then... if the percentage was correct, the plugin would play the animation... and, reverse the other animations (i.e. play green, reverse red and yellow).  After THAT... trying to figure out how to get it into a part.cfg file where the animations were visible to the plugin but there were no buttons for the user to click (which I'm still not happy with)... and then...  well... that's the Readers Digest condensed version of what I did today.

And keep in mind, that's having the equivalent of... Jack Squat... from Squad regarding documentation for their code (a LOT of guessing and restarting a pared down copy of KSP).

So, that's just 4 resources X 3 lights each.  12 total and it took me all day to do it (granted I'm a lot faster at plugins than I was a year ago).  But, I'm NOT gonna repeat what I did 40 times. 

Nice idea and I thot of it half way through... but ummmm no.  I hope that helps explain just how much work went into something that looks so silly and simple.

Edited by Fengist
Link to comment
Share on other sites

2 hours ago, adsii1970 said:

Can't tag you, but you deserve rep!

TBH, I have more rep now that I'll ever need and I've never really seen a use for it.  

Like any most mod creators, donations are one sure way to motivate them to do more.  But, if you're broke like me, simply downloading the mod works. Curse does have a reward system for downloads.  It's not much... After 21,000+ downloads for Maritime I've made a whopping $15.00 in Amazon gift cards.  That's less that's what? $0.001 per download?  But it's $15.00 I didn't have. 

Or, you can always click on an ad in a modder's YouTube video.  Many of them have monetized their YouTube accounts. Again, it's not much, but every click helps and even if you're not one to toss money at a stranger for a mod, you can waste a minute of your time watching some advertisement and know you contributed in a small way.

And if nothing else, if you like a mod, bump it's thread by posting and keep it in the public eye.

Just my two cents.

Edited by Fengist
Link to comment
Share on other sites

Here's a quickly made, pretty nice TweakScale config. Seems to work well as far as being able to read the writing goes.

 

Spoiler

SCALETYPE
{
    name = IdiotLights
    freeScale = false
    scaleFactors = 0.05, 0.1, 0.2
    scaleNames = Small, Medium, Large
    defaultScale = 0.1
}

@PART[FSIdiotLights]:NEEDS[TweakScale]:FINAL
{
    MODULE    {
        name = TweakScale
        type = IdiotLights
        scaleNames = Small, Medium, Large
}
 

 

Link to comment
Share on other sites

7 hours ago, ultraviolet150 said:

Here's a quickly made, pretty nice TweakScale config. Seems to work well as far as being able to read the writing goes.

 

  Reveal hidden contents

SCALETYPE
{
    name = IdiotLights
    freeScale = false
    scaleFactors = 0.05, 0.1, 0.2
    scaleNames = Small, Medium, Large
    defaultScale = 0.1
}

@PART[FSIdiotLights]:NEEDS[TweakScale]:FINAL
{
    MODULE    {
        name = TweakScale
        type = IdiotLights
        scaleNames = Small, Medium, Large
}
 

 

Thanks!  I shall test it out.  I hate writing tweakscale stuff so I usually just go with the basics.

5 hours ago, Deimos Rast said:

1) You need a marketing department.:D

2) Are you familiar with Indicator Lights by the esteemed Mr. Snark?

3) If I find these useful, what does that make me?:wink:

4) The mod you were talking about is BatteryIndicator by PizzaOverhead or the updated version by Darkona.

Anyway, these look mighty fine!

1. The problem with marketing guys.  The expect to get paid whether they make you money or not.

2. I was actually in the middle of coding this thing when I decided to look for similar mods and found that one.  My first thot was, I'm trying to make a visual fuel gauge, not a stinking Christmas tree.  They look cool and all but my thinking is along these lines.

3. A Pragmatist!

4. Nope.  Again, similar concept.  The one I found you surface mounted on the ship and it looked similar to what I've created.  It was on like page 240 something of 275 in of one of the forums and I just thot, "Hey, cool idea. I wonder if I could come up with a way to do that."

 

Thanks!

Link to comment
Share on other sites

Ah.... Good ole eye-dee-ten-tee indicators.... :)
When I was in the service, we used to send all the noobs to Supply, to pick up our monthly restock of these... The guys in Supply used to love taking it to the next stage, and playing along... :D

Edited by Stone Blue
Link to comment
Share on other sites

1 hour ago, Stone Blue said:

Ah.... Good ole eye-dee-ten-tee indicators.... :)
When I was in the service, we used to send all the noobs to Supply, to pick up our monthly restock of these... The guys in Supply used to love taking it to the next stage, and playing along... :D

Did you send them for grid squares, a couple of rolls of flight line, or a bucket of jet wash?  :D

Link to comment
Share on other sites

13 hours ago, Fengist said:

Yea well... allow me to explain what it took to get this working.

First, in my modelling software (Wings 3D).  I had to create the model and unwrap it.  Then in Fireworks, I created the silly texture. 
<snip>

So, that's just 4 resources X 3 lights each.  12 total and it took me all day to do it (granted I'm a lot faster at plugins than I was a year ago). 

So we can expect an updated part with user selectable resources, and a big enough display to show up to and including, ALL of the resources in the Comm. Res. Pack all at once... Say, what, by end of next week?   :D:) lol

Link to comment
Share on other sites

1 hour ago, Stone Blue said:

Ah.... Good ole eye-dee-ten-tee indicators.... :)
When I was in the service, we used to send all the noobs to Supply, to pick up our monthly restock of these... The guys in Supply used to love taking it to the next stage, and playing along... :D

I haven't downloaded this (and probably won't -- while I like it, it's not my style), but...

If the part isn't named "ID-1-0-T Indicator System" or similar, I'll be disappointed.  Other options could be PIKNIK ("Problem In Kerbal, Not In Craft/Capsule") or PEBKAC ("Problem Exists Between Kerbal And Capsule").

 

Link to comment
Share on other sites

3 hours ago, dewin said:

I haven't downloaded this (and probably won't -- while I like it, it's not my style), but...

If the part isn't named "ID-1-0-T Indicator System" or similar, I'll be disappointed.  Other options could be PIKNIK ("Problem In Kerbal, Not In Craft/Capsule") or PEBKAC ("Problem Exists Between Kerbal And Capsule").

 

This! xD

Link to comment
Share on other sites

5 hours ago, Stone Blue said:

So we can expect an updated part with user selectable resources, and a big enough display to show up to and including, ALL of the resources in the Comm. Res. Pack all at once... Say, what, by end of next week?   :D:) lol

Yer funny.

5 hours ago, MaxwellsDemon said:

Did you send them for grid squares, a couple of rolls of flight line, or a bucket of jet wash?  :D

You forgot bulkhead remover.  I once had some 'salty' types send me after one of those thinking I was some lubber. I came back with a 6'4" 250 lb master-at-arms with a gun on his hip who politely asked the salts, which bulkhead they needed removed.

The best one I ever pulled was when the XO was on the 1-MC yelling for suction to handle some flooding they had in a compartment.  I sent our seaman down with a shop-vac. 

5 hours ago, dewin said:

If the part isn't named "ID-1-0-T Indicator System" or similar, I'll be disappointed.  

Suggestion noted and accepted.  Next release.

Edited by Fengist
Link to comment
Share on other sites

  • 9 months later...

I just thought of something. Instead of having one huge panel of lights, you could have a single part with many different variations for each resource. That'd be a lot easier to program and make, wouldn't it?

Link to comment
Share on other sites

  • 5 months later...
On 4/23/2017 at 11:58 AM, Linventor said:

I just thought of something. Instead of having one huge panel of lights, you could have a single part with many different variations for each resource. That'd be a lot easier to program and make, wouldn't it?

DONE!

 

Would a moderator mind closing this thread for me.  The OP now points to it's new home.  Thanks.

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