Log in to reply

Regarding Persistent fuel.

  • Hi guys, I had a curiosity followed by some thoughts regarding a working fuel mod that stores the current vehicles fuel value and reloads that exact value after game reloads, which seems to be the one feature no fuel mod can deliver.

    It was hard to understand why modders dont fix this but I think maybe I have an idea.

    Are they all actually using their scripts to speak to the GTA fuel tank system ?

    If so I suspect that this fuel system can only be cycled up or down at a chosen speed and not actually receive a set figure for fuel.
    This no doubt prevents a mod from loading a specific value into the tank upon restart of game.

    Therefore if that is the case I would suggest making a virtual fuel tank, ignore the GTA tank, let your virtual tank drain with movement.

    With this, the game can store and reload your previous tank level in your virtual gauge, don't worry about how much actual gta fuel is in the tank if it is technically infinite.

    What then needs to be done, is when your virtual tank goes empty, then your script can fast drain the gta tank to empty to actually run the car dry.

    You can then refill to any level (and the script would send the fill tank completely command to the GTA fuel system)
    So with the GTA tank full again, and your virtual tank say, halfway ? after that half reaches 0 your script should drain out the gta fuel quickly or just set to empty if its possible.
    Allowing your virtual gauge to be the decider of fuel and not the GTA fuel system thus allowing to store and reload previous fuel levels after restarting GTA.

    I cant code so if anyone sees what I mean and wants to give it a bash or tell me why it wont work, be my guest :dark_sunglasses:

  • Oh and if anyone with the knowledge can feed here the functions available to the GTA fuel command system that modders can use to manipulate it

    I would like to know exactly how we can manipulate it, so that I or we can revise the above idea into something worthy of someones professional coding hand.

    It would be cool if this could work with the fuel ^-^

  • But ... there is already a mod to refuel the vehicles. And even if you are not driving, but if you have the car on, the fuel also runs out. And if you reload a game and use a vehicle that you had stored in the garage, it will have the same amount of fuel that you had before you left the game.
    That mod is called LeFix SimpleFuel.


    LeFix's mod does not store the fuel level in a persistent way.

    My changes are just to keep it running after the game updated, no gameplay elements had been changed. You can try and implement persistent fuel levels in the repo (fork) (original).

    As for why, I just don't have time for it. I can't answer for LeFix though, might've just been an oversight or use case he didn't consider.

Log in to reply

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.