Jump to content

Kerbal Construction Time/StageRecovery Dev Thread


magico13

Recommended Posts

Ah ha, a plot to keep me on my toes noticing things ;)

Having the build server up would make this 10 times easier since I could tell it to also include the Presets with every build, and I'm too lazy to manually .zip everything up when I put it on dropbox :P I miss the server :( It's totally messed with how I normally do things (outside of modding) by not having it for the past week. I've had to transfer files between computers with flash drives. Flash drives! How archaic! The other day I was referencing a song and decided "Oh, I'll just play it on my phone really quick!" except that I don't have it on my phone because it's on the server. Plus the whole "terabytes of my data isn't accessible to me right now, and though I've backed it up I still feel like it could go missing at any point" thing.

Basically, having a personal server for the past ~6 years and suddenly not having one for a week has been really awkward.

Link to comment
Share on other sites

Got an interesting editing bug that came up. After building a ship in the VAB and had it completed went into edit to make a change. The editor loaded the vessel in the SPH. :P Looked quite funny poking though the roof but wasn't exactly editable that way ;) It is looking like the part that loads what to edit in when clicking the edit option is getting confused.

Also, scrap vessel is refunding the funds, but the ship is remaining on the list allowing for it to be scrapped repeatedly as a money cheat :P

EDIT: whatever caused it to stay on the list is now also causing it to remain after launch and recovery. looks like something got broken, either here or compatibility with another mod that was updated.

Log for hopeful clues: https://www.dropbox.com/s/po1xhoi2n7jx65y/output_log.txt?dl=0

Edited by JeffreyCor
Link to comment
Share on other sites

Hmm, no errors being logged, which sucks because it means I probably did something wrong :P My guess is that the editor info didn't get set properly (same issue that prevented you from loading your old games), which would explain why it's not being removed from the list (it can't be found, though I thought the removal code was pretty extensive and searched EVERY list if it can't find it in the right place). Quick question, do you have Kerbal Konstrcuts installed? It recently updated and I'm afraid the changes might have messed up the compatibility things I did, but I haven't gotten a chance to check.

Well this is a seriously concerning message: "[KCT] Could not find the KSC to remove vessel!" and explains at least why it couldn't be removed. Apparently it can't find the KSC that the vessel belongs to (which it does by searching every KSC for the vessel). My guess is that the Editor identifier got messed up in the vessel data. You might need to fix that manually in the save file, and I might need to add some extra thorough checks to put the vessel in the correct place.

Link to comment
Share on other sites

Debug messages are on because I built the .dll in debug mode and you can't turn them off then ;) I'll look into it when I get a chance. Send me that save if you can, so I can take a look at what nonsense it's saving (and tell me the vessel name)

Link to comment
Share on other sites

The EditorFacility is listed as 0. I'm pretty sure that's not correct... Rescue Rocket is the same way. Wanna try editing that (in the VAB) to see if it has the same issue? If so, then at least I know that's the problem and I can try to fix it.

I'm pretty sure EditorFacility should be 1 for VAB related things. This tiny change is proving to be a nightmare :/

Edit: Also, not directly related to this. If you've ever used Kerbanomics before, there's a chance I'm taking that over (or at least doing a compatibility update) and I'll likely need some help testing it when the time comes. It'll be this weekend at the absolute earliest, but likely some time next week.

Edit2: Alright, if that doesn't find it then I don't know what will. You'll have to load up your save, then switch scenes so that it saves, then when you go back it should hopefully be working properly.

Edited by magico13
Link to comment
Share on other sites

Why is it the smallest changes seem to create the most problems? :P

I had used Kerbanomics before but not recently. I'll certainly jump in on testing that as well if you do take over on that :)

Editing those ships not to change EditorFacility = 1 and see what happens.

And that did seem to work. Editing went to the correct building and scrapping removed the vessel from the list :)

Link to comment
Share on other sites

And that did seem to work. Editing went to the correct building and scrapping removed the vessel from the list :)

I also increased how rigorously it searches for the ship when it can't find it, so hopefully we're done with those issues now...

Off the top of your head, is there anything else that NEEDS done before release?

Is there anything else that maybe should be done but isn't necessary?

The only things I can think of for sure right now are 1) adding a way to cancel tech nodes (and maybe KSC upgrades) and 2) trying to get the RemoteTech "integration" for simulations working correctly. Maybe also changing the KSC upgrade formula like the tech node one where you can change between All At Once and First-in, First-out for how the rates are calculated.

Other than that, I think it's ok. I do need to test KK compatibility again, just to make sure it's alright.

Link to comment
Share on other sites

I don't see any horrible problems that need to be fixed before release now.

A nice feature would be to be able to rollback ships that are ready for launch if something is thought of. Right now it is possible if you have another ship to roll out as that makes the current one on the pad roll back, but there isn't just a roll back by itself once it is all the way out there.

