Jump to content

[WIP] Infernal Robotics - Next


Rudolf Meier

Recommended Posts

2 minutes ago, Rudolf Meier said:

thanks... those bugs we saw in the last two weeks... scaling down things, stability (because it's changed now)... uncontrolled rotation after undocking a part... I don't know other problems... maybe you can reproduce one of those strange things that were reported? ... docking node problem with the hinge... I cannot build an example that does this

Will do.  I'll reload a couple of my projects, and if they still do, I"ll try to rebuild it out of stock parts and get you a craft file.  May take me a couple days though to go through them.

Link to comment
Share on other sites

8 hours ago, gandt2 said:

Well even if I cannot get it to work I really do appreciate all the work you and the other modders do.  You guys are awesome :) xxxxx

I definitely had scaled down IR parts so that explains that one. If I could only figure out why I can’t turn off the autostruts I am sure it would work.  I must have another mod that is over riding it somehow.  I think it might just be a good old process of elimination.

Kim

Thanks for the support... the scaling problem could be solved with the patch 6 (alltough I've no idea why it happens... I try to find out more in Unity forums... I think, it's a bug or at least some undocumented things nobody knows...).

And the autostrut problem. Alt+F12 (I think) should start a menu that allows you to make autostruts visible. Then you can see if that's the problem. But scaled down joints did also not move in patch5 and earlier.

 

Edited by Rudolf Meier
Link to comment
Share on other sites

@Rudolf Meier I got some testing done today.

1. Tested arm on my shuttle.  Bouncing at launch, but maybe about 1/2 as much.

2. Enabled locked joints on same arm and relaunched.  0 bounce.  This is way better.

3. Tested arm on ground picking up very heavy load, and there was a definite improvement.  Picking up same load the other day broke a hinge, and I didn't get anywhere near unloading the payload to the runway.

4. Tested arm in space, unloaded payload and had it dock part (using magnet) to existing station attached to shuttle.  No Space Krackens or anything when the docks joined after I released the magnet!  Just a little bounce that was expected from such a heavy load.  The longer the expansion the greater the bounce, but that is just the game physics.

5. Tested arm (locked) on warp x4 from 80k to entry at 70k.  No bounce coming out of warp.  

6. Tested my Inner Marker craft and it had about 100th the spin from patch 5.  I dropped a port on the runway then launched it, and used MechJeb's target window to give me the heading to target.  It moved 0.1 degrees every 10 seconds or so.  It would do about 1/4 turn in 10 seconds before.  Much improved, but still some unexpected momentum.

7. I build a stock ship with only stock and IR part with the same joints, and same thing happened.  I went and used Alt . (period) to increase time (not warp) and the physics from the spin totally destroyed the craft.

Craft file here https://drive.google.com/open?id=12u764n7wcpBGz_xo877PRYyI_FCMzX5B

Use the IR sequencer to deploy the joints as a group.  I have set limits on everything.

the only thing I forgot to do is go back to the spacedock after launch and then back to the ship to see if that kills the physics. (partly due to the kaboom)  I'll see if I can get to it and test some re-scaled joints in the next couple days.

I'm thinking maybe that adding dampening like the wheels have may stop this.  It brings down movement to 0 on landings.

I do have one request.  Add a lock button to the group, and have it lock/unlock all in that group.  I found that this considerably limits the amount of stress on the joints not being moved at the time, and it would be much easier to use a group button like the movement ones are.

 

Thanks again for the time you spend on all of this!

 

Link to comment
Share on other sites

8 hours ago, Rudolf Meier said:

Thanks for the support... the scaling problem could be solved with the patch 6 (alltough I've no idea why it happens... I try to find out more in Unity forums... I think, it's a bug or at least some undocumented things nobody knows...).

And the autostrut problem. Alt+F12 (I think) should start a menu that allows you to make autostruts visible. Then you can see if that's the problem. But scaled down joints did also not move in patch5 and earlier.

 

