Jump to content

[1.10] AutoAsparagus v2.3.1


hab136

Recommended Posts

Great little mod, thank you. Having two small kids, a full time job and a part time job leaves me with precious free time. I choose to fill the bulk of my free time playing ksp. It's always somewhat irksome that even with subassemblies, I spend so much play time fixing stages, fuel lines, and struts, when I could be doing science and exploring.

Your mod has cut back on the tedium time and given me more play time, thank you!

Link to comment
Share on other sites

I never thought of that. That's easily doable, and something that annoys me too. I'll add it to my list :)

Not that I'd use it this way, but some people would want an option to put it one stage up from the bottom, to replicate how it's done in real life. Light up the engines, and let go of the craft once you know that they're all properly functioning. Not a desperate request by any means, just getting ahead of someone else asking for it.

Link to comment
Share on other sites

Someone should release a vid to show how it works :D

Also does the plugin only work when there is one tank below the command pod with the fuel tanks on it and not when there is a (e.g) second tank with an orbital engine on it above it? like this?

jDi0tRH.jpg

Edited by Boamere
Link to comment
Share on other sites

I'd love to simplify the GUI, but I haven't figured out how combine steps 1 and 2 (adding fuel lines and connecting them). The game needs to refresh or something in between, because if I just run those functions one after another it doesn't work.

Since they run during the same Unity frame?

Try this:

setup a bool variable like isStepTwoNextFrame, set to false at initialize, set to True after running step one code

set the step 2 sub to check for isStepTwoNextFrame = true, execute code in step two then. At end of this code segment, set isStepTwoNextFrame back to false, to prevent execution during the next frame.

As long as you check isStepTwoNextFrame before you change its value it should work correctly.

bool isStepTwoNextFrame = False;

sub AutoAsparagus()

if(isStepTwoNextFrame = True)

stepTwo();

if(stepOneBtnPress = True)

{

step one code

isStepTwoNextFrame = True;

}

end sub

private stepTwo()

{

step two code

isStepTwoNextFrame = False;

}

end

Edited by kujuman
inserted really poorly formatted pseudocode
Link to comment
Share on other sites

+1

No idea how to use this, clicked the fuel button, nothing happend, klicked the stage button, it fixed only one decoupler....

I'm going to second this. Threw it at my GameData, launch KSP and into the VAB. Tank, 10 radials, 10 smaller tanks on that. Press buttons, nothing happens, give up and head for sleep. I like the idea and your list of todos but some usage hints would be nice.

Link to comment
Share on other sites

Just in case you haven't seen it, the Toolbar Plugin is a nice simple way to handle some of the gui basics. And its really nice to have all the mod buttons collected in one place.

I hadn't seen it. It's perfect, thanks!

Here you go:

https://sites.google.com/site/ouchsdownloads/home/downloads/Auto%20Asparagus%20test.zip

You have to look closely as the lines it creates are tiny...

also if you hit remove all lines twice after creating asparagus lines then it removes a set of tanks from the outer edge and creates floating nodes...

Yeah, I expect a rocket like:

1x

6x

6x

6x

6x

And you have:

1x

6x

6x 6x

6x 6x 6x 6x

I could treat sets of tanks that are attached to the same parent as part of the same set (so "6x 6x" would pretend to be one "12x", and "6x 6x 6x 6x" would pretend to be one "24x"), but it currently doesn't do that.

The big problem is that I have no way to tell the difference between what you're doing and something like this:

YJvjy3X.png

Hmm, your rocket is probably more common.

As for the "remove fuel lines" removing tanks, I think you hit a bug I already know about - mouse clicks to the AutoAsparagus window pass through to whatever is behind it. If your AutoAsparagus window is above your outer tanks, then you're going to click on your outer tanks and remove them.

Also does the plugin only work when there is one tank below the command pod with the fuel tanks on it and not when there is a (e.g) second tank with an orbital engine on it above it? like this?

