Jump to content

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


Angelo Kerman

Recommended Posts

Tutorial for making new resources to track is now live.

@klyith It looks like if you close and reopen the Part Action Window, the correct resources are displayed. Meantime I can see if I can get the display to update properly while the PAW is open.

Here is the 1.20.1 update to support the tutorial.

Edited by Angel-125
Link to comment
Share on other sites

2 hours ago, Angel-125 said:

Tutorial for making new resources to track is now live.

@klyith It looks like if you close and reopen the Part Action Window, the correct resources are displayed. Meantime I can see if I can get the display to update properly while the PAW is open.

Here is the 1.20.1 update to support the tutorial.

Check out SimpleFuelSwitch’s code. It fixed the PAW problem for SFS recently. 

Link to comment
Share on other sites

Hi, it seems that resources are continuously added in an infinite loop to parts with symmetric parts. Can be recreated by using a radial attachment point with symmetry, attaching any ModuleCommand with symmetry to it, then right clicking the placed ModuleCommand part in attempt to tweak it. The tweakable window fails to render correctly and the game starts to lag. Right clicking the other symmetric parts doesn't show the Snacks resource.  Makes designing space stations with symmetric pods difficult :(

Link to comment
Share on other sites

==== BUG REPORT ====
KSP: 1.7.3.2594
MH: 1.7.1
BG: 1.2.0
Snacks: 1.20.2

Symptom Description:
Adding any of the Payload parts causes a NRE and will not load.

Log:

Spoiler

[LOG 09:31:50.734] [HighLogic]: =========================== Scene Change : From SPACECENTER to FLIGHT (Async) =====================
[LOG 09:31:51.081] [UIApp] OnDestroy: KSPedia
[LOG 09:31:51.081] ScaleModList: listSize 41 maxListSize 1590
[LOG 09:31:51.190] [AddonLoader]: Instantiating addon 'SnackApp' from assembly 'SnacksUtils'
[LOG 09:31:51.193] [PlanetariumCamera]: Focus: Kerbin
[LOG 09:31:51.194] [UIMasterController]: HideUI
[LOG 09:31:52.002] UICanvasPrefabSpawner FlightUI spawning Flight
[LOG 09:31:52.025] UICanvasPrefabSpawner FlightUI spawning VesselLabels
[LOG 09:31:52.025] [UiApp] Awake: ResourceDisplay
[LOG 09:31:52.123] [AddonLoader]: Instantiating addon 'AeroGUI' from assembly 'KSP'
[LOG 09:31:52.124] [AddonLoader]: Instantiating addon 'SnackApp' from assembly 'SnacksUtils'
[LOG 09:31:52.127] [PlanetariumCamera]: Focus: Kerbin
[LOG 09:31:52.127] [UIMasterController]: HideUI
[LOG 09:31:52.400] [UIMasterController]: HideUI
[LOG 09:31:52.400] ------------------- initializing flight mode... ------------------
[LOG 09:31:52.405] [MessageSystem] Save Messages
[LOG 09:31:52.407] Loading Depletion Nodes
[LOG 09:31:52.407] DepNodeCount:  0
[LOG 09:31:52.407] Loading Biome Nodes
[LOG 09:31:52.407] BiomeNodeCount:  0
[LOG 09:31:52.407] Loading Planet Nodes
[LOG 09:31:52.407] PlanetNodeCount:  0
[LOG 09:31:52.408] [ScenarioDestructibles]: Loading... 0 objects registered
[LOG 09:31:52.424] Loading ship from file: G:\Steam\steamapps\common\Kerbal Space Program\saves\BUG\Ships\VAB\Bugged.craft
[LOG 09:31:52.424] [UIMasterController]: HideUI
[EXC 09:31:52.433] NullReferenceException: Object reference not set to an instance of an object
	Snacks.SnacksResourceSwitcher.LoadOptionResources (Boolean updateSymmetryParts)
	Snacks.SnacksResourceSwitcher.OnAwake ()
	PartModule.Awake ()
	UnityEngine.GameObject:SetActive(Boolean)
	ShipConstruct:LoadShip(ConfigNode, UInt32, Boolean, String&)
	ShipConstruct:LoadShip(ConfigNode, UInt32)
	ShipConstruct:LoadShip(ConfigNode)
	ShipConstruction:LoadShip(String)
	FlightDriver:setStartupNewVessel()
	FlightDriver:Start()
