Jump to content

[0.21.1] StretchyTanks v0.2.2 (updated 8-26-13)


AncientGammoner

Recommended Posts

Are you going to add Kethane to your list of supported fuel types?

EDIT: also ability to create empty tanks?

I'll add kethane when I add the ability to create empty tanks, and the ability to create empty tanks will be there when I add the ability to input stuff into the GUI. I'm just not sure how I want to do that yet... I kinda like the unobtrusiveness right now of just having text display when you mouse over, not sure if I want to add yet another GUI box like all the mechjeb boxes I have open when I'm designing, could be something like that but we'll see.

I've noticed a small typo when cycling through a tank's fuel type: It must be "Monopropellant", not "Monopropellent".

Very astute, I usually catch spelling errors but that one sort of doesn't look wrong spelled the other way lol.

Link to comment
Share on other sites

Very astute, I usually catch spelling errors but that one sort of doesn't look wrong spelled the other way lol.

Speaking of which, isn't there a way to get all resource types programmatically? I think I've seen it done deep down in Lazor's source code somewhere.

Link to comment
Share on other sites

I'll add kethane when I add the ability to create empty tanks, and the ability to create empty tanks will be there when I add the ability to input stuff into the GUI. I'm just not sure how I want to do that yet... I kinda like the unobtrusiveness right now of just having text display when you mouse over, not sure if I want to add yet another GUI box like all the mechjeb boxes I have open when I'm designing, could be something like that but we'll see.

Very astute, I usually catch spelling errors but that one sort of doesn't look wrong spelled the other way lol.

Thanks AncientGammoner

Link to comment
Share on other sites

A request that I saw echoed by a bunch of people on IRC: Snaps for length. F'rex, increments of 25 fuel for 1m tanks, 100 for 2.5m tanks, and so on. Maybe toggleable so that if you need some kind of off-kilter fuel number you can still get it.

Link to comment
Share on other sites

Could you allow us to alter the dry mass without affecting the volume of resources inside? I'd like my tanks to be made from carbon nanotubes instead of steel for efficiency, at the expense of the kerbin taxpayers :)

When lifting 200t of fuel to orbit I'd rather not take 25t of steel with me.

Link to comment
Share on other sites

Could you allow us to alter the dry mass without affecting the volume of resources inside? I'd like my tanks to be made from carbon nanotubes instead of steel for efficiency, at the expense of the kerbin taxpayers :)

When lifting 200t of fuel to orbit I'd rather not take 25t of steel with me.

^^^^ This. ^^^^

Link to comment
Share on other sites

I don't know if this has been suggested before but procedural tanks with no fuel would be amazing. There's no fuselages for anything other than 1.5m parts and that drives me nuts sometimes. It would be great if you could add a "none" fuel type where the "tank" is just dry mass so to speak.

Link to comment
Share on other sites

Okie few problems.

Firstly and most importantly the grab point is in the middle of the tank, (very bad) as it makes it very hard and indeed impossible to place the tank correctly in some situations, grab point should be at one end same as other tanks.

Also support for other resources would be nice such as Xenon, Kethane, empty and full tank, spherical tanks etc would be nice too.

Link to comment
Share on other sites

Could you allow us to alter the dry mass without affecting the volume of resources inside? I'd like my tanks to be made from carbon nanotubes instead of steel for efficiency, at the expense of the kerbin taxpayers :)

When lifting 200t of fuel to orbit I'd rather not take 25t of steel with me.

Yeah I 3rd this motion, please PLEASE reduce the ratio to one that is competitive with existing tanks, this mod is so close to making NP2 and KWR tanks useless.

Link to comment
Share on other sites

Loving this.

Two requests, one presumably easier than the other. :)

1. Can you set the transform origin to be the top of the tank? That will (a) make attachment much easier and (B) make stretching more (IMO) sensible, especially since in KSP we usually build down.

