KSP-RO / ProceduralParts

A continuation of StretchySRBs, which is a continuation of StretchyTanks
71 stars 79 forks source link

tank type: liquid or oxidizer broken #62

Closed ctbram closed 10 years ago

ctbram commented 10 years ago

see the images below a 3.75 stock liquid fuel tank holds around 10k fuel.

a mixed tank of the same same hold about the same volume of liquid + oxidizer.

but if you pick tank type: liquid you only get around 5k fuel. That is half the amount for the same volume and weight. This makes no sense!!! How can I remove nearly 5k of oxidizer and go from 4871 liquid to 4971??? I should have the same amount of liquid fuel as the stock tank around 10k

Swamp-Ig commented 10 years ago

I agree that this is totally dumb, the reason why it's this way is that that's what the stock tanks do.

The 'compensation' for using the single purpose tanks is that you get a better TWR, as the dry mass is lower and the amount of fuel is higher.

Still the tank to use for a rocket is the mixed fuel tank, but for a plane it makes it better to use the liquid fuel tank, plus a small ox tank for like a boost stage or whatever.

Swamp-Ig commented 10 years ago

Look this has totally degenerated. I'm deleting all the comments past the first one and leaving it at that.

Thanks for your apology tmbomber383, Hopefully this will come through as an email.

tmbomber383 commented 10 years ago

It did, no problem.

As to the previous discussion, I'd really rather not fork your code. I'd consider that stealing your thunder.

It would be appreciated if you followed through on your offer to do something. In what is now private I had mentioned what I thought would be your easiest solution and the reasons for implementing it.

For reasons mentioned, I think the request was reasonable. For reasons mentioned, I don not think "that's what the stock tanks do" is a good argument against.

If you still disagree, I'll see what I can come up with.

I'm off till Monday,heading to Grand Rapids MI to play around in a high voltage lab. I'll check back when I return.

Swamp-Ig commented 10 years ago

Be aware that in KSP the physical size of the tanks is more or less irrelevant*, it's all about the thrust/weight ratio. All the mixed tanks with a few minor exceptions give 720 units of liquid fuel to 1t of dry mass, and the fuselage tanks give 800 units / ton. The fuel/ton is effectively a TWR disguised by some scaling factor.

The second thing to be aware of is that mixed and liquid only tanks have different usages - the mixed tanks are for rockets, and the liquid only are for aircraft. Given this some variation in parameters is to be expected.

Really the goal of this project is to closely mimic the stock feel, but with the ability to vary the sizes. We all know KSP is not realistic, and suffers from many shortcomings on that front, this being only one of them. If you want a more realistic feel then the realism overhaul mod, plus real fuels is what you're looking for, and PP very tightly integrates with that.

At the moment if you're building a plane, even though the liquid tank looks terrible on paper compared to the mixed tank, you still get a better TWR using the liquid than the mixed, so you'd naturally use the liquid tank. If I were to alter the Fuel/Ton of the liquid fuel tank, then this would basically be a cheating mod because you could then design a plane using the parts that massed only half as much as the equivalent stock part, which would mean less engine, less control surface, the whole thing.

This is why I won't be changing the fuel/ton of the part, look at it one way and it's dumb, but look at it another way and it does make sense in the context of the game.

Anyhow, here's an MM patch that will give you exactly double the resource:

@PART[proceduralTankLiquid]
{
  @MODULE[TankContentSwitcher]
  {
    @TANK_TYPE_OPTION[LiquidFuel] 
    {
      @dryDensity = 0.1089
      @RESOURCE[LiquidFuel] 
      {
        @unitsPerT = 1440
      }
      @RESOURCE[Oxidizer] 
      {
        @unitsPerT = 1760
      }
    }
  }
}

* The only real relevance of the volume of parts is that as density goes down the mass gets 'spread out', giving a higher angular moment of inertia. This affects RCS thruster and actuator force required, plus their placement, but I won't go into that here. The physical size of parts doesn't affect their aerodynamic drag either, that's all proportional to the mass.

ctbram commented 10 years ago

Thank you. I never thought to compare the PP 3.75 liquid only tank to the equivalent KSPI part. The discrepancy still would have confused me but I would have realized why you implemented things as they are.

Thanks for the MM patch but I had already modified the part.cfg file and added two new tank types and changed the mass ratios so I could choose either the stock numbers or the ones that were more in line with what you would expect based on the volume of the mixed tank and the unitsPerT values of the single type tanks. Thanks for the patch though as it helps me to understand how MM patches work. I am a programmer but not really familiar with the KSP / Unity API and other modding tools like MM. I know just enough now to be a menace to myself (smile).

I changed the stock liquid and stock to be "Liquid:A" and "Oxidizer:A" (for aviation) and added "Liquid:O" and "Oxidizer:O" (for orbital) using modified unitPerT values double that of the stock single type tanks. So I have five options from tank type instead of three.

Then I played with it a bit and felt I was kind of cheating since the stock interstellar parts actually behave like the stock squad parts. So I have the option there but to be honest now that you have explained it to me and given some valid examples of why you did it the way you did I am in agreement with your decision to handle it the way you have. Once again sorry if my comments may have whipped some people into a frenzy.

tmbomber383 commented 10 years ago

Swamp-Ig, Thank you for the MM patch.

In thinking back over my posts, I kinda missed a point you've made a couple times. I'm not intending to use the liquid only tanks for planes. I've seen several people using air breathing engines with liquid only tanks as strap on boosters. (Scott Manley for one) In my current career mode save I've just finished out the science tree with the interstellar mod included. I know your not interested in KSPI, but it has several high powered, high efficiency engines that run on liquid fuel alone. They have liquid only tanks I'm using. For instance:

http://imgur.com/jt9Q2EA

This vessel is just arriving at Eve. She has four 3.75m KSPI liquid tanks. My original version of this vessel used a procedural tank of the same length with Redstone stripes.

To put it bluntly, the Redstone stripes on a vessel that long look... sexier.

Given the choice, I'd like it to look good, but I needed the fuel. (The four tanks you see are almost empty. I've never been asking for more than what I can get with the KSPI tanks, I just think KSPIs tanks look... terrible)

ctbram, I'm really liking your idea of putting in two more tank types. That way the original form of the tanks are maintained for atmospheric use, and I get my sexy Redstone stripes.