Jump to content
Sign in to follow this  
Hank Hill

Fuel Consumption Rates / Capacities Clarification

Recommended Posts

After searching, I found other people asking about this problem (old posts) but could not find a clear answer to my question: so I apologize if it's common knowledge now.

I'm trying to better understand the relationship between vehicle fuel capacities and fuel consumption. I'm scripting a function to approximate filling vehicles with jerry cans somewhat realistically (for example a real jerry can = 20L and an example vehicle CFG fuelCapacity =150, therefore a jerry will fill 20/150 or +.13 for setFuel purposes).

However, fuelConsumptionRate is an enigma to me. A majority of them are "0.01f". Some are integer values however, such as Truck_02_base_F (Zamak) with fuelCapacity = 350 fuelConsumptionRate= 26.

- Whats the deal with this?

- How does fuel consumption work within the ARMA 3 engine given these values?

- Why does something like the "Truck_02_base_F" (Zamak Family) have fuelCapacity = 350 fuelConsumptionRate = 26, but "Truck_01_base_F" (HEMTT Family) has fuelCapacity = 45 fuelConsumptionRate = 0.01f.

The KamAZ-5350, which the Zamak (zamak backwards = kamaz, very sneaky BI) seems based on has ~ 295L capacity and 27L/100km consumption. Therefore 350L capacity and 26L/100KM seems accurate for the Zamak. The real HEMMT has a 580L tank and on the order of 46L/100KM consumption.

To be fair, the HEMMT seems to be the exception to the fuelCapacity trend, so I could script an exception - but I would still like to understand the fuel consumption rate as I DON'T LIKE VOODOO :mad: .

Can anyone shed some insight??

UPDATE - From the M977 HEMTT operators manual (TM 9-2320-279-10-1) fuel capacity is 568L and range is 483km based on mixed terrain and 100,000lb GCWR, giving a staggering 117.6L/100KM.

Edited by Hank Hill

Share this post


Link to post
Share on other sites

Tried to figure this out during alpha,

came to the conclusion that it's an unfinished config value, since, like you already noticed, most vehicles have that value set to 0.01f.

Makes it a bit weird since vehicles with a high fuel capacity can go on almost infinitely.

I thought they'd fix it within the alpha but obviously this didn't happen, doesn't look like too much work though.

Your best bet would be to write a custom value addon, but apart from that there's no easy solution to make fuel consumption more realistic.

Apart from that even the fuelCapacity values seem to be abstract numbers, since 45l for the civilian truck seems to be very low, similar real life counterparts have a capacity of 80l+.

Related ticket, almost one year old without any dev input:

http://feedback.arma3.com/view.php?id=15845

Might wanna open another one or add a comment to it.

Cheers

Edited by Grumpy Old Man

Share this post


Link to post
Share on other sites

I did some testing with scripting, and it looks like the Zamak is actually the broken config entry. Regardless of speed or throttle setting, even at idle, the Zamak burns .018 fuel per hour (since fuel is between 0-1) giving it an endurance of 55.5 hours.

The HEMTT fuel burn seems to vary with speed and throttle setting (no throttle, W key, or E key). So it seems there are more variables involved here and .01f probably feeds into a function somewhere in the engine.

Here my test script if you're interested. I also have a script that uses setVelocity and a while true loop to hold a constant speed so I can vary throttle settings.

hint "MEASURING - HOLD VELOCITY CONSTANT";


sleep 1;

_measuretime = 15;
_fuelcap1 = (fuel vehicle player);
_position1 = getPosATL (vehicle player);
sleep _measuretime;
_position2= getPosATL (vehicle player);
_deltapos = (_position1 vectordistance _position2)*(60/_measuretime);
_fuelcap2 = (fuel vehicle player);
_deltafuel = (_fuelcap1-_fuelcap2) * (60/_measuretime);



hintC format["Time:%3s  Fuel Used:%1  Distance (M): %2",_fuelcap1-_fuelcap2, _position1 vectordistance _position2, _measuretime];

sleep 2;

_fuelper100 = (_deltafuel/_deltapos*1000)*100;
_fuelperhour = _deltafuel*60;
_calcspeed = (_deltapos*60)/1000;
_range=_calcspeed/_fuelperhour;

hintC format["FPH: %1   V Calc: %2 KPH   RANGE:%3 KM    ENDURANCE:%4 H  F/100 = %5", _fuelperhour, _calcspeed, _range, 1/_fuelperhour, _fuelper100];



Share this post


Link to post
Share on other sites

