Jump to content

Kerbal Construction Time/StageRecovery Dev Thread


magico13

Recommended Posts

So, it's hardly game-breaking, but I noticed a small bug: with a relatively long build queue, when I changed scenes to the tracking station, it would begin to make some progress on vessels that are waiting in the queue (not enough build rates available to start them); this would cease when I moved out of the tracking station.

So:

Problem: Progress is made on vessels without an available build rate when in the tracking station (and possibly other scenes where time passes).

Version: Latest 1.2.2, 64-bit Windows

Mods: An absurd number. Let me know if you want me to try to reproduce on a clean build with just KCT.

Logs (I think these are the right files: KSP.log and KSP_Data/output_log):

https://www.dropbox.com/s/qfdzw3gtaicgsry/KSP.log?dl=0

https://www.dropbox.com/s/x5hnlsvmkw9xo35/output_log.txt?dl=0

Severity: Not much, it's just slightly cheaty.

EDIT: By "long queue", I think I have 5 rates, and 9 vessels queued.

Edited by Starman4308
Link to comment
Share on other sites

13 hours ago, magico13 said:

 

You will be able to add ScrapYard to an existing save and theoretically will be able to remove it later without issue (other than some build times being out of whack, such as when editing a finished vessel). But while ScrapYard is in development the inventory might get broken between builds and have to be cleared out. If you wait until release that shouldn't be an issue and you can drop it into an existing save without any problems. Note that the inventory being broken between builds isn't necessarily save breaking since you can safely delete all that data from the save file manually if need be. It shouldn't cause any permanent breaks as long as you're ok with the occasional editing of the save file to delete a chunk of text. But backup the save often.

Great! Looking forward to it!

Link to comment
Share on other sites

On 4/18/2017 at 8:49 PM, Starman4308 said:

So, it's hardly game-breaking, but I noticed a small bug: with a relatively long build queue, when I changed scenes to the tracking station, it would begin to make some progress on vessels that are waiting in the queue (not enough build rates available to start them); this would cease when I moved out of the tracking station.

Figured it out, it was a really stupid mistake. I started caching the build rates a little while back because of changes to support Custom BarnKit, which resulted in building levels not always reporting correctly and causing the build rates to get messed up when outside of the space center scene. Except I accidentally cached all the SPH rates with the VAB rates because I forgot to change one thing when copying the code over from one to the other. Should be fixed in build 20, and thanks for the report :)

Link to comment
Share on other sites

I assure you, you are far from the only coder to make similar mistakes. It's particularly unfun when there are two of something, often by definition, where it's not enough to justify having a list or similar, so you just explicitly reference both.

Link to comment
Share on other sites

Another quick update regarding ScrapYard and KCT. Per the ScrapYard Trello  I am a bit behind schedule. Some IRL stuff came up this week so I didn't get to spend as much time on things as I wanted, but it's not a serious set back. I also spent a bunch of time working out some bugs and integrating KCT and SY together. The good news is that KCT and SY are at the point now where they work together, but not every case has been covered (scrapping works and even doesn't count as a "recovery" so it can be used for ordering parts to put in the inventory, but I haven't looked at what happens with recovering a vessel to storage). I'm very happy it's gotten to this point where it's actually almost a functional thing with only final tweaks and improvements needed.

One fairly major change is that instead of parts automatically being pulled from the inventory and applied to the vessel on rollout, the inventory is applied within the editor and then the parts are removed upon build (either KCT build or rollout). It may not sound all that different, but it's a decent sized shift from how the inventory worked previously. It also opens up the option to have a UI that lets you grab specific parts out of the inventory and place them on vessels. For now there's just a button that will automatically apply the inventory to the vessel in the editor.

