Jump to content

(Drop Support)[1.6.1] Crew Light : An Automatic Light Manager [v1.19] (29 Jan 2019)


Li0n

Recommended Posts

On 17/03/2017 at 0:01 AM, FellipeC said:

Edit: In Runway, planes have the aviation lights working. Rockets in launchpad no. Also the pods internal lights still work. What fails is normal lights (Illuminator Mk1).

Maybe you have a mod that reset the light action group ? Could you check what part you have in the light action group while on the lauchpad ? You need to use AGX for that. Also, do the light go on at the next sunset ? Do a F5/F9 fix it ?

Link to comment
Share on other sites

11 hours ago, Li0n said:

Maybe you have a mod that reset the light action group ? Could you check what part you have in the light action group while on the lauchpad ? You need to use AGX for that. Also, do the light go on at the next sunset ? Do a F5/F9 fix it ?

I have no idea what is happening anymore. Some crafts works fine, other don't, and I could not yet isolate the culprit. All that I know is that the craft that have the problems the nav lights also don't work, just the cabin lights.

Maybe this sunday I'll try again to find what happens. But now I have sure that is just a weird combination of things. Anyway, I'm very glad for all help

Link to comment
Share on other sites

12 hours ago, FellipeC said:

I have no idea what is happening anymore. Some crafts works fine, other don't, and I could not yet isolate the culprit. All that I know is that the craft that have the problems the nav lights also don't work, just the cabin lights.

Maybe this sunday I'll try again to find what happens. But now I have sure that is just a weird combination of things. Anyway, I'm very glad for all help

My best bet is something weird is going one with the light action group. Try inspect it with Action Group Extended. If you need more help send me your persistent.sfs with the faulty craft on the launch pad, and the .craft file.

Link to comment
Share on other sites

Just now, Li0n said:

My best bet is something weird is going one with the light action group. Try inspect it with Action Group Extended. If you need more help send me your persistent.sfs with the faulty craft on the launch pad, and the .craft file.

I changed settings.cfg in this way:

	only_light_not_in_AG = False // only lights not assigned to an Action Group will be lighted when the sun fall

No changes. Soon I hope to isolate better it

Link to comment
Share on other sites

5 minutes ago, FellipeC said:

I changed settings.cfg in this way:


	only_light_not_in_AG = False // only lights not assigned to an Action Group will be lighted when the sun fall

No changes. Soon I hope to isolate better it

I really need your persistent.sfs and a .craft file of a malfunctioning craft to help you more.

Link to comment
Share on other sites

42 minutes ago, Li0n said:

I really need your persistent.sfs and a .craft file of a malfunctioning craft to help you more.

@Li0n So I decided to record my attempt to find the cause of the problem.

You'll not believe, it's wings from this mod:

How this is possible? I don't know. Anyway Here is my save. https://1drv.ms/u/s!AjmAPkVSQK-Mlb0XnBcj5JcG6dxXdA

 

 

Link to comment
Share on other sites

@FellipeC Thanks for taking the time to do a video, unfortunately I can't reproduce the bug on a stock + Airplane Plus install. I suspect there is something else going on but what is it ? AP+ use only stock module for its parts so no idea what is happening...

I also take a look at your persistent.sfs, both MK1 lights are in the light action group, but not the nav lights... So that's not the problem either.

Do you see the same behavior after a quick save / quick load ?

Link to comment
Share on other sites

 

@Li0n First thanks for your awnser

F5/F9 changes nothing

I was trying to rebuild that plane without that modded wings. Then I found they aren't really the problem, but the stock landing gear attached to they. When I removed the wings, the landing gear was removed together. It makes more sense since the landing gear have it's own lights, maybe that for some reason mess with sunlight detection and/or light activation. So I made some tests and record it for you again:

If this can't be reproduced in a stock KSP install then maybe is something crazy on mine. But if you can reproduce this, then maybe is really a bug. 

 

Link to comment
Share on other sites

@FellipeC THANKS :D

It is a genuine bug. In order to select the part that should be lighted when the sun sets each part of the vessel is checked but when it check a landing gear it consider the list done. That also explain why your white nav lights was functioning, you probably add them before you add any landing gear.

It's most likely appear when I rewrote / refactor most of the code, 2 or 3 version ago. I used a "break" instead of a "continue" :rolleyes:

This version should solve your issue.

I'll made a proper release soon. Thanks again for taking the time to troubleshoot this :wink:

Link to comment
Share on other sites

28 minutes ago, Li0n said:

@FellipeC THANKS :D

It is a genuine bug. In order to select the part that should be lighted when the sun sets each part of the vessel is checked but when it check a landing gear it consider the list done. That also explain why your white nav lights was functioning, you probably add them before you add any landing gear.

It's most likely appear when I rewrote / refactor most of the code, 2 or 3 version ago. I used a "break" instead of a "continue" :rolleyes:

This version should solve your issue.

I'll made a proper release soon. Thanks again for taking the time to troubleshoot this :wink:

THANK YOU!

Issue is solved, Jeb is now smiling like a crazy dude. Well, Jeb always smile like a crazy dude anyway! :)

Link to comment
Share on other sites

53 minutes ago, RealGecko said:

Hey, man! I know that it might be not actual already but while I was diggin through KSP API reference I found that Vessel class has public bool directSunlight property :D

Yep I've already saw it, after doing my own implementation, of course :rolleyes:. I have tested it and I think it use a Raycast on the "scaled space" layer which won't acknowledge shadow from mountain, KSC building etc... So my way is more precise :sticktongue: Thanks anyway.