Hi Rudolf,

Just so you know, I did a clean install and that fixed all the issues I was having.  I suspect I forgot to delete KJR before I installed your version for IR.  I suspect there was something left behind when I did that which caused my problems.  Anyway, all good now and thank you again for your amazing work.

Kim

Link to comment
Share on other sites

8 hours ago, Critter79606 said:

6. Tested my Inner Marker craft and it had about 100th the spin from patch 5. I dropped a port on the runway then launched it, and used MechJeb's target window to give me the heading to target.  It moved 0.1 degrees every 10 seconds or so.  It would do about 1/4 turn in 10 seconds before.  Much improved, but still some unexpected momentum.

7. I build a stock ship with only stock and IR part with the same joints, and same thing happened.  I went and used Alt . (period) to increase time (not warp) and the physics from the spin totally destroyed the craft.

Those 2 are the most interesting ones... you know what I think? ... I think that the solution for ugly looking and separating joints that they have introduced in Unity and that I'm using in IR for KSP 1.4 is not working and even worse, it could be the cause of all those problems. I will add a switch to turn it off... and then I'd like to see your test again. If the spinning stops, then... I will decide later what we do then...

Link to comment
Share on other sites

13 hours ago, Critter79606 said:

Thanks again for the time you spend on all of this!

thanks for testing...

can you try the new "test.zip" from GitHub ans see if you have the same spinning when chaning the modes? I do have 4 modes in the IR now... those modes are set globally... set it, then restart the scene and try... after this set another mode, then reload the scene again... would be interesting to see how it affects the spinning

I don't have the KKAOSS.corridor ... cannot load this ship... is this from Making History?

Edited by Rudolf Meier
Link to comment
Share on other sites

Hello,

I noticed there are some significant phantom forces present when using servo locks. I'm currently running an STS-88 recreation and I start the flight with all servos locked in the RMS for transport (the RMS is built exactly like the real thing, with the same joint types). After orbit insertion I noticed growing phantom forces that eventually caused my craft to accelerate, raising its orbit at a high rate (apoapsis rising by >100m/s at some point), and slowly begin spinning towards the port(~0.1 rpm/s), where the arm was installed. Unlocking all servos reduced the severity of the phantom forces by orders of magnitude, although some residual forces were still present. I am using persistent rotation, but disabling it didn't solve the issue (though it might have caused it, I don't know). Note that I was in a 45 deg inclined orbit, in case that matters.

Here's my craft file and log. The craft requires Cormorant Aeronology and Tweakscale in addition to IR, and might require Kerbalism, as it was created with it installed.

https://1drv.ms/u/s!ArMDWm49dN3Cgb0KQvGWolTYMYmHSQ

EDIT: This might have not been directly related after all, I've just got a NaN error pointing to a landing gear collider and krakened the hell out...

Edited by m4ti140
Link to comment
Share on other sites

25 minutes ago, m4ti140 said:

I noticed there are some significant phantom forces present when using servo locks.

I also see this... maybe it's related to translational joints...

oh, ok...

to all testers

very important... -> Alt-F12 -> Physics -> Visual Autostruts  ... activate this so that you can see if you are running into the KSP bug

the "outer marker" test had this problem... the rotation was a product of this autostrutting

Link to comment
Share on other sites

55 minutes ago, Rudolf Meier said:

I also see this... maybe it's related to translational joints...

oh, ok...

to all testers

very important... -> Alt-F12 -> Physics -> Visual Autostruts  ... activate this so that you can see if you are running into the KSP bug

the "outer marker" test had this problem... the rotation was a product of this autostrutting

I actually checked that when the issue happened, and there was no autostrut connected directly to the arm. Here's the entire log, up to the point Kraken devoured the Universe, in case the issue is with IR after all and it unfixed some bug with landing gear that Squad has already taken care of in stock:

https://1drv.ms/u/s!ArMDWm49dN3Cgb0I5QvDLMMj6Mvt1A

There are tons of the following lines spammed before the NullRef spam at the end, this is where the game implodes:

[ERR 20:23:17.371] Infinity or NaN floating point numbers appear when calculating the transform matrix for a Collider. Scene hierarchy path "GearSmall/model/Squad/Parts/Wheel/LandingGear/GearMedium(Clone)/Medium/prong/WheelRetract/WheelRetractCollider"

and this one:

[ERR 20:23:30.151] Infinity or NaN floating point numbers appear when calculating the transform matrix for a Collider. Scene hierarchy path "mk3CargoBayL/model/Squad/Parts/Utility/mk3CargoBay/long(Clone)/BayDoor1/ColDoor 1"

Not entirely sure if it's a stock bug at this point, gonna test later without the arm again, though I'm certain I didn't see the bug before I started playing with IR

Edited by m4ti140
Link to comment
Share on other sites

9 minutes ago, m4ti140 said:

I actually checked that when the issue happened, and there was no autostrut connected directly to the arm.

Not entirely sure if it's a stock bug at this point, gonna test later without the arm again, though I'm certain I didn't see the bug before I started playing with IR

I guess in your case the autostrut is not the problem. But it could be the massScale. I cannot move the foldatron you attached to the arm. This might be because of that.

And... if those stock parts are not placed on top of an IR part, this shouldn't be because of IR. And after all, those bugs should be solved all... but who knows... right now there are so many super strange things that don't make sense... I guess a lot of them are related to the new Unity engine in KSP and to KSP itself... I started a new game and have crashes all the time and I'm still playing without IR parts (haven't invented them yet).

