Gas pumps and firethrowers

There is a weird thing going on, when i fill up my car, the pump goes clang -> empty after this, even if the tanks were almost full before, but if i refill several jurycans, it keeps pumping gas. ( i filled 5 steel jurycans, and is still not empty). Maybe i am wrong about this, but i ran out of containers to refill.

Also, on a separate note, i can’t reload a flamethrower unless is completely empty, and with only the first quantity available. Like, if i have 2 plastic bottles of gasoline, it fills only with 400units, then it refuses to load any more. Says “out of ammo” :stuck_out_tongue:
I found a workaround for this, unloading the second bottle in the flamethrower seems to work.

I’m not sure about the .4 code, but with the current code this is just good/bad luck (as in every time you use the pump you have a 1/50 chance of having it go empty and that’s the only thing that affects it).

I’ve heard tell that cars check it per unit of gas (or something), whereas containers only check it once per container. So, you have a much higher chance of the pump running out when you’re filling a car directly.

Note: I have not actually looked in-depth at the liquid handling OR gas pumping code.

It looks like the 1 in 50 chance of going empty is only when refilling containers (iexamine.cpp).

When refilling vehicles, the chance is much higher at 1 in 10 (game.cpp, process_activity), and I think this gets checked for every 200 units of fuel that goes into the vehicle. Since each gas tank holds a max of 3000 units, it’s pretty much a certainty that the pump will run dry when refilling even a single tank vehicle.

[quote=“DinoCat, post:4, topic:1042”]It looks like the 1 in 50 chance of going empty is only when refilling containers (iexamine.cpp).

When refilling vehicles, the chance is much higher at 1 in 10 (game.cpp, process_activity), and I think this gets checked for every 200 units of fuel that goes into the vehicle. Since each gas tank holds a max of 3000 units, it’s pretty much a certainty that the pump will run dry when refilling even a single tank vehicle.[/quote]
Ah, I missed the game.cpp gas checks. If that is the case though I think I might be submitting a rebalance on that sometime soon for consideration. It doesn’t really make that much sense to not be able to fill up more then a few thousand gasoline units in your car yet be able to fill up aluminum keg after aluminum keg at another pump.

Any ideas for how you propose to rebalance gas failures?

Spawn each pump with X gas (preferably a very small amount.) Remove gas as it’s pumped.

I’d like to see there be a difference between the pump being broken and the gasoline running dry.
That would be a matter of the gas station having X gas, but leaving in the ability for pumps to break or simply not work at all.

I recall it taking about 800 or so gasoline to make a molotov, 120 is a full J-Hammer load (that’s 12 tiles of digging, generally not enough to accomplish much) with the crafted flamer carrying 700 & milspec flamer holding 1400 gasoline (100 gas/shot).

Gasoline is needed to:
run most vehicles (electric motors just don’t have the same punch, and I’m not sure if they can be recharged w/o a solar panel)
dig underground
operate flamers (use them or a shitload of explosives if you’re gunning for a Triffid HQ, and a JHammer is strongly advised as well)
Probably forgetting other applications; it’s late

Anyway, gasoline starvation at stations makes a lot of the existing Cool Things far less accessible, at minimum. I trust that found-vehicles (as distinct from chassis in a Garage) would thus start no less full than 50% fuel (alternatively, with spare cans, etc), to support the gas-looting hypothesis? Players could apply a Rubber Hose and some Mechanics to siphon gas from tanks?

The quickfix idea is to simply decrease the chance of it running dry from a vehicle (probably with a larger increment between rolls as well) and an increase when filling containers. I’ll probably look at the average container size and base it off that.

Once I’ve got that down I’ll probably submit it for merging just to get a fix up, but then I’ll probably try messing around with the static amount of gas per pump idea and see if the balance on that works out better or worse (this might need to wait a week or two for solid data though, I’ve got finals coming up soon so I can’t playtest as much).

why not making it more simple, like a 30% chance of running empty or breaking down after each use, no matter if you fill a bottle or a keg.

Acquiring a decent amount of gasoline shouldn’t require dragging aluminum kegs to the gas station. The difference here is potentially tens or hundreds of thousands of units of gasoline, it’s sort of ridiculous.
On the other side, what if you put 30 storage tanks on your rolling deathmachine, should you be able to get that much gas out of a single gas pump, multiple times? A single gas station might last you, literally, a decade or two.

I honestly think that either a chance per amount, or a randomly generated amount is a far more balanced approach, if we want gasoline to have any kind of rarity whatsoever.

yes, you are right.
On a different note, as i was saying in another thread, the gas tanks have a capacity of 3000 units ~ that is less than 4 liters. So, why not use a realistic capacity, like 40 liters per tank, and a corresponding mileage per engine type, because otherwise kegs are the best containers for storing gas anyway. ( that is if the wiki information is correct about the tank capacity)

I don’t understand why we’d possibly want a % chance of running dry as opposed to defined amounts of gasoline.

% chance for the pump to break, sure. But there should only be a finite amount of gasoline in it. Gasoline is probably one of the most powerful resources in the game. It should be scarce.

because it would simulate pomps having different amounts of gasoline and running dry after taking it out, as opposed to all remaining pomps in the post-apocalyptic world having exactly the same amount of gas left?

He meant a randomized, defined amount of gasoline in each pumps.

What sheb said. Nobody is saying put exactly 30,000 in each pump or something. The idea is that a say 80% of pumps should have 1d6 * 10,000 gas units or something. If you want to randomize it more just have it also randomly +/- some second number between 1-10000. The remaining 20% of pump should start empty.

Then have a 10% chance for the pump to break on each use.

Change the numbers however for balance.

What sheb said. Nobody is saying put exactly 30,000 in each pump or something. The idea is that a say 80% of pumps should have 1d6 * 10,000 gas units or something. If you want to randomize it more just have it also randomly +/- some second number between 1-10000. The remaining 20% of pump should start empty.

Then have a 10% chance for the pump to break on each use.

Change the numbers however for balance.[/quote]
This would be good for more than just gas pumps. If there was a more general way to spawn furniture-containers it could be used for stuff like how much water is contained in toilets and so on.

What is the character doing to it that they have a one in ten chance of breaking the pump :o?

Probably no maintenance, pump locks out for nonpayment (electrohack to the rescue!), or something like that.

Though if you want to get hyper-technical, gas pumps don’t have backup power…so they shouldn’t be operational at all.