IgorZ

[1.7.1] Kerbal Attachment System (KAS) v1.4 - NOT COMPATIBLE WITH KSP 1.7.0

Recommended Posts

14 hours ago, Steven Mading said:

I know it's mostly moot now that a new KAS version is out that works with KSP 1.7, but I wanted to report that I found the cause of this error in kOS and it was *sort of* caused by the fact that KAS didn't load, combined with me not understanding the really weird way GetTypes() works when DLL's fail to load.  I would have assumed that "Failure to load this Type" would only throw an exception once - at the time the DLL is being loaded.   Then after that if you trapped the exception that the loader generated and keep going (as KSP itself does when trying to load mods), then from then on the Type would simply not even be present at all, because it failed to load.  But actually there still is an empty stub of the class there when it didn't load - just enough of one for GetTypes() to attempt to do things with it, and then to make GetTypes() work you have to trap the exception and pull the information from elsewhere to work around the fact that one of the Types that GetTypes wants to return isn't "really there".

Honestly, I have no idea how it can be addressed at all. The missied types thing is about KSP, C# and Unity. It's not related to the mod, which is not loaded in this case. Try raising this issue on the KSP bug tracker. Given you can provide a clear case, they may choose to act.

A note unrelated to my suggestion of addressing it via KSP bug tracker. I'd argue that this error is supposed to throw only once. Every time you try to get a type, which is not known to the runtime domain, you must get an exception. It's perfectly fine to me, as a C# programmer. If your code may end up not finding a type, it must stop requesting it after the first failure. If it didn't, then there will be an error each time it tries.

Share this post


Link to post
Share on other sites
5 hours ago, IgorZ said:

Honestly, I have no idea how it can be addressed at all. The missied types thing is about KSP, C# and Unity. It's not related to the mod, which is not loaded in this case. Try raising this issue on the KSP bug tracker. Given you can provide a clear case, they may choose to act.

A note unrelated to my suggestion of addressing it via KSP bug tracker. I'd argue that this error is supposed to throw only once. Every time you try to get a type, which is not known to the runtime domain, you must get an exception. It's perfectly fine to me, as a C# programmer. If your code may end up not finding a type, it must stop requesting it after the first failure. If it didn't, then there will be an error each time it tries.

You are 100% correct that it's dumb to work this way, but it does, because Microsoft.  Yes, I agree that the exception should only happen when the DLL is first being loaded, not *again and again* every time someone uses reflection to look at the classes.  Once someone is using reflection to look at the classes, the classes that don't exist simply, well, shouldn't exist.  Not "sort of halfway exist enough to break GetTypes() and make it throw an exception."

There is a fix, though.  What MS, in their infinite wisdom, decided to do here is make GetTypes() throw an exception despite the fact that it worked just fine.  And then, because it threw the exception, that means the return value is inside the exception object instead of being returned in the normal fashion.

You can see what I did to fix it here:  https://github.com/KSP-KOS/KOS/pull/2492/files

Share this post


Link to post
Share on other sites

Is there any word on the future of MKS Flex-o-tubes?  I'm a little confused as to how functional the pre-KAS-1.2 legacy DLL is in KSP 1.7 at all...

Share this post


Link to post
Share on other sites
On 4/23/2019 at 10:10 AM, ChrisF0001 said:

Is there any word on the future of MKS Flex-o-tubes?  I'm a little confused as to how functional the pre-KAS-1.2 legacy DLL is in KSP 1.7 at all...