Link to comment
Share on other sites

7 hours ago, Rudolf Meier said:

thanks for testing...

can you try the new "test.zip" from GitHub ans see if you have the same spinning when chaning the modes? I do have 4 modes in the IR now... those modes are set globally... set it, then restart the scene and try... after this set another mode, then reload the scene again... would be interesting to see how it affects the spinning

I don't have the KKAOSS.corridor ... cannot load this ship... is this from Making History?

No problem.  I'll help in any way I can.

Oh crap, I missed the one top part.  It's from K&K.  In rebuilding it again, I found the cause of some issues that may be causing some grief, and maybe a couple possible solutions.

Note: These tests are not with the test.zip.  I will repeat these tests tomorrow night with that file installed.  I ran out of time tonight.

To repeat these tests below, turn on advanced tweakables.  I did this on a stock install + IR + MechJeb2 + the old IR landing foot which I copied by hand.  If you install MechJeb2, you can use TestCraft2 instead of TestCraft1 below. (required for spin test 4 target tracking though, or you just have to wait till you can physically see it).

New craft files are in this zip - https://drive.google.com/open?id=103Da8Pi4VcF1ROdNBtk1__BpHvJtBe0N

I wanted to do testing that can replicated, and hopefully will help in be able to determine what is happening by being able to reproduce the test with a stock system and get the same results (plus the 1 part).  My playable system has 180+ mods.

1. Default landing legs are set to autostrut heaviest part, and you can't change it (at least I can't), and if the heaviest part is above the joint (or in this craft file, is the expansion joint), boom the joint explodes or doesn't move.  This is an issue on the KSP side.  Not something you can do about it that I can tell, but at least you know why it is happening and can post a warning.  Once I put a heavy fuel tank under it, I didn't have an issue with the IR parts breaking until I jettisoned the tank, which caused the autostrut to move real time to another part.

a. Use TestCraft1 with the fuel tank.  Will work fine.

b. Eject the large fuel tank.  This causes the autostrut to bind to the Expansion part. The the expansion joint now binds. 

c. Lock the expansion part, and move the other joints.  Note that they still work, as they are still below the heaviest part.

d. Unlock the expansion part and push > just a little to watch it crunch up the ship.  Now bring the pressure down to 0 with <, and the ship will launch like it's under power. 

