magico13

[1.4.1] Kerbal Construction Time 1.4.0.69 (2018-03-24) - Unrapid Planned Assembly

Recommended Posts

Dude, you know you are one of the most altruistic modders in the ksp community. I'm quite surprised at your relentlessly patient attitude towards pretty much everyone, all the time. Cheers to you for the help Magico. It's much appreciated.

As for my little farm of nullreference blah blah's, I'll fiddle around as per your suggestions and hopefully come to a solution. I don't use ckan and have already reinstalled far and dre, i'll give scansat a try.

Thanks again!

Share this post


Link to post
Share on other sites

If you're still having troubles after that, let me know and I can take a look at some more logs (preferably with as few mods as possible installed, to narrow it down more).

It helps that I wrote a java program a year ago that takes the log files, removes the useless "filename blah blah" lines, splits the log up into individual scenes, counts the number of Null Reference Exceptions per scene, and let's you filter out debug info from other mods. Makes it a million times easier to figure out what's happening in the log. Only downside is that your 60MB log requires 2.5 gigs of ram to view with it XD. There seems to be a memory leak somewhere in it :P

Share this post


Link to post
Share on other sites

Great work with 1.2.1, really like the changes.

Dude, you know you are one of the most altruistic modders in the ksp community. I'm quite surprised at your relentlessly patient attitude towards pretty much everyone, all the time. Cheers to you for the help Magico. It's much appreciated.

Totally agree! :D

Share this post


Link to post
Share on other sites
[timewarp]

That code is pretty old now, so I can probably go back through and tighten it up. I'm pretty sure I can make the slow down take way less time, but I still want to keep it gradual rather than overshooting. But I can make that take the absolute minimal amount of time.

