Jump to content

[0.90] Magic Smoke Industries Infernal Robotics - 0.19.3


sirkut

Recommended Posts

Joints have been redone in KSP which requires a rewrite of sorts for the creation of joints. this will take some time. Be patient and hope that I can get this knocked out.

Love the mod sirkut, take your time and do it right. Most of my craft use Infernal Robotics for Interstellar microwave receivers, so pretty much I am waiting with 0.23.5 install until this is done. No pressure, i still enjoy the main game a lot.

Link to comment
Share on other sites

Love the mod sirkut, take your time and do it right. Most of my craft use Infernal Robotics for Interstellar microwave receivers, so pretty much I am waiting with 0.23.5 install until this is done. No pressure, i still enjoy the main game a lot.

Here, here!

Link to comment
Share on other sites

That explains it. :) The interface showed up fine in the VAB, but wouldn't show up in flight. Started a new career mission, turns out I ended up having an asteroid coming in for "landing" on Kerbins north pole. Figured I'd try and send something to "catch" it and push it out of the way. Unfortunately the rocket I made doesn't have enough surface area to "grapple" it (haven't unlocked the actual grapple yet). So I thought I'd put some small struts on hinges, wasn't planning on using them, just used them as spacers, but now I think it'll come in handy as I can open the hinges a little more and get a more stable connection. As far as the nodes ive placed go I should have enough DV if I can get in position. I'll keep checking back. :)

Link to comment
Share on other sites

Joints have been redone in KSP which requires a rewrite of sorts for the creation of joints. this will take some time. Be patient and hope that I can get this knocked out.

I'm excited to get everything working again I'm checking constantly for you're update :-) no rush i promise lol!

Link to comment
Share on other sites

Well, it was *not* a simple bug. That said, I am having a blast taking apart this plugin. I got some of the parts working, but even then they behave... strangely. Considering I have a very limited understanding of anything thats going on under the hood in the first place, thats not too suprising.

Link to comment
Share on other sites

what if the parts were rebuilt using a unity configurable joint as opposed to a hinge joint? From what i understand the configurable joints are more reliable, offer more config options and function, not to mention strength of attachments. The one major flaw these parts has always had is the floppy nature of the connections making things like swing wings, or heavy cranes less than... trustworthy. Maybe this is a great opportunity to address some of these issues. Had I any abilities whatsoever, I have jumped on this already. As it is I am eagerly await any kind of update from you guys, and greatly appreciate this work!! Thank you so much!

Link to comment
Share on other sites

Yeah, looking forward to this getting fixed. I keep hitting a mental roadblock every time I try to build something in the update because I want things to move. Your mod opened up the game in amazing ways and it's just not the same without it. No rush, take the time to do it right of course, but know your work is VERY appreciated.

Link to comment
Share on other sites

what if the parts were rebuilt using a unity configurable joint as opposed to a hinge joint? From what i understand the configurable joints are more reliable, offer more config options and function, not to mention strength of attachments. The one major flaw these parts has always had is the floppy nature of the connections making things like swing wings, or heavy cranes less than... trustworthy. Maybe this is a great opportunity to address some of these issues. Had I any abilities whatsoever, I have jumped on this already. As it is I am eagerly await any kind of update from you guys, and greatly appreciate this work!! Thank you so much!

Psst. They are already configurable joints. :/

- - - Updated - - -

Well, it was *not* a simple bug. That said, I am having a blast taking apart this plugin. I got some of the parts working, but even then they behave... strangely. Considering I have a very limited understanding of anything thats going on under the hood in the first place, thats not too suprising.

Curious, what did you do?

Link to comment
Share on other sites

Well, it was *not* a simple bug. That said, I am having a blast taking apart this plugin. I got some of the parts working, but even then they behave... strangely. Considering I have a very limited understanding of anything thats going on under the hood in the first place, thats not too suprising.
Curious, what did you do?

I too have started to dive in to the source and found that it's not a simple fix - like StevenRS11 I have no experience with this code, but I have been lately working on a plugin for KSP and am a software developer by day, so code is code:

  1. The first thing of note is that when referencing the 0.23.5 assemblies, there are a series of compiler errors due to some changes to joints. These are relatively straight forward to fix up:

    // Servo.cs, setupJoints()
    //newJoint.breakForce = breakingForce;
    //newJoint.breakTorque = breakingTorque;
    attachJoint.SetBreakingForces(breakingForce, breakingTorque);


    And several places where the PartJoint class has been given a ConfigurableJoint rather than (presumably) encapsulating it, but those seem fairly innocuous to me.

  2. The Servo.cs setupJoints() then throws a curve ball as the changes to the PartJoint don't seem to allow whole replacing of the ConfigurableJoint, so I decided to modify the code to simply update the ConfigurableJoint that is now exposed, rather than creating a new instance.

These minor changes resolve the compiler errors in doing so it does restore the IFR GUI when in flight mode! However, the real challenge then begins. In my simple test of a Docking Washer and Powered Hinge, the Docking Washer almost immediately breaks in two pieces, which the physics engine complies with but doesn't (seem to) break the part from the rest of the vessel. The Powered Hinge is functional through it's range, but the swivel isn't positioned correctly - presumably the geometry of the hinge location has changed, so there is obvious clipping of the two halves of the hinge as it swivels. This is where I left it because I believe to fix this part of the problem requires more knowledge of how the plugin operates and if sirkut is already looking in to the problem as time permits, he's probably going to arrive at the solution before I can wrap my head around the code.