Note: You can switch the AutoStrut on the RoboTruss part the legs are attached to,, to determine the heaviest part the legs are attached to.

In the Squad files, there is an AutoStrut: x and an AutoStrut Locked: x. It appears that the squad wheels/landing gear are locked (Squad\Localization\dictionary.cfg). 

If this could be switched to something else, it would fix this issue. I wonder if there is a .cfg setting we can override this with?

Note: I am not having this issue with non stock legs (I put the old IR landing part in here, and no issues - TestCraft3).  Non stock legs can have autostrut turned off.  This explains why some legs work, and others don't.

2.  going from >> to << or < (or vice versa) causes the part to Jump to the max or min setting (depending on direction).  This causes an extreme physical load and launches the craft. 

Should be an easy fix... if you press >> or << disable the other buttons until >> or << or stop has been re-pressed stopping the part.

Use TestCraft1 with the fuel tank.  Press >> until it is all the way extended.

Press << and wait until it's about 1/2 way down, and press >> or >.  It will launch off the pad.

3.  Using Alt . (period) crunches the ship.  Hopefully you will get some physics data from this test.

Use TestCraft 1 and deploy arms using the IR sequencer

Press Alt . (period) and each time watch it crunch more.

Press / and watch it leap off and explode.

Now repeat the test without deploying the arms.  Physics are much less and doesn't crunch as much, or destroy the ship.  I have no idea why.

4. Spin test ( if using MechJeb, use TestCraft2)

Launch the craft

Decouple the small tank

Set tank to target.(opt)

Open a MJ window with target heading.(opt)

Deploy the arms with IR Sequencer.

Watch the craft spin.  Note the craft spins always, but more when the arms are deployed or fuel tank is empty.  I would imagine if something was heavy enough it wouldn't move in gravity, but probably would in space.

 

 

 

 

 

 

Link to comment
Share on other sites

4 hours ago, Critter79606 said:

Note: These tests are not with the test.zip.  I will repeat these tests tomorrow night with that file installed.  I ran out of time tonight.

great results... try this one when you start the tests: before you do something (always after loading the game), load a ship with 1 IR part and then set the "Mode" to "none" ... you only need to do this once while the game is running... then test again... you can also try other modes if you want (the setting is kept on scene changes, but the gui shows the wrong values after a change... just to mention this).

This Mode is the setting for how massScale is used... with none it's completely off... then the joints aren't specially reinforced with this new 1.4 feature, but maybe this is what causes all the problems. (at least I cannot think of anything else... except really missaligned joints, but I cannot find such).

Anyway, in case it is not that, I will take your steps and reproduce it here...

... and, I have downloaded all mods needed for your craft.

Link to comment
Share on other sites

15 hours ago, Rudolf Meier said:

great results... try this one when you start the tests: before you do something (always after loading the game), load a ship with 1 IR part and then set the "Mode" to "none" ... you only need to do this once while the game is running... then test again... you can also try other modes if you want (the setting is kept on scene changes, but the gui shows the wrong values after a change... just to mention this).

This Mode is the setting for how massScale is used... with none it's completely off... then the joints aren't specially reinforced with this new 1.4 feature, but maybe this is what causes all the problems. (at least I cannot think of anything else... except really missaligned joints, but I cannot find such).

Anyway, in case it is not that, I will take your steps and reproduce it here...

... and, I have downloaded all mods needed for your craft.

@Rudolf Meier I don't see a mode button.  What am I missing?

I miss understood I had to launch the craft... I found it.

uc?export=view&id=1UYUvA6L8quoqrK49yZ1yB

Edited by Critter79606
Found Mode
Link to comment
Share on other sites

@Rudolf Meier

Repeated test with test.zip installed.

1.  Not repeating, this is a KSP issue, not a IR issue,, and works with non-stock landing gear not set to heaviest, or the heaviest part is below all hinges.

2. The craft was launched off the ground (but no where near as high), but didn't explode. Craft seems to be holding together much better. (I used this test as an extreme physics test)

