Jump to content

Kerbal Construction Time/StageRecovery Dev Thread


magico13

Recommended Posts

In honor of the release of the ARM pack, aka 23.5, here is an updated release! This version includes the fix that JeffreyCor helped me find for booster recovery not always working properly (with some help from CatastrophicFailure as well), so thank you both for your assistance. Also included is the removal of time jump as you can now warp in the Space Center and Tracking Station. Warp works properly in both situations in my limited testing. I think those are the only changes. The link is in the OP (if you don't see it yet, give me a minute to actually add it)

Edit: Annnnnd done! Link is in OP. I'm going to go finish writing my thesis now.

Edited by magico13
Link to comment
Share on other sites

Small bug I'm noticing with the 23.5 update ( very well might be a conflict with one of my mods that hasn't updated yet). After finishing up a rocket and sending it to do its mission then recovering it going back to the KSC screen i can again relaunch the same vessel without rebuilding it. Isn't a major bug since i can just scrap the copy but this just started up with 4c.

Link to comment
Share on other sites

Small bug I'm noticing with the 23.5 update ( very well might be a conflict with one of my mods that hasn't updated yet). After finishing up a rocket and sending it to do its mission then recovering it going back to the KSC screen i can again relaunch the same vessel without rebuilding it. Isn't a major bug since i can just scrap the copy but this just started up with 4c.

I haven't had a chance to actually play with 0.23.5 yet, so if anyone else can confirm this it would be nice. You launched, landed, recovered and still had it in your vessel storage? Hmm. I might know how that could have happened. If you reverted back to the editor after launch instead of recovering, that would make it still available to launch. Let me test this really quick. It could be a mod interaction, which I can't really test for.

When you recover do you still get the parts in your inventory? Then when you scrap it you'd theoretically get the parts again.

Edit: Just confirmed this. There's a null reference thrown at launch for some reason and the ship isn't being removed. Give me a little while to figure it out.

Edited by magico13
Link to comment
Share on other sites

This may be tricky. The error is being thrown at TimeWarp.Update() and mentions nothing related to my mod, so I have basically no clue where it's coming from. Thank you for reporting it. I would have never noticed myself for days.

Btw, it's an issue that occurs when the craft is launched, not specifically on recover. It isn't being removed from the list in the first place.

Link to comment
Share on other sites

Could it be from the boaster fix you did in this version ? I know 4b in 23.5 didn't do this so it was somethin that got changed between those 2 versions.

I also noticed that when I tested the latest debug version. I don't know quite yet why it's happening, but I'm rewriting how/when vessels get removed from the list. The new way makes a bit more sense, assuming it works properly. It's currently untested and may not add the vessel back to the list upon reverting now that I think about it. (just tested, that is in fact true. I may have to not do it that way then)

The null reference occurs with the old versions in 0.23.5, so I'm inclined to think that is unrelated and is due to the fact that you can timewarp in the space center now. Still no clue what the cause of it is though.

Ok. Fixed the issue. It was due to an if statement I had to include in order to do the timewarping in the space center and tracking station. The following "else if" statements were detached from the if statement I had meant them to go with. Had to do a little bit of rearranging. Derp. I'll upload a fix in a minute.

Edit: Fix should be available now. 0.23.5 also adds the ability to display the date in Kerbin days/years. I may try to tie into that for my day display in the future so if you use Kerbin days then it will list times with 6 hour days and if you use 24 hour days this will display with 24 hour days. I'm not sure how to access that yet, but I figured I'd mention it in case anyone was interested :P

Edit 2: Ok, apparently accessing the game settings is really easy. I don't know if you guys have preference of how to implement the time thing but I currently see two predominant ways:

1. I just use the setting that the game uses. If you use 6 hour days, so do I. If you don't I don't either.

2. The default of the Use6HourDays setting is whatever you have it set to when the config file is generated. If you change the KSP setting later, you will have to change the setting in this too. This allows you to have "mixed mode" though where you can have one using 6 hours and one using 24.