There are a few known issues that I'm going to try to fix regarding that change. Symmetry is a problem, since if you pick up a part that's had the inventory applied then all symmetry partners become "fresh" parts and you have to reapply the inventory if you want them to be inventory parts, which makes it harder to manually define which parts should be new and which should be from the inventory. That will still be an issue (potentially worse even) when it moves to the UI that lets you select individual parts. There's also an issue where when you build a vessel in KCT the parts in the editor will still appear as if they're pulled from the inventory, but those parts are already removed from the inventory from the previous build (it makes sense when you see it, basically it's "cache invalidation"). I've got a solution in my head for that, basically to just replace them all with fresh parts whenever the parts are removed.

The main other feature I wanted to have at least partially done by now is a way to define which modules are tracked. That's not done yet. At this point I wanted to just have the ability for the user to make a list of modules in a config file. That's ultimately a really crappy way to do it but it's the way it works internally right now. That causes problems with parts before and after installing/removing a mod being treated differently than before (for instance, if you track tweakscale (true by default) and then install it later, suddenly your entire inventory is no longer valid since they don't have the tweakscale module on them). For the tweakscale problem I'd like to just not track the module if the scale is the same as the default scale, but there's not a good general way to do that. Also, it might not be a good idea to track every part of a module, but instead just the relevant ones (the current scale for tweakscale, for instance, but if "staging" is different then that doesn't make it a different part). Also, the PartUpgrades system is defined by a node within every module that is empty by default. ScrapYard needs to track that inner node for every module but is currently not designed to do so. I don't want to hard code any exceptions, instead making the system general enough to handle everything in a user-defined way. As such, I don't think I'm going to even do the basic "here's a list of modules you can change" since that's just going to be rewritten anyway. The proper way of implementing this system is gonna take a while and I have to figure out exactly how to make it work. For instance, how does a user in a config file say to track the TweakScale module only if the default scale on the node is different from the current scale, but in a general way that also works for other modules? I've got ideas for it, but I need to play around with it for a while until I find something that I like that isn't also a pain to use.

 

There's my weekly wall-o-text about progress. TL;DR: Slightly behind on the configuration front because I want to do something better from the start regarding module tracking. KCT and ScrapYard are working together now but it's not finished. Feel free to test that out on a save you don't care about and let me know how broken it is :wink: Keep in mind that everything is still Alpha quality and there's a 95% chance it'll break stuff.

Link to comment
Share on other sites

A quick question about ScrapYard. I was just testing it with a Shuttle/ET/SRB stack and after successfully landing my shuttle, I was able to use ScrapYard's inventory to knock the time of construction with KCT from 128 days to 75 days. However, it didn't change the cost of the Shuttle stack in KSP. Is this something that ScrapYard does with KCT? (I was testing with Sandbox instead of Career.)

Another question is related to Stage Recovery and ScrapYard. Is there plans to integrate these two mods? I used SR to recover the SRBs on my shuttle stack and while SR says they were recovered successfully, ScrapYard didn't show them in inventory.

Link to comment
Share on other sites

3 minutes ago, Daelkyr said:

However, it didn't change the cost of the Shuttle stack in KSP. Is this something that ScrapYard does with KCT? (I was testing with Sandbox instead of Career.)

Another question is related to Stage Recovery and ScrapYard. Is there plans to integrate these two mods?

For the first, as of right now ScrapYard doesn't override funds. It's been set up in a way that should let it, but that setting is off right now and the UI wouldn't actually update (yet).

For the second, yes I plan on integrating the two but I haven't gotten a chance to yet. I can make that happen pretty quickly, maybe even tonight as a dev build.

Link to comment
Share on other sites

1 hour ago, Daelkyr said:

@magico13 Awesome. Is that fund override settings for something I can flip in in the ScrapYard folder or the Persistent file?

There is now. I haven't actually tested if it reads the config correctly, but a config file will generate after the first scene change now (ScrapYard/PluginData/ScrapYard.cfg). That will likely change in the future, but I figured I could at least make that really quick. Also, there's a new dev version of StageRecovery that supports ScrapYard now.

 

Oh, to everyone, if it wasn't obvious, ScrapYard requires ModuleManager but doesn't currently come with it. I'll fix that later, but if things aren't working right and you don't have ModuleManager, that's why :P

Edited by magico13
Link to comment
Share on other sites

@magico13 I'll play with this tonight. I'll have to kick you some thank you Patreon money when I get my check.

[UPDATE]

Stage Recovery works great. But even when I set the cfg in ScrapYard 

OverrideFunds = True

It still does not update the cost in the VAB. Is that beyond the scope of ScrapYard at the moment? (Again. I'm playing in sandbox if that makes a difference.)

Edited by Daelkyr
Link to comment
Share on other sites

2 hours ago, Daelkyr said:

It still does not update the cost in the VAB. Is that beyond the scope of ScrapYard at the moment? (Again. I'm playing in sandbox if that makes a difference.)

There's no code to override the cost visually yet. That will require a lot more work and I haven't officially started on the "override funds" feature yet. Right now it's got function (as in the costs will get worked out correctly overall), but not form :wink: Unfortunately for sandbox it's not going to do anything for now, but the Trello has that tentatively set for 2 weeks from now, after the first Beta.

Link to comment
Share on other sites

6 hours ago, JeffreyCor said:

Might have missed something posted but did notice there is not a very long delay with all decupplers. Is this indicative of the development code at the moment?

Yep, i'm still alive :) Just been a bit overtaxed with rl things.

I haven't done anything with decouplers. Can you elaborate? Long delay as in build time or as in they work differently during launch? If it's build time then nothing has changed at all. Maybe the decouplers are really cheap, or if you've got scrapyard and have built a bunch of things with decouplers then that would reduce their build time

Edited by magico13
Link to comment
Share on other sites

38 minutes ago, JeffreyCor said:

During flight. VAB and SPH have no problems and work smoothly. In flight though when activating a stage that includes a decuppler the game 'pauses' then functions normally again.

Are you running any other mods? Try with just KCT+ScrapYard first. Could be related to RecoveryController and StageRecovery+FMRS if you've got those three installed. I haven't seen that, but I also have a rather beefy computer.

Link to comment
Share on other sites

I do indeed have other mods, but not RecoveryController or FMRS. Was trying to spot conflicts early and was happily surprised to see there was no game breaking problems. Only change I did was going from pre ScrapYard builds or KCT and SR to the current builts along with ScrapYard. I thought it might have been something to do with part tracking on separation. This is also on an existing save, have not tried on a new save.

Link to comment
Share on other sites

1 hour ago, JeffreyCor said:

I thought it might have been something to do with part tracking on separation.

Part tracking is pretty much only at KCT build creation, KCT build completion, and rollout (or just rollout without KCT). Post rollout KCT/SY shouldn't be doing anything. Definitely shouldn't be anything on separation. Feel free to send me some logs and I can check if something is happening on separation.

Link to comment
Share on other sites

Whilst I'm away from my computer, I remember hearing issues with KCT and KK that needed a work around for launching correctly.  Is this still the case does anyone know?

Sorry if it's been addressed recently my Goooogling found something from 2014...

Thanks, Peace.

Link to comment
Share on other sites

1 hour ago, theJesuit said:

Whilst I'm away from my computer, I remember hearing issues with KCT and KK that needed a work around for launching correctly.  Is this still the case does anyone know?

Sorry if it's been addressed recently my Goooogling found something from 2014...

Thanks, Peace.

As far as I know, it's still an issue.

Link to comment
Share on other sites

1 hour ago, theJesuit said:

Whilst I'm away from my computer, I remember hearing issues with KCT and KK that needed a work around for launching correctly.  Is this still the case does anyone know?

Sorry if it's been addressed recently my Goooogling found something from 2014...

Thanks, Peace.

Yes but less than before. You have to select the launch location from the VAB / SPH in order for it to launch correctly. Changing in the KCT select launch location option seems to make it crash, at least when I've tried it. If you need to change launch locations, going into edit of the vessel and selecting the new launch location then saving the edit seems to work fine.

Link to comment
Share on other sites

4 minutes ago, magico13 said:

As far as I know, it's still an issue.

Thanks @magico13, and wow I even posted underneath that particular one!

Edit, and ninja'd by @JeffreyCor.  Thanks!

Whilst I know that your time is precious, would allowing rollouts to other KK launchpads be possibly implemented by KCT, or is it a KK issue?

Peace.

Edited by theJesuit
Ninja'd
Link to comment
Share on other sites

Just now, theJesuit said:

Thanks @magico13, and wow I even posted underneath that particular one!

Whilst I know that your time is precious, would allowing rollouts to other KK launchpads be possibly implemented by KCT, or is it a KK issue?

Peace.

It's an interesting problem. I think it'd have to be fixed in both, though I could maybe fix it KCT side by manually calling functions within KK. So, it used to work great and you could rollout to wherever you wanted and it would launch without issues. Then something changed in a KSP/KK update so that only the current KK launchsite would work correctly and all other ones would catastrophically fail. I did find in my personal testing after the issue first started that as long as you load the KK launchsite once per game session before trying to launch with KCT from the site then it would work for the rest of the game session. So I'd just fire up a simulation at the desired site before actually launching later. I'm not sure if that's still the case, but I don't think it's as difficult as that other post makes it out to be, but again I haven't tested it in a while.

I'd like to fix it so it isn't as ridiculous, but I've obviously been working on other, arguably more important, stuff lately :wink:

Link to comment
Share on other sites

2 hours ago, JeffreyCor said:

I never get anything that makes sense :P Haven't had a chance to test these independently but at least getting some time to do some things.

Log from last flight: https://www.dropbox.com/s/tm0vrjfzfoehhl2/output_log.txt?dl=0

In general I'm seeing some unexpected things regarding half of the max building upgrades being set to -1 and half set to 2 (Personally I was seeing them all set to -1 in the editor and 2 in the space center) which I'll have to add in some code to work around, but I didn't see anything crazy going on around decoupling. I did realize I need to put some logging around the vessel tracker, so there's a bit more in the latest build. Nothing (other than the building upgrades) obviously screwy in general though.

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