3. Craft still crunched, but maybe 1/2 as much, and I could not blow up the craft.  All parts appeared to return to normal, although there was a small hop in the craft.  In my opinion this is acceptable.  Need to test under different gravity loads.

4. Ejected the fuel craft to make it as light as possible, and with SAS on or off, MechJeb is reporting .1 rotation in several minutes.  Even at x4 time (not warp).  Coming out of full warp had 0 issues. This test showed a marked improvement.  I don't think a heavier craft will even move.  I'm going to try to get this rig to minmus, maybe this weekend when I have some more free time.

Tried other settings, and it seems split is worst, and none is best.  It was hard to tell what I was testing with the button not remembering the settings :(   I can tell you that turning on any type of autostrut on the non green side of a strut will bind the hinge, and eventually destroy it (including stacked hinges).

I would make the following recommendations:

1. When a hinge starts to move, turn off autostrut on all IR hinges, and any part connected to it.  Restore when moving is complete.

2. If you can tell what parts are set to root or heaviest that are on the other side of a hinge, set to none while moving any hinge.  Restore when complete. 

3. Make it a requirement for IR that you must turn on Advanced Tweakables, and at least for now be very careful with your rooting.

4. Instead of doing 1 & 2 above, you could just do a autostrut off on the entire vessel, and restore them when IR stops moving.  The stock hinges will still be an issue though unless they can have the root fixed removed.

I did notice that the craft became very stable when I turned autostrut to heaviest after everything was deployed, including the hinges.

You may want to talk to  @linuxgurugamer, as his 

can switch this setting on an entire ship.  He may even know how to over-ride the root-fixed on the stock landing gear.

I did notice another thing.  On the testcraft after I deploy completely, if I set the expansion joint to heaviest (connects to fuel thank) and the hinges to grandparent, it takes off like a helicopter.  I'm thinking because a hinge is connecting across the bad side of the other hinge as they are stacked.  The more I press < the faster it spins.

From these tests, it appears that the issues are a combination of the root part and massScale, which may be why it has been so hard to pin down.

I'm also going to do some testing with 

to see what the differences are.  I've already got it installed on my playable install, as I had planned on using it to move solar panels on my station before I saw IR was revived, just haven't gotten enough time to try it yet.

Edit:

I just got done testing DockRotate.  It definitely has the rotation working much better.  There is no jerking, no lagging rotation issues, and (due to it being a docking port) no root issue.  It also has a smart autostrut option.  If you could replicate what he is doing for his rotation and rooting, and come up with a way of breaking the root like a docking port does, I think all of the issues would be resolved.  

 

Edited by Critter79606
More info
Link to comment
Share on other sites

7 hours ago, Critter79606 said:

Repeated test with test.zip installed.

...

Thanks a lot for your testing.

What I can see from this is:

1) the massScale shouldn't be used. I will remove it. It it a non working solution of Unity to the joint instability problem. I also didn't get an answer to my question the Unity forums.

2) the problem with the autostrut bug is bigger than I thought... so, use KJR instead of autostruts. I would have to write some kind of workaround that does somehow remove the autostruts after KSP added them or something... I don't think it's up to IR to solve KSP bugs... the report is here https://bugs.kerbalspaceprogram.com/issues/18356 . IR parts are already reporting to the game that it can attach autostruts and that it has to remove them (that's done dynamically...) but it is done wrong (by the game). So, what you recommend is already in the game. And my KJR version is also providing such a dynamic activation-deactivation (that's one of the new things in my version) ... but: I don't have this bug KSP has...

Conclusion: I will release a new patch version that does not use massScale at all and I will recommend not to use autostruts as long as they don't have fixed the bug but instead recommend KJR. And I will try to improve the performance of KJR. (and just to mention this: the stability provided by KJR is at least in theory much better than the one of autostruts...)