Edited by magico13
Link to comment
Share on other sites

In honor of the release of the ARM pack, aka 23.5, here is an updated release! This version includes the fix that JeffreyCor helped me find for booster recovery not always working properly (with some help from CatastrophicFailure as well), so thank you both for your assistance. Also included is the removal of time jump as you can now warp in the Space Center and Tracking Station. Warp works properly in both situations in my limited testing. I think those are the only changes. The link is in the OP (if you don't see it yet, give me a minute to actually add it)

Edit: Annnnnd done! Link is in OP. I'm going to go finish writing my thesis now.

i can't take any credit here, JefferyCor did the actual (and quite thorough) troubleshooting, all I did was say "me too."

You're certainly right on top of keeping things updated. I'm STILL waiting on fix from the ProceduralParts guy :P

If this mod is the kinda thing you cook up in your spare time, your thesis must be truly awe inspiring :cool:

Link to comment
Share on other sites

Thank you very much :) I really like this mod a lot, I find it adds a lot of flavor to the game and enhances the reality factor without taking away the fun factor. I'm more than happy to help with testing for a .24 version when the time comes :D

Link to comment
Share on other sites

I've run into an issue, (I believe it's with KCT and the Toolbar plugin) I go to launch a vessel (Any vessel) and when I hit either Simulate or add to part list nothing happens. and a NullReference Exception is thrown.

Launching vessel from LaunchPad. Craft file: C:/Games/KSP_win(ARM)/KSP_Data/../saves/Wolf Aerospace/Ships/VAB/Auto-Saved Ship.craft

(Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

[KCT] Writing to persistence.

(Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

NullReferenceException: Object reference not set to an instance of an object
at Kerbal_Construction_Time.KerbalConstructionTimeData.OnSave (.ConfigNode node) [0x00000] in <filename unknown>:0

at ScenarioModule.Save (.ConfigNode node) [0x00000] in <filename unknown>:0

at ProtoScenarioModule..ctor (.ScenarioModule module) [0x00000] in <filename unknown>:0

at ScenarioRunner.GetUpdatedProtoModules () [0x00000] in <filename unknown>:0

at Game.Updated () [0x00000] in <filename unknown>:0

at GamePersistence.SaveGame (System.String saveFileName, System.String saveFolder, SaveMode saveMode) [0x00000] in <filename unknown>:0

at FlightDriver.StartWithNewLaunch (System.String fullFilePath, System.String missionFlagURL, System.String launchSiteName, .VesselCrewManifest manifest) [0x00000] in <filename unknown>:0

at EditorLogic.goForLaunch () [0x00000] in <filename unknown>:0

at EditorLogic.proceedWithVesselLaunch () [0x00000] in <filename unknown>:0

at PreFlightCheck.Complete () [0x00000] in <filename unknown>:0

at PreFlightCheck.runNextTest () [0x00000] in <filename unknown>:0

at PreFlightCheck.runNextTest () [0x00000] in <filename unknown>:0

at PreFlightCheck.runNextTest () [0x00000] in <filename unknown>:0

at PreFlightCheck.runNextTest () [0x00000] in <filename unknown>:0

at PreFlightCheck.RunTests () [0x00000] in <filename unknown>:0

at EditorLogic.launchVessel () [0x00000] in <filename unknown>:0

at Kerbal_Construction_Time.KCT_GUI.DrawLaunchAlert (Int32 windowID) [0x00000] in <filename unknown>:0

at UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID) [0x00000] in <filename unknown>:0

at UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) [0x00000] in <filename unknown>:0

(Filename: Line: -1)

Here's the snippet from the Output_log.txt

Link to comment
Share on other sites

May i ask something: is there already a feature implemented that when you have a space shuttle and land it back at KSC and want to launch it later, you only have to wait to get the boosters prepared(recovering,refueling and preparing) for the launch(if you have put enough parachutes on it), and the buildtime for the external tank (building,refueling and preparing) aswell as preparing the shuttle (refueling, loading different payloads)

