Jump to content

[1.12] Extraplanetary Launchpads v6.99.3


taniwha

Recommended Posts

3 minutes ago, leatherneck6017 said:

I briefly looked at your code but couldn't find where this occurs. Thanks for your time.

I suspect it's in BuildPadList, (GUI/BuildWindow.cs) which is called when the active vessel changes (which happens at least twice during finalization). It might be a good idea to put the selected pad in the vessel work net (Workshop/VesselWorkNet.cs) and BuildWindow can grab it from there on vessel switch (and fall back to first or none if not valid).

Link to comment
Share on other sites

4 minutes ago, taniwha said:

I suspect it's in BuildPadList, (GUI/BuildWindow.cs) which is called when the active vessel changes (which happens at least twice during finalization). It might be a good idea to put the selected pad in the vessel work net (Workshop/VesselWorkNet.cs) and BuildWindow can grab it from there on vessel switch (and fall back to first or none if not valid).

I'm no C# pro, but I'll dive in deeper and see if I can't send a PR your way.

Link to comment
Share on other sites

And now for a bit of an update.

I think I have finally waded out of the compiler code. Taking a compiler from being a hunk of junk to a hunk of junk that can do the Kessel at all is no mean feat (for the curious, take a look at http:// https://github.com/quakeforge/quakeforge: that's what I've been working on for the last few weeks).

Anyway, with having achieved my current goal with the thing, I feel much freer to work on other things (like EL).

Link to comment
Share on other sites

I have released version 6.7.1 of Extraplanetary Launchpads.

Changes from 6.7.0:

  • Update for KSP versions 1.8-1.9 (looser checking, compiled against 1.9.1 but should work for 1.8)
  • EC smelter recipe from Tonka Crash (not used by EL, but available to those who wish to use it).

I apologize for the delay. I've been very busy over the last several weeks on a different project (unrelated to KSP: QuakeForge) and finally got it to a stage where it would let my mind think about other things.

Link to comment
Share on other sites

Hi,

I'm having a problem with the micro pads, which is really puzzling since in the past I've used them to great success. The last time I really used them heavily was in 2018 (KSP 1.4.3), and at that time I made and published a bunch of modular base vessels that have named EL micro pads on them and are all supported using launch clamps from Blue Dog DB.

Here are some examples:

https://kerbalx.com/Schlosrat/Modular-Base-Core

https://kerbalx.com/Schlosrat/Modular-Base-Smelter

What I had learned back then was to make sure there were parts attached to each node I DIDN'T want to be used on the root part, so that the one remaining available node would be chosen, and to carefully orient each vessel the same way prior to saving it as well as orienting the micropads so that the cyan diamond was up. By doing that I was able to reliably build out planetary bases in a step by step fashion.

I came back to the game recently and have been playing 1.9.1 with a very similar set of mods to what I last used (tried with EL 6.7.0 & 6.7.1), and was able to load up my old designs. They work - if I build them disconnected using survey stakes and ignor all the disposable pads. I'd really like to be able to build them connected like I used to!

What happens now is invariably the new part of the base being built on any micropad will come in not only oriented wrong but in general connected to some mysterious point deep inside the root part. I've found that by reorienting the vessels in the VAB so that the node I want to use is on the bottom I can get EL to pick the right node (no other change to occupied nodes BTW). Nothing else I've tried will get the micropad to pick the right node. Unfortunately this makes the launch clamps get placed wrong so that instead of descending to the ground they extend horzontally so they never intersect the ground.

I've also found I now apparently need the micropads set with the yellow diamond up for some reason, otherwise even with the vessel turned on it's end it will always be place rotated wrong. I tried rotating the craft in the VAB and re-saving it before building it, but that had no effect. Only going out with a kerbal on EVA and replacing the micropad so the yellow diamond was up would result in the correct final orientation of the base component - but even then, as noted above, the launch clamps head off in the wrong direction.

Is this expected behavior? I've searched this forum and not seen any other mention of it going back to when I previously announced my parts here:

 

 

 

Edited by schlosrat
Link to comment
Share on other sites

@taniwha

BTW there's a minor typo in the footnoot for section 2.5.3 (Micro Pad) on page 14 of the EL manual where you refer to the -X direction being represented by the "Magenta" diamond. In the main body of the text you refer to the -X direction diamond being cyan, which I believe is true.

Edited by schlosrat
Link to comment
Share on other sites

@schlosrat: First, thanks for the tip on the typo. I'll look into it (double checking which is which etc).

As for your problem... hmm

Well, first, the node priority was switched from preferring the top node to preferring, the bottom node, but that should not affect you since you occupy all undesired nodes as a policy (if it does, that's worrying).

There was an NRE fix for when no node was found, but since things were working for you, that definitely should not be related.

There were changes to launch transform setup when no transform name is specified or the specified transform is not found, but if you're using my part, they should be unrelated.

There were changes to the ship placement code (for craft hull display) that very well may be related. It's possible the code is incorrect and my testing was inadequate. (this code is highly suspect as there's a commit mentioning that micro pads were broken at one stage during the process of getting craft hulls to work).

I've been through the diffs for every patch since KSP 1.4.2 (don't have a tag for 1.4.3), and nothing else seems relevant.