[LOG 09:31:52.434] Bugged loaded!
[EXC 09:31:54.552] NullReferenceException: Object reference not set to an instance of an object
	PartModule.get_HasAdjusters ()
	PartModule.Save (.ConfigNode node)
	ShipConstruct.SaveShip ()
	ShipConstruction.CreateBackup (.ShipConstruct ship)
	FlightDriver.setStartupNewVessel ()
	UnityEngine.Debug:LogException(Exception)
	FlightDriver:setStartupNewVessel()
	FlightDriver:Start()
[LOG 09:31:54.554] [UIMasterController]: HideUI
[LOG 09:31:54.556] [HighLogic]: =========================== Scene Change : From FLIGHT to SPACECENTER (Async) =====================
[LOG 09:31:54.613] all systems started
[EXC 09:31:54.615] NullReferenceException: Object reference not set to an instance of an object
	ManeuverNodeEditorTabOrbitBasic.UpdateUIElements ()
	ManeuverNodeEditorTabOrbitBasic.SetInitialValues ()
	ManeuverNodeEditorTab.Setup (UnityEngine.Transform parent)
	ManeuverNodeEditorManager.setupAllTabs ()
	ManeuverNodeEditorManager.Start ()
[ERR 09:31:54.617] Module SnacksResourceSwitcher threw during OnStartFinished: System.NullReferenceException: Object reference not set to an instance of an object
  at PartModule.ApplyAdjustersOnStart () [0x00000] in <filename unknown>:0 
  at Part.ModulesOnStartFinished () [0x00000] in <filename unknown>:0 

 

Steps to reproduce:

  1. Start new sandbox game
  2. Enter VAB
  3. Add MK1 Command Pod
  4. Attach S-500 Snack Tin to bottom of pod (or any of the Payload parts)
  5. Rename craft and/or save craft (both optional)
  6. Launch craft
Edited by Red3Tango
Link to comment
Share on other sites

I hate to add any salt to this -
I updated to a 1.7.2 save and when I undocked from a station, the ship and the station spun away from each other and I couldn't control either.

When I went back to the previous snacks, all was back as it should.  Let me know if there is anything that I can do to help?

Link to comment
Share on other sites

I'll have time early this week to look at these issues. @gamerscircle Do you have more information on your situation, such as what resource mods (CRP, Classic Stock Resources) you have installed, what parts did you have on the ship and station that spun away, and ideally, logs that show what happened?

Link to comment
Share on other sites

2 hours ago, Angel-125 said:

I'll have time early this week to look at these issues. @gamerscircle Do you have more information on your situation, such as what resource mods (CRP, Classic Stock Resources) you have installed, what parts did you have on the ship and station that spun away, and ideally, logs that show what happened?

I am not running KSP right now... but I had the small radial snacks on two ships that were docked to the station.

The station had one of the larger tanks connected as a module.  [the station is setup has separate habs, MPL, etc.]  I am all stock for parts with the exception of Snacks, KER, MJ, Indicator lights.  I had no other resource mods installed.  I just recently swapped out TAC LS for Snacks, but I removed all the parts from the station before installing snacks. 

I made sure, by backing up the same, and loading it after removing TAC LS..  There was no errors on the station, so I am assuming it was clean?

Link to comment
Share on other sites

53 minutes ago, gamerscircle said:

I am not running KSP right now... but I had the small radial snacks on two ships that were docked to the station.

The station had one of the larger tanks connected as a module.  [the station is setup has separate habs, MPL, etc.]  I am all stock for parts with the exception of Snacks, KER, MJ, Indicator lights.  I had no other resource mods installed.  I just recently swapped out TAC LS for Snacks, but I removed all the parts from the station before installing snacks. 

I made sure, by backing up the same, and loading it after removing TAC LS..  There was no errors on the station, so I am assuming it was clean?

Yes, it should have been clean. What version of Snacks is running correctly for you? Did you enable the optional Air and/or Stress configs? You would have had to rename the two files in the LifeSupportResources folder.

Link to comment
Share on other sites

I'm also having issues with the dedicated snack containers like Red3Tango. They work fine with Snacks 1.16.4, but not with Snacks 1.20.2.

Any vessel in flight from previous Snacks version can be switched to, but then I'm unable to Save, switch to another vessel via map, return to space center/tracking station, or exit the game. An Alt-F4 is required.

Trying to launch a vessel from the VAB fails and ends up at the main space center view.

Removing the snack containers or downgrading back to 1.16.4 allows the vessels to work normally.

KSP 1.7.3.2594
Making History 1.7.1
Breaking Ground 1.2.0
Snacks 1.20.2
Module Manager 4.0.2