Link to comment
Share on other sites

  • 2 weeks later...
1 minute ago, LastStarDust said:

Hello,

I don't see any Settings.cfg file in my local folder nor in the github repository. Am I supposed to create it? In such a case what would be the syntax?

It will be created when you launch the game and go to flight view or enter the VAB/SPH. I prefer this way over shipping the file because in case of update you just have to copy/merge the new CrewLight folder in your GameData folder, keeping your settings file untouched.

Link to comment
Share on other sites

3 minutes ago, Li0n said:

It will be created when you launch the game and go to flight view or enter the VAB/SPH. I prefer this way over shipping the file because in case of update you just have to copy/merge the new CrewLight folder in your GameData folder, keeping your settings file untouched.

Thanks good to know.

Link to comment
Share on other sites

  • 1 month later...

Version 1.6 is up ! On SpaceDock and Github

Quote

* recompile for KSP 1.3.0
* update ModuleManager to 2.8.0

I haven't done much testing on it, nothing in 1.3 change-log seems relevant to this mod so this should be good to go :) As always, if you catch any bug please report it here.

One thing tho, do you guys think the settings file should be translated ?

Link to comment
Share on other sites

Hello, what an awesome and atmospheric lovely little mod! Thank you.

One question, it sounds silly, but I couldn't be sure: I understand that the mod detects day and night by checking whether the vessel is in shadow or not. From this I understand that the mods actions are not based on time. Which follows that the mod is probably periodicly checking for the shadow (I think 1.5 seconds was mentioned at some point). So, at the end, is the mod "continously" controlling the lights according to sun light, or does it only switch them on/off as the vessel moves into or out of the shadow?

If the answer is the former then I would suggest the latter :) In which case, I would even suggest that the parameter only_light_not_in_AG can be set to a default value of false.

Link to comment
Share on other sites

53 minutes ago, canisin said:

One question, it sounds silly, but I couldn't be sure: I understand that the mod detects day and night by checking whether the vessel is in shadow or not. From this I understand that the mods actions are not based on time. Which follows that the mod is probably periodicly checking for the shadow (I think 1.5 seconds was mentioned at some point). So, at the end, is the mod "continously" controlling the lights according to sun light, or does it only switch them on/off as the vessel moves into or out of the shadow?

The lights gets switched only one time per day/night. If you turn off a light during night it won't be turned on again until the next night.

1 hour ago, canisin said:

In which case, I would even suggest that the parameter only_light_not_in_AG can be set to a default value of false.

I don't see the correlation between the two. "only_light_not_in_AG" means : only the light which are not in the "Light Action Group" will respond to the day/night cycle. Could you explain more what you are looking for ?

 

Link to comment
Share on other sites

Well, when I read that your mod only controls those lights that are not in the Lights action group, I thought to myself that it would be tedious to organize that and I wondered why there is such a distinction, why I wouldn't want all of my lights to be controlled according to the day/night cycle. 

Link to comment
Share on other sites

Just now, canisin said:

Well, when I read that your mod only controls those lights that are not in the Lights action group, I thought to myself that it would be tedious to organize that and I wondered why there is such a distinction, why I wouldn't want all of my lights to be controlled according to the day/night cycle. 

There is such a distinction because I like to have two type of lights, automatic and manual. I use the manual one as docking light mostly.

There is another way to have all your lights following the day/night cycle by default but still get the manual light function if you want it : set "disable_action_group_for_light_part" to "True" (in the "Light_Action_Group" node) and reset "only_light_not_in_AG" to "True". This way the lights are not assigned to the Light Action Group, in the editor, but you can add them back if you want them to work as manual light. It won't do it for ship already in flight tho.

I might change the default settings to this other way, but I will not make a new release just for that.

Thanks for the suggestion anyway :)

Link to comment
Share on other sites

1 minute ago, Li0n said:

There is such a distinction because I like to have two type of lights, automatic and manual. I use the manual one as docking light mostly.

There is another way to have all your lights following the day/night cycle by default but still get the manual light function if you want it : set "disable_action_group_for_light_part" to "True" (in the "Light_Action_Group" node) and reset "only_light_not_in_AG" to "True". This way the lights are not assigned to the Light Action Group, in the editor, but you can add them back if you want them to work as manual light. It won't do it for ship already in flight tho.

I might change the default settings to this other way, but I will not make a new release just for that.

Thanks for the suggestion anyway :)

Hmm, thank you. I will play with the configuration settings and find what I am comfortable with. Thanks a lot both for the mod itself, and your support!

Link to comment
Share on other sites

  • 3 months later...

Hey

Here is a little update to support the brand new Kerbal Electric by @Fengist :

A good set of lights, some can tilt/pan, with a preset color selection and blinking effect.

Download on SpaceDock or GitHub

Quote

* support for KerbalElectric
* fix for the "disableAllAg" setting didn't do anything
* bundle ModuleManager 2.8.1

Enjoy :)

Link to comment
Share on other sites

13 hours ago, robson1000 said:

Can you make this mod working with extra parts from Stock Part Revamp?

Parts like "MK2 'VA' Command Pod", or "PPD-2 KerbCan".

Done :

Version 1.8 is up ! On SpaceDock and GitHub

Quote

* support for Ven's Stock Part Revamp

@robson1000 I didn't take the time to check all the part in "Stock Part Revamp", the two you mentioned work but please report it if you find other that don't.

Enjoy :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...