As it is, your results are practically indistingiushable from KAC. As time warp is KAC's core business, I suspect there's little room for improvement if you want to be punctual. My suggestion was to trade some punctuality for convenience -- construction times are no maneuver nodes, after all. Coming to think of it, a point could be made that construction times should not even be given to the nearest second. (Though maybe that's just my impression: I know KCT only from RP-0, where even the most simple rocket takes a few weeks to complete.)

Share this post


Link to post
Share on other sites
(Though maybe that's just my impression: I know KCT only from RP-0, where even the most simple rocket takes a few weeks to complete.)

It probably doesn't need to be seconds precision, but how everything works internally that's actually the easiest way. All of KCT's times are in seconds and are just converted into hours or days from there. With the default settings you often see 2 day build times, and if you use purely inventory parts then you can see build times of just a few hours. Still doesn't need 100% accuracy. Part of the reason I want to avoid overshoots is that KCT has typically had issues with overshoots in the past (where timewarp never stops and suddenly you're a week past where you should be) and I'm just kinda nervous about them. I know I can prevent that with careful code, but I'd rather have it warp down a bit slower and have to take a few seconds extra time.

I do know that the buffer zone can be made smaller, to reduce the amount of wasted real time, so I'll try that first. If I can't make it much smaller, I'll add your minimum warp suggestion and allow for a bit of overlap.

Share this post


Link to post
Share on other sites
If you're still having troubles after that, let me know and I can take a look at some more logs (preferably with as few mods as possible installed, to narrow it down more).

It helps that I wrote a java program a year ago that takes the log files, removes the useless "filename blah blah" lines, splits the log up into individual scenes, counts the number of Null Reference Exceptions per scene, and let's you filter out debug info from other mods. Makes it a million times easier to figure out what's happening in the log. Only downside is that your 60MB log requires 2.5 gigs of ram to view with it XD. There seems to be a memory leak somewhere in it :P

Hmmm, that would explain my radically capricious performance, an 11-part rescue capsule @ 11 fps yet a 100-part aircraft flies @ over 24 fps. Modded KSP is like a classic car, it has to be tuned and tuned and tuned. In other words, to preserve my career save (and lets face it, proper careers take weeks to even progress enough tech tiers to start being interesting) I have to now duplicate my KSP game into a test platform and start emulating from the bare bones up, cos I sure ain't gonna remove KCT. Nor FAR nor DRE nor Scansat for that matter, these are all fundamental mods.

I'll start my testing pilgrimage and stick my hand up when and if i need some help.

Nothing else to say but thanks again man.

Share this post


Link to post
Share on other sites

It helps that I wrote a java program a year ago that takes the log files, removes the useless "filename blah blah" lines, splits the log up into individual scenes, counts the number of Null Reference Exceptions per scene, and let's you filter out debug info from other mods. Makes it a million times easier to figure out what's happening in the log. Only downside is that your 60MB log requires 2.5 gigs of ram to view with it XD. There seems to be a memory leak somewhere in it :P

For anyone interested, I've made my LogViewer application available for the general public in this thread here. It's a Java application that takes an output_log.txt or Player.log and strips out some of the useless lines, splits things up by scene, and lets you filter out other log spam.

It probably doesn't help normal users too much, but it will probably be somewhat useful to mod authors and players who are trying to track down bugs. Let me know if you have any questions/comments/concerns about it.

Share this post


Link to post
Share on other sites

Hmmm.

Whenever I enter the tracking station, all building progress is lost and the VAB/SPH rates are reset to 0.1 (I'm getting a refund, though, so I can buy these upgrades again). But I can't find any log files. Looking for recently changed files, I find savegames, craft files, a lot seems to be going on in gamedata/(mod)/whatever folders, but no log files. Do I have to enable logging somewhere?

Odd, that. This is Linux_x64; when I still played under Windows, at least the KSP.log would always be quite recent. But here, it hasn't been touched in weeks.

EDIT: OH...MY...DEITY! You have to cd into your KSP folder in order to run the game. I was doing it wrong since day one. Most things appear to work anyway (otherwise I'd not have played for weeks) but some don't. Lets see if this makes a difference.

Edit: it doesn't at least not for this issue. Loss of progress only happens when you enter the tracking station for the first time and receive the "welcome to the tracking station" dialog. Comparing savegames from before and after, the buildings and vessels are still in the pipeline, they just don't get shown. The buildings will be upgraded when the time comes, but the vessels won't show up in storage. For all practical purposes, the vessel progress is lost.

Edited by Laie

Share this post


Link to post
Share on other sites
Alright, any last minute things anyone wants thrown in before the next release?

E: Avera9eJoe, I added your requested "click on runway -> SPH tab in Build List opens / click launchpad -> VAB tab opens" but not anything else mentioned in the stream, yet.

If no one says anything before I get back from eating dinner + possibly watching some TV/a movie, then I'm gonna probably push 1.2.1 since I'm pretty sure things are as stable, if not more stable, than the 1.2 release.

E2:

KCT version 1.2.1 released!

Mostly bug fixes and the occasional aesthetic change. Read the changelog below to see what's been altered. Hopefully this fixes/reduces the likelihood of negative upgrades appearing.

I mentioned this before, but KCT's birthday is next week (August 29th) and I want to do something special for it. I'm thinking I'll try to develop a feature on a live stream but need to know which one you guys want: simulations landed on other planets, or multiple launchpads (ie, rolling out two vessels at once).

Please vote through this Straw Poll.

Changes:

v1.2.1.0 (8/21/15)

- Some tweaks to the UpFree Preset so that VAB upgrades affect the build rates and tech nodes research quicker

- Re-added automatic update checking for development builds (only)

- When pressing the launch button in the editor, the launch/sim window now appears at the mouse as a "drop-down"-like menu. To switch back, change WindowMode to 0 in the KCT_Config.txt file.

- Some potential fixes for the weird fluctuations people are seeing in Upgrade totals

- The vessel launch dialog no longer opens when clicking the runway/launchpad, but now the Build List will open to the appropriate tab automatically

- Added support for my EditorTime modlet

... Rep! ALL the rep! It's great to hear that! It was fun running through your mod on stream and I wish I was able to respond to this sooner... Going camping tends to cut your internet connections for a day or two... It was truly awesome to have you in chat. I'll be pausing my career save until KSP v1.1 drops and all relates mods update but I plan on continuing my save with KCT and SR as well as the rest of my visual/gameplay arsenal. If you ever need another few minutes of Q/A or anything else related to streaming your mods feel free to give me a shout. I'll come running.

Tally ho!

Share this post


Link to post
Share on other sites
There's apparently a few bugs with the rates not being recalculated when they should be, so just be aware of that. I'm going to see what I can do about that tonight/tomorrow. Just don't be too surprised if after the first tech finishes none of the others start up afterward (without a scene change, at least). But I'm glad it's working! I didn't get a chance to test that much before release, so thankfully it is at least mostly functional ;)

Yes, that's exactly what happened - it stopped until I changed scenes. I think it also stopped after the first node and required another scene change to get going again, but I don't remember. Anyways, not a fatal bug at all, especially since I usually go to the R&D center right after a tech is researched to see what's in the new node.

Share this post


Link to post
Share on other sites
Yes, that's exactly what happened - it stopped until I changed scenes. I think it also stopped after the first node and required another scene change to get going again, but I don't remember. Anyways, not a fatal bug at all, especially since I usually go to the R&D center right after a tech is researched to see what's in the new node.

That should be fixed in 1.2.1 by the way. I've made the nodes recalculate more often, so they should be correct now without requiring a scene change.

Share this post


Link to post
Share on other sites
With the strawpoll leaning towards multiple launch sites, does this mean we can expect at least partially compatibility with Kerbal Konstructs in the next update?

Check the 1.2.0 changelog, full Kerbal Konstructs compatibility already exists ;)

Share this post


Link to post
Share on other sites

A small question regarding the configuration and settings, how does altering the overall multiplier and build effect (and inventory effect, for that matter) change the construction time? Does it become longer with a lower multiplier, or is it the opposite?

Thanks!

Share this post


Link to post
Share on other sites
A small question regarding the configuration and settings, how does altering the overall multiplier and build effect (and inventory effect, for that matter) change the construction time? Does it become longer with a lower multiplier, or is it the opposite?

Thanks!

Short answer: It depends on the Preset.

Longer, but actually useful answer: For the Default Preset and likely any derivatives of it, the overall multiplier gets applied directly (1.0 is normal, 0.5 means all build times get cut in half, 2.0 means all build times get doubled). Build Effect and Inventory Effect work the opposite way, where bigger numbers mean less time (since they're in the denominator of the EffectivePartFormula).

For a single part ship, here is what the Build Effect does to the build times:

1 - normal build times, where the fourth build takes half as long as the first one, 16th build takes 1/4 the time

0.5 - first build would take 1.4 times as long, except that it's limited to not take longer than 1.0 times. 8th build will take half the normal time.

2.0 - first build will take 70% as long as a brand new part with a 1.0 Build Effect, second build will take half as long as a brand new part with a 1.0 Build Effect, 8th build takes 1/4 time

Inventory Effect is similar to Build Effect. For this example, let's totally ignore the Build Effect:

100 - If the part is not in the inventory, it takes 1.0 times as long as normal. If it is in the inventory, it takes 1/10 as long as normal (0.1 times)

50 - Not in inventory -> 1.0 times. If in the inventory, takes about 1/7 as long as normal (0.14 times).

200 - Not in inventory -> 1.0 times. In inventory -> takes about 1/14 as long as normal (0.07 times).

If you can't tell, there's a square root involved with the Build Effect and the Inventory Effect, which makes the changes non-linear. The Overall Multiplier is just multiplied directly onto the final calculated build time.

With a different Preset it might be totally different, since the Preset author can choose how the different Effects and the Overall Multiplier play into the formulas, including totally removing them.

Small update to KCT 1.2.2

Mostly fixes some issues observed with RP-0 and tech node rates when making them not all research at once. Additionally fixed a bug where updating a Preset would result in any saves using that Preset to switch to Custom, rather than automatically using the new settings.

(the date says 8/25 because I committed the change last night, but wanted to do a bit more testing and so didn't push the release until this morning)

Changelog:

- Fixed several issues with Tech node rates

- Fixed an issue with automatic updating of Presets

- Switched to using Planetarium.fetch.Home rather than searching for "Kerbin" or "Earth"

- Fixed some display issues with science per day/year

- Made the Upgrades window ever so slightly wider, plus a few other minor tweaks

- Should now fill tanks of Procedural Parts correctly

- Fixed bug where resetting upgrades wasn't incrementing the counter

- Rates should be more correct after saving Presets now (w/o requiring scene change)

Edited by magico13

Share this post


Link to post
Share on other sites

Teleportation from other topic :D

Are you using any Procedural Parts mods? I think there might be an issue with them and clearing the part inventory (but it should have been fixed/averted in 1.2.1). If you do see it again, please let me know as I haven't seen any reports like that before. Thanks :)

Yes I am. There is a slight issue with them stacking in silly numbers. Not only them, I saw it also on RealChutes and the stock ones modified by it. Something like this:

Name - Available - In use

Procedural Liquid Tank - 10762580 - 6393360 (FUEL)

Airstream protective shell - 50000 - 1178893 (AERO)

Fairing base - 13285 - 0 (AERO)

Procedural Nose Cone - 70660 - 0 (AERO)

Procedural Heatshield - 316001 - 0 (AERO)

Stack-mounted Parachute Module (1.25m) - 1012099 - 0 (UTIL)

RealChute Cone Chute - 6567588 - 547299 (no category)

Mk2-R Radial -Mount Parachute - 634000 - 0 (no category)

Mk16 Parachute - 973598 - 0 (no category)

Accumulated after two in game years. Also I do remember having a weird glitch with launch button. It was always inactive, had to do launches/simulations via the KCT button. Although after doing some reinstalling and reverting saves - it works as intended (also did that part purging thing - no error so far).

Share this post


Link to post
Share on other sites

The numbers should be weird because of how Procedural Parts are stored in the inventory in order to keep them procedural. Essentially they're stored as 100 times their cost, so that way you don't use them on a per part basis, but instead by amount of material used. So if you recover a tiny 0.625m procedural part you can't get the full time saving bonus when making it a 5 meter part, but you can recover a big 5 meter part and use it to make several 0.625m parts.

Unfortunately the inventory was created before Procedural Parts were a thing, so it wasn't designed in a way that makes procedural part storage intuitive and I had to come up with the "100 times the cost" hack. RealChutes work that way because the module they use has the word "procedural" in it (ProceduralChute).

Share this post


Link to post
Share on other sites

Ohhhh... ok then. Those numbers aren't that bad, as I don't see them that often. Also I tried to replicate that bug mentioned earlier. 1.2.2. does work fine, no problems with the launch button or the part purging so far.

Share this post


Link to post
Share on other sites

- Should now fill tanks of Procedural Parts correctly

I wasnt able to get this to work. It just didn't fill tanks. I am using realfuels if that matters. LEt me know if you need more info, Thanks!

Share this post


Link to post
Share on other sites
I wasnt able to get this to work. It just didn't fill tanks. I am using realfuels if that matters. LEt me know if you need more info, Thanks!

Ok, thanks! I've recently started playing with RP-0, so I'll probably experience this myself soon (and have an install that I can easily test it on). By chance did you look to see if an error was logged? Just have the Alt-F2 window open when you click the button and check for a red NullReferenceException. I'm guessing it had an error when trying to figure out if the part was procedural or not. What it should be doing is using the default fuel levels if it isn't procedural (thus filling tanks and emptying waste), and completely filling everything if the part is procedural (which would include filling "waste" and things that shouldn't be filled for free, like "antimatter" and stuff like that)

Share this post


Link to post
Share on other sites

Hey magico13. How are ya? Just poping in here to leave my congratulations on the mod is birthday XD

Really like the improvements made to the backend and interface, sweet! Be checking you on twitch.

Edited by Gfurst

Share this post


Link to post
Share on other sites

KCT Birthday Stream is going live, right here: http://www.twitch.tv/themagico13

Gonna be trying to develop multiple launchpads. We'll see how far I can get :P

Edit: After 4 and a half hours, the stream is finished! Thanks to everyone who stopped by :) By the end I had a working, but still quite buggy, implementation of multiple launchpads. After all the bugs have been tracked down, then I'll release it as 1.2.3 (probably not today). For those of you who want to test out what I came up with, download the latest .dll from here.

The video should be up on Twitch for the next week or so, here.

It would have been nice to talk to a few more KCT users (would have been a great time to request features :P) but it was fun nonetheless. I'm not sure if I'll do another development stream in the future or not, I'll let you all know if I do :)

Edit2: Apparently a small portion got muted :/ Which is lame because I was playing music from NoCopyrightSounds, which was supposedly OK for streaming. It was only about 5 minutes out of 4 hours, so there's plenty of video that's totally fine.

Edited by magico13

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.