Jump to content

Kerbal Construction Time/StageRecovery Dev Thread


magico13

Recommended Posts

1 hour ago, magico13 said:

Alright, I need all of your help. Per the ScrapYard Trello, ScrapYard is officially ready for Beta! :o I'm going to set that up a release thread in the next few days, but before the official Beta drops I'd like for you all to hammer it with anything you've got to uncover any bugs that are hiding under the carpet, behind the curtains, and in the cupboards. Interaction with KCT isn't as important as just ScrapYard itself, but it is important to also run tests with KCT since that will test the API as well. Basically both situations need to be tested thoroughly. What doesn't matter is the Override Funds option, since that's not an official feature yet.

-snip-

lll go through as much of this as I can, I am actually using KCT plus scrapyard in my career right now and it appears to be doing exactly what it should. Except for some funkiness regarding editing a craft that's being built which has pre built parts added to it.

I need to do some more tests to see exactly what's happening but it seems that if I build a craft and apply scrapyard it reduces the build time. If i then edit it while building applying inventory again sometimes increases the buildtime.. It looks like what happens is when you apply inventory to a build it removes the inventory by 1 for each part as expected, then when you edit the craft it looks in the inventory for the items, sees none because they're already being used for the craft in production, then makes the build time based on inventoried craft. I don't know if saving the edit returns those parts back to the inventory again, it'll need testing.

Is there an easy way to see the actual inventory being stored'? It would make scrapyard testing so much easier.

Ok nvm I found the relevent info in persistant .sfs.

I may have found a problem, there is duplicate entries.

Take this for example:

			ScrapYard.InventoryPart
			{
				_name = SR.Battery
				_dryCost = 15
				MODULE
				{
					name = ModuleSYPartTracker
					isEnabled = True
					ID = 784f9563-cd0d-4ec8-91bf-babe1c317bba
					TimesRecovered = 2
					Inventoried = True
					stagingEnabled = True
					EVENTS
					{
					}
					ACTIONS
					{
					}
					UPGRADESAPPLIED
					{
					}
				}
			}

Does times recovered track the amount of this item in the inventory?

Unfortunately above this entry on the list I can find:

			ScrapYard.InventoryPart
			{
				_name = SR.Battery
				_dryCost = 15
				MODULE
				{
					name = ModuleSYPartTracker
					isEnabled = True
					ID = be47a1e2-8ed5-4b54-86b1-06152efbf8e0
					TimesRecovered = 1
					Inventoried = True
					stagingEnabled = True
					EVENTS
					{
					}
					ACTIONS
					{
					}
					UPGRADESAPPLIED
					{
					}
				}
			}

Addittionally there is another entry for it with Times recovered 1, another with times recovered 2, and another with times recovered = 0.

Edited by MarcAFK
Edits
Link to comment
Share on other sites

I'm using build 23 in an RP0/RSS/RO install and finding that I can't unlock already in-process tech research unless I have enough science for it.

So I've got 7.8 science and Supersonic flight is in the queue and costs 1 science so I can 'unlock it again' and i get the "it will unlock in infinity days NaN" message and it unlocks (science stays at 7.8), but I also have Early Avionics in the queue which costs 10 science and it just gives me "Not enough science to research this node".  That blocks me from being able to access and queue up Basic Avionics which I could get for 5 (and blocks me from getting the upgrade points now as opposed to later).

I can give you logs and such, but I don't think there's anything too relevant in there, and this seems fairly straightforwards.

Link to comment
Share on other sites

10 hours ago, MarcAFK said:

