Jump to content

[1.10] AutoAsparagus v2.3.1


hab136

Recommended Posts

hab136 in the next version change the ID of your windows, 100 is a common used number and if 2 mods use the same the UI gets messy. ( line 30 of AutoAsparagus.cs change the 100 to an other large number of your choice)

And keep it up. It's a nice idea :)

Link to comment
Share on other sites

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?

There are absolute and relative coordinates in the game and you can use either. You can use (0, 0, 1) relative to the part, or you can use (5.73, 8.91, 2.37) as absolute position in the world, for example.

And yes, you can see which direction a part is facing, and then follow that direction and find out the next part in the way.

I think I misunderstood your original question. You want to place one end of the strut manually, and then have the other end placed automatically based on which way the strut is facing?

BTW besides Quantum struts there's also Docking struts

Link to comment
Share on other sites

I think I misunderstood your original question. You want to place one end of the strut manually, and then have the other end placed automatically based on which way the strut is facing?

Yes, that is basically the easiest solution I came to.

And, speaking of Docking Struts, I do like them, but they need to be connected out of the hangar.

If there was a way to make them work in the hangar, like you place one end as a part first, then the other end like another part, and get a normal link, that would be a great improvement to the stock way, when you can place only the start point and point in the direction you want to create the end. In stock game you cant snap the "end" part because it doesn't exist until you click to place it, and thus making highly accurate constructions becomes a difficult task. With the help of Editor Extensions you can snap to different angles and even vertically, but it leaves the "strut gap" opened. So, I'm searching for a solution to this problem.

Making "auto pointing straight" struts (yes, and fuel lines) is a rather simple solution.

The above said method is more preferable, as it can allow to create angled connections, but I don't know how difficult it is to implement.

Link to comment
Share on other sites

  • 2 weeks later...
hab136 in the next version change the ID of your windows, 100 is a common used number and if 2 mods use the same the UI gets messy. ( line 30 of AutoAsparagus.cs change the 100 to an other large number of your choice)

And keep it up. It's a nice idea :)

Thanks for the kinds words! I changed the ID to

. :D

Version 0.3 is out!

7yHjGFZ.png

New in v0.3:

* Less-terrible GUI

* Optionally stage parachutes

* Optionally move launch clamps to bottom (or next-to-bottom) stage

* In career mode, disable the plugin until fuel lines are unlocked

* Automatically adds blank stages (previously a manual step)

* Fix a bug where two stacks of decouplers were in the same stage

See the main post for more details:

http://forum.kerbalspaceprogram.com/threads/61238-AutoAsparagus-v0-3

Link to comment
Share on other sites

So I'm guessing the algorithm only works with tanks that are directly attached to each other with radial decouplers? I'm trying to make a Thrust Plate (

) and it would be awesome to at least get the decouplers and separatrons staged. I tried version 0.3 today on my current design and the game just sorta froze.
Link to comment
Share on other sites

So I'm guessing the algorithm only works with tanks that are directly attached to each other with radial decouplers? I'm trying to make a Thrust Plate (
) and it would be awesome to at least get the decouplers and separatrons staged. I tried version 0.3 today on my current design and the game just sorta froze.

It's possible to trigger an infinite loop with some ships, which is probably what you saw (I've experienced it myself). Right now sepratrons, parachutes, and decouplers have to be directly attached to the tanks.

I only tackled GUI changes in v0.3, because the GUI in v0.2 was preventing people from using the mod at all. For v0.4, I plan to tackle logic changes, such as finding that infinite loop bug, staging things that aren't directly attached to the tank, and supporting stacked tanks.

Just use a random ID, such as "new System.Random().Next(int.MaxValue)". I find that ID system of Unity quite silly, because who in their right mind uses the same window function for multiple windows?

I thought about that, but then figured I'd be more likely to collide with a statically-defined window ID.. although if everyone is doing random IDs I should too. Is there a way to test if the window ID is already taken?

Link to comment
Share on other sites

You can generate a random number within a range to avoid known window IDs, e.g. if the game normally uses static window IDs up to 9999, you can generate a random number above 10000 with something like Random.Next(10000, int.MaxValue)

Link to comment
Share on other sites

Hmmm. Couldn't get it to work last version, still unable to make it work this version. The moving of separators/parachutes/clamps to bottom of stage works, but there is no auto placement of fuel lines. I press asparagus (having 4 fuel tanks joined to main tank) And it goes through the motions. When it says done no fuel lines added.

Link to comment
Share on other sites

why does the topic say the asparagus and onion buttons both do asparagus staging?

Oops. I wrote up the text late at night :) Fixed.

Hmmm. Couldn't get it to work last version, still unable to make it work this version. The moving of separators/parachutes/clamps to bottom of stage works, but there is no auto placement of fuel lines. I press asparagus (having 4 fuel tanks joined to main tank) And it goes through the motions. When it says done no fuel lines added.

Can you send me the .craft file? Also the KSP.log file from your Kerbal Space Program directory?

Ok just did 2 tests.

1. Using FASA/KW parts. No fuel lines connecting etc

2. Using ONLY default game stuff. It works

So i can only hazard a guess that it works ONLY with default parts?

It should work with mods as long as the fuel tanks are named "tank" or "fuselage" and contain any kind of resource except monopropellent, and the decouplers have "decoupler" in the name. For example the KW tanks are named things like "KW1mtankL1" and "KW2mtankPancake", which should work fine.

I haven't actually tested with any mod packs, though. I've got some bugs to stamp out for the next release first.

does it come with cheese and tomatoes? :D

i mean will it work on big ship or if part of a ship with already manged staging is grayed out will it work on the currently selected?