There is a word. It's here: https://www.patreon.com/posts/26347979. If you cannot read the post, don't worry! Simply wait a bit (or a lot, it doesn't depend on me in this case).

Share this post


Link to post
Share on other sites
Posted (edited)

Is it better to use 1.1 , 1.2 or 1.3 for KSP 1.6.1? Is FlexOTube working on 1.2?

Edited by GraczNet

Share this post


Link to post
Share on other sites
5 minutes ago, GraczNet said:

Is it better to use 1.1 , 1.2 or 1.3 for KSP 1.6.1? Is FlexOTube working on 1.2?

KAS v1.3 is not compatible with KSP 1.6.1. FlexOTube may work till KAS v1.1. Also, you can install KAS v1.3 and then download and add the legacy parts manually.

Share this post


Link to post
Share on other sites

Hmm, I think I decided to don't use MKS now as I am doing fresh install. So besides FlexOTube everything should be working on 1.2? Do you know something about Pathfinder compability?

Share this post


Link to post
Share on other sites
On 4/25/2019 at 3:18 PM, GraczNet said:

Hmm, I think I decided to don't use MKS now as I am doing fresh install. So besides FlexOTube everything should be working on 1.2?

KAS 1.2 on KSP 1.6.1 should work just fine. The mods that need legacy KAS parts will break.

On 4/25/2019 at 3:18 PM, GraczNet said:

Do you know something about Pathfinder compability?

I'm working on a patch (will suggest it into the Pathfinder repository). However, the full pipes support will not be implemented. Only the flex hose and sockets on the parts like TrailerHitch.

Share this post


Link to post
Share on other sites
6 hours ago, IgorZ said:

KAS 1.2 on KSP 1.6.1 should work just fine. The mods that need legacy KAS parts will break.

I'm working on a patch (will suggest it into the Pathfinder repository). However, the full pipes support will not be implemented. Only the flex hose and sockets on the parts like TrailerHitch.

Thank you!

Share this post


Link to post
Share on other sites

So let me just check to see if I can formulate a plan here...

Starting with KSP 1.6.1 / KAS 1.1:

  • Do whatever manual upgrade missions I can to replace legacy parts
  • Disconnect any remaining struts / flex-o-tubes
  • Update KAS to 1.2 and follow the legacy update pipeline sequence
  • Update KSP to 1.7 and KAS to 1.3
  • Reconnect flex-o-tubes
  • Profit?

Sorry for the continuous questions!

Share this post


Link to post
Share on other sites
1 hour ago, ChrisF0001 said:

So let me just check to see if I can formulate a plan here...

Starting with KSP 1.6.1 / KAS 1.1:

  • Do whatever manual upgrade missions I can to replace legacy parts
  • Disconnect any remaining struts / flex-o-tubes
  • Update KAS to 1.2 and follow the legacy update pipeline sequence
  • Update KSP to 1.7 and KAS to 1.3
  • Reconnect flex-o-tubes
  • Profit?

Sorry for the continuous questions!

Your plan is flawed and seems to be under the impression that updating KAS somehow fixes MKS Flex-O-Tubes. The Flex-O-Tub isn't included in KAS, so MKS must update to change it's part config file for the Flex-O-Tube before you update KAS past 1.1. Until MKS updates, MKS REQUIRES the Legacy KAS library to function, so updating past KAS 1.1 will break the MKS parts.

Here's how I would approach it:

  • Copy your entire KSP tree someplace in case you screw up and break something, you can go back to this copy as a last resort.
  • Get rid of any Legacy KAS parts in the save, you could be working on this now. Search your persistent.sfs (don't overwrite it) to look for legacy KAS parts. Use the Debug mode in KIS to allow engineers to spawn parts locally to swap them out. This may be a lot safer than trying to edit the persistent.sfs to change them.
  • Wait for MKS to update.  Igorz has submit a PR to update the Flex-O-Tube, but it's up to Roverdude at this point. He could update it today, could be he waits for KSP 1.8. He seems focused on other priorities. You can rewrite the config locally yourself to support KAS 1.2+ based on this PR to MKS 
  • If staying on KSP 1.6.1: update KAS to 1.2 (it doesn't load on 1.7). 1.6.1 users are stuck at KAS 1.2.
  • If updating  to KSP 1.7: update KAS to 1.3 (it doesn't run on 1.6.1) If going from KAS 1.1 on 1.6.1 to KSP 1.7 there is no reason to update to 1.2 and then 1.3. Just update KAS to 1.3 before trying to run KSP 1.7.

Share this post


Link to post
Share on other sites
1 hour ago, Tonka Crash said:

Your plan is flawed and seems to be under the impression that updating KAS somehow fixes MKS Flex-O-Tubes. The Flex-O-Tub isn't included in KAS, so MKS must update to change it's part config file for the Flex-O-Tube before you update KAS past 1.1. Until MKS updates, MKS REQUIRES the Legacy KAS library to function, so updating past KAS 1.1 will break the MKS parts.

Here's how I would approach it:

  • Copy your entire KSP tree someplace in case you screw up and break something, you can go back to this copy as a last resort.
  • Get rid of any Legacy KAS parts in the save, you could be working on this now. Search your persistent.sfs (don't overwrite it) to look for legacy KAS parts. Use the Debug mode in KIS to allow engineers to spawn parts locally to swap them out. This may be a lot safer than trying to edit the persistent.sfs to change them.
  • Wait for MKS to update.  Igorz has submit a PR to update the Flex-O-Tube, but it's up to Roverdude at this point. He could update it today, could be he waits for KSP 1.8. He seems focused on other priorities. You can rewrite the config locally yourself to support KAS 1.2+ based on this PR to MKS 
  • If staying on KSP 1.6.1: update KAS to 1.2 (it doesn't load on 1.7). 1.6.1 users are stuck at KAS 1.2.
  • If updating  to KSP 1.7: update KAS to 1.3 (it doesn't run on 1.6.1) If going from KAS 1.1 on 1.6.1 to KSP 1.7 there is no reason to update to 1.2 and then 1.3. Just update KAS to 1.3 before trying to run KSP 1.7.

Ah, I see, thanks.  I had not fully grasped the MKS side of things.

My theory about 1.1 -> 1.2 -> 1.3 was to get the automatic upgrade to happen, since I have a couple of probes far out of reach of any engineers and it seemed perhaps safer than editing the save file directly - but if KAS 1.3 will support KSP 1.7, that might be a viable way forward...

Share this post


Link to post
Share on other sites

something that I don't get in kas system and I hope someone can help me with please
why is it that even though there's an option (b/n) to raise and lower the part is does but once you tryu to connect to node it resets to default position?
I would like to be able to connect to node with option of location of part but it doesn't let me

Share this post


Link to post
Share on other sites
6 hours ago, alien_wind said:

something that I don't get in kas system and I hope someone can help me with please
why is it that even though there's an option (b/n) to raise and lower the part is does but once you tryu to connect to node it resets to default position?
I would like to be able to connect to node with option of location of part but it doesn't let me

This part is designed to connect the vessels that are already placed right. You cannot use it to adjust vessels positions. The orientation choice is only made for the parking stata, i.e. for the state when the part is not connected.

Share this post


Link to post
Share on other sites

Quick question.

I just came back to the game after a while so trying to figure out the new version of KAS. I know the old EVA Struts have been decommissioned & removed, is there a replacement that provides the same/similar functionality or is it just completely gone? Based on the legacy conversion notes on the wiki it sounds like the cable brace may have taken over this role but I can't find any information on what the "Spring Force" and "Break Force" values represent.

 

If the functionality is completely gone, than does anyone know a good replacement? I have a space station that likes to try and tear itself apart if I have to reorient it... usually because i hit it too hard while trying to dock lol.

Share this post


Link to post
Share on other sites
1 hour ago, ExavierMacbeth said:

Quick question.

I just came back to the game after a while so trying to figure out the new version of KAS. I know the old EVA Struts have been decommissioned & removed, is there a replacement that provides the same/similar functionality or is it just completely gone? Based on the legacy conversion notes on the wiki it sounds like the cable brace may have taken over this role but I can't find any information on what the "Spring Force" and "Break Force" values represent.

 

If the functionality is completely gone, than does anyone know a good replacement? I have a space station that likes to try and tear itself apart if I have to reorient it... usually because i hit it too hard while trying to dock lol.

EVA Struts

QuantumStrutsContinued

these might be the struts you are looking for.

Share this post


Link to post
Share on other sites
9 hours ago, ExavierMacbeth said:

Quick question.

I just came back to the game after a while so trying to figure out the new version of KAS. I know the old EVA Struts have been decommissioned & removed, is there a replacement that provides the same/similar functionality or is it just completely gone? Based on the legacy conversion notes on the wiki it sounds like the cable brace may have taken over this role but I can't find any information on what the "Spring Force" and "Break Force" values represent.

 

If the functionality is completely gone, than does anyone know a good replacement? I have a space station that likes to try and tear itself apart if I have to reorient it... usually because i hit it too hard while trying to dock lol.

One of the design guidelines IgorZ has for KAS is that all parts need to be physically realistic. The old struts and pipes created a link out of nothing, so they were replaced with either the TJ type extending struts or the PCB cable reel. The cable acts like real world wire rope and will stretch some so it acts more like a spring, the springforce is the tension on the connection, the linkBreakForce is the force where it will separate from the anchor part. I've used the cables a couple times, but I don't see them making stations as rigid as the TJ struts. I found the TJ struts a little short, so came up with a patch for longer versions. I've used them on the station below and it seems to be very rigid when rotating. 

AogFjb3.jpg

Share this post


Link to post
Share on other sites
11 minutes ago, Tonka Crash said:

One of the design guidelines IgorZ has for KAS is that all parts need to be physically realistic. The old struts and pipes created a link out of nothing, so they were replaced with either the TJ type extending struts or the PCB cable reel. The cable acts like real world wire rope and will stretch some so it acts more like a spring, the springforce is the tension on the connection, the linkBreakForce is the force where it will separate from the anchor part. I've used the cables a couple times, but I don't see them making stations as rigid as the TJ struts. I found the TJ struts a little short, so came up with a patch for longer versions. I've used them on the station below and it seems to be very rigid when rotating. 

AogFjb3.jpg

Thanks for the info & the patch. I understand the logic of making them realistic but some of the ranges just seem a bit short. Your modified 5m version of the TJ makes sense to me though I think i may use your patch as a guideline to see if i can't make a 30m version of the PCB. I don't mind some flex as long as it doesn't build on itself until it causes spontaneous disassembly (which it tries to now unless i tap time warp). And my part count is a bit high on this station to try and brace every joint like your image.

 

9 hours ago, zer0Kerbal said:

EVA Struts

QuantumStrutsContinued

these might be the struts you are looking for.

Appreciate the links. I'll try sticking with KAS first though mostly because I don't like adding more mods to my large list if the functionality already exists somewhere else. Less things I need to go back and review when a new game version is released lol

Share this post


Link to post
Share on other sites
Posted (edited)

@ExavierMacbeth You want to adjust the maxLinkLength in the KASJointCableBase Module. Igorz has commented that the connections are limited by the Kerbal's reach distance. I haven't run into this problem yet, but I think this should be the EvaPickup maxDistance in KIS settings.cfg file.

@KISConfig:FINAL
{
    @EvaPickup // Increase range allowed to pickup most cheaty option here
    {
		@maxDistance = 30 // 3 (default)
    }
}
@PART[KAS.PCB1]:FINAL // PCB-1 Portable Cable Brace
{
   @MODULE[KASJointCableBase]
    {
		maxLinkLength = 30	// spools are compact with lots of wire
    }
}

Edit: If you are having problems with a station shaking apart you can try some autostruts, too. When I linked up the final parts in the ship below it decided to spontaneously self destruct. Autostruting solved it. I alternated some to heaviest in the tail and some to root in the nose. The further away from the centerline the better. Stuff along the centerline didn't help nearly as much.

A07LUEl.png

Edited by Tonka Crash
More Info

Share this post


Link to post
Share on other sites
4 minutes ago, Tonka Crash said:

@ExavierMacbeth You want to adjust the maxLinkLength in the KASJointCableBase Module. Igorz has commented that the connections are limited by the Kerbal's reach distance. I haven't run into this problem yet, but I think this should be the EvaPickup maxDistance in KIS settings.cfg file.


@KISConfig:FINAL
{
    @EvaPickup // Increase range allowed to pickup most cheaty option here
    {
		@maxDistance = 30 // 3 (default)
    }
}
@PART[KAS.PCB1]:FINAL // PCB-1 Portable Cable Brace
{
   @MODULE[KASJointCableBase]
    {
		maxLinkLength = 30	// spools are compact with lots of wire
    }
}

 

lol thanks. I remember playing EVA thruster drift games trying to move parts around in older version of KAS and wishing i had a tether when i did something that collision launched the kerbal (or part) rapidly away from the station. Part of the fun of assembly in space :P

Share this post


Link to post
Share on other sites
Posted (edited)

@Tonka Crash worked perfectly. 30m cable version of the PCB with a slightly increased break reasistance to help keep it from snapping allowed me to tether the ends of the station together. It still wobbles like i would expect but no more exponential increase toward spontaneous disassembly :)

Only need to use 8 of them so it even looks better than using struts would have lol. Thanks again for the tips.

 

Edited by ExavierMacbeth

Share this post


Link to post
Share on other sites

Ok one more question. Does KAS no longer physically "dock" ships together when connected? If not i may have to rethink my MKS base building lol.

Share this post


Link to post
Share on other sites

The fuel line has the option for undocked or docked mode.

Share this post


Link to post
Share on other sites
6 minutes ago, ExavierMacbeth said:

Ok one more question. Does KAS no longer physically "dock" ships together when connected? If not i may have to rethink my MKS base building lol.

The MKS Flex-O-Tube is broken for KAS 1.2+ until Roverdude updates MKS. Patches have been submitted, but I have no idea when an update might come out. KPBS has a similar part which is working in KAS 1.3 on 1.7, so it's not a difficult to fix. As Friznit said the RTS-1 has a docked mode, as do the TJ type struts. 

Share this post


Link to post
Share on other sites

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.