Angel-125

[1.7.x] Snacks! - Friendly, Simplified Life Support

Recommended Posts

Snacks unfortunately still doesn't work for me, the game loads in, the snacks window appears, then disappears and snacks doesn't work as long as the vessel appears. This only seems to happen on my main save, and it really frustrates me that I may have to restart my entire save to use this mod.

Share this post


Link to post
Share on other sites
3 hours ago, Capt. Hunt said:

I'm with @bdew here, like it or not that's kind of a sledge hammer approach.  I'd rather not have the feature if that's the only way to do it, the potential for breaking other mods, or even stock features, is just too high.

Agreed. Again, one thing I really liked about this mod was how simple and fun it was. It worked with any other mods, seamlessly. Didn't require configuration or anything special, was simple, and added a fairly big new dimension to my mission planning.

While I enjoy optional features, I'd rather not have them if it means other mods will have to explicitly support this, or be changed to not conflict with this. Even having to code this to support other parts would be bad.

Share this post


Link to post
Share on other sites
27 minutes ago, AmpCat said:

Agreed. Again, one thing I really liked about this mod was how simple and fun it was. It worked with any other mods, seamlessly. Didn't require configuration or anything special, was simple, and added a fairly big new dimension to my mission planning.

While I enjoy optional features, I'd rather not have them if it means other mods will have to explicitly support this, or be changed to not conflict with this. Even having to code this to support other parts would be bad.

@Angel-125, maybe, if you're dead set on this feature, you could link the rename to the option button, so people don't have to edit your code to remove it?

Edited by Capt. Hunt

Share this post


Link to post
Share on other sites

I'm pretty sure (but not entirely sure) I remember @RoverDude mentioning on Reddit that there was an intent to make it possible for the communication net thing to be extended by RemoteTech. If that's the case, then maybe it's actually possible to hack extra restrictions on controls based on the snacks situation. Replacing ModuleCommand seems like a recipe for trouble, there's plenty of MM configs out there that look for it.

Share this post


Link to post
Share on other sites

Well, because this mod now modifies the default capsule, it broke Throttle Controlled Avionics.

Edited by Yoshidude

Share this post


Link to post
Share on other sites
24 minutes ago, Yoshidude said:

Well, because this mod now modifies the default capsule, it broke Throttle Controlled Avionics.

In Snacks/ModuleManagerPatches/MM_Base.cfg, comment out this code:

@MODULE[ModuleCommand]
	{
		@name = SnacksModuleCommand
		//debugMode = true
	}

 

Edited by Capt. Hunt

Share this post


Link to post
Share on other sites
3 minutes ago, Capt. Hunt said:

In ModuleManagerPatches/MM_Base.cfg, comment out this code:


@MODULE[ModuleCommand]
	{
		@name = SnacksModuleCommand
		//debugMode = true
	}

 

Ugh, I've had enough trouble with this mod. I'll just switch to USI. I want to like this mod, but I've had to fight it every step of the way to make it work.

Edited by Yoshidude

Share this post


Link to post
Share on other sites
33 minutes ago, Yoshidude said:

Ugh, I've had enough trouble with this mod. I'll just switch to USI. I want to like this mod, but I've had to fight it every step of the way to make it work.

Ummm... OK....

But you DO know that ownership of the mod WAS just handed over a few days ago?... AND that it needed some re-writing because of, 1.2 only being out a week and breaking every mod with a plugin?

I think Angel-125 has been made well aware that something new he tried is now causing issues for many other mods... no need for every one to get riled up...
 

Edited by Stone Blue

Share this post


Link to post
Share on other sites
51 minutes ago, Yoshidude said:

Ugh, I've had enough trouble with this mod. I'll just switch to USI. I want to like this mod, but I've had to fight it every step of the way to make it work.

Have fun.

Did some more testing and found out that for rescue contracts, kerbals are set to "Unowned" until rescued. I'm able to watch for that and skip vessels that have unowned crew. From my testing, I can see that Snacks is skipping said vessels.

For those who are sticking around, please keep in mind that Snacks Continued is pretty much a re-write of the original to 1) make it work in KSP 1.2 and 2) update it with more options. There's bound to be growing pains. Not to mention making the code base more maintainable.

Anyway, give 1.5.2 a try:

- Temporarily disabled the partial vessel control penalty. I'm researching an alternative way to make this work, KSP kind of locked down vessel control to just CommNet; it's not as moddable as you might think.
- Added additional checks for vessels created through rescue contracts; any crew listed as "Unowned" will be ignored.

Edited by Angel-125

Share this post


Link to post
Share on other sites
10 minutes ago, Stone Blue said:

Ummm... OK....

But you DO know that ownership of the mod WAS just handed over a few days ago?... AND that it needed some re-writing because of, 1.2 only being out a week and breaking every mod with a plugin?

I think Angel-125 has been made well aware that something new he tried is now causing issues for many other mods... no need for every one to get riled up...
 

I know, I know- it's just that I can't even get the mod to work. My snacks wont even deplete during missions, the window is broken, and now my favorite mods don't work with it. :(

Didn't mean to hurt anyone :blush:

Edited by Yoshidude

Share this post


Link to post
Share on other sites

Yup... Unfortunately, this seems to be one of the mods that got hit HARD with major changes in KSP... I was wondering how badly this KerbNet/ComNet thing would hammer mods...

This is also why i dont actually PLAY new major KSP updates, till theres two or three minor ones following, when new changes get figured out, and things settle down... So I usually hold back updating KSP for 2~3 months after a major update...

Share this post


Link to post
Share on other sites

Agreed, though I would general advise it's bad to have to modify parts from other mods for any reason. It's just asking for trouble. Either it'll break someone else's mod, or you'll have to constantly be maintaining it to support other mods properly.

I'm concerned I'm going to get into the problem where I pull in some older part mod and suddenly Snacks doesn't work right, or like in the case above, some mod I really use a lot breaks because of Snacks. 

Share this post


Link to post
Share on other sites

Sorry, missed that last line. Was distracted with dinner. Thanks Angel! You've put a lot of good work into this, I wasn't trying to be annoying. Keep it up!

Share this post


Link to post
Share on other sites

I just made a small radial recycler for this, using these values, does this seem kind of fair? (I'm using a model from another mod atm, I have no idea how to work on dds files else I'd make a simple change of the monoprop tank):
 

RecyclerCapacity = 1 (as opposed to 4 for the hitch-hiker)

INPUT_RESOURCE
        {
            ResourceName = ElectricCharge
            Ratio = 3
        }

RESOURCE
    {
        name = Soil
        amount = 0
        maxAmount = 40
    }

 

Share this post


Link to post
Share on other sites
45 minutes ago, Waxing_Kibbous said:

I just made a small radial recycler for this, using these values, does this seem kind of fair? (I'm using a model from another mod atm, I have no idea how to work on dds files else I'd make a simple change of the monoprop tank):
 


RecyclerCapacity = 1 (as opposed to 4 for the hitch-hiker)

INPUT_RESOURCE
        {
            ResourceName = ElectricCharge
            Ratio = 3
        }

RESOURCE
    {
        name = Soil
        amount = 0
        maxAmount = 40
    }

 

Might be easiest to take the existing config and divide the value by 4.

Share this post


Link to post
Share on other sites

Good news! I *think* have narrowed down my issue with snacks to something involving the command module. When I tried USI life support, the life support had the exact same issue as this one, except the life support worked just fine when I exited this pod. I am pretty sure no mod I use modifies ModuleCommand, but it makes me wonder what mod might do this. EDIT: Also, I noticed that in my save file it left traces of Snacks after I tried to uninstall it?

 

EDIT EDIT: Finally, after much grief, I have narrowed the issue down to AmpYear

Edited by Yoshidude

Share this post


Link to post
Share on other sites

I've been thinking about this, and the old-style snacks set-up had the plug-in and the various containers and other add-on parts from different sources, and so in different downloads. After some hassles I have had with other combined plug-in/part combinations as a single Mod, I am beginning to wonder if a common source handled as two Mods might be the best way forward. Or possibly a single download with two distinct folders under GameData?

Extra Snack storage should be simple. There are a good number of add-on storage parts which can easily have a snacks option. They don't have to have any fancy features.

If you like the old Whyren storage parts, they don't look that difficult to modify to suit KSP1.2

There are other things, usually involved generating Snacks, such as Whyren's old snackhouses, and the recyclers, which maybe need to be kept distinct.

I would like to keep a fairly simple version of Snacks, and have an expansion when you want to go beyond storage. Snacks has been the go-to Mod for simple life support, and I don't want to lose that.

 