Even lower on the list, maybe a way to boost tech node or facility upgrade similar to how extra funds can be paid to speed up vessel construction.

Link to comment
Share on other sites

A nice feature would be to be able to rollback ships that are ready for launch if something is thought of. Right now it is possible if you have another ship to roll out as that makes the current one on the pad roll back, but there isn't just a roll back by itself once it is all the way out there.

Next time you've got that situation, hold the Alt button and see what happens ;)

As for boosting tech nodes/KSC upgrades, I'll think about it. I'm not totally sure if I even like the ability to boost vessel construction.

Link to comment
Share on other sites

Now I'm going to load it up just to see that Alt does :P

I've used the boosting construction a few times, especially on rescue or emergency missions when I didn't have what I needed on standby. A higher cost might be something though to make it something to use only when it's really needed and not as a sidestep around the production line build rate.

Link to comment
Share on other sites

I was playing around with ways to penalize excessive idle time warp when I 'discovered' an easy (hack-ish) way to extend those first four essential contracts (Gather scientific data, Launch first vessel, Escape the atmosphere and Orbit Kerbin).

I play KCT with a lower difficulty preset, but I imagine that those of you that play on hard difficulty and default preset must really need extra time to get those four contracts to kick off the Space Program (?).

This short F# mod will withdraw the contracts at every Space Center load, which results in the contracts getting reoffered with fresh deadlines. That way you don't miss out on the vital first four contracts.


namespace ExtendEarlyContractExpiry

open UnityEngine
open KSP
open Contracts


type
[<KSPAddon(KSPAddon.Startup.SpaceCentre, false)>]
ExtendEarlyContractExpiry () =
inherit MonoBehaviour ()

member public thismod.ExtendExpiry () =
let timecut = 10.*6.*3600.
// keep withdrawing (and reoffering) contracts on each Space Center load
Contracts.ContractSystem.Instance.Contracts
|> Seq.filter (fun contract -> contract.ContractState = Contract.State.Offered)
|> Seq.filter (fun contract -> contract.DateExpire < timecut)
|> Seq.filter (fun contract -> Set.contains (contract.Title) (Set.ofList
["Launch our first vessel!";
"Escape the atmosphere!";
"Gather scientific data from Kerbin.";
"Orbit Kerbin!"]))
|> Seq.iter (fun contract -> do contract.Withdraw ())

member public thismod.Start () =
thismod.Invoke ("ExtendExpiry", 3.f)

Link to comment
Share on other sites

I don't ever remember having issues with those, but I also haven't started a new game in a while. I'll do some testing to see how reasonable it is to complete those contracts. I was under the impression they never expired, at least when you accept them, but at that point in time you can only have two contracts selected at once so you might still miss two of them.

Link to comment
Share on other sites

... so you might still miss two of them.

Yup, that is exactly the problem. Often you only have two or five days to accept the contracts. I think it is reasonable to allow the deadlines to stretch enough that you can get the "Gather science" and "Launch first vessel" done first and then accept the two others.

Link to comment
Share on other sites

Yup, that is exactly the problem. Often you only have two or five days to accept the contracts. I think it is reasonable to allow the deadlines to stretch enough that you can get the "Gather science" and "Launch first vessel" done first and then accept the two others.

I wonder if I can override the time limits completely and set them to never expire. Or to give you like a year to accept them. I can read your F# code well enough to see that I can at least get the time limit, so I might be able to set it as well. I'll check when I get home.

Btw, I'm planning on releasing today (since RP-0 released) so if there's any last minute things you can think of that need added and/or tested, let me know. I did run into an error when trying to clean out the inventory a little while ago but haven't gone back and tested that since.

Link to comment
Share on other sites

THE BUILD SERVER IS BACK, BABY! :D:cool:

It's about the only thing configured on my server right now, but Jenkins is (mostly) up and running now!

http://magico13.net:8080/job/Kerbal%20Construction%20Time%20Development/

- - - Updated - - -

Yup, that is exactly the problem. Often you only have two or five days to accept the contracts. I think it is reasonable to allow the deadlines to stretch enough that you can get the "Gather science" and "Launch first vessel" done first and then accept the two others.

So I just tested something. I let the clock run for about 15 days, and those contracts were still there. I watched one run out of time, and it came back. I think those ones just keep coming back until you do them. I'm doing more testing right now by playing through the first few launches. My first launch was 3 days later and I didn't accept the "Gather Science" contract before that

Edit: Can confirm. Those contracts regenerate until you complete them (or at least complete some other important event that makes the contract generator generate other contracts. Haven't tested that far, but I am 7.5 days into this save and they're still showing up)

