magico13

Kerbal Construction Time/StageRecovery Dev Thread

Recommended Posts

This thread (now that KCT has been released) is going to be dedicated to the open betas that will occur between official releases.

Please see the KCT release thread for the latest stable version of Kerbal Construction Time.

Please see the StageRecovery release thread for the latest stable version of StageRecovery.


What is this thread?

This thread is for discussion and downloads of the beta versions of Kerbal Construction Time and StageRecovery. If you don't know those are, then check the links provided above. This thread will be the place for downloading the betas as they release, posting bug reports (with log files!), and discussing the new features and changes that should be made before the official release (ie, for balance reasons or because a feature has exploits).

How can I get involved?

First step is getting to know KCT/SR as they are now, so check out the links at the top of the post, play around with the mods, then come back here when you've got a sense for what's going on.

Download the latest successful build from the build server and the last official release and merge the two. The development builds do not include all the files needed to run the mod (or the directory structure) so you need to download the last official release from the thread linked at the top of this post, then overwrite the .dll with the new one.

Play around (preferably with a focus on the testing goals outlined below) and if you encounter a bug report it on this thread or the KCT github issue tracker or StageRecovery github issue tracker (after checking if anyone else has reported it already) AND INCLUDE THE BUILD NUMBER (the last number in the version [checkable by viewing the properties of the .dll or in-game for KCT], or by remembering what build you actually downloaded [chances are it was the latest one with a blue icon]).

You MUST read these link(s) before participating!

How to make a proper bug report

JeffreyCor is the official lead KCT tester, so treat him with respect!

KCT

These builds WILL be unstable! There is a good chance that they will break saves, lose data, and crash your game. THEY SHOULD NOT BE USED FOR NORMAL PLAY. BACK UP YOUR SAVES!

Now that we've reached an understanding, I'll gladly provide you the link to the build server.

I Agree that these builds are unstable and won't complain when they break things

Last updated: 2017-06-27


StageRecovery

Current testing targets:

  • Nothing in progress at the moment

Things I still need to do before release:

  • Everything

These builds WILL be unstable! There is a good chance that they will break saves, lose data, and crash your game. THEY SHOULD NOT BE USED FOR NORMAL PLAY. BACK UP YOUR SAVES!

Now that we've reached an understanding, I'll gladly provide you the link to the build server.

I Agree that these builds are unstable and won't complain when they break things

Note: Most of the text on this page is scary "this will break things" text. Well, at the time of writing that was 100% true. At the time of writing this, it's pretty unlikely. But if you're gonna use a development build of something, don't be surprised if things unexpectedly break. Just use common sense :)


ScrapYard

A common part inventory. View progress on the Trello board.

Current testing targets:

  • Not ready for testing

These builds WILL be unstable! There is a good chance that they will break saves, lose data, and crash your game. THEY SHOULD NOT BE USED FOR NORMAL PLAY. BACK UP YOUR SAVES!

Now that we've reached an understanding, I'll gladly provide you the link to the build server.

I Agree that these builds are unstable and won't complain when they break things

Edited by magico13
update links

Share this post


Link to post
Share on other sites

If you've got ships building currently from my last build, let them finish first. This one uses a new system (it saves to the persistence file instead of a separate file) which is incompatible. Recovery of ships built before this version may not work right (but I think it should) so if you recover a ship and the parts aren't added to your inventory, let me know.

Share this post


Link to post
Share on other sites

Wow. Really nice that youre continuing this great plugin. I would suggest optionally tieing into missioncontroller extended by malkuth. You can perhaps have a look at his code for recovering the boosters that get destroyed by the game in the atmosphere.

I also found that you can partially use this:

https://github.com/m4v/DontUnloadIfChutes

To actually prevent unloading the parts in the atmosphere but unload them when they touchdown. It works for the first few sets of boosters but for the later stages i found you would need to warp the boosters to the ground and unload them or handle recovering them before you reach the height when the ground collider gets removed by the game(i think its around 50000-70000m) or the boosters will drop through the surface and explode. But it really looks cool seeing the boosters float to the ground while your ship ascends.