Actually, really looking at the code that figures out how the ship should be rotated could be very incorrect and works only for certain root-part orientations. Which I suspect all my test builds were in...

I think the best thing you can do to help is provide some screenshots showing your modules in their designed (not work-around) orientations with the relevant node indicated (probably easiest to take a VAB/SPH screenshot while holding a part so attach nodes show), and some shots of bad builds.

And yes, indeed, "magenta" should be "cyan". I'd messed up the original part colors, corrected, fixed the docs but forgot the footnote. Again, thank you.

Link to comment
Share on other sites

Thanks for the quick response @taniwha. Here are some screen shots that may help to diagnose the problem.

This view shows my Modular Base Mini ISRU vessel. The root part is the scrap metal container under the ISRU. This view shows the micro pad on the new part, which is typical of all the parts I've got in this line.

https://drive.google.com/file/d/1T1mFh0bx8ChDGVTzMTQlnOrerENF6NES/view?usp=sharing

This view shows the same vessel with the root part selected so you can see which node I intend to connect with.

https://drive.google.com/file/d/10HV5oW9ZpBtp-t5vEq4Re6MXeB7C0nFE/view?usp=sharing

This view shows the existing base (which was built using a survey station) with the micro pad I'll use to build/connect the Modular Base Mini ISRU vessel.

https://drive.google.com/file/d/1K1gpzJV3c3wj5NPNKmQ6UENTH7mfX3pR/view?usp=sharing

And here's the final result if I build the Modular Base Mini ISRU using the micro pad shown in the image above.

https://drive.google.com/file/d/1XUtXtJaU1zKoJ1BTTrlzxEQNl3SVD6aL/view?usp=sharing

Here's a link to the craft file for the Modular Base Mini ISRU.

https://kerbalx.com/Schlosrat/Modular-Base-Mini-ISRU

Thanks for taking the time to look into this!

 

Link to comment
Share on other sites

@schlosrat: That last link gives a 404, but the screenshots are very informative, Thank you. They verified many of my suspicions (though the bad build shot does have me a little puzzled as to just where it tried to attach).

I'm not yet sure just where I went wrong, but it very much is a bug in EL. Knowing my luck, it's just inverted quaternion manipulation, though it's possible it's a deeper error. I'll do up some tests and see what there is to see.

Just to confirm, those shots are in the VAB, right?

Link to comment
Share on other sites

5 hours ago, taniwha said:

@schlosrat: That last link gives a 404, but the screenshots are very informative, Thank you. They verified many of my suspicions (though the bad build shot does have me a little puzzled as to just where it tried to attach).

I'm not yet sure just where I went wrong, but it very much is a bug in EL. Knowing my luck, it's just inverted quaternion manipulation, though it's possible it's a deeper error. I'll do up some tests and see what there is to see.

Just to confirm, those shots are in the VAB, right?

Yeah, I was pretty puzzled what it was attaching to as well.

All of the inside shots are from the VAB, though I've tried by saving the same craft in the SPH and building from that. Same results either way.

How cool is it when you get to talk about quaternions in a hobby setting? Love this game!

Thanks!

Link to comment
Share on other sites

7 hours ago, schlosrat said:

How cool is it when you get to talk about quaternions in a hobby setting? Love this game!

I love quaternions, but I always get them backwards (especially when the quaternion-vector multiplication shortcut is available): q*v when I should do v*q, or using the straight quaternion when I should use the inverse (essentially the same thing, but that doubles the ways to get it wrong).

Link to comment
Share on other sites

@schlosrat: I've reproduced your problem http://taniwha.org/~bill/ksp/screenshot4694.png

It looks like it's attaching to the top node despite the node being occupied, and certainly with the wrong orientation. However, this may be an illusion caused by the incorrect orientation (ie, it may be trying for the bottom node, but the orientation makes it look like the top node)

Link to comment
Share on other sites

This will be a bit tricky to fix, I think, because I probably want to make it so the root part's X axis is ailgned with the red diamond when attaching to the bottom node (and possibly with the cyan diamond when attaching to the top node, thus keeping the part's "up" as up).

Link to comment
Share on other sites

