Li0n Posted December 1, 2016 Author Share Posted December 1, 2016 @Skalou To light a part with ModuleAnimateGeneric I check if "actionGUIName" == "Toggle Lights" or "startEventGUIName" == "Lights On". In your .cfg you call those fields "Toggle Lights Hatch" and "Lights Hatch On" so they aren't seeing as light animation. You can obviously change those but you'll end up with two buttons labeled "Lights On/Off" in the right click menu, not convenient. Can you make it so there is only one ModuleAnimateGeneric for both hatch and regular light ? I imagine it will also be better for people that don't use my mod so they have one button for both lights. No idea if this doable tho... On my hand I could (should) use a regex to check if "actionGUIName" contains the word "light", it will solve this problem and probably with others mods that don't spell those fields exactly like in stock part. Link to comment Share on other sites More sharing options...
Skalou Posted December 1, 2016 Share Posted December 1, 2016 thank you for the fast answer , unfortunately i tried to rename these fields to "Toggle Lights" and "Lights On" /Off, but it doesn't work better, i also tried to to delete the stock model and readd it latter after mine in the module manager patch so my model is the 1st to be read, but not better. maybe i should recompile the whole part as you said ( i wanted to save RAM and keep the lowest possible model, and be compatible with other revamp mods too, but having 2 lights is maybe worst than this) Link to comment Share on other sites More sharing options...
Li0n Posted December 1, 2016 Author Share Posted December 1, 2016 15 minutes ago, Skalou said: unfortunately i tried to rename these fields to "Toggle Lights" and "Lights On" /Off, but it doesn't work better, i also tried to to delete the stock model and readd it latter after mine in the module manager patch so my model is the 1st to be read, but not better. Just tried and my plugin only toggle one light animation per part. I'll draft a new release tomorrow if I have some time. Until then nothing you can do about it, sorry. 21 minutes ago, Skalou said: maybe i should recompile the whole part as you said ( i wanted to save RAM and keep the lowest possible model, and be compatible with other revamp mods too, but having 2 lights is maybe worst than this) Modeling/Animation are the "dark side of the force" to me but maybe B9 Part Switch can help with that ? Link to comment Share on other sites More sharing options...
Skalou Posted December 1, 2016 Share Posted December 1, 2016 thank's for the advices, but i shouldn't have any problem with the stock modules, i can build the whole part in 1 model node with a special plugin for blender to catch the stock, it was my choice to do it separately. and for me Codding is on the other side of the force. Link to comment Share on other sites More sharing options...
Li0n Posted December 1, 2016 Author Share Posted December 1, 2016 @Skalou I got time now so, here is a new version that can recognize every part with "light" somewhere in theirs actionGUIName's field. It also check for several light per part. I just quick tested it (obviously ) so watch for the bees Link to comment Share on other sites More sharing options...
Skalou Posted December 1, 2016 Share Posted December 1, 2016 i tried (quick) with my mod and it works! thank you very much for your effort! Link to comment Share on other sites More sharing options...
Li0n Posted December 9, 2016 Author Share Posted December 9, 2016 v0.7 The Sun Light edition Thanks to @RealGecko for the idea, the light are now toggled when the sun rises/falls. This will only affect light in a part without crew capacity and not belonging to the light action group. Hmm... in fact if you try right now it won't work... By default all lights are assigned to the Light action group so for this function to have any effect you need to remove lights from the action group. You can do it in the editor or in flight with the mod Action Group Extended. Others change include support for part with multiple light and a better detection of light related animation, to support MK1 Cabin Hatch by @Skalou and probably others too. I also rewrote the OP to better explain how the different part/light will behave. Now all I need is some videos or gif... You can grab it on SpaceDock or on GitHub As always please report any issues/bugs or suggestions Link to comment Share on other sites More sharing options...
RealGecko Posted December 9, 2016 Share Posted December 9, 2016 42 minutes ago, Li0n said: v0.7 The Sun Light edition Sweeeet Link to comment Share on other sites More sharing options...
Enceos Posted December 10, 2016 Share Posted December 10, 2016 (edited) @Li0n Wow, I'm so happy about the lights automation :3 You're my hero. I remember myself proposing this idea in Smart Parts, but the author vanished and new maintainers never got around to implement it. You deserve a badge! @RealGecko many thanks, dude, for coming up with and bringing this idea into the right hands ♥ Edited December 10, 2016 by Enceos Link to comment Share on other sites More sharing options...
Skalou Posted December 12, 2016 Share Posted December 12, 2016 Nice update here is some small suggestion to improve it: - Do not include the source files in the download, most user don't need it: lower Ec and mits, better for the planet you can check here to be sure: Quote 3. Source code All plugins which are made available on the services maintained by Squad that serve the KSP Community must have their source code be made publicly available. This can be achieved by posting it on a public code repository and linking this repository in every location you offer the plugin for download. Including the source code in the download file itself instead of hosting it on a public code repository also satisfies this requirement. - compatibility with KSP-AVC Add-on Version Checker , i made it in my mods, so i can help you and send you some pull requests on github with everything if you like the idea. Link to comment Share on other sites More sharing options...
Li0n Posted December 12, 2016 Author Share Posted December 12, 2016 21 minutes ago, Skalou said: Nice update here is some small suggestion to improve it: - Do not include the source files in the download, most user don't need it: lower Ec and mits, better for the planet you can check here to be sure: - compatibility with KSP-AVC Add-on Version Checker , i made it in my mods, so i can help you and send you some pull requests on github with everything if you like the idea. Source files : I bundled them before I made my github account, you're right no point to keep them in the download anymore. "Ec and mits" : I assume you talking about EC consumption of the lights ? Not something I wish to change for my use and I don't feel like it belongs to this mod. I see it like a simple light manager that don't change part. AVC : it is planned for next release. Thanks for the suggestions Link to comment Share on other sites More sharing options...
Skalou Posted December 12, 2016 Share Posted December 12, 2016 59 minutes ago, Li0n said: "Ec and mits" : I assume you talking about EC consumption of the lights ? No, it was a joke to say it will make the download lighter in data (Mo) Link to comment Share on other sites More sharing options...
Li0n Posted December 13, 2016 Author Share Posted December 13, 2016 (edited) v0.8 The MOAR Sun Light edition Nearby vessel's lights are now toggled when the sun rise/fall Lights are toggled when the craft reach a certain depth Small fixes, see download link for more info Grab it on SpaceDock or on GitHub With this update I think Crew Light's feature are complete, do you guys see any light related stuff I could add ? Edit : @Enceos thanks for the badge Edited December 13, 2016 by Li0n Link to comment Share on other sites More sharing options...
Li0n Posted December 14, 2016 Author Share Posted December 14, 2016 Just found a bug in the v0.8 with KIS, it happens when you remove or attach a container to a mount. The game keep working but the performance suffer. Probably an infinite loop, haven't dig in the code yet. If you got too bad fps : F5/F9 or turn "use_sun_light" to false in GameData/CrewLight/PluginData/Settings.cfg Link to comment Share on other sites More sharing options...
Li0n Posted December 23, 2016 Author Share Posted December 23, 2016 v0.9 The BETTER Sun Light edition Lights on Kerbal's helmet are now toggled as the sun rise/fall, can be tweaked in settings.cfg so lights are always on when in space or landed Better handling of the sunlight feature, mostly for building / modifying vessel with KIS Correct a typo in the .version file, KSP-AVC should now give the right link when a new version comes up Grab it on SpaceDock or on GitHub In this version I rewrote a good bunch of the code so please report any issues or inconsistencies. For the next version I plan on adding the ability for kerbals to switch lights when on EVA (almost three years of playing KSP and I just noticed I can't do that ) Enjoy Link to comment Share on other sites More sharing options...
Li0n Posted December 28, 2016 Author Share Posted December 28, 2016 v0.10 The EVA Light edition New Function : Kerbal on EVA can toggle light (only for non-crewable part) Now support Surface Light by @Why485, maintained by @IgorZ Landing gear/wheel 's light no longer respond to the sun rise / fall ModuleManager by @sarbian is now required for toggling light on EVA ModuleManager is bundled Grab it on SpaceDock or on GitHub If you have any suggestion about light *stuff* please share, and of course report to me any bug or UFI* * Unidentified Flying Insect Link to comment Share on other sites More sharing options...
wasml Posted December 28, 2016 Share Posted December 28, 2016 FYI: Went to update the settings in the new 0.10 settings.cfg and didn't find it - assumed this was an oversight and copied the 0.90 settings file. Thanks for sharing this mod. Link to comment Share on other sites More sharing options...
Li0n Posted December 29, 2016 Author Share Posted December 29, 2016 8 hours ago, wasml said: FYI: Went to update the settings in the new 0.10 settings.cfg and didn't find it - assumed this was an oversight and copied the 0.90 settings file. Thanks for sharing this mod. I don't include the settings.cfg, it's created when the game starts. The purpose being to merge the CrewLight folder of the download with the one in GameData without losing your settings. Link to comment Share on other sites More sharing options...
linuxgurugamer Posted December 29, 2016 Share Posted December 29, 2016 7 hours ago, Li0n said: I don't include the settings.cfg, it's created when the game starts. The purpose being to merge the CrewLight folder of the download with the one in GameData without losing your settings. If you like, I can generate a CKAN file for you. Let me know Link to comment Share on other sites More sharing options...
Li0n Posted December 29, 2016 Author Share Posted December 29, 2016 (edited) 6 minutes ago, linuxgurugamer said: If you like, I can generate a CKAN file for you. Let me know Thanks for the offer but I prefer to wait a little longer, continue testing, squashing bug with a hammer, all that... I consider it still a WIP project. Edited December 29, 2016 by Li0n Link to comment Share on other sites More sharing options...
linuxgurugamer Posted December 29, 2016 Share Posted December 29, 2016 Just now, Li0n said: Thanks for the offer but I prefer to wait a little longer, continue testing, squashing bug with a hammer, all that... I consider it still it a WIP project. Ok. Let me know, i have a script which does it quickly. Link to comment Share on other sites More sharing options...
Li0n Posted December 29, 2016 Author Share Posted December 29, 2016 Just now, linuxgurugamer said: Ok. Let me know, i have a script which does it quickly. Aaah.. that's why you were quicker than me on my other mod https://github.com/KSP-CKAN/NetKAN/pull/5033 Link to comment Share on other sites More sharing options...
Li0n Posted January 12, 2017 Author Share Posted January 12, 2017 I haven't find any issues so I post this mod in the release section : Thanks everyone for the help, I ask moderator to close this thread. Link to comment Share on other sites More sharing options...
Snark Posted January 12, 2017 Share Posted January 12, 2017 Locking per OP's request. Link to comment Share on other sites More sharing options...
Recommended Posts