[Note, I've snipped out a bunch of stuff -magico13]

Except for some funkiness regarding editing a craft that's being built which has pre built parts added to it.

Is there an easy way to see the actual inventory being stored'? It would make scrapyard testing so much easier.

I may have found a problem, there is duplicate entries.

Does times recovered track the amount of this item in the inventory?

I'm not surprised by editing a vessel being a bit goofy. It's one of the situations I need to look at.

Currently you can't view the inventory, it's one of the main things I want to work on during/post Beta. Not required for the mod to be fully functional, but definitely required for it to be easy to use.

The inventory isn't a Dictionary anymore, it's a HashSet, meaning every single part in the inventory is stored individually (and no duplicates are allowed). Since every part has a unique ID (stored in the ModuleSYPartTracker) every single part is trackable from the moment it is placed in the editor, to the point where it is destroyed in flight. So there's no count stored anywhere. TimesRecovered is the number of times an individual, particular part has been recovered. That same exact part. Which is a core feature of ScrapYard (that KCT doesn't care about yet, but part failure mods might be very interested in).

8 hours ago, Jim DiGriz said:

I'm using build 23 in an RP0/RSS/RO install and finding that I can't unlock already in-process tech research unless I have enough science for it.

I'm pretty sure it's been that way forever, but I might be able to allow you to unlock in-progress nodes. Actually, I think it used to work that way but KSP changed some stuff and the UI doesn't update properly when I manually unlock a node. Hmm. No promises, but I'll look into it again.

Link to comment
Share on other sites

On 5/3/2017 at 1:01 PM, MarcAFK said:

I'm not having trouble with unusual build times with earth time turned on, and kerbin system resized by 8.8 and day lengths rescaled by an extra 4.0095 using sigma dimensions to get exactly 24 hour days and 365 day years.

How long are your build times? I'm getting 5 and  half days to make a mk 1 pod with 0.1 points  on the default config.

day length multiplied by 4.0095 would not give you days of 24hrs

would give you solar days of 24h 3' 25.2''

 

to get 24hrs for a solar day just multiply by 4

Edited by Sigma88
Link to comment
Share on other sites

43 minutes ago, JeffreyCor said:

Wouldn't storing information on every part lead to late game bloat and lag as parts storage grows after multiple ships and designs are built and recovered?

That's one of my concerns. ScrapYard itself won't slow down much, except maybe during scene changes (I might be able to fix that if it becomes a problem). I don't think Flight will slow down much if at all since that would be affected more by the number of ships active (which increases save size) but I don't think increased save size will affect Flight. Saving might take a bit longer (I might run some performance tests on it).

Unfortunately it's the only way to make it work. Fortunately, only some modules are tracked, so for each part substantially less lines are needed in the save for an InventoryPart than for a regular part on a Vessel. I might be able to strip down how ModuleSYPartTracker is saved on the InventoryPart so that regular parts take up tiny amounts of space (like only 5-10 lines, whereas a part on a Vessel can take 30+).

Basically, bloat, yes. I can maybe reduce it a bit more, but the only "fix" is a separate file, which introduces a bunch of other problems. Lag, probably not, other than increased save/load times in late game since there's more to store. Also, as the Override Funds option comes into play I expect people will keep their inventories decently managed since you'll want to sell off any parts you aren't using regularly. Same with older parts that have been recovered a bunch of times.

Edited by magico13
Link to comment
Share on other sites

2 hours ago, magico13 said:

I'm pretty sure it's been that way forever, but I might be able to allow you to unlock in-progress nodes. Actually, I think it used to work that way but KSP changed some stuff and the UI doesn't update properly when I manually unlock a node. Hmm. No promises, but I'll look into it again.

I'm running through NathanKell's 1.1.3 RP0 playthrough from last year (but playtesting on 1.2.2) and I think you were able to unlock-in-progress-without-science.  I'll try to pay more attention to it and see if I catch it working on the vids from last year.

There was the known UI klunkiness where in-progress wouldn't show as unlocked and it would do the "unlocked in NaN days" thing when you clicked on it, but i think it would unlock, even if you had zero science...

I could totally buy that 1.2.x broke an API and that you can't fix it tho, it 'smells' like it might be that kind of bug...

Link to comment
Share on other sites

1 hour ago, Sigma88 said:

day length multiplied by 4.0095 would not give you days of 24hrs

would give you solar days of 24h 3' 25.2''

 

to get 24hrs for a solar day just multiply by 4

