KCT icon indicating copy to clipboard operation
KCT copied to clipboard

Intermittent issue: Upgrading a pad while a new pad is building causes the pad-to-be-upgraded to lose track

Open NathanKell opened this issue 8 years ago • 7 comments

I had two pads, one at Tier 4 and one at Tier 2. I chose to build a third pad, then immediately tried to upgrade the Tier 2 pad, but it had reset to tier 1 and thus started upgrading to tier 2.

NOTE: I have not had a chance to try to repro this clean, so please don't worry about it atm unless you hear about it from someone else. Just sticking this here so I don't forget.

NathanKell avatar Jul 04 '17 21:07 NathanKell

I am also having an issue with a pad upgrade not "taking" but I'm not currently building or even have a second pad.

KCT appears to be spamming the logs repeatedly with the following content:

Updating launchpad destruction state.
Facility SpaceCenter/LaunchPad upgraded to lvl -1
VAB rates:
0.3
0
SPH Rates:
0.1 0

pianojosh avatar Jul 09 '17 00:07 pianojosh

Here is the relevant snippet from my save for when an upgrade is in-progress that doesn't "take":

				UpgradingBuilding
				{
					upgradeLevel = 0
					currentLevel = -1
					launchpadID = 0
					id = SpaceCenter/LaunchPad
					commonName = LaunchPad
					progress = 779738.24703568767
					BP = 6777015.027073849
					cost = 15000
					UpgradeProcessed = False
					isLaunchpad = True
				}

pianojosh avatar Jul 09 '17 00:07 pianojosh

Here's the snippet when the upgrade does work:

				UpgradingBuilding
				{
					upgradeLevel = 1
					currentLevel = 0
					launchpadID = 0
					id = SpaceCenter/LaunchPad
					commonName = LaunchPad
					progress = 5952014.1120023131
					BP = 6777015.027073849
					cost = 15000
					UpgradeProcessed = False
					isLaunchpad = True
				}

pianojosh avatar Jul 09 '17 00:07 pianojosh

Are you running the latest build? You can try to just delete that entire entry and manually set the level to the correct one. Also, this is a different issue and should be in it's own issue on GitHub, not under this one, thanks :)

On Jul 8, 2017 20:16, "pianojosh" [email protected] wrote:

Here's the snippet when the upgrade does work:

			UpgradingBuilding
			{
				upgradeLevel = 1
				currentLevel = 0
				launchpadID = 0
				id = SpaceCenter/LaunchPad
				commonName = LaunchPad
				progress = 5952014.1120023131
				BP = 6777015.027073849
				cost = 15000
				UpgradeProcessed = False
				isLaunchpad = True
			}

You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/magico13/KCT/issues/159#issuecomment-313888905, or mute the thread https://github.com/notifications/unsubscribe-auth/AFC21YKWnWETEo_MJ4ukYGutGrqNMoqHks5sMBvAgaJpZM4ONry5 .

magico13 avatar Jul 09 '17 00:07 magico13

Fair enough, I think they might have the same underlying cause though.

@NathanKell, can you take a look at the save where the unlock is failing, before the unlock completes, if you have a snapshot of that? In my save that's exhibiting this issue, the launch pad has a level of -1 instead of 0. I just created a new game and the beginning launch pad has a level of 0, and in that save, the upgrade is working as expected.

pianojosh avatar Jul 09 '17 00:07 pianojosh

@magico13 Per my version file, I have 1.3.9.0.

Also, I can confirm that manually editing my save to set the KCT_LaunchPad to level = 0 instead of level = -1 and changing the UpgradingBuilding to upgradeLevel = 1 and currentLevel = 0 both makes the upgrade work as expected and stops the logspam.

pianojosh avatar Jul 09 '17 00:07 pianojosh

@pianojosh good to know you could get it to stop. I've seen similar things happen when it does something incorrectly and then keeps dropping levels until it gets caught in the -1 loop you saw. Btw, the best place to check the version is either in the log (Module Manager spits out all the versions), by checking the .dll version itself (right click, go to properties, then details). The version file is updated manually and only during releases, but the .dll version is done automatically every single build and will be way more precise.

I really should just try to override the upgrade buttons again, but I haven't gotten a chance to look into that again recently. It'd fix a lot of glitches.

magico13 avatar Jul 09 '17 00:07 magico13