Jump to content

[Minimum KSP: 1.12.2] Snacks! - Friendly, Simplified Life Support


Angel-125
 Share

Recommended Posts

On 6/3/2022 at 5:17 AM, Lithium-7 said:

I am using Snacks version 1.27.5, the latest version as of posting this.

I would have posted this to the Github, but there is no Issues section as far as I can tell, and I'm not experienced enough with Github to figure out how to post an issue in that situation, if it's even possible.

I'm getting the bug where the simulator caps out at 1 Year, 407 Days, 1 Hour, 27 Minutes, and 35.38 Seconds, no matter how many additional Snacks I add to the vessel- in the VAB and in space. Even below this threshold, adding a part with a Soil recycler(not an Ore processor, I know that's not considered) doesn't seem to affect the duration either, and nor does the level of my Engineers or even if one is present at all.

It's been reported multiple times in this thread over the past three or so years, and as of yet I haven't been able to find an answer as to why this is happening, a solution for the problem, or even any acknowledgement(to my knowledge) that the issue exists.

I thought it might be because the solution is obvious, or it's somehow intended functionality, but the image on the OP clearly shows the simulator predicting further than this, so that can't be it.

So therefore, I was scientific about this and made sure to make the most comprehensive, by-the-book bug report possible!

I've just confirmed that this occurs on a 100% fresh stock 1.12.3 install, after installing ONLY Snacks and Module Manager.

 

Steps to reproduce:

Open KSP 1.12.3.3173 with Snacks 1.27.5 and Module Manager 4.2.1 installed.

Create a new Sandbox save file named "Test".

Enter the save and select the Mk1 Pod, ensuring that there is 1 Kerbal inside, then attach the S-4500 Snack Tin to the top and play with the values. Past exactly 2449 Snacks(in the 2-4500 Snack Tin), the Snacks simulator will stop calculating durations higher than 1 Year, 407 Days, 1 Hour, 27 Minutes, and 35.38 Seconds exactly.

Adding a Hitchhiker part to the craft does not change the simulated duration according to its Soil recycler, even if the Snacks in both the Hitchhiker and the S-4500 Snack Tin are drained.

 

Player.log:

https://www.mediafire.com/file/7rc9wznamrr1fvl/Player.log/file

Normally I'd have used Pastebin, but this Player.log is 1.108 Mb, and you need a paid account on Pastebin to post anything larger than half that size.

Posting because I discovered the cause of this 'bug'. I haven't seen this described ANYWHERE, but in GameData/WildBlueIndustries/Snacks, there's a SimulatorSettings.cfg file. Again, there appears to be no documentation as to what these settings do as far as I can tell, but changing the maxSimulatorCycles value changes the maximum time duration that can be simulated. The default value of 5000 is why the simulator stops simming past 1 Year, 407 Days, 1 Hour, 27 Minutes, and 35.38 Seconds.