But one thing does come to mind. A Kerbal may use the Snack stored with the seat he'd using. That's simple and obvious. What happens when you have other Snack storage, or you have a Snack generator? Could a Duna flight have a Snack and fuel stages that are jettisoned when empty? It probably needs to use something such as Ship Manifest to make sure the correct tanks are empty, but is there any particular order of use?

One of the things I have done with orbital stations is put a stack of 1.25m Snack tanks, with a docking port at each end. on the nose of a capsule. It docks with the Station Hub part. And when the capsule returned, maybe loaded down with science, it left that stack behind as a crew-tube/spacer.

I've seen crew tubes, and when things settle  in v1.2 I may take one and modify the config. Something a little like Whyren's SnackPLM but three times the length, Snack storage and some monopropellant, and maybe some KIS storage space. Crew space? Maybe, if total crew space were significant, maybe 2 crew spaces per Kerbal on long flights as a comfort optimum, but I am not sure that should matter for Snacks.

On the other hand, they'd give you more total snack storage, right?

They're testing inflatable habitat space in the real world. Maybe such a module could make snacks available, but only while it was inflated, to represent the good effects of extra comfort space.

I think my ideas are getting a little wild... But I reckon Snacks are an abstraction of a lot of life-support and crew-comfort elements of planning long spaceflights. I know there's a Mod which provides a flat-screen TV, I'm not sure what that is for. but if it was meant for crew-comfort. maybe it could do that as a low-rate snack-generator which in KerbNet contact. And the same for some of the bits and pieces with KIS. Yes, that guitar, but might that sometimes consume snacks?

Have you heard Jeb playing guitar?

Share this post


Link to post
Share on other sites
5 hours ago, Wolf Baginski said:

I've been thinking about this, and the old-style snacks set-up had the plug-in and the various containers and other add-on parts from different sources, and so in different downloads. After some hassles I have had with other combined plug-in/part combinations as a single Mod, I am beginning to wonder if a common source handled as two Mods might be the best way forward. Or possibly a single download with two distinct folders under GameData?

Extra Snack storage should be simple. There are a good number of add-on storage parts which can easily have a snacks option. They don't have to have any fancy features.

If you like the old Whyren storage parts, they don't look that difficult to modify to suit KSP1.2

There are other things, usually involved generating Snacks, such as Whyren's old snackhouses, and the recyclers, which maybe need to be kept distinct.

I would like to keep a fairly simple version of Snacks, and have an expansion when you want to go beyond storage. Snacks has been the go-to Mod for simple life support, and I don't want to lose that.

 

But one thing does come to mind. A Kerbal may use the Snack stored with the seat he'd using. That's simple and obvious. What happens when you have other Snack storage, or you have a Snack generator? Could a Duna flight have a Snack and fuel stages that are jettisoned when empty? It probably needs to use something such as Ship Manifest to make sure the correct tanks are empty, but is there any particular order of use?

One of the things I have done with orbital stations is put a stack of 1.25m Snack tanks, with a docking port at each end. on the nose of a capsule. It docks with the Station Hub part. And when the capsule returned, maybe loaded down with science, it left that stack behind as a crew-tube/spacer.

I've seen crew tubes, and when things settle  in v1.2 I may take one and modify the config. Something a little like Whyren's SnackPLM but three times the length, Snack storage and some monopropellant, and maybe some KIS storage space. Crew space? Maybe, if total crew space were significant, maybe 2 crew spaces per Kerbal on long flights as a comfort optimum, but I am not sure that should matter for Snacks.

On the other hand, they'd give you more total snack storage, right?

They're testing inflatable habitat space in the real world. Maybe such a module could make snacks available, but only while it was inflated, to represent the good effects of extra comfort space.

I think my ideas are getting a little wild... But I reckon Snacks are an abstraction of a lot of life-support and crew-comfort elements of planning long spaceflights. I know there's a Mod which provides a flat-screen TV, I'm not sure what that is for. but if it was meant for crew-comfort. maybe it could do that as a low-rate snack-generator which in KerbNet contact. And the same for some of the bits and pieces with KIS. Yes, that guitar, but might that sometimes consume snacks?

Have you heard Jeb playing guitar?

I'm trying to keep Snacks lightweight for both players and for maintainability. I'm also designing this rewrite to be very configurable in-game and modder friendly too. Having links on the front page to Snack addons is definitely possible, but I'd like to keep sources separate. Less for me to maintain that way. I do like playing KSP too, not just modding it... :)