Perhaps if youre going this path you could change the color of the vessel marker for the boosters to reflect that they are being handled by the plugin. It could use a special "boosterchute" containing a marker partmodule and adjusted so it deploys the chute very close to the ground.

I absolutly love the idea of the build list. It would really put the icing on the cake. will you try to handle it when the user presses the launch button? Can you prevent loading the flight scene and instead bring up the gui? Perhaps you can do something like remotetech does (modifying the stock gui) and overlay a "Build" button over the launch button in the vab?

Edited by landeTLS

Share this post


Link to post
Share on other sites
Wow. Really nice that youre continuing this great plugin. I would suggest optionally tieing into missioncontroller extended by malkuth. You can perhaps have a look at his code for recovering the boosters that get destroyed by the game in the atmosphere.

His method is very similar to what I was trying to do (calculating the mass and drag of each part when it gets packed at the 2.5 km border and seeing if it has a terminal velocity that is below ~10m/s at sea level). My original method was running into issues that he appears to have fixed, so I can likely do it that way. I'd rather not keep them loaded the whole time, for fear of what side effects that may have (probably not much, but you never know).

I absolutly love the idea of the build list. It would really put the icing on the cake. will you try to handle it when the user presses the launch button? Can you prevent loading the flight scene and instead bring up the gui? Perhaps you can do something like remotetech does (modifying the stock gui) and overlay a "Build" button over the launch button in the vab?

For now I'm simply disabling the VAB button and have a separate one on my own GUI. Hopefully that doesn't interfere with any other mods, but the loading should be identical. I actually haven't gotten a chance to test if this works with the rest of the mods I use. Ideally a window will pop up when the user presses the launch button (probably the one I have popup now) which will give you the "Add to List" or "Simulate" options. I don't know of a way to stop KSP from switching to the flight scene right away though. The build list is my next priority and I hope to have a preliminary version of it done by the end of this weekend.

I need to know how people want it implemented though, sequentially or parallel.

I'm very new to KSP modding and have pretty much never used C# before working on this, so I don't know all the nuances and tricks that others probably do. With that said, I can usually find a way to get things to work, just not always in the most elegant of ways :wink:

Share this post


Link to post
Share on other sites
His method is very similar to what I was trying to do (calculating the mass and drag of each part when it gets packed at the 2.5 km border and seeing if it has a terminal velocity that is below ~10m/s at sea level). My original method was running into issues that he appears to have fixed, so I can likely do it that way. I'd rather not keep them loaded the whole time, for fear of what side effects that may have (probably not much, but you never know).

For now I'm simply disabling the VAB button and have a separate one on my own GUI. Hopefully that doesn't interfere with any other mods, but the loading should be identical. I actually haven't gotten a chance to test if this works with the rest of the mods I use. Ideally a window will pop up when the user presses the launch button (probably the one I have popup now) which will give you the "Add to List" or "Simulate" options. I don't know of a way to stop KSP from switching to the flight scene right away though. The build list is my next priority and I hope to have a preliminary version of it done by the end of this weekend.

I need to know how people want it implemented though, sequentially or parallel.

I'm very new to KSP modding and have pretty much never used C# before working on this, so I don't know all the nuances and tricks that others probably do. With that said, I can usually find a way to get things to work, just not always in the most elegant of ways :wink:

I think most ppl will like the gui stuff best if its as well integrated into the stock feel as possible. Btw you can overlay an invisible button area over the launch button i think and then make that button bring up your gui. Thats a very hacked approach tho but im not sure if it can be done another way. If you wanna change the launch button i would suggest a dark yellow build button with a wrench on it. I could probably make it for you if you decide to go that way.

I think youve done a good job adapting this from the original plugin. Im excited to see where this goes. Dont worry about the coding sollutions you do too much. You can always change them later if youre not happy with them.

Edited by landeTLS

Share this post


Link to post
Share on other sites
If you wanna change the launch button i would suggest a dark yellow build button with a wrench on it. I could probably make it for you if you decide to go that way.