2. Procedural SRBs. Seems like the code code easily be used to make procedural solid rockets. And that would be incredibly useful! (You'd need one more key to set burn rate, aka thrust).

Link to comment
Share on other sites

Since reply with quote doesn't seem to be working for me atm...

Hawkstorm: What is a grab point? Never heard of such a thing before.

RuBisCO et al: On tank weight... the tanks are at exactly 9:1 wet to dry ratio which is the same ratio as the stock tanks and almost all mod pack tanks like NovaPunch, AIES, etc with the exception of KW which bumped it up to 10:1. I have no plans or desire to make these tanks better than stock because (1) for every 1 person who's saying I should make them be better than stock there's probably 10 people who would complain if I changed them and (2) considering how easy the stock game is in the first place, making it even easier makes little sense.

Starwaster: If you're talking about the place is in code where it computes volume, if you read it closer you'll realize its just using the constant initial tank mass from the cfg file to find which tank it is since they all have the the same starting volume:dry mass ratio, once it computes the initial volume everything from there is just multiplying by stretch factors (which are normalized to 1).

Link to comment
Share on other sites

Ditto on procedural engines! I'm building rockets large enough now that I need more powerful engines to lift them and all the fuel. Just strike a balance between thrust and ISP (adjustable slider?) and I can finally get those 5-10 meter engines I've always wanted. :)

Link to comment
Share on other sites

Since reply with quote doesn't seem to be working for me atm...

Hawkstorm: What is a grab point? Never heard of such a thing before.

RuBisCO et al: On tank weight... the tanks are at exactly 9:1 wet to dry ratio which is the same ratio as the stock tanks and almost all mod pack tanks like NovaPunch, AIES, etc with the exception of KW which bumped it up to 10:1. I have no plans or desire to make these tanks better than stock because (1) for every 1 person who's saying I should make them be better than stock there's probably 10 people who would complain if I changed them and (2) considering how easy the stock game is in the first place, making it even easier makes little sense.

Starwaster: If you're talking about the place is in code where it computes volume, if you read it closer you'll realize its just using the constant initial tank mass from the cfg file to find which tank it is since they all have the the same starting volume:dry mass ratio, once it computes the initial volume everything from there is just multiplying by stretch factors (which are normalized to 1).

If you don't want to make this 'better than stock' that's fine I agree that you shouldn't, and nobody's arguing that you should (unless I missed something above).

But regarding whether or not volume is deriving from tank mass, you've got both volume and final part mass (dry) linked to the same constant. That it's in two different equations doesn't matter, volume is deriving from mass in a way that can't be altered.

If I have a stretchy tank whose dry mass is 5 times a stock tank of identical dimensions and volume, I can't fix that on my side.. Change the mass constant and I slash my tank's volume. And it's not like I'm trying to 'cheat' (hate that word in a sandbox game) here, I'm just trying to get a tank whose mass is in line with existing tankage and that doesn't murder my delta-V and thrust.

Edit: The problem is specific to modular fuel tank compatibility implementation.

First: Definitely (for MFT at least) explicitly basing volume from mass.


if (part.Modules.Contains("ModuleFuelTanks"))
{
PartModule moduleFuelTanks = part.Modules["ModuleFuelTanks"];
[B]moduleFuelTanks.GetType().GetField("volume").SetValue(moduleFuelTanks, part.mass * 1600);[/B]
moduleFuelTanks.GetType().GetField("basemass").SetValue(moduleFuelTanks, part.mass);
foreach (PartResource resource in part.Resources)
{
part.Resources.list.Clear();
}
}

So that's our base mass before the mass of any other MFT tanks are installed. MF has no way of knowing that its mass calculations have been usurped. If you don't want to change how mass and volume are handled, fine, but at the very least you should scale the basemass down. I think scaling basemass by 0.2 (down to 20%) should cover it.

To better illustrate the problem, consider:

The way MFT does its mass calculations, you end up with a basemass that's a fairly small fraction of your final mass. Then add additional mass per tank based on the fueltype. (MFT still handles that, so it's just the basemass we need to worry about) For Liquid Fuel and Oxidizer final mass works out to be the same as stock for a default tank.

Let's take the big orange tank for instance. Stock tonnage 4 tons. volume 6400

MFT does the mass as

6400 * 0.000125 = 0.8 basemass

