Angelo Kerman Posted November 9, 2016 Author Share Posted November 9, 2016 4 hours ago, linuxgurugamer said: @Angel-125 I'm working on updating Dang It!, and a tester is having a problem with Snacks. So, before I start digging, I saw that on SpaceDock, the version seems to be for 1.2 (unless you just forgot to update Spacedock), and the last version was released on 11/2 So, do you have a 1.2.1 version available? Almost, I'm testing some fixes. Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted November 9, 2016 Share Posted November 9, 2016 1 hour ago, Angel-125 said: Almost, I'm testing some fixes. OK. If you can, please ping me when you get it released. Thanks Quote Link to comment Share on other sites More sharing options...
Angelo Kerman Posted November 9, 2016 Author Share Posted November 9, 2016 3 hours ago, linuxgurugamer said: OK. If you can, please ping me when you get it released. Thanks Done, get Snacks 1.5.6 here. - Fixed NRE's that happen in the editor (VAB/SPH) - Snacking frequency is correctly calculated now. - Updated to KSP 1.2.1 - Added recyclers to the Mk3 shuttle cockpit and the Mk2 crew cabin. Quote Link to comment Share on other sites More sharing options...
LatiMacciato Posted November 10, 2016 Share Posted November 10, 2016 (edited) love the update on the new recyclers!! Mind I ask, is it ok if I create another additional cfg file named "additionalRecyclers.cfg" in the ./Snacks/ModuleManagerPatches/ModSupport folder, so that it applies additional recycler abilities on modded and/or other parts i wish to have that feature? i.e. utilityCabin/PPD-24 Itinerant Service Container from NearFutureSpacecraft would have the line @PART[utilityCabin]:NEEDS[NearFutureSpacecraft] instead of (or add "utilityCabin" to) @PART[crewCabin,mk3Cockpit_Shuttle,mk2CrewCabin] but the section below copy/pasted from the last segment of the "MM_Stock.cfg" additional thinking: Spoiler I have created a folder called ./Snacks/ModuleManagerPatches/ModSupport, added a config there called "NearFutureSpacecraft.cfg" (or w/e mod is wishing to get supported, IF planned or else) this way i might get that sorted if thats not just this one part of this mod or different mods. My question still remains and I'm yet convinced those recycler abilities should just be added on mod parts that are eligable for that feature .. or better said, that have the capability ty in advance Edited November 10, 2016 by LatiMacciato Quote Link to comment Share on other sites More sharing options...
Angelo Kerman Posted November 10, 2016 Author Share Posted November 10, 2016 41 minutes ago, LatiMacciato said: love the update on the new recyclers!! Mind I ask, is it ok if I create another additional cfg file named "additionalRecyclers.cfg" in the ./ModuleManagerPatches folder, so that it applies additional recycler abilities on modded and/or other parts i wish to have that feature? i.e. utilityCabin/PPD-24 Itinerant Service Container from NearFutureSpacecraft would have the line @PART[utilityCabin]:NEEDS[NearFutureSpacecraft] instead of (or add "utilityCabin" to) @PART[crewCabin,mk3Cockpit_Shuttle,mk2CrewCabin] ty in advance Absolutely! Knock yourself out. Snacks is designed to be moddable, so by all means, make extra patches. :) Quote Link to comment Share on other sites More sharing options...
LatiMacciato Posted November 10, 2016 Share Posted November 10, 2016 (edited) I have added utilityCabin and the 2 greenhouses from KBPS so far (1 module, 1 container) NearFutureSpacecraft.cfg: (400 snacks/100 soil, 10 ec) Spoiler @PART[utilityCabin]:NEEDS[NearFutureSpacecraft] { //This is calibrated for 4 kerbals at 100% efficiency //when they consume 1 snack per meal and 1 meal per day. For your custom recycler, //Take into account the number of kerbals it should support along with the meals and snacks. //In game, the player can adjust the efficiency of the recycler from 10% to 100%. MODULE { name = SoilRecycler ConverterName = Soil Recycler StartActionName = Start Soil Recycler StopActionName = Stop Soil Recycler AutoShutdown = false GeneratesHeat = false UseSpecialistBonus = true SpecialistEfficiencyFactor = 0.2 UseSpecializationBonus = true SpecialistEfficiencyFactor = 0.1 ExperienceEffect = ScienceSkill EfficiencyBonus = 1.0 RecyclerCapacity = 4 INPUT_RESOURCE { ResourceName = Soil Ratio = 0.0002 FlowMode = ALL_VESSEL } INPUT_RESOURCE { ResourceName = ElectricCharge Ratio = 10 } OUTPUT_RESOURCE { ResourceName = Snacks Ratio = 0.0002 DumpExcess = false FlowMode = ALL_VESSEL } } RESOURCE { name = Soil amount = 0 maxAmount = 100 } } PlanetaryBaseInc.cfg (greenhouse has also 400 snacks/100 soil, same ec, but the container doesn't have any storage for snacks/soil and converts in half ratio/just 5 ec) Spoiler @PART[KKAOSS_Greenhouse_g]:NEEDS[PlanetaryBaseInc] { //This is calibrated for 4 kerbals at 100% efficiency //when they consume 1 snack per meal and 1 meal per day. For your custom recycler, //Take into account the number of kerbals it should support along with the meals and snacks. //In game, the player can adjust the efficiency of the recycler from 10% to 100%. MODULE { name = SoilRecycler ConverterName = Soil Recycler StartActionName = Start Soil Recycler StopActionName = Stop Soil Recycler AutoShutdown = false GeneratesHeat = false UseSpecialistBonus = true SpecialistEfficiencyFactor = 0.2 UseSpecializationBonus = true SpecialistEfficiencyFactor = 0.1 ExperienceEffect = ScienceSkill EfficiencyBonus = 1.0 RecyclerCapacity = 4 INPUT_RESOURCE { ResourceName = Soil Ratio = 0.0002 FlowMode = ALL_VESSEL } INPUT_RESOURCE { ResourceName = ElectricCharge Ratio = 10 } OUTPUT_RESOURCE { ResourceName = Snacks Ratio = 0.0002 DumpExcess = false FlowMode = ALL_VESSEL } } RESOURCE { name = Soil amount = 0 maxAmount = 100 } } @PART[KKAOSS_LS_container_greenhouse]:NEEDS[PlanetaryBaseInc] { //This is calibrated for 4 kerbals at 100% efficiency //when they consume 1 snack per meal and 1 meal per day. For your custom recycler, //Take into account the number of kerbals it should support along with the meals and snacks. //In game, the player can adjust the efficiency of the recycler from 10% to 100%. MODULE { name = SoilRecycler ConverterName = Soil Recycler StartActionName = Start Soil Recycler StopActionName = Stop Soil Recycler AutoShutdown = false GeneratesHeat = false UseSpecialistBonus = true SpecialistEfficiencyFactor = 0.2 UseSpecializationBonus = true SpecialistEfficiencyFactor = 0.1 ExperienceEffect = ScienceSkill EfficiencyBonus = 1.0 RecyclerCapacity = 4 INPUT_RESOURCE { ResourceName = Soil Ratio = 0.0001 FlowMode = ALL_VESSEL } INPUT_RESOURCE { ResourceName = ElectricCharge Ratio = 5 } OUTPUT_RESOURCE { ResourceName = Snacks Ratio = 0.0001 DumpExcess = false FlowMode = ALL_VESSEL } } } just saved that 2 files, wish me luck, hehe EDIT: works flawlessly! ty again for that feature heres my XKOM.cfg: (300 snacks/75 soil, 10 ec regular rate) Spoiler @PART[SkyRangerFuselage]:NEEDS[XKOM] { //This is calibrated for 4 kerbals at 100% efficiency //when they consume 1 snack per meal and 1 meal per day. For your custom recycler, //Take into account the number of kerbals it should support along with the meals and snacks. //In game, the player can adjust the efficiency of the recycler from 10% to 100%. MODULE { name = SoilRecycler ConverterName = Soil Recycler StartActionName = Start Soil Recycler StopActionName = Stop Soil Recycler AutoShutdown = false GeneratesHeat = false UseSpecialistBonus = true SpecialistEfficiencyFactor = 0.2 UseSpecializationBonus = true SpecialistEfficiencyFactor = 0.1 ExperienceEffect = ScienceSkill EfficiencyBonus = 1.0 RecyclerCapacity = 4 INPUT_RESOURCE { ResourceName = Soil Ratio = 0.0002 FlowMode = ALL_VESSEL } INPUT_RESOURCE { ResourceName = ElectricCharge Ratio = 10 } OUTPUT_RESOURCE { ResourceName = Snacks Ratio = 0.0002 DumpExcess = false FlowMode = ALL_VESSEL } } RESOURCE { name = Soil amount = 0 maxAmount = 75 } } EDIT2: yes i noticed the snack/soil balance on the hitchy .. its 1 soil per 4 snacks .. corrected, now its as its originally purposed Edited November 10, 2016 by LatiMacciato Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted November 10, 2016 Share Posted November 10, 2016 (edited) @Angel-125 DangIt! uses the following code to get a list of all the resources in a part: leakables = new List<PartResource>(); But it doesn't seem to get the snacks which are controlled by the SnacksResourceSwitcher Any ideas? I just looked at the code, and I think I might know what's going on. DangIt gets the list early, probably before Snacks! has updated the partlist I'll have to think about this, not sure yet how to fix Edited November 10, 2016 by linuxgurugamer Quote Link to comment Share on other sites More sharing options...
Angelo Kerman Posted November 10, 2016 Author Share Posted November 10, 2016 1 hour ago, linuxgurugamer said: @Angel-125 DangIt! uses the following code to get a list of all the resources in a part: leakables = new List<PartResource>(); But it doesn't seem to get the snacks which are controlled by the SnacksResourceSwitcher Any ideas? I just looked at the code, and I think I might know what's going on. DangIt gets the list early, probably before Snacks! has updated the partlist I'll have to think about this, not sure yet how to fix Hm. Can you get to the SnacksResourceSwitcher? Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted November 10, 2016 Share Posted November 10, 2016 1 hour ago, Angel-125 said: Hm. Can you get to the SnacksResourceSwitcher? Not without using Reflection. But, I have some ideas, I'm going to try them this evening. If it works, I may send you a PR on Github Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted November 11, 2016 Share Posted November 11, 2016 10 hours ago, linuxgurugamer said: Not without using Reflection. But, I have some ideas, I'm going to try them this evening. If it works, I may send you a PR on Github I found the problem, it was becuase the basic part didn't have any resources the way a tank did, so the MM patch for tanks wasn't working on it. I'm adding a MM patch for any part which contains: SnacksResourceSwitcher Quote Link to comment Share on other sites More sharing options...
bounty123 Posted November 12, 2016 Share Posted November 12, 2016 (edited) I'm having a minor issue with the latest version (1.5.6), Snack Supply check window is showing indefinite duration for all vessels. Snack and crew amount is fine. Only exception is when I'm controlling a vessel, for that it shows the right estimated time, but after exiting to KSC, goes back to indefinite. Anyone else experiencing this? Running KSP 1.2.1 64 bit. Also, there is no Snacks button in Tracking Station, could you enable it please? I can still switch it on in KSC and switch to TS, but a separate button would be convenient. Edited November 12, 2016 by bounty123 Quote Link to comment Share on other sites More sharing options...
Wyzard Posted November 13, 2016 Share Posted November 13, 2016 6 hours ago, bounty123 said: I'm having a minor issue with the latest version (1.5.6), Snack Supply check window is showing indefinite duration for all vessels. Snack and crew amount is fine. Only exception is when I'm controlling a vessel, for that it shows the right estimated time, but after exiting to KSC, goes back to indefinite. Anyone else experiencing this? Running KSP 1.2.1 64 bit. Running KSP 1.2.1 64-bit and Snacks 1.5.6 in Linux, the supply window shows correct times for me at KSC. On a related note, though, I notice that it says "indefinite" in the VAB when the craft has zero snacks aboard. I don't know whether that's a code bug, or an intentional message using an inaccurate word. (Strictly speaking, "indefinite" just means that the duration can't be determined, but in common usage it means "no end in sight", i.e. unlimited snacks.) Quote Link to comment Share on other sites More sharing options...
bounty123 Posted November 13, 2016 Share Posted November 13, 2016 4 hours ago, Wyzard said: Running KSP 1.2.1 64-bit and Snacks 1.5.6 in Linux, the supply window shows correct times for me at KSC. I investigated a bit, and it must be something save-related, because it works fine with a new save. I wonder how could I fix it. Quote Link to comment Share on other sites More sharing options...
Geschosskopf Posted November 13, 2016 Share Posted November 13, 2016 @Angel-125: I like what you've done with Snacks! here, solving the 2 main issues with the original version: lack of extra storage and lack of recyclers. I'll give this a try. Thanks. Quote Link to comment Share on other sites More sharing options...
Angelo Kerman Posted November 13, 2016 Author Share Posted November 13, 2016 8 hours ago, bounty123 said: I investigated a bit, and it must be something save-related, because it works fine with a new save. I wonder how could I fix it. Not sure. One scenario I tested was dropping Snacks into an existing save, including one with active rescue contracts. I'll look into adding a Snacks button into the Tracking Station window; depends upon whether the game supports that. 2 hours ago, Geschosskopf said: @Angel-125: I like what you've done with Snacks! here, solving the 2 main issues with the original version: lack of extra storage and lack of recyclers. I'll give this a try. Thanks. Glad you like the changes. The third issue it had, a messy code base, is also in progress. I also like that none of the penalties will brick your mission, just like losing comms won't necessarily brick your mission. And should you uninstall Snacks, doing so won't brick your save. And, I've left hooks in place so that Snacks can be modded. Say, for instance, you want the death penalty, radiation effects, and to track habitation time. These features don't really belong in the core mod but could be added as an additional plugin. Quote Link to comment Share on other sites More sharing options...
bounty123 Posted November 13, 2016 Share Posted November 13, 2016 (edited) On 11/13/2016 at 6:16 PM, Angel-125 said: Not sure. One scenario I tested was dropping Snacks into an existing save, including one with active rescue contracts. Update: calculation changes from indefinite to right amount, if I disable recyclers Update2: I think I managed to find the bug in the code. In SnackSnapshot.cs, in case of not loaded vessels with recyclers, the snackConsumption reduction code runs at the wrong stage, multiple times for every protopart, so snackConsumption becomes negative. If I move it outside of the "foreach (ProtoPartSnapshot pps in pv.protoPartSnapshots)" loop, the consumption value becomes correct and the same as in case of loaded vessels, which worked fine. Edited November 16, 2016 by bounty123 Quote Link to comment Share on other sites More sharing options...
Angelo Kerman Posted November 16, 2016 Author Share Posted November 16, 2016 On 11/13/2016 at 11:47 AM, bounty123 said: Update: calculation changes from indefinite to right amount, if I disable recyclers Update2: I think I managed to find the bug in the code. In SnackSnapshot.cs, in case of not loaded vessels with recyclers, the snackConsumption reduction code runs at the wrong stage, multiple times for every protopart, so snackConsumption becomes negative. If I move it outside of the "foreach (ProtoPartSnapshot pps in pv.protoPartSnapshots)" loop, the consumption value becomes correct and the same as in case of loaded vessels, which worked fine. Awesome. Can you create a pull request? Quote Link to comment Share on other sites More sharing options...
bounty123 Posted November 16, 2016 Share Posted November 16, 2016 1 hour ago, Angel-125 said: Awesome. Can you create a pull request? Ok I'll try tomorrow, it's about time I figure out how to do it. Snacks already made me learn how to debug and compile a ksp addon, that's how much I like it Quote Link to comment Share on other sites More sharing options...
bounty123 Posted November 17, 2016 Share Posted November 17, 2016 (edited) Sent a pull request with the duration display fix. Also for some minor cosmetic changes to the Supply window if you agree, I found it a bit hard to distinguish between vessels as it was, especially when you have many vessels around the same body. Before - after screenshot. Edited November 17, 2016 by bounty123 Quote Link to comment Share on other sites More sharing options...
Angelo Kerman Posted November 18, 2016 Author Share Posted November 18, 2016 On 11/17/2016 at 2:42 AM, bounty123 said: Sent a pull request with the duration display fix. Also for some minor cosmetic changes to the Supply window if you agree, I found it a bit hard to distinguish between vessels as it was, especially when you have many vessels around the same body. Before - after screenshot. Much appreciated, thanks. Here is 1.5.7 with your changes. Quote Link to comment Share on other sites More sharing options...
dtoxic Posted November 18, 2016 Share Posted November 18, 2016 @Angel-125 wanted to ask,is there a possibility to set the settings so that when Kerbals Faint,they stay in that status until you provide more Snacks? If no, is there a possibility to add this Feature in the next release? Quote Link to comment Share on other sites More sharing options...
Angelo Kerman Posted November 19, 2016 Author Share Posted November 19, 2016 55 minutes ago, dtoxic said: @Angel-125 wanted to ask,is there a possibility to set the settings so that when Kerbals Faint,they stay in that status until you provide more Snacks? If no, is there a possibility to add this Feature in the next release? At present no, but you could set the faint duration to maximum. Whenever the next snack time is, they'll faint again. Quote Link to comment Share on other sites More sharing options...
dtoxic Posted November 19, 2016 Share Posted November 19, 2016 5 minutes ago, Angel-125 said: At present no, but you could set the faint duration to maximum. Whenever the next snack time is, they'll faint again. Ok, thx for the info Quote Link to comment Share on other sites More sharing options...
sardia Posted November 20, 2016 Share Posted November 20, 2016 Is anyone having the issue where the kerbal EVAs, and then immediately becomes disabled on your ladder due to lack of snacks? Maybe make it so that kerbals can go a few hours before fainting from lack of snacks? Quote Link to comment Share on other sites More sharing options...
dtoxic Posted November 20, 2016 Share Posted November 20, 2016 21 minutes ago, sardia said: Is anyone having the issue where the kerbal EVAs, and then immediately becomes disabled on your ladder due to lack of snacks? Maybe make it so that kerbals can go a few hours before fainting from lack of snacks? you have the settings so you can adjust that,personally i have not experienced that. make sure you got the latest version Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.