If I decide to go that direction then I will certainly let you know. I am absolutely terrible at anything requiring the faintest bit of artistic skill. If I can't get it to work by intercepting the change from Editor to Flight scenes I may have to go that way, I definitely do not want to keep it the way it is now. I originally (back when I first posted on the original thread) suggested something like that, a separate button to add the craft to the build list and keeping the launch button for simulations, because I was concerned that it would be difficult to intercept the scene change.

As for the coding, I'm sure a lot of things will need changed/fixed, which is why I decided to open this up for playtesting now before I make an official release. Once I've got most of the primary features implemented and the major bugs squashed then I'll feel comfortable with a full release, even if things aren't as smooth as they could be if done by someone more proficient.

Share this post


Link to post
Share on other sites

Im happy to test it. Will do so a bit later. If i have any spesific coding suggestions or other suggestions ill be sure to post them here tho frankly im more of a design guy than i am a coder.:P

Share this post


Link to post
Share on other sites
Im happy to test it. Will do so a bit later. If i have any spesific coding suggestions or other suggestions ill be sure to post them here tho frankly im more of a design guy than i am a coder.:P

No worries :) Anybody who can offer suggestions/find bugs/just test things has my eternal gratitude. I can't and don't want to think of everything/find every bug on my own. If I make a plugin that only I enjoy, then that's no fun for everyone else :D

Share this post


Link to post
Share on other sites

I really like this idea :)

Here are some suggestions for the test flights:

* I'd suggest always reverting to VAB after a test flight, and not ending the flight prematurely on AP/PE altitudes. IF someone wants to test fly his elaborate base to jool, let them but auto revert all progress after the flight is ended. So even if they interact with other vehicles, those changes will be undone.

* Also, if it's possible, test flights don't necesarily need to start on the launch pad do they? Perhaps you could start test flights in orbit around kerbin, orbit around the mun or landed on the Mun. I'd love the ability to test the landers of my vehicles before actually launching from kerbin. Also if this were available as a config file enableable cheat option so you can launch vessels immediately into duna orbit. (Some of us are interested in building magnificient vehicles and less so in the flight to get them to their goal, it's a cheat I know, but it's also a single player game)

* Maybe it's possible to put a shader over the entire screen, turning the whole scenario more bluish or black and white to clearly distinguish between testing and real flights?

And some build queue ideas.

* Putting large vessels on hold and pushing smaller vessels to the top of the queue.

* A rocketparking lot, built rockets that are launcheable even if we choose to wait with launching them. (Refuel vehicles come to mind, or a fleet prepared for a launch window.)

Good luck.

Share this post


Link to post
Share on other sites

* I'd suggest always reverting to VAB after a test flight, and not ending the flight prematurely on AP/PE altitudes. IF someone wants to test fly his elaborate base to jool, let them but auto revert all progress after the flight is ended. So even if they interact with other vehicles, those changes will be undone.

I imagine this could be done by making a copy of persistent.sfs and then, after the simulation is over, loading that and replacing the new file with it. Shouldn't be too hard, but then again I don't know much about programming.

Share this post


Link to post
Share on other sites
I really like this idea :)

Here are some suggestions for the test flights:

*IDEAS*

I was considering making simulations timed, as the original purpose of them was to make sure you could get to orbit/test a few things, but there was still a possibility for failure in the final mission. They weren't supposed to be a full test run of the mission, because that should itself be a mission. If you know that you're going to run out of fuel right after capturing at the Mun, then where's the fun in building a rescue mission?! I'll think about it, but I'd rather not let you simulate an ENTIRE mission. An hour of game time (starting after launch, not when its put on the pad, so you can still timewarp for weeks) is enough to get into orbit and test things, even setup a transfer to another planet but not actually execute the encounter. Without manually making a backup of the save, I can't allow switching to another vessel as the "Revert to Vehicle Assembly" function no longer works when you do. I may have to go this route anyway if I make it timed, because I have no idea what docking would do.

As for launches starting on the pad, this is something I was thinking about, but I decided that the functionality of moving the ship to another location was outside the scope of this mod. Should simulations go to a timed method, using HyperEdit to transfer into orbit around another body would work just fine without any issues. Then you could test landers/transfer vehicles/aerobraking/etc.

The shader idea is interesting. I have no idea how to actually implement it though. Currently a window pops up when you start a simulation stating the end conditions. If I move to a timed method then I will put a clock with the amount of remaining time on the screen. That should be more than enough to remind you that its a simulation.

