Quantcast

Jump to content

» «
Photo

[IV | REL/WIP] FuelScript IV

724 replies to this topic
Andrew
  • Andrew

  • Inactive Staff
  • Joined: 21 Jul 2003
  • None

#1

Posted 22 February 2009 - 06:29 PM Edited by Gangsta Killa, 15 November 2009 - 06:29 PM.

Fuel mod V3 BETA

Version 3 BETA has now been released, get it from the gta garage page

Note: Need .net scripthook V0.893 to use this mod
Now you can add fuel to IV. Features:

• Fuel stations on all islands with 3 different prices
• Stealing locations on all islands
• Control the engine / hazard lights
• Mobile refueling system (for those who cant get to a fuel station (call MOB 555 0100)
• Fuel bar with speed and engine health bars.
• If you run out of fuel, emergency recovery service (call TOW 555 0100), which restores fuel.
• Car database for invidial fuel usage on cars.


user posted image
user posted image
user posted image
user posted image




Get it from http://www.gtagarage...how.php?id=5538.

HazardX
  • HazardX

    pedestrian mangler

  • Members
  • Joined: 13 Dec 2008

#2

Posted 22 February 2009 - 06:38 PM

Congrats on the release! icon14.gif Nice work!

tazzer
  • tazzer

    Player Hater

  • Members
  • Joined: 06 Jan 2009

#3

Posted 22 February 2009 - 06:45 PM

cool! downloading now

Andrew
  • Andrew

  • Inactive Staff
  • Joined: 21 Jul 2003
  • None

#4

Posted 22 February 2009 - 06:47 PM

QUOTE (HazardX @ Feb 22 2009, 19:38)
Congrats on the release! icon14.gif Nice work!

Thanks Hazard, wouldn't of been done if it wasnt for your help and the scripthook. smile.gif

Fabio206
  • Fabio206

    GTA-Expert.it Webmaster

  • Members
  • Joined: 20 Oct 2006

#5

Posted 22 February 2009 - 08:41 PM

Great mod, cookie.gif biggrin.gif

Could I upload also in my site? smile.gif

Low_tuning
  • Low_tuning

    Aaight player dats wel vet ouwe

  • BUSTED!
  • Joined: 23 Jan 2009

#6

Posted 22 February 2009 - 08:43 PM

I dont know why, but i hate all fuel mods confused.gif sometimes its so anoing.... sarcasm.gif

But nice try! icon14.gif

a-k-t-w
  • a-k-t-w

    Wannabe GTA IV Dev

  • Members
  • Joined: 30 Sep 2008

#7

Posted 22 February 2009 - 08:58 PM

YES!!! I've been waiting for this!! HELL YEA icon14.gif icon14.gif cookie.gif

CaptainDingo
  • CaptainDingo

    Not actually a captain, or a dingo.

  • Members
  • Joined: 18 Jan 2009

#8

Posted 22 February 2009 - 09:34 PM Edited by CaptainDingo, 22 February 2009 - 09:39 PM.

Pretty interesting, however before I download, in my opinion the speed and health bar are rather unnecessary for the purpose of the mod, as well as the fact that the bars in general are too large and obtrusive.

If it was only a fuel bar, was more towards the bottom right of the screen, and was a bit smaller it'd be perfect.

What I like: You can change the fuel price in the .ini, which is nice because I think by default you charge way too much. biggrin.gif

FunGt
  • FunGt

    GTA-Modding.com

  • Members
  • Joined: 10 Jun 2005
  • Italy

#9

Posted 22 February 2009 - 09:35 PM

Good mod, I tried it out but when I called TOW 555 0100 it bugs and the script exits. I was out of fuel. And also, when I am at a gas station, I turn off the car, exit and press R, but nothing happen. Can you explain how to refuel?

Btw you should remove the background under the writings SFE and make them smaller and lower in the screen.

CaptainDingo
  • CaptainDingo

    Not actually a captain, or a dingo.

  • Members
  • Joined: 18 Jan 2009

#10

Posted 22 February 2009 - 09:59 PM

I seem to have other big problems with it as well...

Like, cars I get into won't drive, period. Niko gets stuck turning the key forever.

PGoD
  • PGoD

    Houat de phoque!

  • Members
  • Joined: 03 Aug 2008

#11

Posted 22 February 2009 - 10:19 PM

Great Job Gangsta Killa! Like it!
For those who can't refuel, while in the station, stop the engine, and just hold the button to get out of the car, that's it! A bug that GK have to fix smile.gif

Andrew
  • Andrew

  • Inactive Staff
  • Joined: 21 Jul 2003
  • None

#12

Posted 22 February 2009 - 10:20 PM Edited by Gangsta Killa, 22 February 2009 - 10:27 PM.

QUOTE (CaptainDingo @ Feb 22 2009, 22:59)
I seem to have other big problems with it as well...

Like, cars I get into won't drive, period. Niko gets stuck turning the key forever.

To fix that problem you need to start the car using the key press for the engine. Control + R. Then Niko should be able to start the car.

For anyone having problems filling up, try with E key. Anyone who is having the script crash on them, please send me the scripthookdotnet.log file in the IV folder.

Edit: Niko should just exit the car as normal.

Next release will hopefully have the toggle switcheds implemented.

Edit2: I see what people actually mean by the speedo display, I've actually been playing the missions with it just now, and realised its quite big. When testing I didn't do any missions, lol.

CaptainDingo
  • CaptainDingo

    Not actually a captain, or a dingo.

  • Members
  • Joined: 18 Jan 2009

#13

Posted 22 February 2009 - 10:32 PM

Okay, I've played with it a bit more, and have more feedback (constructive, I understand nothing works all the time wink.gif ).

Here's what I've gathered:

-Turning the engine on and off is rather inconvenient using the default mapping, so I remapped it to a single key (Z) and it works better for me, personally.

-It wasn't made clear but yes, it seems E is the key that makes you fill your car up... despite it even saying in the .ini file that R is the key for it? whatsthat.gif

-Holding E down fills it continuously, which is good because I was afraid I'd be sitting there hammering E to get my car filled. tounge.gif

-One big issue right now, is you can't see the fuel gauge while you're filling it up, which leads me to a lot of getting in and out of the car to see how much I've put in.

-In my opinion, gas isn't used fast enough. If it was consumed twice as quickly, it really wouldn't hurt anything. As it is, if your fuel bar is orange, you can still do a few laps back and forth across all the islands without worrying about running out. That's actually my biggest complaint right now, is there's never a reason to fill the car up unless you're driving around for like two hours IRL.

So in total, here's what I'd like to see changed in future versions:

1) Either increase the consumption rate or let us change it via the .ini file.
2) Letting us pick our own fuel costs via the .ini is goooood, leave it in. colgate.gif
3) The bars need to be less obtrusive.

