Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

*DO NOT* SHARE MEDIA OR LINKS TO LEAKED COPYRIGHTED MATERIAL. Discussion is allowed.

[IV | REL/WIP] FuelScript IV


Andrew
 Share

Recommended Posts

I'll implement a few console commands, and set some prices for them in the ini.

I meant that the console fills you car up for free. Because sometimes I buy a car (with the vehicle selector) to find that it has not enough petrol to make it to the nearest station, and it is especially annoying when you buy a boat, seeing as there are no boat refuel stations, I'm pretty much screwed.

Link to comment
Share on other sites

Another suggestion: Fuel tank size.

 

And by that I mean customizing any car in the ini with a custom tank size. I mean it would lower/higher the time to refuel because the tank is smaller/larger. I drive a faggio sometimes, and when I run out of petrol, It takes me far too long to fill it up. It's not like it has a huge-ass fuel tank that can hold 200L of fuel whatsthat.gif I've got alot of suggestions, I just forgot them all rolleyes.gif

 

customizable for each vehicle. Here's an example of how it should appear in the ini:

 

//Custom Tank size://example code thingy:163://car id// 10 //how long much petrol it puts in the tank12: 10045: 62Defult: 100 //The default fuel tank size if there is no config for that car.

 

Edited by a-k-t-w
Link to comment
Share on other sites

Just remember that if you make the Faggio's tank smaller, you'll have to refill it more often so either way you're going to be spending time at the gas pump. tounge.gif

Link to comment
Share on other sites

No, thats not how it should work either. Just because the tank is smaller, dosn't mean it would use more petrol.

 

Edit: Another suggestion! If you can somehow manage to get vehicle ids, you might be able to re-set petrol status after you exit, and re-launch the game. Like this: You get into a car and the ini then sets petrol for that type of car. The best way to be able to save the fuel when re-launching the game biggrin.gif Only down side is, if you were to hop into another car, but the same type (e.g. infurnes -> infurnes) it will be the same amout of petrol tounge.gif but who cares? It will be able to save the petrol somewhat!

Edited by a-k-t-w
Link to comment
Share on other sites

No, thats not how it should work either. Just because the tank is smaller, dosn't mean it would use more petrol.

 

Edit: Another suggestion! If you can somehow manage to get vehicle ids, you might be able to re-set petrol status after you exit, and re-launch the game. Like this: You get into a car and the ini then sets petrol for that type of car. The best way to be able to save the fuel when re-launching the game biggrin.gif Only down side is, if you were to hop into another car, but the same type (e.g. infurnes -> infurnes) it will be the same amout of petrol tounge.gif but who cares? It will be able to save the petrol somewhat!

Nah the IDs aren't the games pointer to a specific car, rather the cars model. I suppose I could do it by using the car model names. Or hash of the models. I'll look into something like that, shouldn't be too hard, just have an ini or txt file as the database. And then use a function to look it up to set the size of the tank.

Link to comment
Share on other sites

No, thats not how it should work either. Just because the tank is smaller, dosn't mean it would use more petrol.

 

Edit: Another suggestion! If you can somehow manage to get vehicle ids, you might be able to re-set petrol status after you exit, and re-launch the game. Like this: You get into a car and the ini then sets petrol for that type of car. The best way to be able to save the fuel when re-launching the game  biggrin.gif Only down side is, if you were to hop into another car, but the same type (e.g. infurnes -> infurnes) it will be the same amout of petrol tounge.gif but who cares? It will be able to save the petrol somewhat!

Nah the IDs aren't the games pointer to a specific car, rather the cars model. I suppose I could do it by using the car model names. Or hash of the models. I'll look into something like that, shouldn't be too hard, just have an ini or txt file as the database. And then use a function to look it up to set the size of the tank.

You can get the vehicle ID by using Vehicle.GetHashCode, but it will be worthless to you because vehicles get new IDs on every load.

 

I guess i have an idea how we could save the current fuel level.. we definately need the names of all player garages. does anyone know where to find them?

Link to comment
Share on other sites

No, thats not how it should work either. Just because the tank is smaller, dosn't mean it would use more petrol.

 

Edit: Another suggestion! If you can somehow manage to get vehicle ids, you might be able to re-set petrol status after you exit, and re-launch the game. Like this: You get into a car and the ini then sets petrol for that type of car. The best way to be able to save the fuel when re-launching the game  biggrin.gif Only down side is, if you were to hop into another car, but the same type (e.g. infurnes -> infurnes) it will be the same amout of petrol tounge.gif but who cares? It will be able to save the petrol somewhat!

Nah the IDs aren't the games pointer to a specific car, rather the cars model. I suppose I could do it by using the car model names. Or hash of the models. I'll look into something like that, shouldn't be too hard, just have an ini or txt file as the database. And then use a function to look it up to set the size of the tank.

You can get the vehicle ID by using Vehicle.GetHashCode, but it will be worthless to you because vehicles get new IDs on every load.

 

I guess i have an idea how we could save the current fuel level.. we definately need the names of all player garages. does anyone know where to find them?

I've got it to save one of the fuel levels when you exit a car, but saving all across a garage would be fantastic. I'm looking at trying to implement different tank sizes for each vehicle. But it's working out which vehicle the player is in which is the problem. Using model name seems to cause problems.

Link to comment
Share on other sites

No no no you didn't understand what I was saying. I know that you can't save the specific car id. I ment for example: You get into a infurnes. The ini logs that car. So when you reload the game, ANY infurnes will have that amount of petrol.

 

