a-k-t-w Posted February 26, 2009 Share Posted February 26, 2009 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 More sharing options...
Andrew Posted February 26, 2009 Author Share Posted February 26, 2009 Ah, yeah I'll do that, as for boat / heli fuel stations. They are planned. Eventually. Link to comment Share on other sites More sharing options...
a-k-t-w Posted February 26, 2009 Share Posted February 26, 2009 (edited) 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 I've got alot of suggestions, I just forgot them all 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 February 26, 2009 by a-k-t-w Link to comment Share on other sites More sharing options...
Andrew Posted February 26, 2009 Author Share Posted February 26, 2009 I'll look into being able to get the vehicle ID, and seeing if I can do something with that. Link to comment Share on other sites More sharing options...
CaptainDingo Posted February 26, 2009 Share Posted February 26, 2009 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. Link to comment Share on other sites More sharing options...
a-k-t-w Posted February 26, 2009 Share Posted February 26, 2009 (edited) 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 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 but who cares? It will be able to save the petrol somewhat! Edited February 26, 2009 by a-k-t-w Link to comment Share on other sites More sharing options...
Andrew Posted February 26, 2009 Author Share Posted February 26, 2009 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 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 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 More sharing options...
HazardX Posted February 27, 2009 Share Posted February 27, 2009 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 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 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 More sharing options...
Andrew Posted February 27, 2009 Author Share Posted February 27, 2009 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 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 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 More sharing options...
a-k-t-w Posted February 27, 2009 Share Posted February 27, 2009 (edited) 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 Edited February 27, 2009 by a-k-t-w Link to comment Share on other sites More sharing options...
Andrew Posted February 27, 2009 Author Share Posted February 27, 2009 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 More sharing options...
HazardX Posted February 27, 2009 Share Posted February 27, 2009 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 More sharing options...
Andrew Posted February 27, 2009 Author Share Posted February 27, 2009 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 More sharing options...
S_G Posted February 28, 2009 Share Posted February 28, 2009 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 More sharing options...
Andrew Posted February 28, 2009 Author Share Posted February 28, 2009 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 More sharing options...
mazda0mpv Posted February 28, 2009 Share Posted February 28, 2009 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 Link to comment Share on other sites More sharing options...
HazardX Posted February 28, 2009 Share Posted February 28, 2009 (edited) 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 February 28, 2009 by HazardX Link to comment Share on other sites More sharing options...
Andrew Posted March 1, 2009 Author Share Posted March 1, 2009 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 More sharing options...
S_G Posted March 1, 2009 Share Posted March 1, 2009 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 More sharing options...
Andrew Posted March 1, 2009 Author Share Posted March 1, 2009 (edited) 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 March 1, 2009 by Gangsta Killa Link to comment Share on other sites More sharing options...
a-k-t-w Posted March 2, 2009 Share Posted March 2, 2009 Different typ- F*** YEA Link to comment Share on other sites More sharing options...
Andrew Posted March 2, 2009 Author Share Posted March 2, 2009 (edited) 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 March 5, 2009 by Gangsta Killa Link to comment Share on other sites More sharing options...
a-k-t-w Posted March 2, 2009 Share Posted March 2, 2009 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. Link to comment Share on other sites More sharing options...
Andrew Posted March 2, 2009 Author Share Posted March 2, 2009 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 More sharing options...
jisco Posted March 2, 2009 Share Posted March 2, 2009 where do i put the "radar_fire" file? please help! Link to comment Share on other sites More sharing options...
a-k-t-w Posted March 2, 2009 Share Posted March 2, 2009 What 'radar_fire' file? Link to comment Share on other sites More sharing options...
Andrew Posted March 2, 2009 Author Share Posted March 2, 2009 where do i put the "radar_fire" file? please help! 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 More sharing options...
jisco Posted March 3, 2009 Share Posted March 3, 2009 where do i put the "radar_fire" file? please help! You need to use either SparkIV or OpenIV to open the blips.wtd file, and replace the firestation icon. thx man! Link to comment Share on other sites More sharing options...
C06alt Posted March 3, 2009 Share Posted March 3, 2009 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 More sharing options...
Andrew Posted March 3, 2009 Author Share Posted March 3, 2009 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now