so... if you want to use autostruts: force Squad to solve the problem... it's really easy to solve. Doesn't take more than 10 minutes for them. It's just a "+1 -1 error" as we call them here (they simply overshoot by 1 when searching for parts to add struts to).

Edited by Rudolf Meier
Link to comment
Share on other sites

I have removed the massScaling completely in patch 7 ... it's online now

the auto strut problems due to the KSP bug will still be there, but using KJR solves that (or you can also try to attach the problematic IR parts reversely... this can solve the problem too)

Link to comment
Share on other sites

14 hours ago, Rudolf Meier said:

Thanks a lot for your testing.

What I can see from this is:

1) the massScale shouldn't be used. I will remove it. It it a non working solution of Unity to the joint instability problem. I also didn't get an answer to my question the Unity forums.

2) the problem with the autostrut bug is bigger than I thought... so, use KJR instead of autostruts. I would have to write some kind of workaround that does somehow remove the autostruts after KSP added them or something... I don't think it's up to IR to solve KSP bugs... the report is here https://bugs.kerbalspaceprogram.com/issues/18356 . IR parts are already reporting to the game that it can attach autostruts and that it has to remove them (that's done dynamically...) but it is done wrong (by the game). So, what you recommend is already in the game. And my KJR version is also providing such a dynamic activation-deactivation (that's one of the new things in my version) ... but: I don't have this bug KSP has...

Conclusion: I will release a new patch version that does not use massScale at all and I will recommend not to use autostruts as long as they don't have fixed the bug but instead recommend KJR. And I will try to improve the performance of KJR. (and just to mention this: the stability provided by KJR is at least in theory much better than the one of autostruts...)

so... if you want to use autostruts: force Squad to solve the problem... it's really easy to solve. Doesn't take more than 10 minutes for them. It's just a "+1 -1 error" as we call them here (they simply overshoot by 1 when searching for parts to add struts to).

@Rudolf Meier I obviously was subconsciously thinking about this last night, as I woke up with what  I think is a solution within the KSP framework.  KSP doesn't have any single part that moves like IR, and I doubt they will address it just for one mod.  

The issue is that your hinges are a single part, that one end moves on.  KSP just isn't designed for this.  I've run some more tests between the 45 deg IR hinge and a simulated hinge using 2 docking port jr.  They both acted the same, they both moved the same, and trying to move a heavy fuel tank, had the same amount of give and bounce while moving.  The main difference is that when the docking ports stopped, the smart autostrut re-engaged, and the craft settled right down.  The IR one keeps on bouncing due to the KSP physics.  I think the autostrut is their fix for the continuous momentum the game has.  The other difference is that if autostrut was on, the port didn't allow it to cross the port boundry.  The IR part blew up, the 2 port jr one worked fine.

I think that spliting the IR parts into 2 pieces per hinge (male/female) and making them a port attachment, this would get rid of the autostrut issue if combined with the smart strut that peteletroll came up with.  This would keep the autostrut from crossing the connection boundary, and keep the movement to between the parts, instead of in the middle of them, while not loosing the stability of the autostrut feature.

The one thing about the autostrut and IR is that when IR stops moving, turning the autostrut on considerably dampens the shake after the joint is done moving, especially when attached to heaviest part.  While KJR stiffens joints, it doesn't stabilize the craft, but just keeps it from coming apart.  Having 2 parts making up a hinge would also keep you from having to maintain a separate KJR just for IR. 

 You could even consider making IR optionally support peteletroll's smart autostrut which would (I think) be just .cfg files at that point.

Of course this would mean that only one side of the port would be able to move, and I don't know how you would handle the un-powered parts that moved free.

Anyway, it's just an idea I thought I would throw out there.

 

1 hour ago, m4ti140 said:

I did more testing, the phantom forces were indeed due to IR

@m4ti140  That was probably doe to the issue with massScaling which was just removed in patch 7.  You may want to try it again and see if you still have the issue.

Link to comment
Share on other sites

