Home   Help Search Login Register  

Author Topic: I need an accurate fuel reading please  (Read 461 times)

0 Members and 2 Guests are viewing this topic.

dharbert

  • Guest
I need an accurate fuel reading please
« on: 14 Oct 2003, 06:09:36 »
Greetings.  This is my first post here and I really hope it can be solved.  It will probably look like a nightmare at first, but I'm pretty sure it can be worked out.

I've got a slight problem.  It seems that OFP's vehicle fuel accounting does not work very well.

What I'm trying to do is to put just enough fuel into an M1A2 Abrams to make it have a maximum cruising range of 420km (just like the real one).  I am calculating the fuel mileage by using a mileage calculator script that I downloaded from this site. (It calculates distance traveled in meters).

Here's how I'm doing the calculating.  In my M1A2's config.cpp I set fuelCapacity=500, which means that it has 500 gallons of fuel.  Now, I load up my mission and activate the mileage script.  I then added the following to the Init line of the M1A2:

vehicle1 setFuel 0.0027

So, now I'm using 0.0027% of 500 gallons of fuel, which equals 1.35 gallons.

Using only 1.35 gallons of fuel, the M1A2 will travel 980 meters before running out.  That would place the maximum cruising range at 362km (50km short of what I'm wanting it to be).

Well, it looks like 500 gallons of fuel isn't going to be enough, so I edited the config.cpp and set it to fuelCapacity=800.

I reload my mission and mileage script and put the same Init on the M1A2.  So, now I'm using 0.0027% of 800 gallons of fuel, which equals 2.16 gallons.

Well, guess what.  It still only travels 980 meters even though I just added 300 gallons more fuel to it!

And this is the funny part.  I put the same Init line on a Hummer and it only got about 30 meters before running out of gas.  ???

Anyone got any ideas?

dharbert

  • Guest
Re:I need an accurate fuel reading please
« Reply #1 on: 14 Oct 2003, 11:07:12 »
Ok......here's another question:

Why is the variable fuelCapacity even in the config.cpp?  It is completely and utterly useless.

I set the fuelCapacity for one of my vehicles to "0" and it STILL runs!!  Without ANY FRIGGIN FUEL!!!  >:(

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:I need an accurate fuel reading please
« Reply #2 on: 14 Oct 2003, 18:50:17 »
Welcome to the forums dharbert!

I don't know anything about addons and config files ... but here are my thoughts for what there're worth

You're probably right that OFP's fuel accounting is up the spout.     I have a vague memory of fuel with armoured vehicles being a bit funny just in gameplay.

What is the range of the regular Abrams, before you fiddle with the config file?     And what happens when you put setfuel 0.0027 in the init field of the regular abrams?

How do you know the fuelcapacity bit is in gallons?  Could it be in litres?
Plenty of reviewed ArmA missions for you to play

dharbert

  • Guest
Re:I need an accurate fuel reading please
« Reply #3 on: 14 Oct 2003, 22:05:02 »
The original BIS M1A1 Abrams has fuelCapacity=700 and will travel 1020 meters with the Init line vehicle1 setFuel 0.0027

I just assumed that the fuelCapacity was in gallons, but it could be in litres or "units".  It doesn't really matter what the fuel is measured in because it doesn't work.  I can set fuelCapacity=0 (which means that the vehicle should have NO fuel at all) and it will still run.

I've pretty much come to the conclusion that it's a function of vehicle speed rather than fuel capacity.  The original BIS M1A1 Abrams is just a little faster than the M1A2 model that I'm using.  By the way, I am using the correct (real world) speed of the Abrams and not the speed that the BIS model has.

Thanks for trying to help.  :)