Also, a question: Is this mod changing how much damage my car can take? It feels like my cars are catching fire a lot faster... which is obviously not a good thing. monocle.gif

Andrew
  • Andrew

  • Inactive Staff
  • Joined: 21 Jul 2003
  • None

#14

Posted 22 February 2009 - 10:36 PM Edited by Gangsta Killa, 22 February 2009 - 10:45 PM.

QUOTE (CaptainDingo @ Feb 22 2009, 23:32)
Okay, I've played with it a bit more, and have more feedback (constructive, I understand nothing works all the time wink.gif ).

Here's what I've gathered:

-Turning the engine on and off is rather inconvenient using the default mapping, so I remapped it to a single key (Z) and it works better for me, personally.

-It wasn't made clear but yes, it seems E is the key that makes you fill your car up... despite it even saying in the .ini file that R is the key for it? whatsthat.gif

-Holding E down fills it continuously, which is good because I was afraid I'd be sitting there hammering E to get my car filled. tounge.gif

-One big issue right now, is you can't see the fuel gauge while you're filling it up, which leads me to a lot of getting in and out of the car to see how much I've put in.

-In my opinion, gas isn't used fast enough. If it was consumed twice as quickly, it really wouldn't hurt anything. As it is, if your fuel bar is orange, you can still do a few laps back and forth across all the islands without worrying about running out. That's actually my biggest complaint right now, is there's never a reason to fill the car up unless you're driving around for like two hours IRL.

So in total, here's what I'd like to see changed in future versions:

1) Either increase the consumption rate or let us change it via the .ini file.
2) Letting us pick our own fuel costs via the .ini is goooood, leave it in. colgate.gif
3) The bars need to be less obtrusive.

Also, a question: Is this mod changing how much damage my car can take? It feels like my cars are catching fire a lot faster... which is obviously not a good thing. monocle.gif

Shouldn't be changing the cars engine damage. I'm trying to find a balance for the comsumption rate and failing.

Currently the comsumtion calculation looks like this.
CODE

