Jump to content

Kerbal Construction Time/StageRecovery Dev Thread


magico13

Recommended Posts

Because their is no inventory at present, edit times are likely very wacky. I believe this will be addressed when the inventory is put back in but it is certainly something to keep an eye on.

Having one build list open automatically is just as or more annoying if you want a different list. Having one open by default will undoubtedly lead to complains from people not wanting that particular list open. Having some option may be something to consider if it is not overly complicated.

The window width size is certainly something I'd also like to see looked into since it isn't resizable. The same issue comes up if there is a long vessel name. Having a wider window, or resizable, would be great to see :)

Link to comment
Share on other sites

2 hours ago, DiEvAl said:

It'd be really nice to have build list open by default when you go to the KSC screen. It's annoying to have to open it manually every time.

It's supposed to, but the order of things is messed up and it isn't respecting that I think. I'll try to fix it while I work on the new game bug.

The UI really needs another overhaul but that won't be happening any time soon. I might be able to make it resizeable though.

 

Editing times (are supposed to) work like this: take the completed BP of the ship, subtract 1.1 times the change in BP from the edit, and that's the new currently complete BP. In numbers: Ship that is 50% complete and is 200,000 BP has 100,000 BP completed (~28 hours left at 1 BP/s). If you edit and the new BP is 175,000 then the completed is 100,000-1.1*25,000 = 72,500 (41.4% or 35.4 hours at 1 BP/s). If instead the new BP is 225,000 then the completed is still 72,500 but that's only 32.2% and 42.4 hours. Because it's just BP based, replacing parts with similar costs (since BP is cost based by default) can actually result in no reductions in % complete.

The sooner you edit the better, since the completed can't go below zero. So worst case scenario it's the same as if you built it new.

When the inventory works it gets more complicated, since the BP values get all wonked up by the inventory and things get extra weird with adding new parts from the inventory.

Link to comment
Share on other sites

I've actually seen some extreme swings myself. One example was adding a thermometer to a plane took 4 days to complete and changed the build information from 100% to 0% whereas other times doing changes resulted in a fractional change as indicated.

Link to comment
Share on other sites

55 minutes ago, JeffreyCor said:

I've actually seen some extreme swings myself. One example was adding a thermometer to a plane took 4 days to complete and changed the build information from 100% to 0% whereas other times doing changes resulted in a fractional change as indicated.

I've noticed times where it definitely wasn't behaving properly but it hasn't been a high priority.

What has been a high priority is the new game bug. I think I've got it sorted out now, but there's a decent chance I've introduced more problems. Grab the _3.dll build from here if you want to test. (put it in GameData/KerbalConstructionTime/Plugins and delete anything else you have in that folder)

 

Edit: Snuck in "fixes" for the rollback bug and the scrollbar. AKA made it so you can't scrap when rolling out/back (since that wasn't intended) and made the build list 100 pixels wider (500 vs 400)

Edited by magico13
Link to comment
Share on other sites

24 minutes ago, JeffreyCor said:

As long as you're aware of it, that's what we're here for :)

New bugs introduced in an update, that never happens :wink: Will start testing it tonight once I finish work :)

Hopefully it's good because I won't have another free night for a few more days. Almost done painting. Almost...

Link to comment
Share on other sites

2 hours ago, JeffreyCor said:

I've actually seen some extreme swings myself. One example was adding a thermometer to a plane took 4 days to complete and changed the build information from 100% to 0% whereas other times doing changes resulted in a fractional change as indicated.

Well, if you order changes at 3PM on the friday of a long weekend, of course it's going to take 4 days...

Link to comment
Share on other sites

Theorem: build time calculations are seriously f***ed up.

Proof:

Spoiler

 

I've recovered this craft (I know it looks weird, I built it for part contracts :P):

WT6am5I.png

and removed quite a few parts (an engine, a science bay, a parachute, and a bicoupler)

iY00WfC.png

Let BP0 be original "cost" of the craft, and BP1 be the new "cost". The ship was 100% complete, so the new completion must be BP0 - 1.1(BP0 - BP1). The remaining BP is BP1 - BP0 + 1.1(BP0 - BP1) = 0.1(BP0 - BP1) = 0.4(22*60+9) = 443.6. So the removed parts must be worth 4436 BP.