6400 * 0.0005 = 3.2 liquidFuel + Oxidizer (both have a multiplier of 0.0005 so I'm just doing them as one lump calculation here)

Final tonnage is 4 tons just as in stock.

If I take a stretchy and scale it to have exactly 6400 I'll end up with

4 tons basemass (just as it would be in stock)

Plus 3.2 tons as above for the LF / OX tanks.

7.2 tons.

With a Mainsail engine that gets me a loss of 10% of my delta-V when using a stretchy tank.

MFT w/Mainsail

4,386 m/s

Stretchy

3,949 m/s

Edited by Starwaster
Link to comment
Share on other sites

First of all, why would the stretchy tank have a dry mass 5 times stock when it's currently set to be identical to stock? Second, if I'm understanding correctly, what you guys are really talking about is the fact that you can't edit the config files for the tanks to make them lighter and have the mod work? Sorry but the thought never crossed my mind to design the plugin with that in mind. If you're having a bug/problem with excessive tank weights please post it here or PM me about it, but currently the tank masses are as balanced as possible with the other tanks in the game. If you simply want tanks that weighs little to nothing, why not just turn on infinite fuel?

Link to comment
Share on other sites

First of all, why would the stretchy tank have a dry mass 5 times stock when it's currently set to be identical to stock? Second, if I'm understanding correctly, what you guys are really talking about is the fact that you can't edit the config files for the tanks to make them lighter and have the mod work? Sorry but the thought never crossed my mind to design the plugin with that in mind. If you're having a bug/problem with excessive tank weights please post it here or PM me about it, but currently the tank masses are as balanced as possible with the other tanks in the game. If you simply want tanks that weighs little to nothing, why not just turn on infinite fuel?

See original post, I edited. And, I only mentioned editing the files as an attempt on my end to fix the problem.

Summary: It's modular fuel tank specific. MFT does basemass + (additional tank mass based on fuel type per tank). Base mass is only a fractional amount of the final tank mass In the end, for stock fuel types it works out to the same as it would for a stock tank. But you're assessing full tank mass against it up front just for the base mass. It's about 5 times too massive and then it's throwing additional tank mass on top of that.

To summarize the summary. Scale back the basemass to 20% (x0.2) and it should be fine.

Finally, I'm only trying to help you here. That infinite fuel crack is a little insulting. It was unnecessary.

Link to comment
Share on other sites

You could have started with "I'm using modular fuel tanks with this mod and...." instead of saying "If I have a stretchy tank whose dry mass is 5 times a stock..." like it was an issue with the mod in general. Yes, the compatibility with modular fuel tanks is probably not very good since I added a bunch of stuff to my mod since I first wrote the (rough) compatibility, especially with the new fuel types which change the density and mass of the tank as you switch from say LiquidFuel/Oxidizer to LiquidFuel. The developer of modular fuel tanks has yet to respond to a PM, and seeing as his last post is a month ago that mod could very well be abandoned, and I'm not sure how/if I could proceed to fix any compatibility issues without help from his/her end.

Link to comment
Share on other sites

You could have started with "I'm using modular fuel tanks with this mod and...." instead of saying "If I have a stretchy tank whose dry mass is 5 times a stock..." like it was an issue with the mod in general. Yes, the compatibility with modular fuel tanks is probably not very good since I added a bunch of stuff to my mod since I first wrote the (rough) compatibility, especially with the new fuel types which change the density and mass of the tank as you switch from say LiquidFuel/Oxidizer to LiquidFuel. The developer of modular fuel tanks has yet to respond to a PM, and seeing as his last post is a month ago that mod could very well be abandoned, and I'm not sure how/if I could proceed to fix any compatibility issues without help from his/her end.

That wasn't me 'starting with'; that was me revisiting. Perhaps you just missed the other times.

And you don't need to worry about the other fuel types. That's not an issue; MFT takes care of that.

It might even take care of the basemass by itself if it weren't getting set; I'm not certain. Assuming it cannot, isn't is possible to retrieve the basemass value from the tank definition nodes? Set it based on that. Failing that, do what I suggested a few posts ago and cut it to 20% of what you're setting it to now

Link to comment
Share on other sites

Starwaster: Stretchytanks currently works with MFT, I just tested it with what you suggested before, a tank stretched to 6400 volume and filled with fuel was 4 tons dry mass not some other value. Maybe it's RealFuels that's making it heavier but the current setup works for regular MFT.

Link to comment
Share on other sites

Starwaster: Stretchytanks currently works with MFT, I just tested it with what you suggested before, a tank stretched to 6400 volume and filled with fuel was 4 tons dry mass not some other value. Maybe it's RealFuels that's making it heavier but the current setup works for regular MFT.

I weep for what could have been.

kkthxbai

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