if (vehSpeed < 1)
                   fuelRatio = 0.00f;

               if (vehSpeed > 1)
                   if(vehSpeed < 10)
                       fuelRatio = 0.10f; //miminal drain above 0mph

               if (vehSpeed > 10)
                   if(vehSpeed < 20)
                       fuelRatio = 0.20f;

               if (vehSpeed > 20)
                   if(vehSpeed < 30)
                       fuelRatio = 0.30f;

               if (vehSpeed > 30)
                   if(vehSpeed < 40)
                       fuelRatio = 0.40f;

               if (vehSpeed > 40)
                   if (vehSpeed < 50)
                       fuelRatio = 0.50f;

               if (vehSpeed > 50)
                   if (vehSpeed < 60)
                       fuelRatio = 0.60f;

               if (vehSpeed > 60)
                   if (vehSpeed < 70)
                       fuelRatio = 0.70f;

               if (vehSpeed > 70)
                   if (vehSpeed < 80)
                       fuelRatio = 0.80f;

               if (vehSpeed > 80)
                   if (vehSpeed < 90)
                       fuelRatio = 0.90f;

               if (vehSpeed > 90)
                   if (vehSpeed < 100)
                       fuelRatio = 1.00f;

               if (vehSpeed > 100)
                   if (vehSpeed < 120)
                       fuelRatio = 1.50f;

               if (vehSpeed > 120)
                   if (vehSpeed < 140)
                       fuelRatio = 2.0f;

               if (vehSpeed > 140)
                   if (vehSpeed < 180)
                       fuelRatio = 2.50f;

               if (vehSpeed > 200)
                   fuelRatio = 4.0f;

               //add on the extra from the engine damage
               float calc = engineHealth / 100;

               if (calc > 20)
                   if(calc < 40)
                       fuelRatio = fuelRatio + 1.0f;

               if (calc > 40)
                   if(calc < 60)
                       fuelRatio = fuelRatio + 2.0f;

               if (calc > 70)
                   fuelRatio = fuelRatio + 3.0f;


Changes to be made in next release:

- Change the GUI display
- Toggle switches
- Fuel consumption.
- Fuel gauge to be shown when filling up.


CaptainDingo
  • CaptainDingo

    Not actually a captain, or a dingo.

  • Members
  • Joined: 18 Jan 2009

#15

Posted 22 February 2009 - 10:46 PM

Cool beans.

Maybe you just need to increase the ratios exponentially more at faster-than-leisurely speeds. I can be going like 80MPH down a straightaway and staring at the gauge and it doesn't even move one pixel (well, that I can see anyways...).

I think the sweet spot for the fuel consumption/fuel cost would be to make fuel be consumed a lot faster and make it cost a lot less to fill up. Maybe test it in-game so you can only go about two laps back and forth across the map on a full tank before you need to fill up. Because I do like this mod, and I'd like to have more opportunities to use it and burn all this money I've got piled up, but at the current consumption rate filling up never happens, even when I find a car with half a tank or quarter of a tank left.

Anyways, I eagerly await the next version!

Andrew
  • Andrew

  • Inactive Staff
  • Joined: 21 Jul 2003
  • None

#16

Posted 22 February 2009 - 10:57 PM

QUOTE (CaptainDingo @ Feb 22 2009, 23:46)
Cool beans.

Maybe you just need to increase the ratios exponentially more at faster-than-leisurely speeds. I can be going like 80MPH down a straightaway and staring at the gauge and it doesn't even move one pixel (well, that I can see anyways...).

I think the sweet spot for the fuel consumption/fuel cost would be to make fuel be consumed a lot faster and make it cost a lot less to fill up. Maybe test it in-game so you can only go about two laps back and forth across the map on a full tank before you need to fill up. Because I do like this mod, and I'd like to have more opportunities to use it and burn all this money I've got piled up, but at the current consumption rate filling up never happens, even when I find a car with half a tank or quarter of a tank left.

Anyways, I eagerly await the next version!

The max tank on the cars used to be 600L. In order to make things display better I switched this to 1000L. So that might be why its taking a while for a full tank to go down, lol. I'll look at doing it exponentially. Might even be able to make that change able.

CaptainDingo
  • CaptainDingo

    Not actually a captain, or a dingo.

  • Members
  • Joined: 18 Jan 2009

#17

Posted 22 February 2009 - 11:03 PM

I had another thought too that would reduce how much code you've been writing for the fuel consumption.

I've only ever dabbled with coding and I'm not good enough to really do anything, but I'm fairly certain I understand the gist of it...

Rather than having a dozen If statements, maybe you could simply multiply the fuel consumption by however fast the car is going. That way you only need one little snippet of code to handle the fuel consumption rather than:

if 10-20 MPH then consume 0.5
if 20-30 MPH then consume 1.0
if 30-40 MPH then consume 1.5

