pioneerspacesim/pioneer — Issue #980: Thruster fuel use
Author: Luomu
Created: 2012-02-16 23:32:54+00:00
State: open

Fuel use is discussed every now and then, here are some notes by @Brianetta: https://github.com/pioneerspacesim/pioneer/wiki/Idea.Fuel

However, it is hard to know the impact on gameplay without actually trying. I have hacked together a protoype: https://github.com/Luomu/pioneer/tree/thruster-fuel

It is based on these simple principles:
Thrusters use Fuel. This is separate from the hyperjump fuel. The rate of consumption should not be too stressful, the purpose of the mechanic is more to define ship ranges & roles. When you dock at any station, your fuel tank is automatically filled as part of the docking fee (I implemented a flat fee of 5$). Angular thrusters do not use fuel, so you can turn freely. A full tank has a mass of X tons, so your ship becomes lighter over time.

I added the following to lua ship_defs:
fuel_tank_mass (tons, for a full tank). This is in addition to hull_mass. I don't know which values are sensible and should the hull_mass be decreased in proportion.
The consumption is defined by thruster_fuel_use. The strongest thrusters use this many percentage points per second at full thrust (so the total consumption/second can be more or less). Thrusters are treated as groups, the amount of visual flares does not matter.

I gave IP shuttle a tank size of 4 (and reduced hull_mass 12->8) and a consumption on 0.03, on a trip from earth to moon it uses approximately 40% of the fuel. I don't mean this is how it should be - tweak it out.

I also added ship:SetFuel/GetFuel lua functions.

I put a fuel gauge on the screen, but I don't think a constant reminder is needed, the gauge can be shown when it passes certain intervals.

Additional ideas: Make it possible to buy Reserve Tank items to store in your cargobay. When you run out of fuel, a reserve tank is automatically used. You can then sell or jettison the empty tanks.