Yeah I'm not sure why, but the displayed rotation period doesn't read 24 hours exactly unless i have the day length multiplier set to that number. Could be a small rounding error from resizing the system. Btw I chose 8.8 resize for the system because it seemed that the actual solar year length wasn't correct for smaller or lesser amounts.

Link to comment
Share on other sites

23 minutes ago, MarcAFK said:

Yeah I'm not sure why, but the displayed rotation period doesn't read 24 hours exactly unless i have the day length multiplier set to that number. Could be a small rounding error from resizing the system. Btw I chose 8.8 resize for the system because it seemed that the actual solar year length wasn't correct for smaller or lesser amounts.

This is because the displayed value is the sideral rotation period

The solar rotation period is slightly longer

Link to comment
Share on other sites

Being able to sell off unneeded parts will go far in reducing any bloat! I haven't been able to get into detail on what it tracks (4 weeks left got my MBA). Does it track the aspects of the part, ie ISP values, thrust, tank capacity, dry mass? If it does, it might need to be listed on the future GUI for selling off "old" versions after upgrades have been done such as with KRnD (love that mod! :) ), if they aren't it can just be considered upgrade applied in maintenance :wink:

Link to comment
Share on other sites

43 minutes ago, JeffreyCor said:

Being able to sell off unneeded parts will go far in reducing any bloat! I haven't been able to get into detail on what it tracks (4 weeks left got my MBA). Does it track the aspects of the part, ie ISP values, thrust, tank capacity, dry mass? If it does, it might need to be listed on the future GUI for selling off "old" versions after upgrades have been done such as with KRnD (love that mod! :) ), if they aren't it can just be considered upgrade applied in maintenance :wink:

No, it just tracks the part name, dry cost, a unique ID*, times recovered*, whether it's from the inventory* (since times recovered can be 0), and any modules that are defined to be tracked (TweakScale, everything procedural, any part that has had an Upgrade Applied. This list is designed to be highly configurable.). Right now there's no UI, just a button that when pressed goes through all the parts on the vessel in the editor and sees if there are any exact matches in the inventory, minus the ModuleSYPartTracker. If there's a match, the part tracker gets copied onto it (therefore the ID and times recovered are updated on the part), and then on build those parts are pulled out of the inventory.

(* Through the ModuleSYPartTracker module applied to all parts upon creation.)

For instance, if you've got a part that uses tweakscale to go from 1.25m to 2.5m and you have the 2.5m version stored in the inventory, if you have the regular version on a vessel in the editor then applying the inventory won't do anything. But if you use tweakscale to make it 2.5m and then apply the inventory it will pull the part out of the inventory. That means that if you can't recreate the part in the editor, you can't get it out of the inventory right now.

I plan on making a UI where you can see all the parts in the inventory and "grab" one of them, turning it into a part stuck to the cursor with all the right modules applied. So if you've got parts with some upgrades but not others, you could still use the old version (in theory). I have a few designs in my head for that: A) Alt+Right click a part in the part list on the left to see a new window pane with the list of all the forms of that part in the editor (click a procedural tank and see all the different ones you've made, click one of those to make a part with those dimensions appear), or B) in the right click menu on a part in the editor, press a button to see a list of all forms of that part, then click one of those and it will automatically apply it to that part (resizing and such), or C) press the ScrapYard button to open a new window where you can see every part in the inventory and click it to make it appear in the editor. I might do a combination of all of those. Or I might do A with a little symbol next to the source part in the part list if it's got forms in the inventory, with a special category that only shows parts in the inventory. I like A since it works nicely with stock.

Link to comment
Share on other sites