I'm happy to collaborate on getting IFR updated for 0.23.5, as it is one of my key addons for playing KSP! I very much appreciate the time involved - if I can help out in any way, please let me know. :)

My apologies if this forum isn't the correct place to discuss the internal workings of mods - I'll gladly repost to the appropriate place if there is already a thread.

Link to comment
Share on other sites

It's in the source code. During the method setupJoints()

ConfigurableJoint newJoint = gameObject.AddComponent<ConfigurableJoint>();

then a chunk setting up breaking force, spring damping, etc. This was all done before I forked it from the original Damned Robotics source which is why it's currently broken. KSP devs have changed how joints and parts are connected.

Link to comment
Share on other sites

It's in the source code. During the method setupJoints()

then a chunk setting up breaking force, spring damping, etc. This was all done before I forked it from the original Damned Robotics source which is why it's currently broken. KSP devs have changed how joints and parts are connected.

So it would be fair to say that a chunk of legacy code is the culprit for the floppy joints? That's excellent news, now that the problem is identified it can be fixed :) Excellent work good sir.

Looking forward to the next release :)

Link to comment
Share on other sites

I've been spending far too much time on this. I keep telling myself I'll stop after this debug log, but I keep compiling.

I cant speak for StevenRS11, but heres where I am with it:

The first few lines are just for intro purposes, and things I expect you know after 10 seconds:

attachJoint is now a PartJoint. PartJoint contains a Joint class. That contains ConfigurableJoint.

So far, I've had to totally comment out the two methods there are to set breakingforce and breakingtorque, as those so far always give NullReferences (also commented out in servo.cs)

I tried altering newJoint to a PartJoint, that made most of the code happy, but you cant set attachJoint.Joint to newJoint, as it's read-only

I've gone in and am directly setting attachJoint.Joint variables. This works with the large gantry (there may be others, but so far, this is the only part to work 100%) There is no longer a newJoint object.

There is still a "NpScene::createJoint: desc.isValid() fails!" being thrown, at:

attachJoint.Joint.connectedBody = parent.Rigidbody;

Again, it works for the gantry, not for the others I've tested. I see zero difference in the part configs, but the large gantry has the rigidbody parent of GantryLarge, and everything else has the parent as the object they're connected to.

So, if I attach a gantry large to one side of a lander cabin on launch A, and the gantry 1/2 on launch B, GantryLarge is the rigidbody parent on launch A, LanderCabin is the parent on launch B, which causes the joint setup to not be valid.

Commenting this out makes the joint function, but the moving portion is in the wrong location.

Link to comment
Share on other sites

Wow, sounds like this will take some effort to get working again. I just want to say thank you. It's appreciated by many, including me.

ps: Take whatever time you need to rest and have a life too, no pressure.

Link to comment
Share on other sites

I've been spending far too much time on this. I keep telling myself I'll stop after this debug log, but I keep compiling.

I cant speak for StevenRS11, but heres where I am with it:

The first few lines are just for intro purposes, and things I expect you know after 10 seconds:

attachJoint is now a PartJoint. PartJoint contains a Joint class. That contains ConfigurableJoint.

So far, I've had to totally comment out the two methods there are to set breakingforce and breakingtorque, as those so far always give NullReferences (also commented out in servo.cs)

I tried altering newJoint to a PartJoint, that made most of the code happy, but you cant set attachJoint.Joint to newJoint, as it's read-only

I've gone in and am directly setting attachJoint.Joint variables. This works with the large gantry (there may be others, but so far, this is the only part to work 100%) There is no longer a newJoint object.

There is still a "NpScene::createJoint: desc.isValid() fails!" being thrown, at:

attachJoint.Joint.connectedBody = parent.Rigidbody;

Again, it works for the gantry, not for the others I've tested. I see zero difference in the part configs, but the large gantry has the rigidbody parent of GantryLarge, and everything else has the parent as the object they're connected to.

So, if I attach a gantry large to one side of a lander cabin on launch A, and the gantry 1/2 on launch B, GantryLarge is the rigidbody parent on launch A, LanderCabin is the parent on launch B, which causes the joint setup to not be valid.

Commenting this out makes the joint function, but the moving portion is in the wrong location.

Yup. That's the snippet I've been having issues with. I didn't try the gantry part so I'll give that a whirl.

attachJoint.Joint.connectedBody = parent.Rigidbody;

Link to comment
Share on other sites

That is almost exactly what I have done as well- just set the fields in attachJoint.Joint.

As for setting the rigidBody, thats what I am currently trying to figure out. We may need to make a completely new joint object that allows us to set the fields that we need. Again, I am thinking in terms of java, so I may be a bit off base, but code is still code.

Link to comment
Share on other sites

As much as I know about coding, mostly PHP/ASP.net, ancient VB...etc, most of what you all are discussing is still going over my head lol. Though I guess it takes a certain amount of experience with how coding in KSP/Unity works.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...