KSP logs. One for trying to Fly an already launched vessel, one for trying to launch a new vessel:

https://www.dropbox.com/s/b78x8us4cjibc81/KSP_1_7_3-Snacks_1_20_2.zip?dl=0

Link to comment
Share on other sites

3 minutes ago, OncaLupe said:

I'm also having issues with the dedicated snack containers like Red3Tango. They work fine with Snacks 1.16.4, but not with Snacks 1.20.2.

Any vessel in flight from previous Snacks version can be switched to, but then I'm unable to Save, switch to another vessel via map, return to space center/tracking station, or exit the game. An Alt-F4 is required.

Trying to launch a vessel from the VAB fails and ends up at the main space center view.

Removing the snack containers or downgrading back to 1.16.4 allows the vessels to work normally.

KSP 1.7.3.2594
Making History 1.7.1
Breaking Ground 1.2.0
Snacks 1.20.2
Module Manager 4.0.2

KSP logs. One for trying to Fly an already launched vessel, one for trying to launch a new vessel:

https://www.dropbox.com/s/b78x8us4cjibc81/KSP_1_7_3-Snacks_1_20_2.zip?dl=0

See above, it's the PAW fix that went into 1.20.2.

Link to comment
Share on other sites

On 6/5/2019 at 12:49 PM, Angel-125 said:

Ok, I have created a similar vessel to yours and observe that at 10,000x time warp:

delta time is 200

input efficiency is 19.8 (specialty base is 0.05, efficiency bonus is 0.1, crew rank is 5, recycler supports 4, 1 snack per meal, 3 snacks per day)

Base EC input is 3

Base EC input * input efficiency * delta time = 3 * 19.8 * 200 = 11880

Based on these numbers, you don't have enough Electric Charge aboard to handle the 10,000x time warp.

This is a bit late, but from my understanding, would it be correct to say this isn't a problem with snack use rising non-linearly with time-warp, but with the EC calculations being tied to delta-time?

Link to comment
Share on other sites

5 hours ago, Bartybum said:

This is a bit late, but from my understanding, would it be correct to say this isn't a problem with snack use rising non-linearly with time-warp, but with the EC calculations being tied to delta-time?

Correct. If you are going to use high timewarp, make sure that your vessels have enough E.C. to handle it.

Link to comment
Share on other sites

Is There a way to check if a resource is a percentage full on a vessel. E.g. if the vessel has space for 1000 units of stuff then i want to trigger an event when it's at or over 50% i.e. 500-1000 units.

Edited by Lach_01298
Link to comment
Share on other sites

On 7/16/2019 at 4:15 PM, Angel-125 said:

Correct. If you are going to use high timewarp, make sure that your vessels have enough E.C. to handle it.

Or use Nertea’s Dynamic Battery Storage mod to work around stock’s EC system quirks. 

Link to comment
Share on other sites

Also is there a way to disable Snacks? That is the resource and kerbals need for it. This is so i can replace it with another resource.

I ask this because it looks like the snacks SNACKS_RESOURCE_PROCESSOR is hard coded as opposed to defined in the Snacks.cfg.

Link to comment
Share on other sites

When you change how many Snacks are on a vessel in the VAB, it makes the resource window blank (showing how many days/hours) until you reload the craft. Hitting the "Rerun Simulation" button does nothing.

May be a design decision, but when you have death enabled, crafts will report 1 hour continuously until the craft is active.

Link to comment
Share on other sites

14 hours ago, Lach_01298 said:

Also is there a way to disable Snacks? That is the resource and kerbals need for it. This is so i can replace it with another resource.

I ask this because it looks like the snacks SNACKS_RESOURCE_PROCESSOR is hard coded as opposed to defined in the Snacks.cfg.

I can add a checkAsPercentage flag to the CheckResource precondition in the next update.

On 7/20/2019 at 1:00 AM, Lach_01298 said:

Is There a way to check if a resource is a percentage full on a vessel. E.g. if the vessel has space for 1000 units of stuff then i want to trigger an event when it's at or over 50% i.e. 500-1000 units.

It's Snacks, so the Snacks resource is hard coded. But you can comment out the SNACKS_PART_RESOURCE and SNACKS_EVA_RESOURCE found in LifeSupportResources/Snacks.cfg to prevent vessels from being stocked with Snacks. The resource processors are smart and won't try to process Snacks if none exist on the vessel.

12 hours ago, Red3Tango said:

When you change how many Snacks are on a vessel in the VAB, it makes the resource window blank (showing how many days/hours) until you reload the craft. Hitting the "Rerun Simulation" button does nothing.