etc, it might be easier (and all you'd have to do is change a multiplier) if you just made it a straight:

Make consumption of fuel = current speed x 0.2 (or whatever tounge2.gif ).

Andrew
  • Andrew

  • Inactive Staff
  • Joined: 21 Jul 2003
  • None

#18

Posted 22 February 2009 - 11:11 PM Edited by Gangsta Killa, 22 February 2009 - 11:23 PM.

QUOTE (CaptainDingo @ Feb 23 2009, 00:03)
I had another thought too that would reduce how much code you've been writing for the fuel consumption.

I've only ever dabbled with coding and I'm not good enough to really do anything, but I'm fairly certain I understand the gist of it...

Rather than having a dozen If statements, maybe you could simply multiply the fuel consumption by however fast the car is going. That way you only need one little snippet of code to handle the fuel consumption rather than:

if 10-20 MPH then consume 0.5
if 20-30 MPH then consume 1.0
if 30-40 MPH then consume 1.5

etc, it might be easier (and all you'd have to do is change a multiplier) if you just made it a straight:

Make consumption of fuel = current speed x 0.2 (or whatever tounge2.gif ).

Hmm, I'll definately have a play around with that. I was aiming for something where, at normalish speeds ie 0 - 60od. The tank wouldn't drain very quickly, whereas above 60 it would start to drain rapidly.

Edit: Just doing a quick test using fuelRatio = vehSpeed * 0.05f, I might stick to that, and add that fuelRatio value to the ini so people can change it.

Edit2: Doesn't seem too bad. I'll stick to that.

CaptainDingo
  • CaptainDingo

    Not actually a captain, or a dingo.

  • Members
  • Joined: 18 Jan 2009

#19

Posted 22 February 2009 - 11:27 PM

Yay, I was helpful. lol.gif

Andrew
  • Andrew

  • Inactive Staff
  • Joined: 21 Jul 2003
  • None

#20

Posted 22 February 2009 - 11:31 PM Edited by Gangsta Killa, 22 February 2009 - 11:52 PM.

Also changed the way the fuelRatio was calculated by engine damage. There are two multipliers, the first one is 1.5 times the current fuelRatio, and the second one is 3 times the current fuelRatio.

So if your engine is knackered, and you're flooring it you're going to drain that fuel tank pretty fast. Which is exactly what happens, With the engine in the red, flooring it to Alderny, I think I was burning about 13.5L a second!


Edit: Released 2.1 RC. Its on the gtagarage page. The only changes to this version is the fuelCalculation, you can now set these in the ini file. I've also removed the grey rectangle, but the gauges remain.

Edit2: You'll find in 2.1 that I've left in some functions that I used whilst testing. The following Keys cannot be mapped to. Q, Y, T, E

CaptainDingo
  • CaptainDingo

    Not actually a captain, or a dingo.

  • Members
  • Joined: 18 Jan 2009

#21

Posted 23 February 2009 - 12:58 AM

You're probably getting tired of my damn suggestions, but I have one more. colgate.gif

Each bar should have a full length dark gray/black bar behind it, so you can see how much of each bar is actually full. A minor aesthetic, but it would look more "smart."

Anyways, I haven't tried out your newer version but I'll certainly do so now.

tomworld10
  • tomworld10

    Mark Chump

  • Members
  • Joined: 29 Jun 2005

#22

Posted 23 February 2009 - 01:10 AM



Hi,

Just Beautiful !!!!!!!

Have cookies cookie.gif cookie.gif cookie.gif


Have Fun


CaptainDingo
  • CaptainDingo

    Not actually a captain, or a dingo.

  • Members
  • Joined: 18 Jan 2009

#23

Posted 23 February 2009 - 04:55 AM Edited by CaptainDingo, 23 February 2009 - 04:59 AM.

Alright, just got done taking the new version for a test run. Very big improvement overall, the fuel consumption is right on in my opinion.

The addition of a display showing the current fuel level as you're refilling is nice as well, though now my gripe is that refilling takes ages. Luckily I realized you had the fill rate already there in the .ini so I simply raised it and raised the prices to compensate, problem solved. cool.gif

Pretty good overall, I'd say you're nearly done with this nice little mod. As far as aesthetics go, all I could really ask is you find a way to represent the fuel while refilling as a percent rather than its raw number, just for user friendliness.

Andrew
  • Andrew

  • Inactive Staff
  • Joined: 21 Jul 2003
  • None

#24

Posted 23 February 2009 - 06:38 AM

QUOTE (CaptainDingo @ Feb 23 2009, 05:55)
Alright, just got done taking the new version for a test run. Very big improvement overall, the fuel consumption is right on in my opinion.

The addition of a display showing the current fuel level as you're refilling is nice as well, though now my gripe is that refilling takes ages. Luckily I realized you had the fill rate already there in the .ini so I simply raised it and raised the prices to compensate, problem solved. cool.gif

Pretty good overall, I'd say you're nearly done with this nice little mod. As far as aesthetics go, all I could really ask is you find a way to represent the fuel while refilling as a percent rather than its raw number, just for user friendliness.

Hopefully when I get back from University today I'm going to add in the suggestions people have made, add in the toggle switches and hopefully get it working nice and stable.

a-k-t-w
  • a-k-t-w

    Wannabe GTA IV Dev

  • Members
  • Joined: 30 Sep 2008

#25

Posted 23 February 2009 - 01:00 PM Edited by a-k-t-w, 23 February 2009 - 01:32 PM.

-snip-

I've really got to stop posting when I'm angry.

Anyway, Q and E spawn cars and it's annoying as hell, cause it interferes with default controls.

Also, MOB 555 0100 and TOW 555 0100 are completely useless (not the number, just the service.)

The tanker guy, will just sit in his truck, after he is spawned and dose nothing, only comes to you when you get into another car, and drive near it. He also flys out of the truck, never to be seen again, when he stops.

The other thing TOW dose nothing. The noose will come to you, and thats it. You can't refuel from them. Also, when you call for a second one, the first one will beat up the second one? lol.gif lol, funny sh*t. So basicly, you run out of fuel? Your screwed.

Andrew
  • Andrew

  • Inactive Staff
  • Joined: 21 Jul 2003
  • None

#26

Posted 23 February 2009 - 03:17 PM Edited by Gangsta Killa, 23 February 2009 - 03:53 PM.

QUOTE (a-k-t-w @ Feb 23 2009, 14:00)
-snip-

I've really got to stop posting when I'm angry.

Anyway, Q and E spawn cars and it's annoying as hell, cause it interferes with default controls.

Also, MOB 555 0100 and TOW 555 0100 are completely useless (not the number, just the service.)

The tanker guy, will just sit in his truck, after he is spawned and dose nothing, only comes to you when you get into another car, and drive near it. He also flys out of the truck, never to be seen again, when he stops.

The other thing TOW dose nothing. The noose will come to you, and thats it. You can't refuel from them. Also, when you call for a second one, the first one will beat up the second one?  lol.gif lol, funny sh*t. So basicly, you run out of fuel? Your screwed.

As for the Q and E, I left in some code I used whilst testing. So they spawn some vehicles. As for the MOB 555 0100 and TOW 555 0100. I have to look at a different way of getting them to work, it is hit and miss with the vehicles, they are pretty useless sometimes. They drive like idiots.

Edit: The idea behind the noose is that you cannot refuel from it, it fills the car with 100L of fuel.

Edit2: Tweaked the distance settings for the mobile refueling service, called it multiple times and only had one issue where it spawned on the highway. This the way it works:

- Player calls the mobile service
- Tanker is created within 40f of the player
- Ped is created and ordered to drive the tanker to within 4f of the player
- A temporary mobile station is added
- Can now fill up like at a station
- Player moves away from tanker 20f.
- Station is removed and tanker is set to cruise.


loczek47
  • loczek47

    They call me "Random Funny Guy".

  • BUSTED!
  • Joined: 22 May 2008

#27

Posted 23 February 2009 - 07:17 PM

You can call me big noob, but how the hell I'm suspossed to call MOB/TOW 555 0100? I was thinking you can only type numbers to call on Niko's phone.

Andrew
  • Andrew

  • Inactive Staff
  • Joined: 21 Jul 2003
  • None

#28

Posted 23 February 2009 - 07:40 PM

Same way you type the cheats in, the letters correspond to a number. Look at the phones key pad. So MOB 555 0100 becomes 662 555 0100 and TOW 555 0100 becomes 869 555 0100.

loczek47
  • loczek47

    They call me "Random Funny Guy".

  • BUSTED!
  • Joined: 22 May 2008

#29

Posted 23 February 2009 - 07:41 PM

Oh ok thanks icon14.gif The mod is awesome, it's good you made ini for it though.

Andrew
  • Andrew

  • Inactive Staff
  • Joined: 21 Jul 2003
  • None

#30

Posted 23 February 2009 - 08:17 PM

We're getting there with the changes. I'm going to make pretty much every aspect of the mod be able to be configured by the ini.

Currently done

•Master on/off switch
•Turn parts of the display off
•Edit the displays location




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users