This is a wonderful add on that enables so many things! Thank you very much for all your hard work.  One small piece of feedback that may just be a bug in my game is that whenever I include any of the IR parts on a ship (or even just place an exentdatron or something onto an mk1 capsule and stick it in orbit) the part seems to cause the 'constant acceleration' bug to kick in.  The craft will slowly accelerate (quicker with more IR parts vs. mass) even when under no thrust.  It is significant enough that setting up maneuvers for long (interplanetary) trips becomes impossible (acceleration for a 150ton ship with 5 IR parts trying to get an airbrake at Jool set up showed about a 0.2 m/s^2 acceleration, which quickly throws you out millions of meters in the time it take to set it up) same ship with those 5 parts (3 extendatrons, one right angle one, one moveable rail)  removed showed no issues.  Any ideas on a possible issue or for a workaround?

 

Thanks again for your work on this - it is a great mod, articulating parts was a badly needed thing in the game to accomplish many things!

 

****Update after more testing - this problem has recurred even after removing IR installation, so I don't think it is related to this mod - I got tricked because it was at first only occurring with IR parts,  and would go away if they were removed, now it is impacting all vessels/parts.  Seems very similar to this issue, I guess Squad can't claim the Noble prize they mentioned in the post yet :) . Thanks for the reply Rudolf and insight - after looking more into the Unity engine  I can see this may be the root of a lot of issues with the game. You mentioned patch #7, was this the 7th patch to the game or a patch to this mod?

 

Edited by bd1323
Updated issue with additional info - referenced wrong post
Link to comment
Share on other sites

2 hours ago, bd1323 said:

One small piece of feedback that may just be a bug in my game is that whenever I include any of the IR parts on a ship (or even just place an exentdatron or something onto an mk1 capsule and stick it in orbit) the part seems to cause the 'constant acceleration' bug to kick in.

I think this is due to the massScale and this is removed in patch 7 ... it is something in Unity to stabilize the joints. But in my opinion it does not work at all... I think the biggest mistake squad made was to use Unity as base for the game. Physics is a pretty big problem in Unity as far as I have learned.

Link to comment
Share on other sites

On 5/2/2018 at 10:35 AM, Rudolf Meier said:

I would have to write some kind of workaround that does somehow remove the autostruts after KSP added them or something...

KSP actually has an API to remove and reenable autostruts: you can check out releaseAllAutoStruts() and secureAllAutoStruts() in DockRotate source.

Smart autostruts are a hack I'm not entirely proud of, but it seems to work... I refactored it to make it easier to port to other mods.

Edited by peteletroll
Smart autostruts note
Link to comment
Share on other sites

1 hour ago, peteletroll said:

KSP actually has an API to remove and reenable autostruts: you can check out releaseAllAutoStruts() and secureAllAutoStruts() in DockRotate source.

Smart autostruts are a hack I'm not entirely proud of, but it seems to work...

I know... the official way is to call "CycleAllAutoStrut" on the vessel.

Link to comment
Share on other sites

42 minutes ago, Rudolf Meier said:

I know... the official way is to call "CycleAllAutoStrut" on the vessel.

That's what I used. I was unsure of the exact semantics of CycleAllAutoStrut(), so I used the Part.ReleaseAutoStruts() / Vessel.CycleAutoStruts() pair, that gave me the opportunity to experiment quite successfully with the "Smart Autostruts" feature. Feel free to "be inspired" :wink: by DockRotate code. I tried to understand Infernal Robotics code to solve problems I had with DockRotate, and I know your task as new mantainer is not easy at all, so, if my experience can be of any help...

Link to comment
Share on other sites

39 minutes ago, peteletroll said:

I was unsure of the exact semantics of CycleAllAutoStrut()

The idea is to implement IJointLockState and to call CycleAllAutoStrut when you changed the value returned by the interface. (that's at least how KSP does it for the Klaw)

And, did you know that internally they do have motors and actuators? But they never made it into a part. Some classes are even called "test". :)

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