I'm not sure I understand the question - the rocket in the picture should work fine. Double-stack tanks don't currently work right.

setup a bool variable like isStepTwoNextFrame, set to false at initialize, set to True after running step one code

Oh yeah! Even more abstract, I can just set a "nextAction" flag and process that on the next Update(). Thanks!

Hmm, I could even add a delay if I need to - just check a timer on each Update(). This gives me great hope for reducing the GUI down to pushing one button.

I may make a video, assuming that there won't be an update super soon. Any info on that?

Before Christmas is my guess for v0.3. I'll have time next week to work on it.

support for parachutes, I like to put parachutes on all my stages and i think it's pretty easy to implement along with the sepatron.

Easy enough, but I'll probably make it a checkbox. I'm thinking of Eve/Laythe landers where you might land with all your parachutes, then discard them on the way up.

Edited by hab136
Link to comment
Share on other sites

I'm not sure I understand the question - the rocket in the picture should work fine. Double-stack tanks don't currently work right.

I kinda used the wrong image, but yeah i meant that it doesn't work when you put a fuel tank above the area you want to asparagus stage

EDIT: Also guys if you want it to work, just use the section you want to stage with a command pod, then save it, then stick it under a pre-build rocket

Edited by Boamere
Link to comment
Share on other sites

Wow! You really did a good job on this! :cool:

I haven't really ever needed this kind of help, but the amount of complex logic in this thing is impressive.

And I want to ask you a question. If you are in such kind of a thing and some words being said about "autostrutting"...

I often tend to make everything as straight and precise as possible. And Editor Extensions with its vertical and angular snap function helps me with it... But there is one thing, that it can't do. :( With it you can place a beginning of a strut precisely, but you still need to place the end of it manually! I even exploited some kind of a bug, when you place a strut or a fuel line, connect it normally and then copy it, then when you place the copy it tries to connect its end in the same direction as the original one have. So I used this feature to quickly place perpendicular struts between tanks. I only made one strut, connected in the proper dirrection and than copied it all over the rocket. But for some reason it don't work all of the time. ;.;

But now I tried you plugin, and it places fuel lines even more precisely than I do! :confused: It even makes that thing with pushing through a radial decoupler, which I invented myself! :huh: So I really want to make a small request... :blush:

Could you probably make a light version of your plugin (like another mod), which will implement a strut and a fuel line, that would automatically place its end in the opposite direction from the one they are placed on?