@schlosrat: I got it working to my satisfaction:

screenshot4695.png

screenshot4696.png

And yes, that is a deliberately skew-wiff orientation, yet the bottom node is correctly positioned \and orienteed.

And finally...

screenshot4697.png

 

However, I need to sort out the "root forward axis is within 30 degrees of the node axis" case.

Link to comment
Share on other sites

44 minutes ago, taniwha said:

@schlosrat: I got it working to my satisfaction:

And yes, that is a deliberately skew-wiff orientation, yet the bottom node is correctly positioned \and orienteed.

And finally...

However, I need to sort out the "root forward axis is within 30 degrees of the node axis" case.

Well that was fast! Looks like I should have my micro pads oriented with yellow up now? Easy adjustment at my end! :D

Definitely looking forward to playing with this. Thanks, @taniwha!

On another note in the meantime I've been playing around with some alternate base configurations where I build larger sections pre-assembled using survey steaks. I'm observing this effect where, with a +X, O, -X set of stakes in a line my final build comes in tilted fairly significantly up. That might be due to the terrain, although I've picked a spot that should have a slope less than 1 degree. The other odd thing is that the launch clamps don't extend all the way to the ground. I had thought that one of the things about using launch clamps is that they autoextend to the height they need to offset variations in slope. Apparently I'm mistaken about that!

Here's a recent result that showes this effect. Also, even though there wasn't a launch clamp under the root part (which was set to the scrap metal container near the middle of the assembly for this test), the Origin steak popped out of the ground like it had been hit. Is that normal?

https://drive.google.com/file/d/1QvzLZh8d0XMflDSxT3GE3FaKDP6Ht2Ci/view?usp=sharing

Link to comment
Share on other sites

I have released version 6.7.2 of Extraplanetary Launchpads.

Changes from 6.7.1:

  • Fix incorrect placement of built vessel on the micro-pad (thanks to @schlosrat for his assistance (a picture really is worth a thousand words, if not more))
  • Correct -X color in micro-pad footnote in the manual (again, thanks to @schlosrat)

I've left some debug logging in around the micro-pad placement code in case there are other problems.

Also, for reference, the micro-pad tries to be very consistent when orienting the build: unless the root part's forward axis (normally the north wall of the VAB, so the ventral side (belly) of an Mk2 cockpit) is within 30 degrees of the selected attach node's axis, the root part's forward axis is aligned with the blue diamond of the micro-pad (ie, the node's axis is anti-parallel to the micro-pad, and the ventral axis is co-planar with the blue diamond). If the forward axis is within 30 degrees, the root part's starboard (VAB door by default) side is aligned with the red diamond.

Link to comment
Share on other sites

@schlosrat: I am not familiar with those launch clamps. On a hunch, I checked the code, and it looks at only the part name, so it auto-replaces the part module only for launchClamp1. I think I didn't want to scan each part module node of every part of a craft file looking for the LaunchClamp module. One fix for this would be to use ModuleManager to edit the part in question to use ELExtendingLaunchClamp instead of LaunchClamp for the module. Back in KSP 1.4.x, EL used LaunchClamp, telling it to extend (I put the extension code in there for 1.2), but later discovered some inadequacies (including needed segment support for Diamond Grid), so that approach was abandoned in KSP 1.5.1

I didn't do the MM thing in EL because I did not want to mess up people's craft files should the uninstall EL. I think I'll do up a "launch clamp" list config file that EL reads and uses to check for parts it needs to edit.

Link to comment
Share on other sites

2 minutes ago, taniwha said:

@schlosrat: I am not familiar with those launch clamps. On a hunch, I checked the code, and it looks at only the part name, so it auto-replaces the part module only for launchClamp1. I think I didn't want to scan each part module node of every part of a craft file looking for the LaunchClamp module. One fix for this would be to use ModuleManager to edit the part in question to use ELExtendingLaunchClamp instead of LaunchClamp for the module. Back in KSP 1.4.x, EL used LaunchClamp, telling it to extend (I put the extension code in there for 1.2), but later discovered some inadequacies (including needed segment support for Diamond Grid), so that approach was abandoned in KSP 1.5.1

I didn't do the MM thing in EL because I did not want to mess up people's craft files should the uninstall EL. I think I'll do up a "launch clamp" list config file that EL reads and uses to check for parts it needs to edit.

Ahhh! That explains it! I'll work on a MM fix for the parts I'm using to use ELExtendingLaunchClamp instead of LaunchClamp.

Thanks!

Link to comment
Share on other sites

Oh, and looking at your pic, it looks about right to me (even 1 degree is a lot over several meters). As for the stake: they fall out of the ground a lot for me, too. I think it's some KIS bug, I haven't tracked it down yet.