Is fuel consumption different when climbing a hill? Maybe try playing around with that X.XXf value on a vehicle addon config.

Share this post


Link to post
Share on other sites

It's linked to the transmission / engine RPM somehow I think. Using the below code which simulates a fuel flow gauge, you can watch the rates rise and fall with the shift points. The HEMMT gearbox values from the config are gearBox[] = {-8,0,10,6.15,4.44,3.33}; so this may factor in.

while {true} do {

_measuretime = .5;
_fuelcap1 = (fuel vehicle player);
sleep _measuretime;
_fuelcap2 = (fuel vehicle player);
_deltafuel = (_fuelcap1-_fuelcap2) * (60/_measuretime);



hint format["FLOW:%1s",_deltafuel];

Share this post


Link to post
Share on other sites

The only thing I have ever found out about what the fuelConsumptionRate does is:

//ammount of fuel needed for 1 second, so far used only for RTD heli

fuelConsumptionRate = 0.01f;

The value "0.01f" is applied to all vehicles in CfgVehicles via class All, it is pretty much the default value. fuelConsumptionRate as it is described above is only implemented for Helicopters, the consumption rate for everything else runs off a default hard-coded value of 0.01 in the engine. The way fuel is drained (from my limited reading in some areas of ... something..) the consumption of fuel (depends on the type of vehicle) is generally based upon the RPM of the vehicle, other vehicles like jet it is based upon thrust and other things. Certain vehicle types take in the account of the damage state of certain things such as helicopters take in fuel consumption rate based upon engine RPM, damage state of rotor blades, damage state of engine and hull (body) where as cars only take in the RPM & Damage state of the fuel container. The implementation of fuelConsumtionRate I believe is from Take on Helicopters seeing as it is only applied for Helicopters and as we know a lot of Take on helicopters stuff was already implemented into ARMA 3 since alpha.

Hopefully once the Helicopters DLC is released and the full implementation of take on helicopters stuff is done they will change this hard-coded stuff in the engine for regular cars and tanks to what the helicopters use, a person can dream but this is bohemia.. What I have said is all based upon what I have been reading in the engine and experimenting with since the Alpha but we shall never truly know unless one of the developers chimes in on this conversation, also it seems to me f is based upon a fraction of the value.

Share this post


Link to post
Share on other sites

I did some tweaking regarding fuel capacity and consumption on some tracked vehicles using tankx today. Though I might share my experience.

First, I just want to say that fuelConsumptionRate does nothing on this type of vehicle. I ran some tests to confirm this.

Secondly, how do we interpret fuelCapacity? Some seem to think of it as volume in liters. I noticed that the numbers make no sense, so it's better to just think of it as an arbitrary number. Forget liters or any unit of volume or mass.

So what do we have to play with then? The only thing to play with is fuelCapacity. How to set fuelCapacity to give your vehicle realistic range?

1. Find out the maximum range of your vehicle's real life counterpart.

2. Set fuelCapacity = 1; in your vehicles config

3. Start Arma3, go into the editor and place your vehicle together with some flags or something that you can use to mark out a stretch of road that is 1km.

4. Preview the mission and take control of the driver. Drive the course. Use setFuel =1; at the very start of the course, and see how much fuel you have left at the end using "fuel vehicle;".

5. Calculate the consumption. 1 - y = x where y is amount of fuel at the end of the test and x is consumed fuel per kilometer.

6. Go back into your vehicles config file. Take your vehicles maximum range and multiply it with your calculated consumption. Put the results into fuelCapacity.

Done. Your vehicle now has about the same range as it's real counterpart. If you desire shorter range, for gameplay reasons, try dividing by ten or something. That should get the result you desire.

Make sure you are finished with the vehicles handling characteristics, engine and gearbox before attempting this because it affects fuel consumption. You will have to redo this process if you go back and change anything else regarding vehicle handling.

Edited by Brisse

Share this post


Link to post
Share on other sites

Fuel depletion for vehicles needed.

 

As it is now, hardly any use for fuel trucks which is sad it's not incorporated into the base vanilla game.  You can drive forever and never need fuel.

Can you add into a module or script to run on dedicated servers for fuel uptake? The one thing that's missing badly in Arma3 is shorter fuel time. The islands are half the size, so the fuel should be double the speed of fuel consumption.  On Tom's blog tom_48_97, he has scripted an uptake script but I can't seem to make it work for the clients on a dedicated server. http://tom4897.info/...el-consumption/It  increases the fuel uptake taking into account the speed of the player vehicle. The script doesn't cancel and replace the default, it adds to it and the base consumption of ground vehicle is already greater.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×