Jump to content

Kerbal Construction Time/StageRecovery Dev Thread


magico13

Recommended Posts

2 hours ago, magico13 said:

It's due to some logging I added to diagnose a bug someone was having that I've since removed from the 1.3 builds. I'm not officially supporting 1.2.2 anymore, but may make a build with that logging disabled.

Oh... without ScrapYard I don't seem to have a BIG problem. But I plan to enable it... I would be very grateful if you could do that and post it to CKAN.
I have spent 20h+ on KSP upgrade & save game migration, thus I don't see myself fighting next battle soon, even more so since fight for 1.2.2 is not finished yet :) And I don't think all necessary mods have been released for 1.3...

So in other words, I'll worship you even more :)

Link to comment
Share on other sites

1 hour ago, Arivald Ha'gel said:

Oh... without ScrapYard I don't seem to have a BIG problem. But I plan to enable it... I would be very grateful if you could do that and post it to CKAN.
I have spent 20h+ on KSP upgrade & save game migration, thus I don't see myself fighting next battle soon, even more so since fight for 1.2.2 is not finished yet :) And I don't think all necessary mods have been released for 1.3...

So in other words, I'll worship you even more :)

I'm not sure what the problem you're having with ScrapYard is, so feel free to send a log my way (.zip it if it's big). A few people have mentioned still being on 1.2.2 and having issues with that logging, so I'll see if I can backport that change without it being a huge pain.

 

Edit: There you go. Backported that change and at least one other one to 1.2.2, then uploaded it to SpaceDock (and thus also CKAN). Have fun.

Edited by magico13
Link to comment
Share on other sites

16 hours ago, magico13 said:

I'm not sure what the problem you're having with ScrapYard is, so feel free to send a log my way (.zip it if it's big). A few people have mentioned still being on 1.2.2 and having issues with that logging, so I'll see if I can backport that change without it being a huge pain.

 

Edit: There you go. Backported that change and at least one other one to 1.2.2, then uploaded it to SpaceDock (and thus also CKAN). Have fun.

Thanks! You're one of the gods of KSP community!

Link to comment
Share on other sites

Hey magico, using KCT beta 30 (1.3.9.0), I'm not able to access Kerbal Konstructs bases the way that I used to.  When I click the "Select LaunchSite" button, I get the following in my log:

[KCT] Site manager is good.
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

NullReferenceException
  at (wrapper managed-to-native) UnityEngine.Object:get_name ()
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.MonoProperty.GetValue (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] index, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.MonoProperty.GetValue (System.Object obj, System.Object[] index) [0x00000] in <filename unknown>:0 
  at KerbalConstructionTime.KCT_Utilities.GetMemberInfoValue (System.Reflection.MemberInfo member, System.Object sourceObject) [0x00000] in <filename unknown>:0 
  at KerbalConstructionTime.KCT_Utilities.GetAllOpenKKLaunchSites (System.String type) [0x00000] in <filename unknown>:0 
  at KerbalConstructionTime.KCT_GUI.DrawBLPlusWindow (Int32 windowID) [0x00000] in <filename unknown>:0 
  at UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID) [0x00000] in <filename unknown>:0 
  at UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) [0x00000] in <filename unknown>:0 

I thought the issue was just that Kerbal Constructs changed the launch site manager from KerbalKonstructs.LaunchSites.LaunchSiteManager to KerbalKonstructs.Core.LaunchSiteManager, but changing that in KCT_Utilities and recompiling didn't fix the issue.  (KK's launch site manager API is now here: https://github.com/GER-Space/Kerbal-Konstructs/blob/master/src/Core/LaunchSites/LaunchSiteManager.cs)

Link to comment
Share on other sites

@Kerbas_ad_astra I'll try to take a look at that soon. Hopefully is as simple as changing a few strings in a few places. Hopefully I can also fix the issue with having to manually load sites before going to them to avoid crashes.

 

 