The current functionality is about where it should be. You have Snacks stuffed into parts with crew capacity, a way to store Snacks in non-crewed parts, a way to stretch your supplies through recycling (with the option to turn it off if desired), and a way to produce snacks after launch. And with its configurable options, you can configure the mod to be just like the original, or make things more difficult. The only thing the base mod needs is an improved in-game trip planner similar to the included spreadsheet, and if I can make it work, re-introduce the partial-vessel control penalty.

Snack consumption happens vessel-wide as long as the resource isn't locked.

I left hooks in place to let you alter the snack consumption as it is being calculated, and you have access to the data telling you how many meals a kerbal missed (used for the fainting penalty). An interesting add-on to snacks might provide entertainment facilities that reduce your consumption rate. Another addition might implement a death penalty for kerbals that miss too many meals. That goes against my philosophy of not bricking your mission, but some people like that for hardcore mode.

Share this post


Link to post
Share on other sites

Been playing with snacks and a few others mod all the day long, having much fun. Snacks runs nice,as of now all the Kerbals got their mouths full. Thanks!!

 

Share this post


Link to post
Share on other sites
Spoiler

[EXC 01:55:51.600] NullReferenceException: Object reference not set to an instance of an object
    Snacks.SnackPenalties.Enabled (System.Reflection.MemberInfo member, .GameParameters parameters)
    DifficultyOptionsMenu+<CreateDifficultWindow>c__AnonStorey158.<>m__250 ()
    UnityEngine.Debug:LogException(Exception)
    <CreateDifficultWindow>c__AnonStorey158:<>m__250()
    DialogGUIBase:Update()
    DialogGUIToggle:Update()
    DialogGUIBase:Update()
    DialogGUIVerticalLayout:Update()
    DialogGUIBase:Update()
    DialogGUIVerticalLayout:Update()
    DialogGUIBase:Update()
    DialogGUIBase:Update()
    DialogGUIVerticalLayout:Update()
    DialogGUIBase:Update()
    MultiOptionDialog:Update()
    PopupDialog:Update()
[ERR 01:55:51.603] Error calling custom Enabled method in type Snacks.SnackPenalties:

Getting this error when i start a new Career (While still on the Difficulty Window)

and here is the Log (about 11mb i used Winrar to shrink the size), Hope it helps

https://www.dropbox.com/s/ay1gntuak3iftt4/KSP.rar?dl=0

Share this post


Link to post
Share on other sites
37 minutes ago, Angel-125 said:

Snacks 1.5.3 should help:

- When kerbals go EVA, they take one day's worth of snacks with them.
- More code cleanup.
- Bug Fixes

Thx works like a charm! :) keep up the great work, and thx for taking the time for doing this! by far the best mod (at least for my personal taste) :)

Share this post


Link to post
Share on other sites
Spoiler

[ERR 01:33:57.136] Error calling custom SetDifficultyPreset method in type [Snacks.SnacksProperties, Snacks.SnacksProperties]:

[EXC 01:33:57.139] NotImplementedException: The requested feature is not implemented.
    Snacks.SnacksProperties.SetDifficultyPreset (Preset preset)
    GameParameters.GetDefaultParameters (Modes mode, Preset p)
    UnityEngine.Debug:LogException(Exception)
    GameParameters:GetDefaultParameters(Modes, Preset)
    MainMenu:Start()

Here is another one, only happens once when the game is loading (main menu not a save file/game) after that i was playing the game could not see anything wrong.

Edited by dtoxic

Share this post


Link to post
Share on other sites
5 hours ago, Angel-125 said:

Snacks 1.5.3 should help:

- When kerbals go EVA, they take one day's worth of snacks with them.
- More code cleanup.
- Bug Fixes

cool!  A full days worth of snacks might be a little OP though, unless you fixed the bug where an EVAed astronaut's snacks are not subtracted from the mothership when they leave.  I foresee an exploit where you could set Meals Per Day to maximum and use EVAs to replenish your food supply just by sending them outside and then back in.

Since we have options for meals per day and also snacks per meal, maybe an EVAed kerbal should only carry 1 meal's worth of snacks, rather then a full day's ration.  How often are they going to be outside for an entire day anyway?

Share this post


Link to post
Share on other sites

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.