Something similar to quantum strut (which I don't use :rolleyes:) but that would be a real strut. It is possible and not too complex isn't it?

Alternatively I always wanted a version of docking strut, that can be coonected inside the VAB, it'd also make it possible to place the two ends precisely and have a permanent connection between them, but it is probably another story. :D

So, long story short: a strut (and a fuel line) that automatically place its end perpendicular to the surface on which it is placed, I want it!

Oh, and I'm sorry for any dumb grammatical mistakes, I'm only learning English now.

Link to comment
Share on other sites

The idea of having a mod which takes out the tedious job of asparaging a craft is thrilling. Yet it seems it doesn't work for everybody. Some people (like me) fail to get a proper response from the mod. Apparently i'm not intelligent enough to use it, although the lack of instructions might have something to do with it as well. The lack of instructions makes an attempt to check if there's some kind of interferance with another mod as pointless as keeping this mod on my pc. What seemed like an ideal addition now is only a waste of space.

Link to comment
Share on other sites

Could you probably make a light version of your plugin (like another mod), which will implement a strut and a fuel line, that would automatically place its end in the opposite direction from the one they are placed on?

Maybe. I now know how to place a strut or fuel line from (x,y,z) to (x,y,z).. but figuring out those numbers is difficult.

The idea of having a mod which takes out the tedious job of asparaging a craft is thrilling. Yet it seems it doesn't work for everybody. Some people (like me) fail to get a proper response from the mod. Apparently i'm not intelligent enough to use it, although the lack of instructions might have something to do with it as well. The lack of instructions makes an attempt to check if there's some kind of interferance with another mod as pointless as keeping this mod on my pc. What seemed like an ideal addition now is only a waste of space.

The GUI sucks, I know.

There actually are instructions in the Spaceport link. I’ll copy them to this thread. I’ve also made a video.

The "Add fuel lines" functions aren't working for me.

Plus, whenever I need to edit the craft after autostaging, it keeps reverting back to being unstaged.

Pressing one of the “add fuel lines†buttons (asparagus or onion) will just create nubs of fuel lines; you have to press the next button “connect fuel lines†for them to show up. I suspect this is what most people are complaining about. I’ve made a video to clear it up.

You have to save and re-load the craft after using the mod, or it will revert. Manually adding a stage will also fix it.

Much of this will be fixed in the next version.

Link to comment
Share on other sites

setup a bool variable like isStepTwoNextFrame, set to false at initialize, set to True after running step one code

set the step 2 sub to check for isStepTwoNextFrame = true, execute code in step two then. At end of this code segment, set isStepTwoNextFrame back to false, to prevent execution during the next frame.

I tried this in a dev build; it worked pretty well. One frame was enough between creating fuel lines and connecting them, but I had to wait longer more between connecting and staging. Waiting 10 frames didn’t work, but waiting 100 did. I’ll have to play with this more.

Just in case you haven't seen it, the Toolbar Plugin is a nice simple way to handle some of the gui basics. And its really nice to have all the mod buttons collected in one place.

This worked wonderfully:

awTfkcs.png

Between these two suggestions, the next version should have a much better GUI. Now, if only I could find decent free icons for "asparagus" and "onion"! :)

Link to comment
Share on other sites

I'm having issues when trying to do the asparagus fuel lines, when I click asparagus it doesn't add them. When I do Onion the fuel lines are added, and it seems that both of them are having issues with staging. I have been trying it in career mode, not sure if that makes a difference.

Link to comment
Share on other sites

I found the issue I was having. I was using multiple fuel tanks for each rocket, once I used just one fuel tank everything worked fine.

You mean that you hanged stacks of 2+ tanks on decouplers? If yes, that doesn't seem to be the cause, I had the same issue yesterday. Well, maybe it was cause by adding small tanks to staged tanks, but I've added them to upper stage that was already set up, not for the one that had to be "autoasparagusized".

Another issue: when I used mod successfully and tested rocket in the field (1 central + 4 side tanks), first pair of side tanks was drained asymmetrically (one side much faster than the other) which turned rocket into bunch of scrap parts near launch pad. I tried it 2 times with same result. When I removed automatically placed fuel lines and placed them manually - it worked fine. Even though visually everything made by the mod was completely fine. Any ideas?

Link to comment
Share on other sites

Um... hello again!

I got your answer quite a while ago, but suddenly understood one thing. You wrote:

Maybe. I now know how to place a strut or fuel line from (x,y,z) to (x,y,z).. but figuring out those numbers is difficult.

Not to bother you with something meaningless, but I thought that there was no any coordinates for destination point...

I mean, if you copy an attached strut/fuel line and then place the copy (it also works with copying a part that has struts going from it) it places the strut exactly in the same direction it used to point, no matter what was the lenght and the attachment coordinates of its original.

So, looks like vektors! I kinda guess that for your mod purposes you already needed to calculate those numbers based on relative part position (or am I wrong?) Seems like the copied part inherits these numbers from its parent and when it is finally placed the game processes these numbers to create a strut link (or am I again completely wrong?) So, I though that all that it is needed to create the desired "autoplacing" strut is to initialize the numbers with someting like "0, 0, 1" and that will go. I could probably try to make this thing myself, so I want to ask this question. Please, answer when you will have a chance.

EDIT: and again, there is such thing as "quantum struts". Don't they work similary?

Edited by Absolute Human
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...