Just a heads up, since 1.2.2 is still fairly popular I've started up a new automated build process for the 1.2.2 backports branch. I'm still preferring active development in the 1.3 development branch, but the 1.2.2 backports branch will include any changes I think are important enough to backport (mostly bug fixes, maybe some new stuff). I have to manually cherry-pick the commits from the 1.3 build into that branch as of right now, but I've at least got them automatically building whenever I do that. You can access the builds for 1.2.2 from here: http://magico13.net:8080/job/Kerbal Construction Time 1.2.2 Backports/

Link to comment
Share on other sites

On 6/25/2017 at 9:27 AM, Kerbas_ad_astra said:

Hey magico, using KCT beta 30 (1.3.9.0), I'm not able to access Kerbal Konstructs bases the way that I used to.  When I click the "Select LaunchSite" button, I get the following in my log:

Fixed, and then some :wink: It should now populate the list correctly, should wrap the list in a ScrollView so that if it's really long it won't go off the screen, and you should be able to launch at any open site without having to go into the editor and do any funky workarounds. It should just be that you set the site with KCT and can launch right away. Let me know how it works (and also that stock isn't broken...)

Link to comment
Share on other sites

Would Stage Recovery be able to check chute parts that have built in decouplers to see which node decouples, for the VAB tool? Right now, any chute that has a decoupler gets a separate stage from what it's attached to in the stage preview window, so you can't see the recovery speed for the real full stage.

Eg this chute's decoupler is on it's top node, but SR still counts the two parts as separate stages:

DjLbPwF.png

Link to comment
Share on other sites

Um, I'm seeing this is available for 1.3 but dev build, but not finding it, can someone link me it? Also can it work well in 1.3 without too many bugs? I'm not too sure if I may add it in, but I am eager to do a reusable space program with some realism

Link to comment
Share on other sites

All dev builds are linked on the first post, separated by which specific mod (KCT, SR, SY) All are working pretty well in 1.3, was just in it a moment ago before writing this and didn't experience any major issues with any of them.

Link to comment
Share on other sites

35 minutes ago, The-Doctor said:

Um, I'm seeing this is available for 1.3 but dev build, but not finding it, can someone link me it? Also can it work well in 1.3 without too many bugs? I'm not too sure if I may add it in, but I am eager to do a reusable space program with some realism

I've tried the last few of dev builds from magico's Jenkins server and they've been running smoothly for me in a fairly heavily modded 1.3 but I haven't really been pushing their integration with other mods so I can only really speak for core functionality.

Edited by Aelfhe1m
Link to comment
Share on other sites

i think im using the last version of KCT (installed it 3 days ago in 1.3)
i edited a craft in the SPH hanger (ready to flay) that was recovered to hanger
after editing it (pressing save edit) it went puff
i cant find it in any list
i have  ScrapYard and SR too

log 1 : https://yadi.sk/i/Q_6ySFni3Kzwd6

log 2 : https://yadi.sk/i/uEbJV4wP3KzweM

Edited by danielboro
Link to comment
Share on other sites

1 hour ago, danielboro said:

i dont have the build button on new ships

I think you're stuck in Edit mode there. Restarting KSP will fix that, but I'm not sure why it's happening. You have so many mods installed it's really hard to track anything down. Surprisingly you only have a small amount of exceptions, and none in any of the scenes you're having issues with. You can try ScrapYard build #61 which should fix an issue I'm seeing with ScrapYard saving the inventory, which could be related to why you're getting stuck in edit mode and maybe why the ship vanished previously.

Link to comment
Share on other sites

some more info
i tred to restart KSP before writing and to install the new SY i have to restart KSP
still no build button
this is the first time i tred to build a new ship snce going to 1.3
i have at list 1 ship i cant edit but all ather ship and plains i tred to edit didnt have any problem
so far wat i did was i dubel a ship under construction (did that lots of times ) then edit it to the new ship i wanted

edit

i was hoping its a gui glic like i hade in 1.2 whit the start sim button
i started a new game but the new game has the same no build button problem
next ill see if removing mods will help

Edited by danielboro
Link to comment
Share on other sites

@magico13
i had a CTD after pressing edit on a ship in vab build queu.
i zip up all the data (crash dir, kspx64 data and ksp.log )
another good thing is that i didnt play yet so the log is probably sort

i hope thr is  info that can help you in the logs
https://yadi.sk/d/_68Hzj5c3L5zHy

p.s.
i coldent get a sher link for the big file so i deleted most of the files in kspx64 data. if you think ther somting usfell in the dir i still have it ziped and i can link what files you think can help

Link to comment
Share on other sites

Hi

I downloaded the wrapper for Scrap Yard. There is a function called "GetPartsInInventory". As I understand it, and please correct me if I have misunderstood the functionality, it works pretty much like running through a shopping list. Let us say I have four items on my list, a solid booster and three basic fins, and that there are two solid boosters and two basic fins in the inventory. Then it will go like this:

  1. "Do you have a solid booster?" - "sure" - the solid booster is included in the returned list.
  2. "Do you have a basic fin?" - "sure" - the fin is included in the returned list.
  3. "Do you have one more basic fin?" - "sure" - this fin is included in the returned list too.
  4. "Do you have yet another basic fin?" - "nope, all out" - no further fins are included in the returned list.

So, I can walk up to the "ScrapYardWrapper" clerk and show all kinds of exciting shopping lists and get accurate answers. But I cannot simply ask "what is in the store?"; is that correct?

Link to comment
Share on other sites

@danielboro you might try deleting your KCT configs in KerbalConstructionTime/PluginData. When I get a chance I'll try to find time to look through those logs. I definitely don't need everything in KSP_Data, only the logs and the contents of the crash folder.

 

@Rodhern Right now, your understanding is correct. The original purpose for that design was that I could send an entire ship from KCT to ScrapYard and it would give me back the parts on the ship that have matching parts in the inventory. There actually wasn't a way to get the whole inventory out (even within ScrapYard) until recently, but that's not exposed in the API yet. If you need it, it'd be pretty easy to expose. I'll probably expose it at some point anyway, but it'll return a copy of the inventory and not the actual inventory, meaning you'll have to go through the API to actually affect the inventory.

Link to comment
Share on other sites

That makes fine sense. At some point browsing access to the inventory would probably be interesting, but no rush. Maybe you could also have the 'override funds' option exposed through the wrapper, so that you know if the inventory is 'payed for' or not.

Link to comment
Share on other sites

37 minutes ago, Rodhern said:

Maybe you could also have the 'override funds' option exposed through the wrapper, so that you know if the inventory is 'payed for' or not

Yeah, good point. I should probably make all of the options be exposed through it. You could maybe get them through the stock settings system, but the wrapper would likely be easier.

Link to comment
Share on other sites

As far as I remember the current recommendation for interacting with KCT from third party mods is through Unity/.Net reflection. Now that we have a convenient ScrapYard API wrapper, I could get a little greedy and wish for a KCT one too.

In my potentially upcoming mod I would like to offer a contract that removes (some or all) items from the ScrapYard inventory and rewards the player with science points and/or KCT build points.

Link to comment
Share on other sites

9 minutes ago, Rodhern said:

As far as I remember the current recommendation for interacting with KCT from third party mods is through Unity/.Net reflection. Now that we have a convenient ScrapYard API wrapper, I could get a little greedy and wish for a KCT one too.

Believe me, I wish there was one too. ScrapYard was designed from the beginning to have an API, so it was developed with the API in mind. KCT wasn't and creating an API for it would require a substantial amount of rework of the underlying code base. If/when I rewrite KCT it will be designed with an API in mind and I'd rather rewrite it than try to force one into the current code.

Link to comment
Share on other sites

Just now, magico13 said:

Believe me, I wish there was one too. ScrapYard was designed from the beginning to have an API, so it was developed with the API in mind. KCT wasn't and creating an API for it would require a substantial amount of rework of the underlying code base. If/when I rewrite KCT it will be designed with an API in mind and I'd rather rewrite it than try to force one into the current code.

Ahh, I see. Thank you for your quick answer. I didn't realize there was a technical reason for the 'missing' wrapper.

Link to comment
Share on other sites

  • 2 weeks later...

I tried to run a simulation using KCT by clicking build but there was no menu and it immediately started building the rocket. I checked the setting and found that the simulation has been removed. Is this something that was changed on purpose or should I submit a bug report?

I am currently using the dev build for 1.3.

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