So if you want it to simulate further(why the Kraken wouldn't you), you need to increase this value. I have no idea why 5000 is the default; as this value ensures that the simulator will only be useful for calculating the duration of missions within Kerbin's SOI, and you're never gonna need more than, like, a couple months of snacks for that unless you plan on staying. The real big use of the simulator would come in for missions past Kerbin, but by default it cannot be used for this...

Link to comment
Share on other sites

Regarding my previous bug report, it seems that the bug also occurs the other way around: a background vessel not consuming snacks, while the loaded vessel operates as normal. I don't have the energy to move around all my mods, reinstall the game and try reproducing this particular variant, since I already isolated the bug to snacks in my previous report, but if it helps, I encountered this variation when launching a new mission to rescue a stranded kerbal orbiting the moon.  After launching the new vessel, the stranded vessel stopped consuming snacks, while the new vessel (and currently loaded one) performed nominally.

 

I have yet to see what happens with three or more vessels, but I will provide more information if anything new comes to light. I truly hope these problems are fixed, I spent a long time searching for alternative life support mods and decided I'd prefer Snacks to the rest even if it wasn't working properly.

Edit: Big news! I ended up performing some more tests with just Snacks, and they were legitimately fascinating. I made several simple vessels of landing cans, radial snack tins, and rtgs, and zipped them up into kerbin orbits using the cheat menu. Each time I added a vessel, I observed the effects in the snacks menu. What did I see? The bug seems dependent on whether the number of simulated vessels is even or odd. When I had one, three, five, or seven simulated vessels, every vessel performed nominally. When I had two, four, or six, exactly half of the vessels failed to consume snacks during mealtime. There seemed to be a pattern, too: I had numbered the vessels in their names, and I noticed by the time of testing 6 that every other vessel in the list was failing to eat, the ones I named One, Three, and Five.

@Angel-125 Assuming this isn't some esoteric quirk of my particular setup and is, in fact, a bug in the mod in general, I'd be incredibly interested in hearing the technical explanation behind it if you end up working it out. This strikes me as the kind of bug thats fun to talk about with nerds, since the causes are so bizarre.

As an unrelated side note, I observed that every time I opened the Snacks menu in a new scene, it exerted a permanent toll on the CPU usage of the game until closing and restarting it. Not an enormous issue since it only becomes a problem after opening it many times, but it certainly isn't great.

Edited by Vaskritaya
more information
Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...
On 3/28/2022 at 6:16 PM, Zelda said:

Snacks is nested in another folder in GameData - WildBlueIndustries. Taking a wild guess, but maybe MM can't see that folder since it's not directly in GameData and needs to depend on Snacks running a patch with :FOR[Snacks] to establish it is present. If that's the case, the problem may be that BetterScienceLabsContinued runs before Snacks does that. Maybe try changing this:
@PART[Large_Crewed_Lab]:NEEDS[Snacks]

@PART[Large_Crewed_Lab]:NEEDS[Snacks]

to this:

@PART[Large_Crewed_Lab]:AFTER[Snacks]:NEEDS[Snacks]

And see if that solves the problem? Again, this is a total shot in the dark, but it's easy to try.

Sorry, where do I go to find this? 

Link to comment
Share on other sites

23 hours ago, BrobDingnag said:

Sorry, where do I go to find this? 

Oh, I wouldn't worry about this change I suggested - it was a guess, and it was later pointed out that it wouldn't fix anything  anyway. However, the specific line I was referring to was here in the snacksexperiment.cfg file of BetterScienceLabsContinued:

https://github.com/linuxgurugamer/BetterScienceLabsContinued/blob/309bf23232dd7b7802da2f5d893ddcdc4939d1cb/GameData/BetterScienceLabsContinued/Resources/snackexperiment.cfg#L172

Link to comment
Share on other sites

  • 2 weeks later...

Hi! I have noticed in KSP 1.12.3 no Kerbal is taking any snacks on the road (EVA), for me they are only getting EVA Propellant. 1 snack is getting substracted properly from the part where the Kerbal sat in right after going EVA tho. Is this a known bug?

Edited by LatiMacciato
Link to comment
Share on other sites

  • 2 months later...
On 8/4/2022 at 3:34 PM, LatiMacciato said:

Hi! I have noticed in KSP 1.12.3 no Kerbal is taking any snacks on the road (EVA), for me they are only getting EVA Propellant. 1 snack is getting substracted properly from the part where the Kerbal sat in right after going EVA tho. Is this a known bug?

Not sure what that's all about, I'll have to investigate. I'm not seeing that on my end.

Meanwhile, here is a small compatibility update for Buffalo 2.

Link to comment
Share on other sites

So I have modified the Air config so that the cycle takes every 10 minutes instead of an hour. I have also set in simulator settings: secondsPerCycle = 600. When I test this I notice that the resources update only every hour not 10 minutes, though the right amount of resources for the hour are used. Is this intentional to update only every hour?

Link to comment
Share on other sites

I also think that the precondition CheckResource's checkAsPercentage flag isn't working. I have this:
 

SNACKS_EVENT
{
	name = CO2Poisoning
	eventCategory = categoryPostProcessCycle
	kerbalsAffected = affectsAllAssigned
	secondsBetweenChecks = 600
	
	PRECONDITION 
	{
		name = CheckResource 
		resourceName = StaleAir
		checkType = checkGreaterOrEqual 
		valueToCheck = 20
		checkAsPercentage = true
	}
	OUTCOME
	{
		name = FaintPenalty
		playerMessage = is suffering from CO2 poisoning! Quickly scrub the Stale Air!
	}
}

and test with a command module in orbit and as soon as the first StaleAir is generated it triggers. The vessel is only the command module and has a capacity of 1125 StaleAir. The first cycle produces 37 StaleAir which is more 20 but not more than 20% of the 1125.

Link to comment
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.

 Share

×
×
  • Create New...