Fixed several ScrapYard bugs, some of them decently major. Examples are TweakScale not working, but that was a config thing. Another is that you could change a part after applying inventory and it would still "count" as being from the inventory (fixed by checking at processing time and once a second in the editor that the parts are valid configurations). TweakScale and Procedural Parts seem to be working as expected, but the SRBs in Procedural Parts aren't because the dry cost is getting set too high (I'm pretty sure that's why). I haven't figured out what's causing it to fail for the SRB but work fine for the tanks. I also reduced the amount of stuff that's stored for regular parts as the ModuleSYPartTracker isn't stored in its entirety anymore, but instead only the 3 values I care about are stored. On Vessels the whole thing is stored, since it's an actual Module there. The old setup will load correctly and will save it in the smaller form after a scene change. I'll remove loading the old way after the first Beta. Additionally, the latest Module Manager is now automatically added to the .zip file thanks to a python script that runs before the build, so that's cool. I'm going to try to do a bit more testing before setting up the Beta thread, but I'd still like to do that tomorrow evening.

Also, there's only about 16 hours or so until this month's poll on Patreon closes. I'm still trying to decide on when to do the dev livestream (and what to actually show, maybe some UI development?). I'm thinking either the 13th or the 20th of May around 12pm EDT (16:00 UTC), but I could also do the 12th or 19th at ~7pm EDT (23:00 UTC).

Edited by magico13
Link to comment
Share on other sites

18 hours ago, Sigma88 said:

This is because the displayed value is the sideral rotation period

The solar rotation period is slightly longer

You're right. It's too late to change it now because perfect solar days just screws the calendar up for a few  other mods i'm using. Particularly monthly budget.

Link to comment
Share on other sites

Release thread now open! I still have some work to do on it, like add pictures and rewrite about a thousand words in the history part that all got wiped out by some accidentally messed up spoiler tags... But it exists! Stuff shouldn't change too much now, just bug fixes and polish mostly. Plus the override funds setting and a new GUI.

 

 

Link to comment
Share on other sites

Is it possible to designate parts that should not be added to the inventory on recovery?  (Either an individual instance, or for an entire part.)

For example, "The Kerpollo 11 capsule is a historic artifact, so it's going to a museum."  Or even a partial discount for reuse, as in "The capsule went to the museum, but we stripped some of the internals for future use."

Also, career mode gives science value for recovery of a vessel under certain conditions.  I think the partial discount would work here to represent the portions being studied to gain the science bonus.

Link to comment
Share on other sites

I've seen some odd behavior in my current save. For some reason the VAB assembly queues is only showing two rates, instead of multiple. Apparently its lost the additional queues. On the upgrades tab in KCT, it looks like I should be seeing the additional rates listed but they are blank. Is this an after effect of CustomBarnKit meddling?

Link to comment
Share on other sites

15 hours ago, razark said:

Is it possible to designate parts that should not be added to the inventory on recovery?  (Either an individual instance, or for an entire part.)

For example, "The Kerpollo 11 capsule is a historic artifact, so it's going to a museum."  Or even a partial discount for reuse, as in "The capsule went to the museum, but we stripped some of the internals for future use."

Also, career mode gives science value for recovery of a vessel under certain conditions.  I think the partial discount would work here to represent the portions being studied to gain the science bonus.

You can forbid parts on the basis of modules by creating a FORBIDDEN_TEMPLATE in the ModuleTemplates.cfg file (see the already existing KerbalEVA template). You'd have to have a module that is different though. As of right now you can't blacklist parts, but that is something I'd like to add. I might also add an option so you can right-click a part in flight and set it to not be added to the inventory on recovery since that'd be easy to add. Partial discount is harder, especially on a per-part basis. I might try to come up with a general way of allowing modules to set that and then someone could make a small mod that allows that, but I'm not sure the creation of that small mod is something that should be in ScrapYard, just the backing code that allows for it to function.

8 hours ago, thunder175 said:

I've seen some odd behavior in my current save. For some reason the VAB assembly queues is only showing two rates, instead of multiple. Apparently its lost the additional queues. On the upgrades tab in KCT, it looks like I should be seeing the additional rates listed but they are blank. Is this an after effect of CustomBarnKit meddling?

Could be because of the changes for CustomBarnKit. Send me the log if you don't mind as it should say what rates are being set. Also make sure you're using the latest MagiCore and KCT versions and don't have two MagiCores installed anywhere.