Link to comment
Share on other sites

@taniwha, I haven't tried the MM fix yet as I was focused on trying out the new launch pads, but I then this just happened.

https://drive.google.com/file/d/1R1zpT7DC_4gbR1T531YyOFDpH4VBsb8O/view?usp=sharing

So with this module there's only one launch clamp and I shouldn't even need the MM fix, That launch clamp most likely came down right on the origin stake, and what I observed was that the craft appears in the right place then sort of hopped up and settled tilted like this. If you look closely you can see there's a gap between the bottom of the launch clamp and the ground.

Is this just due to there having been an origin stake in the way of the launch clamp?

 

EDIT: Nuts. It did the exact same thing without the origin stake there...

 

Edited by schlosrat
Link to comment
Share on other sites

@taniwha thank you for the update. as always am impressed with the responsiveness!

Don't know if this is a bug, but I think the description for the KS-CR Control Reference is slightly inaccurate to what it actually does:

Spoiler

    name = ELControlReference

    title = KS-CR Control Reference
    description = Mark where built modules will be permanently attached to the construting vessel. The build replaces the pad. The built module must have a free stack node on its root part (top or bottom, top takes priority if both are available).

 

This part just adds a control reference correct? doesn't do something else? Silly me, from the part title, I originally thought it would be something that goes onto an assembly/subassembly/vessel saying when built onto an existing ship - attach me here. Which would be a great part - for when you m*u*s*t* assemble say a space station just so.

just thought I would bring this to your attention. Thank you without was for this mod!

Link to comment
Share on other sites

Can anything be done to improve survivability of stakes?  I expect this is just the nature of KSP.  I've replaced these 3 or 4 times while the build was going on, but finally got around to saving a log with them disappearing.  I loaded the save, loaded a ship in the vicinity of the stakes (Drilling Rig) from the Tracking Station to verify stakes were still present (Valentina Kerman Base 3 Stakes (Origin, +X, +Z)) then switched to my orbital station (Mun Station) using the Kerbal Engineer Select Target and Switch to Target options. When I flew back down from the station with a ship (Ore Heavy Hopper) the stakes were gone.  Looking at the log it looks like the stakes were destroyed with I changed scenes from the Drilling Rig to the Mun Station.

[LOG 12:32:40.065] Game State Saved as persistent
[WRN 12:32:40.755] [F: 22389]: Vessel Valentina Kerman Base crashed through terrain on Mun.
[LOG 12:32:40.759] [DeployedScience]: Cluster 1714262089 on Mun Impact Detected on Mun - Impact of 0J. RootPart Unloaded TotalParts 1 Vessel Mass 0 Velocity 1.554078
[LOG 12:32:40.770] [Vessel Valentina Kerman Base]: Vessel was destroyed.
[WRN 12:32:40.770] [F: 22389]: Vessel Valentina Kerman Base crashed through terrain on Mun.
[LOG 12:32:40.770] [DeployedScience]: Cluster 1714262089 on Mun Impact Detected on Mun - Impact of 0J. RootPart Unloaded TotalParts 1 Vessel Mass 0 Velocity 1.554079
[LOG 12:32:40.778] [Vessel Valentina Kerman Base]: Vessel was destroyed.
[WRN 12:32:40.778] [F: 22389]: Vessel Valentina Kerman Base crashed through terrain on Mun.
[LOG 12:32:40.778] [DeployedScience]: Cluster 1714262089 on Mun Impact Detected on Mun - Impact of 0J. RootPart Unloaded TotalParts 1 Vessel Mass 0 Velocity 1.554077
[LOG 12:32:40.785] [Vessel Valentina Kerman Base]: Vessel was destroyed.
[LOG 12:32:40.796] [EL ST] stake on rails Valentina Kerman Base
[LOG 12:32:40.796] [EL ST] RemoveStake Valentina Kerman Base Mun
[LOG 12:32:40.796] [EL ST] isClose 200
[LOG 12:32:40.796] [EL ST] isClose [-77775.1910957244, -29153.2728322181, 88916.6646714817] [-77775.7698275694, -29147.5833237349, 88916.2753509557] 32.8570078015231 40000
[LOG 12:32:40.797] [EL ST] stake on rails Valentina Kerman Base
[LOG 12:32:40.797] [EL ST] RemoveStake Valentina Kerman Base Mun
[LOG 12:32:40.798] [EL ST] stake on rails Valentina Kerman Base
[LOG 12:32:40.798] [EL ST] RemoveStake Valentina Kerman Base Mun
[LOG 12:32:40.981] Unpacking Mun Station

Log with stakes disappearing

Edited by Tonka Crash
Link to comment
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.

×
×
  • Create New...