Jump to content

Kerbal Construction Time/StageRecovery Dev Thread


magico13

Recommended Posts

Is there a Problem with New Horizons?

When I launch a Vessel the KSC looks like this:

Try launching a vessel by clicking on the launchpad and selecting one from the list. That'll use entirely Stock functions to launch a ship (but KCT will think it's a simulation). If it doesn't work, then it's probably an issue with a different mod. If it does work, then it's probably a KCT issue. Unfortunately the log didn't report any substantial errors, meaning I'm not sure what's happening. I can try installing New Horizons and testing it myself later tonight.

Link to comment
Share on other sites

I have tested

When i launch the Vessel by clicking the Launch-Button in the VAB everything is OK. The issue happens only when i launch by the KCT-Window in the KSC-Overview.

Can you, just for me, test by clicking the launchpad and not through the VAB. The functions that are used for those methods are different, but clicking through the launchpad should use the same method as launching through the KCT window.

Link to comment
Share on other sites

when I rollout the vessel with KCT i can`t see a vessel standing at the launchpad in the KSC-Overview. when i click at the launch pad it shows a message that i must go to the vab to construct a vessel. i can only sitch to the vessel by KCT.

Link to comment
Share on other sites

when I rollout the vessel with KCT i can`t see a vessel standing at the launchpad in the KSC-Overview. when i click at the launch pad it shows a message that i must go to the vab to construct a vessel. i can only sitch to the vessel by KCT.

You have to either save a craft in the VAB or be in sandbox mode to launch through the launchpad. It let's you launch craft that you've already constructed and saved. It's entirely stock functionality that we're trying to test.

Link to comment
Share on other sites

Is there a Problem with New Horizons?

When I launch a Vessel the KSC looks like this:

I can't reproduce this (might have been fixed in the latest version of New Horizons?) Just launched through the launchpad and through the KCT menu without issue.

jigXNaz.png

cVcd200.png

As a side note, this planet pack looks really cool and I might play with it now...

Link to comment
Share on other sites

  • 5 weeks later...

Hello everyone! KCT's got a new dev version out (build 121) with the new Presets feature! It needs quite a bit of testing. There were a good number of changes/new features that I haven't gotten a chance to play with yet (simulations for instance got their costs completely changed).

This update is slightly save breaking. All of your settings are pretty much invalid now as they've been moved into the Preset system. It doesn't attempt to automatically create a new preset based on your settings, so you'll need to set them up again if you weren't using the default. Your old settings shouldn't get deleted, but no promises (back them up beforehand if you need to reference them later). Setting up new configs is MUCH easier now, and you can have different sets of configs for many different play styles.

I need to write up some documentation on the wiki for Presets (and maybe for KCT in general), but if you have questions please ask them here!

Link to comment
Share on other sites

No worries on setting getting reset, that no biggie. :)

Odd GUI think which what looks like a preview of the rollout time when hovering over the button. one gave the display on a different vessel's line and another was cut off so unreadable. The estimate was also off about a day. Screenshots included :)

First shot, I had the pointer on the bottom ship on the list "Mun Lifter - Workshop"

https://www.dropbox.com/s/f1luuybjsz172eo/pointing%20to%20bottom%20one.png?dl=0

Second shot, pointing to the middle ship "Eagle Passenger Launcher"

https://www.dropbox.com/s/46c5jwwdtne1mu8/pointing%20to%20middle.png?dl=0

Last one, after having clicked the bottom one to initiate rollout

https://www.dropbox.com/s/dod7zkra1jo6aeg/clicked%20bottom.png?dl=0

EDIT: Additional item, upgrade points available seem to reset but the upgrades from previous points spend don't change. This results in over 300 free upgrade points. Kerbal engineers won the lottery! ;) Of it could be an exploit for current saves, either way :P

Edited by JeffreyCor
Link to comment
Share on other sites

Yeah, definitely doesn't appear to be working properly with multiple ships. I'll maybe get a chance to look at that tomorrow. Getting something to happen when hovering over a GUI element isn't as trivial as I would have hoped :/

Link to comment
Share on other sites

Possible issue between RSS and Stage Recovery I didn't see mentioned (but may have missed). the new version of RSS changes the names so the home planet is now called Earth with it. Doing testing with that SR didn't give any notices just as if it was on a different SOI. I'm RSS might be confusing SR because of the name change.

Link to comment
Share on other sites

Possible issue between RSS and Stage Recovery I didn't see mentioned (but may have missed). the new version of RSS changes the names so the home planet is now called Earth with it. Doing testing with that SR didn't give any notices just as if it was on a different SOI. I'm RSS might be confusing SR because of the name change.