Edited by magico13
Link to comment
Share on other sites

Hey there, Magico, since last night I've been having a rather major issue with the latest dev build of KCT. When I loaded up my save, all KCT upgrades were gone and KCT wasn't storing constructed vehicles (I could still build them, I just could no longer see them after they were built). Here is my Output_log along with a couple saves (my manual save and the persistent save) and the KCT Settings file. I reinstalled KCT, ScrapYard (the beta version from the forum thread that you recently created), and MagiCore (using the MagiCore folder that is included in the ScrapYard download). There aren't any duplicates of these folders within GameData, either.

https://www.dropbox.com/s/p3sey407wz50qph/KCT_Issue_files.zip?dl=0

Link to comment
Share on other sites

@fallout2077 I'll take a look at that tonight. What happens if you remove ScrapYard? I updated the ScrapYard API a bit but haven't updated it in KCT yet, so that could be causing failures. It was supposed to be a non-breaking change, but with how I call the methods with reflection it's possible that it temporarily broke some stuff. If that's the reason then the fix will be very simple. I might even be able to fix it through Github, so let me try that really quick.

 

Edit: Try KCT build #25 and see if it's still doing it.

Edited by magico13
Link to comment
Share on other sites

Something seems to be seriously borked with the latest dev build of KCT for me. Strange as it seems others have it working fine.. Broken on existing playthrough as well as fresh careers. On Win64 KSP 1.2.2 and KCT dev build #25. Output Log. Any clues?

Edited by darvo110
Link to comment
Share on other sites

3 hours ago, darvo110 said:

Something seems to be seriously borked with the latest dev build of KCT for me. Strange as it seems others have it working fine.. Broken on existing playthrough as well as fresh careers. On Win64 KSP 1.2.2 and KCT dev build #25. Output Log. Any clues?

Nothing has really changed since April 27th except some added stuff to use ScrapYard. If you're using ScrapYard, try removing that and seeing what happens. I'll try to experiment with it tonight.

Link to comment
Share on other sites

On 05/10/2017 at 1:47 PM, magico13 said:

@fallout2077 I'll take a look at that tonight. What happens if you remove ScrapYard? I updated the ScrapYard API a bit but haven't updated it in KCT yet, so that could be causing failures. It was supposed to be a non-breaking change, but with how I call the methods with reflection it's possible that it temporarily broke some stuff. If that's the reason then the fix will be very simple. I might even be able to fix it through Github, so let me try that really quick.

 

Edit: Try KCT build #25 and see if it's still doing it.

It wasn't a problem with KCT. I forgot that I had installed KSCSwitcher after I had started up a new game, and I started seeing the issue I posted above after I had installed KSCSwitcher. After removing KSCSwitcher, all was well with my save.

Thanks anyway, Magico!

Link to comment
Share on other sites

12 hours ago, darvo110 said:

Something seems to be seriously borked with the latest dev build of KCT for me. Strange as it seems others have it working fine.. Broken on existing playthrough as well as fresh careers. On Win64 KSP 1.2.2 and KCT dev build #25. Output Log. Any clues?

You went from the Main Menu to flight without stopping through the Space Center, which could cause problems with initialization. But your main problem is that you have KCT installed twice. Remove the following file: C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\GameData\KerbalConstructionTime\plugins\KerbalConstructionTime_ksp1.2_3.dll

Link to comment
Share on other sites

On 12/05/2017 at 10:46 AM, magico13 said:

You went from the Main Menu to flight without stopping through the Space Center, which could cause problems with initialization. But your main problem is that you have KCT installed twice. Remove the following file: C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\GameData\KerbalConstructionTime\plugins\KerbalConstructionTime_ksp1.2_3.dll

Ahhh good find. That was it. Probably should have clued on that it was something like that from the two KCT icons I was getting in the toolbar :/. Could have sworn I'd clean installed after it broke, but evidently not. Thanks heaps for having a look!

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