Then I undid everything, clicked the stock save button and KCT cancel button. I reopened SPH, loaded the same craft, and deleted everything except for those parts.

f87GbvC.png

But now the build time is 15 days, i.e. 0.4*15*6*60*60=130000BP. So we calculated the same quantity in 2 ways, and got results that differ by a factor of 30. QED.

 

 

 

EDIT: booo, you haven't pushed your code to github in 4 months :(

Edited by DiEvAl
Link to comment
Share on other sites

On 10/28/2016 at 4:32 PM, JeffreyCor said:

 

The forum software is really crappy on mobile :/

 

@DiEvAl check the Development branch. The code was updated several times today. And plug your costs directly into the BP formulas. You make the very invalid assumption that BP is linearly related to cost, but BP is related to the square root of total cost. Just the parts by themselves will take much longer than if you put those parts on a big vessel.

Sqrt(100)=10, but sqrt(10000)-sqrt(9900)~0.5

Link to comment
Share on other sites

I'm enjoying this, but it's very different without the parts inventory. My build times just don't seem to be coming down very quickly compared toy previous KCT experiences, because I've always been really good about recovering my dropped stages. It's taking awhile to adjust to the new normal. :-)

Link to comment
Share on other sites

I think I remember that it was possible to award KCT build points from other mods. I have forgotten were I saw that, and a few forum searches didn't help me. If one of you remember how, could you post a link, tell how it is done or quote a code example. Thanks.

Link to comment
Share on other sites

1 hour ago, Rodhern said:

I think I remember that it was possible to award KCT build points from other mods. I have forgotten were I saw that, and a few forum searches didn't help me. If one of you remember how, could you post a link, tell how it is done or quote a code example. Thanks.

It was planned but never fully implemented. I was going to write an API, which would really just require a total rewrite to be done correctly. There is a way to do it, by modifying either:

public static int KCT_GameStates.TemporaryModAddedUpgradesButReallyWaitForTheAPI;

or

public static int KCT_GameStates.PermanentModAddedUpgradesButReallyWaitForTheAPI;

 

The former is reset to zero when the main menu is loaded and the latter is saved in the save file. So you can use reflection (or build against KCT directly) to modify those and it will add upgrade points that the player can spend.

Link to comment
Share on other sites

I don't mean to sound dumb, but I'm not sure what to do with the files I downloaded from the dev build link.

Do I replace the MagiCore.dll inside the KerbalConstructionTime folder with the other one?  And what should I be doing with the KerbalConstructionTime_ksp1.2.3.dll file?  I'm sure it's very self-explanatory, but I don't seem to be getting it.

Link to comment
Share on other sites

28 minutes ago, MerlinsMaster said:

I don't mean to sound dumb, but I'm not sure what to do with the files I downloaded from the dev build link.

Do I replace the MagiCore.dll inside the KerbalConstructionTime folder with the other one?  And what should I be doing with the KerbalConstructionTime_ksp1.2.3.dll file?  I'm sure it's very self-explanatory, but I don't seem to be getting it.

Hello MerlinsMaster, I'll be glad to walk you though it. :)

Since it sounds like your first install, get KCT_base.zip and unzip the contents into your GameData folder. This gives you the base files and MagiCore.dll

Next, download the newest version of the KerbalConstructionTime DLL, which is currently 1.2_3. Place this in GameData\KerbalConstructionTime\plugins

Now you'll be all set to go to start testing and see what breaks :) If you have problems or something doesn't make sense just let me know.

Link to comment
Share on other sites

3 hours ago, Kertech said:

just wondering if anyone else has found that anything recovered to SPH will change orientation so that the root faces up (like a rocket)

Known issue for a long time. Grabbing the root part in Edit mode will cause it to flip to the correct orientation. I'll try to look at this, and the "ships can be in ceiling" bug since recovering to storage is going to be more important this update without the part inventory.

See this related github issue: https://github.com/magico13/KCT/issues/82

Link to comment
Share on other sites

Is there any way that the KCT window can always be open in the space center screen?  Every time I exit the VAB, I have to click the icon to bring it up again. That ends up being a lot of times....

If it could also automatically open whichever list was open last (VAB build list in my case) that would also be very convenient.

Love the mod.

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