Jump to content

[1.10] AutoAsparagus v2.3.1


hab136

Recommended Posts

13 hours ago, Shadriss said:

Not seeing it show up in the appbar. Most likely a mod conflict - working on the troubleshooting side. I'll let you know what I find.

Yeah, if one mod is broken, it will often eat the next mod's button too.

Just to be clear, the button only appears in the editor.

Link to comment
Share on other sites

On this - after a complete rebuild, I was unable to spot the culprit because they all work now for no readily explicable reason. Saw the same thing happen with [X] Science. Odd thing is, my old save still has the problem, but the new one I created for troubleshooting is fine, oddly enough.

Link to comment
Share on other sites

  • 2 weeks later...

@hab136: Culprit identified. Turns out that the wrapper code for integration into the Toolbar mod has a huge flaw in it. Nightengale (Contract Configurator and other mods...) identified this bug and rewrote his own mod to avoid the bug, and in the process created a huge incompatibility with a great many other mods. There's a lot more detail in CC's thread, and I think he posted a separate thread specifically about this issue, though I'm having problems finding it at the moment (though I know it's linked in the CC thread, so that may be the place to take a look). I'm no modded myself, so I may have misunderstood some of it, but if I'm correct in my understanding, anyone using this mod (and a great many others, including SmartStage) in conjunction with CC will see this 'missing toolbar button' problem, as well as having some of the core functionality not work, that I mentioned a few weeks ago.

So there it is - supposed to be a simple fix, and a great many other mods have already made it, and I figured I'd throw you a bone on this one.

Edited by Shadriss
Link to comment
Share on other sites

19 hours ago, Shadriss said:

@hab136: Culprit identified. Turns out that the wrapper code for integration into the Toolbar mod has a huge flaw in it. Nightengale (Contract Configurator and other mods...) identified this bug and rewrote his own mod to avoid the bug, and in the process created a huge incompatibility with a great many other mods. There's a lot more detail in CC's thread, and I think he posted a separate thread specifically about this issue, though I'm having problems finding it at the moment (though I know it's linked in the CC thread, so that may be the place to take a look). I'm no modded myself, so I may have misunderstood some of it, but if I'm correct in my understanding, anyone using this mod (and a great many others, including SmartStage) in conjunction with CC will see this 'missing toolbar button' problem, as well as having some of the core functionality not work, that I mentioned a few weeks ago.

So there it is - supposed to be a simple fix, and a great many other mods have already made it, and I figured I'd throw you a bone on this one.

The problem and fix is detailed here:

 

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
On 11/30/2016 at 10:16 AM, Ryusho said:

I know you may of heard this already, though this needs a CKAN update, as even though it works with 1.2, it will not allow ckan to download or update it for 1.2.1 because of how its ckan file is currently set.

Just updated for KSP 1.2.2.  CKAN should show it whenever it re-indexes.

Link to comment
Share on other sites

  • 5 months later...

AutoAsparagus v2.2.6 for KSP 1.3 just released.  No changes other than recompiling.

I also tested with SmartStage which hasn't updated yet, but the current version seems to work in KSP 1.3 just fine.

Link to comment
Share on other sites

  • 1 month later...

I've got a pretty simple ship design.  I click the asparagus button, and it thinks for a while.  When it finishes, it appears to have done nothing (no fuel lines).  I get a message that there is no unobstructed path for the fuel line. I have made similar designs in the past KSP versions, and had no issues.  Are these decouplers not moving the fuel tanks far enough away from the main tank?  The parts that are not attached I removed just in case they were messing with AA, but it didn't seem to make a difference.

Thanks for all your time spent on this mod, I have really enjoyed using it!

Craft File:
https://drive.google.com/file/d/0B7HL6tXnXM0aaG84U1hwX3RCeFU/view?usp=sharing

nL48GTP.png
 

5VyrG1Z.png


 

 

Link to comment
Share on other sites

9 hours ago, khadgarion said:

I've got a pretty simple ship design.  I click the asparagus button, and it thinks for a while.  When it finishes, it appears to have done nothing (no fuel lines).  I get a message that there is no unobstructed path for the fuel line. I have made similar designs in the past KSP versions, and had no issues.  Are these decouplers not moving the fuel tanks far enough away from the main tank?  The parts that are not attached I removed just in case they were messing with AA, but it didn't seem to make a difference.

Thanks for all your time spent on this mod, I have really enjoyed using it!

Craft File:
https://drive.google.com/file/d/0B7HL6tXnXM0aaG84U1hwX3RCeFU/view?usp=sharing
 

Yep, when I try it, I see in KSP.log:

[LOG 12:21:15.255] [AutoAsparagus]: === AttachFuelLine ===
[LOG 12:21:15.255] [AutoAsparagus]: sourceTank: KW1mtankL4: Scott/4294066324/5/2/SRF_ATTACH/4/0
[LOG 12:21:15.256] [AutoAsparagus]: destTank: KW1mtankL1: Betty/4294090880/0/1/STACK/2/0
[LOG 12:21:15.256] [AutoAsparagus]: sourceTank: (1.21813100, 8.36670500, -0.70328780)
[LOG 12:21:15.256] [AutoAsparagus]:     dist: 1.91
[LOG 12:21:15.257] [AutoAsparagus]: destTank: (0.00000000, 11.92296000, 0.00000000)
[LOG 12:21:15.257] [AutoAsparagus]:     dist: 1.91
[LOG 12:21:15.257] [AutoAsparagus]: midway: (0.60906540, 10.14483000, -0.35164390)
[LOG 12:21:23.311] [AutoAsparagus]: Failed to find unobstructed path between: KW1mtankL4: Scott/4294066324/5/2/SRF_ATTACH/4/0
[LOG 12:21:23.311] [AutoAsparagus]: ... and: KW1mtankL1: Betty/4294090880/0/1/STACK/2/0
[LOG 12:21:23.311] [AutoAsparagus]: === Blocking Parts: 14 parts ===
[LOG 12:21:23.312] [AutoAsparagus]: BP:: KW1mtankL4: Helen/4294087244/0/7/STACK/2/0
[LOG 12:21:23.312] [AutoAsparagus]: BP:: KW1mNoseCone: Kimberly/4294056120/5/1/STACK/4/0
 

The problem isn't the decouplers, surprisingly, but the "KW Rocketry SA-1 LFT" tank in the middle.  If you click on "Show visualizations", you'll see what it's trying to do:  Green are fuel tanks that it considers for connecting, and purple is decouplers.

f5uzf7L.png

I added an MS Paint arrow showing where it's trying to connect level 2 to level 3.  There's no good way to do that, because the nose cone is in the way.

Why isn't the large "KW Rocketry SA-4 LFT" in the middle considered for connecting? Only the first fuel tank after the decoupler is considered for connecting.  Anything else is hard :)

As a workaround, take off the tiny middle tank, run AutoAsparagus, then put it back.  You'll see the large SA-4 tank turn green.  Alternatively, put the small tank on the bottom, and move the boosters down, like this:

 

nGqzkYM.png

 

AutoAsparagus already logs which two tanks it's trying to connect, and which parts are in the way, but you have to go into the KSP.log to see that.  I'll look into putting this info on screen.  Either a text message or visualizing it - highlighting the tanks in different colors and/or drawing a line.  First I have to figure out how to draw a line on-screen, lol.

Link to comment
Share on other sites

xQEMzB2.jpg

Posted version 2.2.7:

  • Show visualization on error
  • Show line between parts that couldn't be connected by fuel lines
  • Clear errors on ship modification

Turns out I already wrote code to highlight the tanks it couldn't connect, but if you didn't have visualization turned on, you wouldn't see it.  So, now visualization will automatically be turned on if there's an error.

~ 30 lines of code just to draw a line, and an hour of research to get it visible by setting the right layer. Geez.  But at least it works.  Here's what it looks like when it can't find a path:

LI6TelE.png

Link to comment
Share on other sites

Oh wow!  Thanks for the effort, it's much appreciated.  I figured it was something I was doing wrong, I didn't know that it was only looking at the first tank after a decoupler.  I must not have ever done fuel tanks like that.  That short tank was actually a leftover from a recycled design when I only had the little tanks (in career). 

Thanks for the explanation too!

EDIT:  I sent you a little something, have a sixpack (or a couple cups of coffee) on me :)

Edited by khadgarion
Link to comment
Share on other sites

  • 2 weeks later...

Installed this today via CKAN and KSP AVC made me aware this has been updated. Looking at the change log, I would really like the updated version but don't want to do it outside of CKAN. Any chance we can get the updated version in CKAN?

Link to comment
Share on other sites

On 7/10/2017 at 1:35 AM, khadgarion said:

Oh wow!  Thanks for the effort, it's much appreciated.  I figured it was something I was doing wrong, I didn't know that it was only looking at the first tank after a decoupler.  I must not have ever done fuel tanks like that.  That short tank was actually a leftover from a recycled design when I only had the little tanks (in career). 

Thanks for the explanation too!

EDIT:  I sent you a little something, have a sixpack (or a couple cups of coffee) on me :)

You da man!

 

22 hours ago, HaploAW said:

Installed this today via CKAN and KSP AVC made me aware this has been updated. Looking at the change log, I would really like the updated version but don't want to do it outside of CKAN. Any chance we can get the updated version in CKAN?