Link to comment
Share on other sites

May i ask something: is there already a feature implemented that when you have a space shuttle and land it back at KSC and want to launch it later, you only have to wait to get the boosters prepared(recovering,refueling and preparing) for the launch(if you have put enough parachutes on it), and the buildtime for the external tank (building,refueling and preparing) aswell as preparing the shuttle (refueling, loading different payloads)

Yep, that's kinda the whole point. The more parts you recover the less time it takes the next time you launch an identical vessel, and if you launch it enough it will eventually cost no time at all.

Link to comment
Share on other sites

I've run into an issue, (I believe it's with KCT and the Toolbar plugin) I go to launch a vessel (Any vessel) and when I hit either Simulate or add to part list nothing happens. and a NullReference Exception is thrown.

First known issue in the known issues list on the OP. You probably tried to load a ship after adding one to the build list. Unfortunately, you have to force quit KSP once you do it. The workaround is to exit the VAB/SPH after adding a ship to the build list whenever loading a ship or pressing the new button. I haven't had time to figure out the cause yet.

Edit: Mentioned here too. http://forum.kerbalspaceprogram.com/threads/69310-WIP-0-23-5-Kerbal-Construction-Time-PreRelease-4c-%284-1-14%29?p=1031970&viewfull=1#post1031970

May i ask something: is there already a feature implemented that when you have a space shuttle and land it back at KSC and want to launch it later, you only have to wait to get the boosters prepared(recovering,refueling and preparing) for the launch(if you have put enough parachutes on it), and the buildtime for the external tank (building,refueling and preparing) aswell as preparing the shuttle (refueling, loading different payloads)
Can boosters be recovered even when dropped from unstable orbit into atmosphere (witch enough chutes)?

Reentry heating and all that stuff.

I'll address both of these at once. Booster recovery happens whenever the booster (or anything actually) is sub-orbital and gets destroyed by being on rails in atmosphere with enough parachutes to land safely (less than 10 m/s). Anything recovered this way or through normal recovery gets added to the inventory and when used has an effective cost of 1/100 when calculating the total time. As a result, reusable craft have minimal time. The more you reuse, the better. For the case of a shuttle with some parts not recovered, the first time will take a while, the second time will take much less (though still over a day most likely). The more parts get used, the faster they are in the future, EXCEPT when being used from the inventory. Then they always have an effective cost of 1/100. I may make a change later to include the part tracker in the part inventory calculation so that it isn't fixed. I also need to rework the timing eventually to find something more balanced. The next version has much finer time controls for the user (allowing the user to alter the overall time, the part tracker effect, and the inventory effect. Including disabling these features)

As for reentry heating, I am considering adding a condition if deadly reentry is installed so that they can't be recovered if they would have burned up. It will be really hand wavy though, since the actual heating won't have been calculated. It'll be like, if it's moving more than 1 km/s when destroyed and doesn't have shielding, it isn't recovered, or something like that.

I'm also planning on reorganizing the part inventory so you can browse it by category, like Propulsion or Utility or Science, just like the KSP categories. The current way is a mess with a lot of parts.

Edit: It has to be suborbital btw. It can't have a periapsis above 0.

Edited by magico13
Link to comment
Share on other sites

This mod looks awesome and I am using it in my career save. [P.S I am the upcoming [confidential] Kerman in your youtube series:cool:]

Haha, no way! Just testing things today in 23.5 I took you up to an asteroid which I named Your Pet Rock. I didn't record it though, but I'm going to redo it and record it soon. I'm quite busy lately, so this mod has been kind of on hold. But soon I'll be getting more free time and will be trying to make some serious usability increases to this, so it will only be getting better.

Edited by magico13
Link to comment
Share on other sites

Yeah, when I try to make a new youtube account it bugs out and deletes it.:mad:

EDIT: Just realized everybody who reads this knows my name now.:blush:

You can quickly change it if you want. I can also edit it out of the quote earlier.

Link to comment
Share on other sites

Alright, just finished reading through this entire thread. I'm just about to bit the bullet and download this for my new career mod save, but I'm also very interested in using MCE. I saw Way earlier in here that you wanted to add compadiblitly for it, which would he awesome, as they seem to go hand and hand with each other. Just curious if you had any news on that front. This is what the Dev over at the MCE thread said:

If I remember correct they work fine other then revert buttons. If you use his revert you won't get anything back. It was planned that he would fix this but not sure if he did or not.
Link to comment
Share on other sites

Alright, just finished reading through this entire thread. I'm just about to bit the bullet and download this for my new career mod save, but I'm also very interested in using MCE. I saw Way earlier in here that you wanted to add compadiblitly for it, which would he awesome, as they seem to go hand and hand with each other. Just curious if you had any news on that front. This is what the Dev over at the MCE thread said:

Malkuth is correct, I was waiting to implement this when I reworked how simulations work but I haven't had much time lately for new development. The only time this is a serious issue is when simulating and the vessel crashes. This will automatically revert, which will not give you your money back. There is a config option to disable the automatic revert. Otherwise, at the end of any simulation you can just use the MCE revert instead of mine.

Better compatibility is a planned feature. Maybe I can throw it into my dev build really quick and release that. There's only a couple changes in it.

Link to comment
Share on other sites

Ok, I uploaded the few things I've been working on. This includes Mission Controller Extended support. This update is optional, as I don't think I fixed any of the known issues yet.

Features:

- Automatically use Kerbin Time or 24 hour time based on game settings

- Implemented CompatibilityChecker to give a warning if the version of KSP is unsupported

- Implemented MCE compatibility. Upon simulation revert you should be given 100% of your money back. There is an issue with this in a new game where your first launch is a simulation: The MCE save file isn't created yet so when you revert you don't get your money back. I think going into the VAB then back to the Space Center and then back into the VAB will fix it. Only needs to be done on brand new games and only once.

- Enhanced build time controls. I moved build time controls to a new file, KCT_TimeSettings.txt, which currently contains three settings:

OverallMultiplier = 1 : The same functionality as BuildTimeModifier. All it does is take the calculated time and multiply it by this number

BuildEffect = 1 : This controls the effect that subsequent builds has on a part's effective cost. Setting it higher than 1 means that subsequent builds will reduce the cost more, setting it less will lessen the effect (it could take multiple builds before a time decrease is noticed). Setting it to 0 will disable subsequent builds having an effect.

InventoryEffect = 100 : This alters the effect of using inventory parts on a part's effective cost. Setting it above 100 will decrease the cost more, setting it below 100 will decrease the effect. Setting it to 1 will cause the inventory to have no effect at all. Setting it less than 1 will actually make using inventory parts take longer, if you want to torture yourself for recovering parts.

Remember that both *Effect multipliers are on the effective cost of the part, which is then added to the effective cost of all the other parts and then square rooted. Doubling one of them won't cut the build time in half. Though setting OverallMultiplier to 0.5 will.

And now, a request!

I want to rebalance the build times but as I don't get to play very often I have no idea how balanced they are or what a good balance would be. I'm asking you all, the community, to come up with good settings. It may be that good settings are subjective based on what mods you are using, so I think it would be good to have one set for STOCK and one set for REALISM . Stock would be about playability, while Realism would be about having realistic build times (for use with RSS for example).

The "winning" settings will be able to be downloaded from the OP or included in the mod. The Stock settings would be the default ones and the Realism one could be downloaded and easily installed (hence the new file instead of keeping time settings in the overall settings)

I wasn't planning on releasing this yet so I haven't thought of any official rules or guidelines, but the settings should be balanced for subsequent builds and for inventory use. Also, please let me know if you are using Kerbin Time or 24 hour time when reporting.

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...