You're right about that. StageRecovery specifically looks for "Kerbin" as the name (not an issue with old RSS), so I'll need to update that. It broke KCT not too long ago because of that as well.

Edit: A few issues mentioned on GitHub that I'm linking here as well.

First, general settings aren't being saved properly. It'll be a simple fix of actually saving the settings ;)

Second, apparently one of the GUIs is flickering. Probably the code that keeps things centered. Should be easy fix. Edit2: Nope. They're using the same Rect object (I have one that gets tossed around for various minor windows). I'll just have to give one of them a dedicated Rect.

Edited by magico13
Link to comment
Share on other sites

I have a set of (cosmetics) observations.

This is what I did to get to these observations:

I create a new career with a 'fresh install' of KCT#121.

I select "1 - Choose a Preset" and the default is selected automatically. (cool feature by the way)

I change "Override Launch Button" to off and "Debug Logging" to on.

I select "Save as New Preset".

I enter the VAB, at first everything is normal. Then when I use a command pod (first item placed) the settings are forgotten.

I exit the VAB and head to the launch pad.

Finally I install the 'Blizzy' Toolbar mod.

Global settings not saved

The global settings aren't saved, and what is worse is that when I exit the VAB and enter KCT Settings I see that "Override Launch Button" and "Debug Logging" have reverted (to on and off respectively).

Cosmetic issue, "Save as New Preset" name field flickers

When filling out Preset name the window flickers while typing.

It only flickers at this first occasion, possibly because the "Choose a Preset or Spend Upgrades" is visible underneath?

Cosmetic issue, inconsistent "Upgrades" and "Settings" sub-windows for Blizzy Toolbar

There is inconsistency to when I chose "Upgrades" or "Settings". Usually I should get the main window which says "Build List" back when I close the "Upgrades" or "Settings" pop-up. But in the current configuration that is not necessarily so. I am not sure if it has to do with the toolbar plugin, the new Settings dialog or maybe even both.

B.t.w. It might work as intended (I was just a bit surprised, that's all).

Notice to others, if you already have a simulation length set it is treated as seconds

If you use build #123 on an old career the first time you may see the length of the simulation set at "0.25", which used to be 15 minutes, but now is actually indeed taken as one quarter of a second. It is a non-issue though just type in any number of seconds and the next time it will be presented as "00:00:01:00:00" (say if you type 3600) - it does not affect new careers.

Cosmetic request, the launch pad warning is difficult to read

I don't know if it is an easy change. Currently the otherwise very appropriate warning when going to the launch pad and runway is difficult to read. Is it possible to choose a dialog style with less transparency in the box-background?

Overall nice features, as witnessed by the fact that my observations are predominantly cosmetic.

Link to comment
Share on other sites

Even though I addressed some of these above, I'll address them specifically so that everyone's all on the same page (and so I can write down my thoughts on what to do to fix them so I don't forget later ;) )

Global settings not saved

Simple case of not actually telling the settings to be saved on my end. Easily fixed by explicitly saving the settings when clicking "Save" or trashing them and loading the old ones on "Cancel". I'll have it fixed for next update.

Cosmetic issue, "Save as New Preset" name field flickers

There are two possibilities here: 1) issues with the window being a Centered Window and being redrawn every frame when it shouldn't be, or 2) the save window and the first run window use the same Rect object. If it's the second one (which I believe it is) that's easily fixed by giving one of those its own Rect object.

Cosmetic issue, inconsistent "Upgrades" and "Settings" sub-windows for Blizzy Toolbar

Ha! I didn't even think about that when I made a recent change. It bugged me that the "highlight" when using the Stock toolbar wasn't always synced up properly, so I "fixed" an occurrence of that by manually calling a button press (opening the build list and highlighting the button). But if you're using Blizzy's toolbar that button doesn't exist, so it doesn't open the Build List then. Another simple fix for next version.

Notice to others, if you already have a simulation length set it is treated as seconds

I recently made it so you can use any amount of time for simulations (which you've noticed), which had the effect of switching from hours as the default time unit to seconds. I might still change it back to hours since nobody wants a 30 second simulation and you should be able to put in 0.25 for 15 minutes. At the very least, I'll put a mention of that issue in the release notes, but people will hopefully figure it out pretty quickly.

Cosmetic request, the launch pad warning is difficult to read

It's supposed to be using a different background (the same one as all the other windows) but it for some reason has been selecting the HighLogic skin instead of the default Unity skin. I'll see if I can force it to use the more opaque background. I couldn't find a way to override the OnClick for the launchpad, unfortunately, as I wanted to try to just have that popup happen instead of the normal launch dialog. I found the class that defines it, but no instance of the class to mess around with. In fact, I couldn't find a single instance of any of the KSC buildings, so I'm not sure where they're being kept :/ If I can't change the background, I can also just move the dialog to the side.

Edit: Build 122 up to (hopefully) fix most of these issues. I didn't get a chance to test it myself, sorry, so you'll be going in blind, but it should mostly be cosmetic changes anyway. I might get some more time to test tomorrow.

Edited by magico13
Link to comment
Share on other sites

Hi. Now that there is an "Save as New Preset" button, maybe we should have a "delete" button for presets as well. Or maybe that is too much of a power user feature, as you can potentially brake innocent career saves with such a button. What do you think?

Link to comment
Share on other sites

Hi. Now that there is an "Save as New Preset" button, maybe we should have a "delete" button for presets as well. Or maybe that is too much of a power user feature, as you can potentially brake innocent career saves with such a button. What do you think?

The only way I'd be ok with that is if you could only delete presets you make yourself. I could add a flag that gets set saying it's user made, then other providers will just set that false and make it not deletable.

Of course, you can always delete them manually by going into the folder and deleting it.

Deleting the current preset is actually safe, since it gets saved to the Save folder.

Edit: I went ahead and added it. There's a hidden flag inside the Preset files now called "allowDeletion". If it's False then there isn't an option in-game to delete the Preset (but deleting the file outside of KSP will work still). If it's True then you can delete the preset from in game, after a confirmation window. All Presets made through the Save As New Preset button have it set to True, so user made presets can automatically be deleted. Any Presets shipped by external mods (RP-0, KCT itself) should manually set that to False to prevent them from being deleted on accident.

Something I just realized, any Presets shipped in other mod folders can't be overwritten or deleted in-game (unless they don't set that flag, in which case they can be deleted but not overwritten), but KCT provided Presets can be overwritten. I'm not sure how I feel about that. I should probably prevent overwriting any configs that have allowDeletion set to False.

Edit 2: My wish is my own command, I guess. I went and added that restriction as well. Now if you choose a shortName for a preset that is the same as one that already exists you'll be warned. If it's the same as a Preset that has allowDeletion set to False then you cannot save the Preset at all until you give it a new shortName. The Save button just totally vanishes. If you're allowed to delete the Preset, then you're allowed to overwrite it as well.

Edited by magico13
Link to comment
Share on other sites

Hi, tried to clear the inventory. The log shows an exception like this:

[EXC 21:21:32.717] InvalidOperationException: out of sync
System.Collections.Generic.Dictionary`2+Enumerator[System.String,System.Int32].VerifyState ()
System.Collections.Generic.Dictionary`2+Enumerator[System.String,System.Int32].MoveNext ()
KerbalConstructionTime.KCT_GUI.ClearOutInventory ()
DialogOption.OptionSelected ()
MultiOptionDialog.drawContent (Int32 id)
UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID)
UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style)