I have no way to force CKAN to notice the new version.  It normally updates automatically.

Looks like CKAN is not updating at the moment: https://github.com/KSP-CKAN/NetKAN/issues/5694

 

Link to comment
Share on other sites

  • 3 months later...
  • 4 months later...
  • 2 weeks later...
On 7/9/2017 at 4:33 PM, hab136 said:

xQEMzB2.jpg

Posted version 2.2.7:

  • Show visualization on error
  • Show line between parts that couldn't be connected by fuel lines
  • Clear errors on ship modification

Turns out I already wrote code to highlight the tanks it couldn't connect, but if you didn't have visualization turned on, you wouldn't see it.  So, now visualization will automatically be turned on if there's an error.

~ 30 lines of code just to draw a line, and an hour of research to get it visible by setting the right layer. Geez.  But at least it works.  Here's what it looks like when it can't find a path:

LI6TelE.png

Doh, I was testing SmartStage in 1.4, and came across this same issue. It's kind of a bummer when you want aerodynamic looking rockets with fuel in the cone:

SZuH59z.png

The visualisation makes it easier to find issues, thanks for that! What are the chances of fixing this to make fuel lines attach to the grandparent part in future? It looks like KSP's autostrut function can identify this correctly: Maybe that's something you can hook into?

Link to comment
Share on other sites

On 4/3/2018 at 3:54 PM, Rohaq said:

Doh, I was testing SmartStage in 1.4, and came across this same issue. It's kind of a bummer when you want aerodynamic looking rockets with fuel in the cone:

The visualisation makes it easier to find issues, thanks for that! What are the chances of fixing this to make fuel lines attach to the grandparent part in future? It looks like KSP's autostrut function can identify this correctly: Maybe that's something you can hook into?

It's trivial to find the grandparent part (part.parent.parent) but that part is not always a fuel tank - or it could be the wrong fuel tank.  A lot of effort has gone into figuring out what tanks should be connected, including a full rewrite of that logic back in 2015 for v1.1.  The logic is "correct" - those two tanks should be connected - but there's no backup in case that's not physically possible.

Imagine this rocket, made of stacked fuel tanks (indicated by letters):

A-B-decoupler-C-D-E-decoupler-F-G

In this case we'd try to connect F to C to A.  Currently the mod does this by only considering fuel tanks if their parent isn't also a fuel tank - that is, it doesn't consider B/D/E/G to be fuel tanks.  We then make a list of tanksToConnect, which contains {A,C,F}, then then try to connect A-C, then C-F.  If connecting A-C fails, currently it just gives up.

...and I wrote up a whole lot more, explaining why it would be hard to have it connect B-C or A-D or B-D instead, but had an idea of an ugly solution in the bathroom this morning, and while typing it out today realized it might be feasible.  So.. I might have a solution.  An ugly, possibly recursive solution, but a solution.  Let me see when I get some development time.

In the meantime, the workaround is to just detach the conical fuel tank, run AutoAsparagus, then put the conical fuel tank back. :)

 

Link to comment
Share on other sites

10 hours ago, hab136 said:

It's trivial to find the grandparent part (part.parent.parent) but that part is not always a fuel tank - or it could be the wrong fuel tank.  A lot of effort has gone into figuring out what tanks should be connected, including a full rewrite of that logic back in 2015 for v1.1.  The logic is "correct" - those two tanks should be connected - but there's no backup in case that's not physically possible.

Imagine this rocket, made of stacked fuel tanks (indicated by letters):

A-B-decoupler-C-D-E-decoupler-F-G

In this case we'd try to connect F to C to A.  Currently the mod does this by only considering fuel tanks if their parent isn't also a fuel tank - that is, it doesn't consider B/D/E/G to be fuel tanks.  We then make a list of tanksToConnect, which contains {A,C,F}, then then try to connect A-C, then C-F.  If connecting A-C fails, currently it just gives up.

...and I wrote up a whole lot more, explaining why it would be hard to have it connect B-C or A-D or B-D instead, but had an idea of an ugly solution in the bathroom this morning, and while typing it out today realized it might be feasible.  So.. I might have a solution.  An ugly, possibly recursive solution, but a solution.  Let me see when I get some development time.

In the meantime, the workaround is to just detach the conical fuel tank, run AutoAsparagus, then put the conical fuel tank back. :)

 

Fair enough - I'd previously thought that maybe you were grouping stacked tanks and treating them as one, while storing the part ID for the lowest tank in each group - then attaching fuel lines between the stored lowest tank parts in each group to handle fuel flow properly.

It sounds like a huge pain in the ass to get right though. Best of luck with your new solution!

Link to comment
Share on other sites

  • 4 months later...
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...