As for the build list, both of those ideas are things I'm planning on implementing. I want to make it so you can change the order in which vessels are built, so if you're half way through one ship and then REALLY need a new ship finished you can just put it at the top of the list and the old ship will stop building but keep its progress. When vessels are finished they'll be placed in a "Warehouse" where they will stay until you launch them. That way you can always have things in the build list even if you won't need them for a while. The warehouse will have a limited size (which will increase as you progress through the tech tree), so you can't just fill it with a bunch of ships you'll never use. You'll be able to remove ships from the build list and warehouse and if you remove them from the warehouse their parts will be added to the part inventory.

Sorry if it sounds like I'm shooting down your ideas :/ They're all pretty good, so thank you for the suggestions! At the very least, test flights really need reworked. I am displeased with how I implemented them for this first release.

To everyone: Let me know if you prefer the idea of being able to simulate an ENTIRE mission, or if you would prefer having a timer, or if you've got some other idea. Remember that simulations aren't supposed to replace the actual mission though!

Share this post


Link to post
Share on other sites

Just saw you posted the continuation thread :) Definitely going to try this out too, liked the idea before and I'm glad it is continuated

Share this post


Link to post
Share on other sites
Any screens?

As of right now, no. If I get a chance to do some development tonight then I'll take some.

Speaking of development, I hopefully will get a chance to do some work tonight (it's Valentine's day and we're hosting a birthday party for my friend, so somewhat unlikely) and if I do then I'll upload a new pre-release with booster recovery (parachutes only, no estimates for powered landing) and some tweaks to the simulations (timed, not automatically reverting (except in the case of crashes), possibly try backing up the persistence.sfs myself) before I delve into trying to get a build list working this weekend.

Share this post


Link to post
Share on other sites

Uploaded pre-release 2. Major changes include simulations being based on game time after launch and recovery of spent boosters. It's late and I'm tired, so I'll start work on the build list tomorrow. Let me know if you find any bugs. I'm curious as to what docking will do during simulations, it may not revert properly. For the booster recovery, if there's enough parachutes to drop the terminal velocity to below 10 m/s at sea level, then they'll be added to the part inventory. I also possibly fixed/reduced an issue with build times less than about an hour causing time warp to be stuck at above 1x. Keep in mind this is still a pre-release, so there will be bugs.

Thanks everyone!

Edit: Also I added a gallery with some pictures taken in pre release 2.

Edited by magico13
pictures

Share this post


Link to post
Share on other sites
Sorry if it sounds like I'm shooting down your ideas :/ They're all pretty good, so thank you for the suggestions! At the very least, test flights really need reworked. I am displeased with how I implemented them for this first release.

No worries. It's your ideas, your work so your judgment should obviously be final in how you intend to go about it. :)

I personally don't see a huge problem in being able to test the whole mission. It might take some of the excitement away if you decide to go through the trouble, which is true, but it's also a hassle since you do not have saves in a simulation :) But on the other hand right now I can accomplish the exact same thing with one savegame and I can choose to make it final if it works better than expected.

It's still KSP there's always plenty that can, no... Will! go wrong. (Usually with the physics engine :/ )

I imagine there's as many reasons to play this game as there are players, but for me personally this game is about building the most flexible stable and reusable crafts. Orbital science flagships that can easily visit two or three planets with landers that can land on the various moons and can then get back to the mothership again. Doing the missions is good too but I tend to mess around in the editor and with reverted launches for days before even doing a mission. :) This is why the ability to test certain parts of my crafts in different simulations interests me greatly..

But as said :) You're taking the time to do the work, so the decisions on features are yours and yours alone to make, I can only share opinions. ;) I'll certainly be keeping an eye on this one, good luck!

Share this post


Link to post
Share on other sites

I had some time to test the mod out and seems to work well. Tho im mostly excited for the build list. So here are my spesific suggestions for it:

*Option to recycle a kerbin landed vessel to individual parts or store it in a list(warehouse) for launching as is (just needs to be refueled and refurbished perhaps which would only take a very short time, id like it if this process was also done before transitioning to the flightscene(dont like seeing the vessel sit on the launchpad magically filling up with resources). Perhaps with a special progressbar for refuelling. Perhaps this could be used on standard builds too after the construction is complete) i realize this is very similar to recycling but if you think about it its really very applicable to ssto's etc. This option would only be available to vessels with a command module ofcourse so it cant be done with boosters.

* i like the idea of sequential building. But perhaps limited parallel construction could be researched.

* perhaps in a future version you could tie in with the vesselview plugin or use repurpose code from it to get a wireframe view of the vessel as its assembled from the ground and up (this would be cool tho probably hard to impliment, thats why i said perhaps and in a future version:P)

Other ideas:

* now that squad is making the official contracts id suggest implimenting cost to the construction process when 0.24 is released and we know how that system is going to work. From what i heard the parts wont cost anything. Tho that sounds wierd to me as there would be no incentive to do the contracts. Im guessing squad will impliment something here so id wait to see how that will turn out.

Feedback:

* i like the way the simulations work now. Id like it even more if you also couldnt leave close orbit/have an orbit that leaves the sphere of influence of kerbin/ have an orbit that passes through another soi(if you do then the simulation will say something like "error, simulation accuracy breakdown... ending simulation in 5 4 3 2 1" and also have the simulation timed. A lot of what is fun with this game is the guesswork with the process after the launch. If you think about it, Kerbals dont know enough about their solar system to make simulations on the mun etc.(thats why they need to go there) The next best thing would be to test ones lander etc. on kerbin(which is what i already do. And it works well enough)

Edited by landeTLS

Share this post


Link to post
Share on other sites

*Option to recycle a kerbin landed vessel to individual parts or store it in a list(warehouse) for launching as is (just needs to be refueled and refurbished

Well, something similar is already implemented (and demonstrated in the pictures on the OP) where when you recover a vessel, such as an SSTO or a plane, the next "build" of that vessel takes 1/10 of the time to build. So a 5 day SSTO will take 12 hours to build. This is to simulate refuelling and refurbishing of the vessel. Also, when you recover any part of a vessel (even just a command pod) those parts are added to the part inventory and have an almost negligible effect on the total build time of the vessels they're used in. The more parts you can recover, the faster new ships can be built.

Id like it even more if you also couldnt leave close orbit/have an orbit that leaves the sphere of influence of kerbin/ have an orbit that passes through another soi)

Well, with the 2 hour time limit currently imposed pretty much limits you to remaining in Kerbin's SOI. I have gotten to the Mun in less than 2 hours though, but it requires a lot of deliberation. The way simulations were implemented in Pre-Release 1 had it end when apoapsis > 250km or periapsis > 70km but that didn't let you test things in orbit. I don't think it's possible to leave Kerbin's SOI in less than 2 hours without cheats or a ridiculous space craft.

I will probably make the simulation time limit a configurable value, with a value of 0 meaning indefinite and 7200 being 2 hours. Then if you really wanted them to work one way or the other, you could make a small change to the time limit. 15 minutes would probably work just fine for getting into orbit/small amounts of testing. 2 hours (maybe 1 hour) would be the default. Good for a couple of orbits/seeing if you've got enough dV for that transfer window to Jool/etc. That should be a sufficient solution for willow :wink:

Edit:

id suggest implimenting cost to the construction process when 0.24 is released

I don't, at the moment at least, want to implement any sort of money system into this. That is already covered by other mods, such as Mission Controller. My major concern with contracts is that they'll have time limits like 3 hours (from now) to send a satellite into orbit or land on the Mun in 2 days, where the time limits this mod imposes makes it impossible to satisfy those conditions. 5 years to Jool would still be doable when your ship takes 10 days, but I may have to try to rework the time limits of the early game contracts.

Edited by magico13

Share this post


Link to post
Share on other sites

Time spent in Simulation mode could add time to build for the actual ship, representing time spent in testing... not sure if that could actually be tracked if you change the craft though...?

Share this post


Link to post
Share on other sites

Hello,

This is a great idea and I cant wait for the build list, just wanted to add my suggestion to a couple of your outstanding questions:

1. building order in build list: rather than decide a sequential vs parallel build order, you could setup a system that would be able to build sequentially (FIFO - first in first out) with the ability to pause a build in the sequence - there by still able to influence the order in a way. Another approach, would be to implement a priority to the ship under construction, with a time penalty added depending on the amount of ships in progress; say for every additional ship addded to the list, a x% would be added to every ships ETA for completion... this could also add to the immersion of scheduling projects/launches, etc.

2. Regarding the simulation, I typically always default to giving the option to the user, you can add a prompt for the user to select a timer (and/or parameters to end the simulation - time, altitude, similar to mission controllers mod) or to run the simulation under the flight is reverted or recovered. - You could enforce a reversal of the flight regardless to prevent simulations being used to bypass build times, etc.

Just 2 cents, either way this is a great mod, and a wonderful idea.

Share this post


Link to post
Share on other sites

build sequentially (FIFO - first in first out) with the ability to pause a build in the sequence

The method I'm gonna use for the first incarnation of the build list (it's coming along nicely now btw, but is still very primitive and not totally functional. It may take until next weekend to get something that doesn't completely suck) only adds progress to the first ship in the respective build list (VAB and SPH each have their own), but you can cancel any ship and you can move any ship to the top of the list, thereby pushing the others down one slot. Any progress is kept when ships get moved around. You can completely reorganize the list with some clever usage of the "TOP" button. Later incarnations (possibly in the next release) will let you move things up and down more precisely (up/down buttons instead of just going to the top, possibly keeping the top button though). When tech tree implementation is added, I want to allow the second or third ships in the list to also gain progress at a lower rate (with the rate increasing from 0 with more tech tree nodes. The VAB list would be dependent on the rocket construction nodes, while the SPH list would be dependent on plane part nodes)

you can add a prompt for the user to select a timer (and/or parameters to end the simulation - time, altitude

This makes a lot of sense. Perhaps a window that pops up when the flight begins letting you choose conditions. Although I don't know what the incentive for not choosing "Infinite Time" would be, or when testing a plane to put an Apoapsis restriction of 250km.

Time spent in Simulation mode could add time to build for the actual ship, representing time spent in testing

I kind of like the idea of if you run a (relevant) simulation, the ship can be built a little faster. Since simulations are supposed to not take any real time in world, I can't have the time be one to one. But perhaps completing a simulation (with certain conditions) would give you a 5% reduction in build time or something like that. That's something for later down the road I think though and may tie in well with letting the user choose restrictions (the more restrictive the bigger the bonus?). Alternatively, simulations may actually take MORE time since you won't be blindly flying a ship for the first time, unaware of its flaws. For now, simulations are there to give back the stock ability to test fly a craft and revert to fix it, since this mod eliminates that ability.

A sneak peak at what I'm working on. It works, it just doesn't look pretty and is missing features.

bSHk7dF.png

Share this post


Link to post
Share on other sites

Been playing with the first pre-release and liking it a lot. The build list will be a great addition.

Some observations:

When using reactors from KSPI, having this plugin deprive the reactor of nuclear fuel puts it into a bad situation requiring a kerbal in EVA to manually restart it once control is available. Of course this makes using reactors on unmanned craft or on craft where the reactor isn't really reachable via EVA on the lauchpad a complete show stopper. This might not be the only plugin that goes a bit haywire when its parts don't start out as intended.

Perhaps a fix for this would be a config file with a white list of resources that don't get drained and refilled at launch? Or barring this, for those of us that wouldn't mind working on the honor system, a means of disabling this particular feature? As I understand it, control of the vessel is already locked out, so starving the vessel in the mean time (the original means of lockdown) is kinda redundant isn't it?

Share this post


Link to post
Share on other sites

With the build list, which just needs a bit more work before I can release another pre release, the reactor issue won't be a concern since the craft isn't put on the pad until after completion. I hope to have the first version of the build list ready for release this weekend. Until then, you'll either have to remove this mod or find a workaround. The build list will fix a lot of issues with the current implementation of lockdown.

Share this post


Link to post
Share on other sites

I like where this is going and I will be looking at it for future use. How will this handle mods?

Share this post


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