Edit: OH, woopsie daisy user posted image

Edited by a-k-t-w
Link to comment
Share on other sites

No no no you didn't understand what I was saying. I know that you can't save the specific car id. I ment for example: You get into a infurnes. The ini logs that car. So when you reload the game, ANY infurnes will have that amount of petrol.

Thats what is being looked at, at the moment getting and using any sort of vehicle identifier seems to be tricky.

Link to comment
Share on other sites

No no no you didn't understand what I was saying. I know that you can't save the specific car id. I ment for example: You get into a infurnes. The ini logs that car. So when you reload the game, ANY infurnes will have that amount of petrol.

Thats what is being looked at, at the moment getting and using any sort of vehicle identifier seems to be tricky.

Vehicle.Model.Hash should work to identify the car model at least, or does it cause problems too?

Link to comment
Share on other sites

It casued some problems, but that might of been because I didn't set the code up correctly. I'll try again using that, if it works sucessfully, then hopefully I can set a database of vehicles, and their tank size. Which could also leave room for other expansions.

Link to comment
Share on other sites

I'm going to have fun playing with this one. Thanks!

 

I haven't read the thread, so excuse me if I'm asking something that has already been covered or changed. Are you still using that "vehicle speed as fuel consumption" check? If so, there should be a simpler and more realistic way of calculating fuel consumption.

 

Is there a way to get vehicle RPM? Or only its speed? If you can get its RPM, then that, in conjunction with speed, and various other factors (vehicle weight, engine type, and fuel type affect fuel efficiency; turbocharged vehicles should have better fuel efficiency; etc.) will allow you get an excellent fuel consumption calculation.

 

If you can't get RPM, then the best way to calculate fuel efficiency is to run checks on the vehicle's speed every few milliseconds or so, whatever is most convenient for this purpose. Depending on the rate of acceleration, fuel consumption should change similarly. Fast acceleration = faster rate of fuel loss until acceleration slows down; fast deceleration = fuel consumption drops very low; car speed remaining fairly constant = fuel consumption is low to medium, depending on actual speed; car speed is idle = fuel consumption is minimal.

Link to comment
Share on other sites

At the moment there is no way to get the vehicles RPM. You can change the current fuel drain yourself via the INI. Though I'll look at changing the calculation and still have the option to use it from the ini.

 

In the next release:

 

- Users can now add their own fuel stations, by adding a station to the fuelStations.pet file

- Some helipads / boat fueling stations are now added.

- Have some vehicles petrol tank size set by a carDB file.

Link to comment
Share on other sites

 

At the moment there is no way to get the vehicles RPM.

I think it's possible because there is a speedometer which has RPM. click here

Thanks for the hint. I took a look at the sourcecode. The speedometer grabs the RPM value directly from the games memory, without using script functions. I'll try to include it as a function in the scripthook.

 

[EDIT]I've included it now. It doesn't return the actual RPM, but a value between 0 and 1 that indicates how close you are to the maximum RPM.

Edited by HazardX
Link to comment
Share on other sites

At the moment there is no way to get the vehicles RPM.

I think it's possible because there is a speedometer which has RPM. click here

Thanks for the hint. I took a look at the sourcecode. The speedometer grabs the RPM value directly from the games memory, without using script functions. I'll try to include it as a function in the scripthook.

 

[EDIT]I've included it now. It doesn't return the actual RPM, but a value between 0 and 1 that indicates how close you are to the maximum RPM.

Thats awesome, that should help alot.

Link to comment
Share on other sites

Thanks for the hint. I took a look at the sourcecode. The speedometer grabs the RPM value directly from the games memory, without using script functions. I'll try to include it as a function in the scripthook.

 

[EDIT]I've included it now. It doesn't return the actual RPM, but a value between 0 and 1 that indicates how close you are to the maximum RPM.

Very nice! That's more useful than the actual RPM, since all we are checking to see is how much we are pushing it.

Link to comment
Share on other sites

Each car now has its own tank size and fuel drain. All stored in one file. Now starts the long and tedious task of collecting all the car details and specifiying there parameters.

 

Having a crazy idea here, now I've got this system implemented I could add different types of fuel.

Edited by Gangsta Killa
Link to comment
Share on other sites

By doing different types, I'd have to rework the station / refilling aspects. I think for 2.2 I'll leave it with the user station additions and the carDB.

Edited by Gangsta Killa
Link to comment
Share on other sites

Different types of fuel would be very interesting. It would be funny putting unleaded into a deasle car, and watching the engine blow up later. tounge2.gif

Link to comment
Share on other sites

Well slowly gathering the vehicles ids / hash for the vehicle database. Christ theres alot of vehicles. I'm only up to 50od.

Link to comment
Share on other sites

 

where do i put the "radar_fire" file? please help! smile.gif

You need to use either SparkIV or OpenIV to open the blips.wtd file, and replace the firestation icon.

Link to comment
Share on other sites

where do i put the "radar_fire" file? please help! smile.gif

You need to use either SparkIV or OpenIV to open the blips.wtd file, and replace the firestation icon.

thx man! smile.gif

Link to comment
Share on other sites

Great job on this Gangsta Killa. Nice to see a well executed fuel mod that covers all the angles.

Link to comment
Share on other sites

Great job on this Gangsta Killa. Nice to see a well executed fuel mod that covers all the angles.

Thanks, I'm hoping to expand on this and include more features.

 

The carDB is getting there slowly. I think I'll set a standard fuelDrain / tankSize depending on the type of car. I'll let anyone else customize it to their likings.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.