I suspect it stems from here:

            [COLOR=#800000][B]foreach[/B][/COLOR] (KeyValuePair<string, int> kvp in KCT_GameStates.[COLOR=#800000][B]PartInventory[/B][/COLOR])
{
AvailablePart part = KCT_Utilities.GetAvailablePartByName(kvp.Key);
if (part != null)
{
if (!KCT_Utilities.PartIsProcedural(part.partPrefab))
{
totalValue += part.cost * kvp.Value;
}
else
{
totalValue += kvp.Value / 100.0F;
}
//Remove the parts from the inventory
KCT_GameStates.[B][COLOR=#800000]PartInventory[/COLOR].[COLOR=#800000]Remove[/COLOR][/B](kvp.Key);
}
}

I guess you don't need log and save game files for this one :-)

Link to comment
Share on other sites

Hi, tried to clear the inventory. The log shows an exception like this:

Yep. That would do it! Not sure what I was thinking at the time, as you clearly aren't allowed to loop over a list and remove items from it inside the loop. I'll get that fixed tonight probably (I'll just make a list of which parts are cleared to be removed, then loop over that list and remove them from the inventory. No sync issues then). That's what I get for not testing things :P

Off the top of my head the only other thing I know I need to fix is the issue JeffreyCor reported here

Link to comment
Share on other sites

You want to clear the entire collection right? Is there no method for that, or is there some other reason the entries must be removed one at a time?

They have to be removed one at a time. Since the inventory is just a dictionary of part names and quantities, KCT knows nothing about the parts. To figure out their costs, KCT asks KSP about the default values for each part, but that doesn't work if the part can't be found in the game (ie, the mod it's from got removed or it's a tweakscaled part). Rather than deleting those things from the inventory and not giving the player anything for them, KCT keeps them in the inventory in case those parts become available again (or, in the case of tweakscale, they'll still be useable despite the fact that KCT can't determine cost info for them).

Basically, KCT plays it safe. If it can't find the part in question loaded in the game, it doesn't delete it from the inventory.

I've worked on an alternative inventory system in the past that tracks part costs explicitly, which would alleviate situations like this. It also had support for storing module information. I might end up bringing that out at some point. We'll see.

E: BTW, 125 should hopefully fix the inventory clearing and rollout hover bugs. There might still be an issue in that last one after you rollout a vessel. I haven't gotten around to testing it yet still :/

Edited by magico13
Link to comment
Share on other sites

I am creating a preset that I feel is better balanced toward the low-tech end at the start of a new career. The first few missions (launch a vessel, gather some science etc) can be quite difficult to get done in time with the default preset.

I start with 15 upgrade points; 16 if you count the one I get from the "start" technology node. After the first four launches I have a total of 25 upgrade points. The nine 'extra' points originate from science reports:

  1. crewReport@KerbinSrfLandedLaunchPad
  2. evaReport@KerbinSrfLandedLaunchPad
  3. crewReport@KerbinSrfLandedRunway
  4. evaReport@KerbinSrfLandedRunway
  5. evaReport@KerbinFlyingLowShores
  6. mysteryGoo@KerbinSrfLandedRunway
  7. crewReport@KerbinSrfSplashedWater
  8. evaReport@KerbinFlyingLowWater
  9. recovery@KerbinFlew

I notice that the development code have a filter commented out; so my question is, is it working as intended at the moment?

Link to comment
Share on other sites

I'm not sure if I'm fully understanding what you're saying. You're getting 9 extra upgrade points from somewhere for some reason? They shouldn't be tied to science reports. The commented out part of the code is because that method of getting the number of unlocked tech nodes only works when the R&D center is open. The way I'm using should work in any scene, but it occurs to me that it might be possible that it's counting the number of science reports instead of tech nodes... Or it might be counting both...

I'll see if I can get that fixed later today. I finally got a chance to play yesterday and noticed it was acting up, but couldn't figure out why. That's probably why (for me, it said I had -9 upgrades left). I'm also not sure if simulations around other bodies are working. Trying to select the Mun resulted in a bunch of errors for me.

Link to comment
Share on other sites

I'm not sure if I'm fully understanding what you're saying. ... it might be possible that it's counting the number of science reports instead of tech nodes... Or it might be counting both.

Yup, that is what I am trying to say. In my setup right now it counts both (tech nodes + science reports). Good to know that it is supposed to count only tech nodes; that seems reasonable.

Link to comment
Share on other sites

Yup, that is what I am trying to say. In my setup right now it counts both (tech nodes + science reports). Good to know that it is supposed to count only tech nodes; that seems reasonable.

Yeah, what KCT does normally is count tech nodes. With the Presets update I've added the ability to turn off getting upgrades from tech nodes to either require purchasing upgrades manually, get them from another mod (when I get the API up and running that is), or to not use them at all (for Presets that define everything based on Stock upgrades). The way of counting the number of unlocked tech nodes that I was using before apparently worked better than the new one I was trying out :P

Edit: Should have the counting issue fixed in the latest update. Also, Kerbin orbital simulations should be using the correct formula now. Previously it was using the "landed at KSC" formula instead of the more general orbital formula.

Edited by magico13
Link to comment
Share on other sites

There is a minor snag. When I select simulate the cost of the simulation is deducted from my funds and the cost of the vessel is (temporarily) added to my funds. If I now get a warning that the launch pad isn't clear or that the vessel is unmanned and uncontrollable and I choose to heed the warning and cancel the simulation I am almost certainly at a net gain (as the vessel is usually more expensive than the simulation and the KSP vessel expense or simulation revert will never take place).

I am not sure if it is worth the effort to fix the issue. Then again maybe there is an easy fix.

Link to comment
Share on other sites

There is a minor snag. When I select simulate the cost of the simulation is deducted from my funds and the cost of the vessel is (temporarily) added to my funds. If I now get a warning that the launch pad isn't clear or that the vessel is unmanned and uncontrollable and I choose to heed the warning and cancel the simulation I am almost certainly at a net gain (as the vessel is usually more expensive than the simulation and the KSP vessel expense or simulation revert will never take place).

I am not sure if it is worth the effort to fix the issue. Then again maybe there is an easy fix.

I'm pretty sure when you switch scenes or try to simulate again you'll be back at your normal funds level. I vaguely remember implementing that fix a while back, but it doesn't take the funds back until a scene change. It might not be totally balanced correctly, since it might still be taking the funds for the simulation, so you might actually lose money if it's working "properly". I haven't tested that in a while, so I can't recall.

Edit: Checking through the code, it looks like it takes the funds back that it gives for a vessel, but doesn't return the funds spent on the failed simulation.

Edited by magico13
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...