[prerelease] trew_hud_ui/LegacyFuel - Advanced fuel usage, efficiency displays, advanced cruise control

As my first project i decided to go on some Modifications for Legacy Fuel and threw_hud as those are both pretty simple mods. Features so Far:

Legacy Fuel:
-improoved fuel consumption formula, the car speed is now factored in also the motor will consume a
lot less fuel if you are not acclerating (cars can now idle for hours)

-calculation of some basic fuel efficiency values to show them in the ui

trew_hud_ui:
-added key controls to raise or lower max cruise speed by 5KMH steps
(has to be updated to support mph also)

TODO/will be maybe done:
-find a better way to diable the vehicles when fuel is empty

-different fuel tank sizes for different car classes

-a possibilty to override values for single cars by id

-add more control over the accleration, or max rpm
That would be the hard part, as fivem allows not wuch control on that. I have to check if i can introduce driving modes like, Drive, Sport. Sport+ and limit the accleration. That should be possible, but it would’nt circumvent cruising at low speed in a to low gear at to high rpm. I had a look into some plugins that allow scripted control of the gearbox, maybe thats an option.


(if you are still interessted, a video says more than thousand words)

It’s mostely a practice project for myself, i dont know if there is any interesst for a release. Code also should be pretty ugly by know, and would need a revision :smiley: Also i’ve nodified other Projcets so i would have to consider how to release it without flooding the internet with redundantent releases for small modification. In my opinion i would have to check if the repos are still active the check if a contribution would be an option. Or otherwise maybe a tutorial on how to implement the changes yourself would be an option…

So let me know if there is interrest regarding a release and how to proper release it.

6 Likes

Don’t re-release resources instead make a pull request on the orginal resource.

2 Likes

Hi, thanks for the fast answer, but i’m not so familliar with github as a contributor. So for clarification, that would involve to establish a new fork as first step?

Should it better be forked from the original or from more recent forks like the one of [XxFri3ndlyxX] for example. Would there be any difference, aside from the modifications done by that fork if there are any?

And second step would be to push the pull request to the repo i forked it from, or to the origanal author, and hope that that repo is still maintained, right?

Update:

-done with basic code cleaning and restructuring

-implemented gearbox simulation from: [Discussion/Research] Manual transmission resource

-implemented custom acceleration curves for smoother driving with keayboard (speed limiter without fully reving the car all the time, slower acceleration for a more realistic feel)image

-fuel consumption in Liter/100km is now accurate

-made all the fuel/car_stat calculations timesafe, so interval for sampling and processing can be set as config, to keep as most as possible control over the scripts ressource consumption.

Planned next:
-implement switching of driving styles between cruise,drive or race to decide how hard
that pedal gonna be stamped on

-implement option for sports and super to switch between Drive,Sports or S+ mode to influence torque and fuel consumption

-some improvements on the fuel calculation. Vehicle weight is’nt considred so far,
so the fuel consumption at low speeds or while climbing hills is pretty low by now

-modify threw_hud to display the gears properly

-implementation of a basic automatic transmission mode

-make as much as possible changeable in the config, option to overide settings for individual cars in the config (because handling.meta values are bs so often :confused: )

-individual fuel tank sizes are’nt implementd fully yet, atm it just uses the value from the handling.meta, but that tank capacities are often quite random. That also could need some work.

+some further half thought ideas :smiley: feel free to add some.

1 Like

Would love to play with this on my drift server. :smiley:

that looks pretty sick good job

Hi thanks for this! what is the github or repository. Thank you.

Nice release my dude!

Keep up the good work :smiley:

Kind Regards

Vik

can you release what you modified, i tried to search for it but cant find it anywhere online im guessing you never figured github out ? just upload where ever so at lease others can access it lol :slight_smile: thank you