May be a design decision, but when you have death enabled, crafts will report 1 hour continuously until the craft is active.

Can you provide steps to reproduce this?

Link to comment
Share on other sites

1 hour ago, Angel-125 said:

Can you provide steps to reproduce this?

Snacks Window in VAB doesn't update on change:

  1. Open Snacks! "Vessel Status" inside of VAB and close
  2. Change stored Snacks amount on capsule (Mk1 Command Pod)
  3. Re-open Snacks! "Vessel Status" (now blank), clicking "Rerun Simulator" does not do anything

Indefinite Duration of 1 Hour:

  1. Create new save (Sandbox), turn off Fainting, turn on Death, set to 1 missed meal
  2. Launch craft, and return to Space Center
  3. After all Snacks have been consumed, shows Duration of "1.00 Hours"
  4. When "ticked" it displays "Calculating" then back to "1.00 Hours" (will continue to display this regardless of hours/days/years that pass)
  5. Fly the craft (so its active), when it calculates again (after 1 hour) the Kerbal is then removed/dead
Edited by Red3Tango
Link to comment
Share on other sites

On 7/21/2019 at 11:00 AM, Red3Tango said:

Snacks Window in VAB doesn't update on change:

  1. Open Snacks! "Vessel Status" inside of VAB and close
  2. Change stored Snacks amount on capsule (Mk1 Command Pod)
  3. Re-open Snacks! "Vessel Status" (now blank), clicking "Rerun Simulator" does not do anything

Indefinite Duration of 1 Hour:

  1. Create new save (Sandbox), turn off Fainting, turn on Death, set to 1 missed meal
  2. Launch craft, and return to Space Center
  3. After all Snacks have been consumed, shows Duration of "1.00 Hours"
  4. When "ticked" it displays "Calculating" then back to "1.00 Hours" (will continue to display this regardless of hours/days/years that pass)
  5. Fly the craft (so its active), when it calculates again (after 1 hour) the Kerbal is then removed/dead

Fixed the snacks window issue, tomorrow I can look at the other issue.

Link to comment
Share on other sites

@Angel-125, I'm still running into an issue where if I timewarp at max speed, (using stock time warp), craft that are currently NOT in focus, will generate errors that they no longer have enough resources (specifically, electricity) to keep running soil->snack converters, and it shuts them down until I focus on that craft again. I think (I'll double check) that craft in focus no longer have this issue.

I also noticed that the amount of time warp required to trigger these messages varied just a bit, and it seems correlated to the maximum timewarp speed (due to altitude) that the complaining craft can go if it were in focus.

For example, I'm at my space station around Minimus, soil converters running, and go to timewarp. I have a station around Mun at a low altitude, so it's max timewarp speed is x1000. Once I hit x10,000 timewarp while focused on my Minimus station, I get a message that the Mun station is out of electricity.

However, I've noticed an oddity. Say my Minimus station's timewarp max, due to altitude maxes out at x10,000, then I would expect to only see the warning for that station if I warp past x10,000. However, I don't. Not sure if I just missed something while doing the experiment, or there's some special cases.

Okay, this is getting weirds. I'm focused on Minimus Station. It's at 50km up, so can timewarp x10,000. When I hit x1000, everything's fine. I hit x10,000, the recyclers shut down completely. I have plenty of power, plenty of solar, and a small nuke keeping batteries topped off in shadow. This station can store 13,000 electric charge. But it keeps shutting down the recyclers. The only thing I can think of that might be adding complexity, is I have @Nertea's mods, and I think there was some fiddling done on electricity levels in timewarp there, if I recall.

Also, on another note, when I click the 'Snacks!' toolbar button, it shows me Kerbin, Mun, and Minumus buttons.. I can only use the button for the orbit I'm currently in. While at the Minimus station, I can't select Kerbin or the Mun.

Edit: Okay, the other difference is the Mun station is using just two Hitchhikers for soil recyclers. The Minimus station is using 3.75m parts from @Nertea's station expansion (The Shelter and Coriolis parts) which now have soil recyclers on them. Also, at the moment, if I'm focused on the Mun station with the Hitchhikers, so far, I don't have a problem with time warp or the recyclers going inactive while its in focus. Only if that station is not in focus.

Edit2: I tried installing Better Time Warp, and the issue occurs exactly the same as before, based on the time warp multiplier, not on the steps on the time warp >>>>>>> controller at the top left.

Edited by AmpCat
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.

×
×
  • Create New...