If you already have some fuel lines, it will leave them alone. It only adds fuel lines to tanks that don't have any. If you have a ship and add more tanks and want to auto-asparagus only those new additions, it should work. Should. :)

It will always change the staging to match the fuel line routing, including fuel lines you placed yourself.

There's no artificial limitation on ship size or number of tanks, but there are a few bugs and unimplemented features. For example it doesn't yet support stacked tanks (one tank connected directly to another one) or two sets of tanks connected to the same parent tanks (as many thrust plate ships do).

Link to comment
Share on other sites

I think the biggest issue I have come across is that the moment that you have multi stage rockets. for example launch stage --> transfer stage -- orbital/lander stage, then the plugin freaks out trying to work out the different permutations. Therefore I guess it appears that if you wish to auto asparagus anything larger than a single stage, it leaves something to be desired. Otherwise though, an amazing tool

Link to comment
Share on other sites

This never seems to work for me. I give it a try every once in a while but it either screws up the fuel lines I already placed, or screws up the staging in a way that's merely different than (not better and certainly not worse) than whatever the game put there in the first place.

Maybe it's that I'm doing it on my lifter which is under all of my other stages, but really that's what you'd use this for in pretty much all cases. If it can't figure out a couple 2-symmetry, radially-attached fuel tanks with boosters under them, what CAN it figure out?

Link to comment
Share on other sites

I think the biggest issue I have come across is that the moment that you have multi stage rockets. for example launch stage --> transfer stage -- orbital/lander stage, then the plugin freaks out trying to work out the different permutations.

This is the same problem I had, mulit-stage-rocket, autoasparagus activated - and then I had to restart the game, because nothing was working anymore :(

Link to comment
Share on other sites

This never seems to work for me. I give it a try every once in a while but it either screws up the fuel lines I already placed, or screws up the staging in a way that's merely different than (not better and certainly not worse) than whatever the game put there in the first place.

Maybe it's that I'm doing it on my lifter which is under all of my other stages, but really that's what you'd use this for in pretty much all cases. If it can't figure out a couple 2-symmetry, radially-attached fuel tanks with boosters under them, what CAN it figure out?

:)

There was a major bug that prevented it from working on a lot of ships (now fixed).

Please try v0.4, just released, as it fixes some critical bugs. http://kerbalspaceprogram.com/autoasparagus/

If it still doesn't work, I'd be happy to figure out why it's not working on your lifter if you send me the .craft file.

I only started this mod in November, so there's still a number of bugs to stamp out and features to add.

Is that 4 tanks in symmetry plus 4 other tanks in symmetry? That's not a supported configuration right now, and it's the only way I can think of that it would produce that output. When I try to recreate that ship (with 8x symmetry), it works:

ZLMSOAJ.png

Link to comment
Share on other sites

This is the same problem I had, mulit-stage-rocket, autoasparagus activated - and then I had to restart the game, because nothing was working anymore :(

That's the infinite loop bug, just fixed in v0.4.

Link to comment
Share on other sites

:)

I apologize if I came off as anything but calm. I'm not mad or anything. I just can't fit the mod into my design style as it seems to be designed to do what I think I need, but it doesn't :)

Please try v0.4, just released, as it fixes some critical bugs. http://kerbalspaceprogram.com/autoasparagus/

If it still doesn't work, I'd be happy to figure out why it's not working on your lifter if you send me the .craft file.

Crap, I just tested this and took a bunch of pictures, and then alt-f4'd out of the game without saving the craft. I can recreate it in a little bit but here are the images of what I did in an imgur album with descriptions. NOTE: it's a lot better now. Before it was throwing engines and decouplers around at random and now it's putting all the decouplers in the right stages, but it put the decouplers before the engines. NOTE: The ship isn't really meant for flying. I made it specifically to test this mod :)

Javascript is disabled. View full album
I only started this mod in November, so there's still a number of bugs to stamp out and features to add.

Totally understandable :)

Link to comment
Share on other sites

I apologize if I came off as anything but calm. I'm not mad or anything. I just can't fit the mod into my design style as it seems to be designed to do what I think I need, but it doesn't :)

No worries, I'll take any excuse to post that video :)

Crap, I just tested this and took a bunch of pictures, and then alt-f4'd out of the game without saving the craft. I can recreate it in a little bit but here are the images of what I did in an imgur album with descriptions. NOTE: it's a lot better now. Before it was throwing engines and decouplers around at random and now it's putting all the decouplers in the right stages, but it put the decouplers before the engines. NOTE: The ship isn't really meant for flying. I made it specifically to test this mod :)

http://imgur.com/a/S5j0u

The mod doesn't try to change the stages for the engines, but it doesn't try to preserve them either. I'll add preserving the stages for other things that I'm not staging as a TODO item :)

Link to comment
Share on other sites

The mod doesn't try to change the stages for the engines, but it doesn't try to preserve them either. I'll add preserving the stages for other things that I'm not staging as a TODO item :)

Aha. I thought the mod went from 0 to launchable, at least for engines within the asparagus network. My misunderstanding!

Then it does work exactly as advertised now. I've tried it a few times to see if I could break it and haven't found anything yet. The engine thing really isn't a big deal and it could cause problems if the mod mistakenly puts some of your lander's engines in the ignition stage.

Link to comment
Share on other sites

A bit annoying that the central tank apparently needs to be the root part. I've built the ship from the pod down (guess I'm having trouble getting used to the newfangled "anything can be root" idea), I attached decouplers in 6x symmetry, and then added tanks in 6x symmetry but it still refuses to place any fuel lines. If I build from the bottom up it works fine. Unfortunately that just isn't how I build things, I tend to create the payload and then guestimate what I need to lift it (none of these Manley-style, pen-and-paper calculations for me, that sounds like work).

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