Edit: Alright, I think I'm gonna feature freeze and release now. Hopefully we didn't miss too much, otherwise I'll be busy this weekend! Rodhern, I'm including your Preset in the download. If you want me to remove it for future versions, just let me know.

Edit: Released! Crossing my fingers that I didn't leave any obvious bugs hanging around... I expect to wake up to about a thousand support requests tomorrow :/

Edited by magico13
Link to comment
Share on other sites

Edit: Can confirm. Those contracts regenerate until you complete them (or at least complete some other important event that makes the contract generator generate other contracts. Haven't tested that far, but I am 7.5 days into this save and they're still showing up)

Heh, thanks, good to know. That is quite amusing when I think about the juggling tricks and planning headaches that I put myself through at the start of my KSP games. I never did allow time to pass far enough ahead to see that the contracts get reissued. :-)

Thank you for including the preset, I think it is a good idea to bundle a varieties of presets with the mod package (presently there isn't an unwieldy abundance of presets anyway).

Just read the news about the possible future API and Contract Configurator missions to earn KCT upgrades. That is a brilliant idea!

Link to comment
Share on other sites

Small update to KCT to add the * menu to rolled out craft so you can roll them back without having to press Alt (since it's not obvious to do that). Also made some balance tweaks to the UpFree Preset to make it so the VAB has an effect on the build rates and so the Development time isn't ridiculously slow. Additionally, changed up the tech node counting code a bit and am hoping that reduces or eliminates the negative upgrade counts that some people are seeing (especially with existing saves).

If you get negative upgrades, send me logs and your save file!

Also, don't worry about the ridiculous number of failed builds. I updated mono recently and as a result totally broke the mono 3.5 version of xbuild and needed to fix that some how. It seems to be working correctly now.

Edit: Forgot to post the new rates for UpFree:

Development:

R&D 1: 2 sci/day

R&D 2: 10 sci/day

R&D 3: 20 sci/day

(balanced around taking ~50 days for the most expensive node available at each tier. Upgrading early is beneficial)

Build rates (summary: R&D upgrades give 0.5, Editor upgrades give 0.25 and unlock more rates)

[table=width: 500, class: grid]

[tr]

[td][/td]

[td]Editor 1[/td]

[td]Editor 2[/td]

[td]Editor 3[/td]

[/tr]

[tr]

[td]R&D 1[/td]

[td]1.0[/td]

[td]1.25/0.25[/td]

[td]1.5/0.5[/td]

[/tr]

[tr]

[td]R&D 2[/td]

[td]1.5[/td]

[td]1.75/0.75[/td]

[td]2.0/1.0[/td]

[/tr]

[tr]

[td]R&D 3[/td]

[td]2.0[/td]

[td]2.25/1.25[/td]

[td]2.5/1.5/0.5[/td]

[/tr]

[/table]

Edited by magico13
Link to comment
Share on other sites

Hi

i'm using the GameStates.TotalUpgradePoints before to add upgrades points. (inside a PartModule & a ContractConfigurator Behaviour)

I need to use MiscellaneousTempUpgrades instead?

i can't find a field for this inside the new savefile.

(sad)

Link to comment
Share on other sites

I wasn't aware anyone was doing that, so I didn't leave in any way of doing that. I can attempt to put in a temporary workaround for you in the next update. When I do the next big update the API is the main priority.

Link to comment
Share on other sites

Perfect!

thanks

I added in two things you can modify in KCT_GameStates to adjust the number of upgrades:


public static int TemporaryModAddedUpgradesButReallyWaitForTheAPI = 0; //Reset when returned to the MainMenu
public static int PermanentModAddedUpgradesButReallyWaitForTheAPI = 0; //Saved to the save file

You can change the first one if you keep track of the total number of upgrades. The second one saves to the save file, which is how TotalUpgradePoints worked. Obviously, those are temporary variables and once I write the API I'll be removing them.

The server had another failure during this past week and I had to set everything up again. Jenkins is working properly again, and I've released a new development version. It's just got a few bug fixes, but I also reenabled automatic update checking for the development versions (full release won't have update checking) since there's really no good way to figure out if I've released another update otherwise. The default is based on if you chose to send progress tracking data to Squad. You can enable/disable it in the settings or the config file. It shouldn't check until after the first scene change (meaning you can disable it before it makes a check).

Don't forget to check the commit log to see what's changed recently: https://github.com/magico13/KCT/commits/development

Link to comment
Share on other sites

  • 2 weeks later...
The vessel launch dialog no longer opens when clicking the runway/launchpad

I agree this is the best best default behavior for new KCT players. Maybe it could be an option in the KCT_Config.txt file to not auto-close the vessel launch dialog though. The reason is that I still think the vessel launch dialog is the best ship design browser.

Link to comment
Share on other sites

  • 4 months later...
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...