Jump to content

Entity Persistence - Keeps entities persistent! 1.0.1

   (21 reviews)

2 Screenshots

If updating to v1.0.1, you should replace your .ini with a fresh one from the download. Many important default settings were changed.

Caution: This plugin is EXPERIMENTAL.

This may cause a performance hit on your game, depending how you adjust the settings in the included .ini file. The default settings should provide functionality without impacting performance aside from possible drops of 2-3 frames and more at times. If you get less performance than this, please PM me.

You may want to back up your save file. Note that this does not have a chance of messing up your save file unless you save over it in-game. I'm not sure if this actually can mess up your save, but if you want to be on the safe side, go to "C:\Users\<username>\Documents\Rockstar Games\GTA V\Profiles\<some number>" and back up the files with SGTA in their name. 

 

Information

Annoyed when you get out of your stolen car and walk a few feet away, only to turn around and find it gone? Or maybe you just stopped a criminal's car, and he ran a few blocks before you caught up. Maybe when you got back to the suspect's vehicle, you find that it's mysteriously gone, along with his friend's corpse, who was more violent and paid the price.

Now, you don't have to worry about these random disappearances. Once you've loaded this plugin, it will automatically add anything within a radius you set to a list. Anything in the list will be kept persistent and won't disappear until you get far enough away. Once you do, it will be removed from the list and therefore, it will no longer be persistent.

No longer do you have to worry about crime scenes looking like nothing ever happened.

Persistence - the continued or prolonged existence of something.

 

Installation and Usage

You need the Rage Plugin Hook for this to work. This has been tested with version 0.42.969.8470 , but it should work with newer versions. If it does not, send me a message so I can fix it. Again, I'd like you to keep in mind that this is experimental. The game wasn't meant to have this many entities all persistent at once. Use at your own discretion.

When you have that installed, drop both the .dll and the .ini into your Plugins folder. Once you're in-game, press F4 to bring up the Rage Hook console, and type 'LoadPlugin EntityPersistence.dll' (without the apostrophes). It will probably say something about the plugin not being verified. Just hit the up arrow, and then enter again. It should load correctly. Everything after that is taken care of by the plugin itself. This does include a console command to unload the plugin gracefully. By that, I mean it removes persistence from all entities that were made persistent before unloading. I recommend using this before unloading all plugins or exiting the game.

 

Configuration

In the included .ini file, you can edit multiple things. The default settings seem to work fine with the lowest performance drop, but if you find you want to change something, be sure to read the comment associated with it carefully to know what impact it might have. The comments show the default setting and what it was tested at. The default radius values are pretty large already, so if you encounter any performance problems, you can tone those down by increments of 32 (personal preference, you can change them by whatever you like). The options are explained in the .ini but I'll put the non-advanced ones down here anyway.

  • VehiclePersistence - Determines if vehicles will be added to the persistence list.
  • VehiclesUnoccupiedOnly - Only add vehicles if they're unoccupied.
  • PedPersistence - Determines if pedestrians will be added to the persistence list. 
  • PedsDeadOnly - Only add peds if they're dead.
  • PersistenceRemoveRadius - The distance from the player at which to remove persistence from entities.
  • PersistenceAddRadius - The distance from the player at which to add persistence to entities.
  • OnlyOnFoot - Whether entities are made persistent at any time, or just when the player isn't in a vehicle.
  • RemoveOnPersistenceRemove - Determines if entities will get removed when their persistence gets removed. More of a fail-safe than anything.

 

Planned Features

  • Performance improvements
  • More performance improvements
  • Even more performance improvements

 

Miscellaneous

Please, give me any bug or crash reports. I'll try my best to fix them. If you have a great idea of something that would work well with the system already in place, then go ahead and tell me; if I think it would fit well, then I'll do my best to add it.

 


What's New in Version 1.0.1

Released

  • If PersistenceRemoveRadius is zero, entities will not lose persistence until the max count is reached, and then they will lose persistence in the order they gained it as the list is added to
  • Updated default values in .ini. It is recommended to replace your current .ini with a new one from the download and tweak as you see fit.
FtDLulz

You may also like

  • [Replacement] This is an audio replacement for Immersive Dispatch

    Audio replacement for Immersive Dispatch
    Mid

    By Mid

    Updated

    • 56
  • LSPD First Response

    The LSPD First Response modification
    G17 Media

    By G17 Media

    Updated

    • 16.7m
  • Unmarked 2022 BMW M3

    Unmarked 2022 BMW M3
    buddy03

    By buddy03

    Updated

    • 148
  • [NON-ELS] Chicago Police Department Pack [32 Siren]

    recently updated with two new vehicles!
    AbruptEnforcement

    By AbruptEnforcement

    Updated

    • 3.1k
  • 2023 QPS Kia Ev6 Trial Car [Fivem Ready]

    2023 QPS Kia Ev6 Trial Car Fivem Ready
    ArkaneDesigns

    By ArkaneDesigns

    Updated

    • 279
  • [Non-ELS] Low-Profile 2018 Dodge Charger AWD

    Unmarked Low-Profile 2018 Dodge Charger AWD with Whelen based lighting setups
    Immaculate Productions

    By Immaculate Productions

    Updated

    • 1.5k
  • User Feedback

    Recommended Comments



    Does seem to cost Vram. Even after leaving an area Vram still seems to be  absurdly high in usage. Which is causing frame dips. Still 5/5 Since it is experimental.

    Link to comment
    Share on other sites

    Does seem to cost Vram. Even after leaving an area Vram still seems to be  absurdly high in usage. Which is causing frame dips. Still 5/5 Since it is experimental.

    If you are getting huge dips even after leaving an area, try lowering the PersistenceRemoveRadius down to something like 92.0 or less. You'll have to reload the plugin to have the ini changes go into effect, so use the UnloadEntityPersistence command. Going to see what improvements I can make to the code when I'm not busy.

    Thanks for the feedback!

    Link to comment
    Share on other sites

    If you are getting huge dips even after leaving an area, try lowering the PersistenceRemoveRadius down to something like 92.0 or less. You'll have to reload the plugin to have the ini changes go into effect, so use the UnloadEntityPersistence command. Going to see what improvements I can make to the code when I'm not busy.

    Thanks for the feedback!

    No worries! Glad to finally see a modification that allows me to roleplay more without a scene completely disappearing before my eyes.

    Link to comment
    Share on other sites

    No worries! Glad to finally see a modification that allows me to roleplay more without a scene completely disappearing before my eyes.

    Forgot to message you that there's a new version out that hopefully at least helps performance.

    Link to comment
    Share on other sites

    Forgot to message you that there's a new version out that hopefully at least helps performance.

    Thank you so much. Keep up the amazing  work. I really look forward to more of your stuff!

    Link to comment
    Share on other sites

    Thanks for the report (and the log!) but v0.2.1 fixes this. Download the update; if you still get crashes, send me another log. Thanks!

    Lovely.

     

    Just as a clearance. This mod disables the de-spawning of objects if a player gets too far away from them? AKA, it keeps them in the world?

    Link to comment
    Share on other sites

    Lovely.

     

    Just as a clearance. This mod disables the de-spawning of objects if a player gets too far away from them? AKA, it keeps them in the world?

    Yes. The distance it stops them from de-spawning in is the PersistenceRemoveRadius in the .ini file. If a vehicle is within that radius (middle of the radius is the player) then it will not de-spawn.

    Link to comment
    Share on other sites

    Just wanted to let you know that this plugin crashes as soon as the Coroner from FinKone's police radio removes a dead ped, but I don't know if you can do anything about that. Log: http://pastebin.com/ehtkrfGW

     

    Other than that, this plugin is awesome. Keep up the good work.

    Link to comment
    Share on other sites

    Just wanted to let you know that this plugin crashes as soon as the Coroner from FinKone's police radio removes a dead ped, but I don't know if you can do anything about that. Log: http://pastebin.com/ehtkrfGW

     

    Other than that, this plugin is awesome. Keep up the good work.

    Remove EntityPersistence. It's causing the crashes.

    Link to comment
    Share on other sites

    Remove EntityPersistence. It's causing the crashes.

    Isn't that this plugin, which I'm filing a bug report on? Or am I doing a derp?

    Link to comment
    Share on other sites

    Isn't that this plugin, which I'm filing a bug report on? Or am I doing a derp?

    [7/3/2015 6:26:32 PM.223] Entity Persistence: ==============================
    [7/3/2015 6:26:32 PM.223] Entity Persistence: UNHANDLED EXCEPTION DURING GAME THREAD TICK
    [7/3/2015 6:26:32 PM.223] Entity Persistence: ------------------------------
    [7/3/2015 6:26:32 PM.223] Entity Persistence: Origin: Game fiber "Plugin "Entity Persistence" main thread".
    [7/3/2015 6:26:32 PM.223] Entity Persistence: ------------------------------
    [7/3/2015 6:26:32 PM.223] Entity Persistence: Exception type: Rage.Exceptions.InvalidHandleableException
    [7/3/2015 6:26:32 PM.223] Entity Persistence: Exception message: Operation is not valid because this Rage.Ped is invalid.
    [7/3/2015 6:26:32 PM.223] Entity Persistence: ------------------------------
    [7/3/2015 6:26:32 PM.223] Entity Persistence: Inner exceptions:
    [7/3/2015 6:26:32 PM.223] Entity Persistence: ------------------------------
    [7/3/2015 6:26:32 PM.223] Entity Persistence: Stack trace:
    [7/3/2015 6:26:32 PM.259] Entity Persistence: at Rage.Entity.get_IsPersistent()
    [7/3/2015 6:26:32 PM.259] at EntityPersistence.EntryPoint.PersistenceHandler()
    [7/3/2015 6:26:32 PM.259] at EntityPersistence.EntryPoint.Main()
    [7/3/2015 6:26:32 PM.259] at Rage.GameFiber.Main()
    [7/3/2015 6:26:32 PM.259] Entity Persistence: ==============================

    As you can see, big derp my friend :)

    Link to comment
    Share on other sites

    [7/3/2015 6:26:32 PM.223] Entity Persistence: ==============================
    [7/3/2015 6:26:32 PM.223] Entity Persistence: UNHANDLED EXCEPTION DURING GAME THREAD TICK
    [7/3/2015 6:26:32 PM.223] Entity Persistence: ------------------------------
    [7/3/2015 6:26:32 PM.223] Entity Persistence: Origin: Game fiber "Plugin "Entity Persistence" main thread".
    [7/3/2015 6:26:32 PM.223] Entity Persistence: ------------------------------
    [7/3/2015 6:26:32 PM.223] Entity Persistence: Exception type: Rage.Exceptions.InvalidHandleableException
    [7/3/2015 6:26:32 PM.223] Entity Persistence: Exception message: Operation is not valid because this Rage.Ped is invalid.
    [7/3/2015 6:26:32 PM.223] Entity Persistence: ------------------------------
    [7/3/2015 6:26:32 PM.223] Entity Persistence: Inner exceptions:
    [7/3/2015 6:26:32 PM.223] Entity Persistence: ------------------------------
    [7/3/2015 6:26:32 PM.223] Entity Persistence: Stack trace:
    [7/3/2015 6:26:32 PM.259] Entity Persistence: at Rage.Entity.get_IsPersistent()
    [7/3/2015 6:26:32 PM.259] at EntityPersistence.EntryPoint.PersistenceHandler()
    [7/3/2015 6:26:32 PM.259] at EntityPersistence.EntryPoint.Main()
    [7/3/2015 6:26:32 PM.259] at Rage.GameFiber.Main()
    [7/3/2015 6:26:32 PM.259] Entity Persistence: ==============================

    As you can see, big derp my friend :)

    Sorry, but I don't see where I'm going wrong here. 'Entity Persistence' is the name of the plugin that this comment section is for. 'Entity Persistence' crashed, and so I'm reporting that bug on this thread.

    Could you please explain how this logic is flawed? Thanks.

    Link to comment
    Share on other sites

    Sorry, but I don't see where I'm going wrong here. 'Entity Persistence' is the name of the plugin that this comment section is for. 'Entity Persistence' crashed, and so I'm reporting that bug on this thread.

    Could you please explain how this logic is flawed? Thanks.

    To be honest I don't know - 

    Coroner from FinKone's police radio removes a dead ped

    I thought you were talking about PoliceRadio lel

    Link to comment
    Share on other sites

    To be honest I don't know - 

    Coroner from FinKone's police radio removes a dead ped

    I thought you were talking about PoliceRadio lel

    Looks like he was talking about how removing a dead ped using Police Radio's coroner makes this plugin crash.

    Just wanted to let you know that this plugin crashes as soon as the Coroner from FinKone's police radio removes a dead ped, but I don't know if you can do anything about that. Log: http://pastebin.com/ehtkrfGW

     

    Other than that, this plugin is awesome. Keep up the good work.

    I'll see what I can do about it.

    Edited by FtDLulz
    Link to comment
    Share on other sites

    Just wanted to let you know that this plugin crashes as soon as the Coroner from FinKone's police radio removes a dead ped, but I don't know if you can do anything about that. Log: http://pastebin.com/ehtkrfGW

     

    Other than that, this plugin is awesome. Keep up the good work.

    A new version is uploaded that fixes the crashes when using coroner (and most likely tow) from Police Radio.

    Link to comment
    Share on other sites

     

    To be honest I don't know - 

    Coroner from FinKone's police radio removes a dead ped

    I thought you were talking about PoliceRadio lel

     Oh lol. Well, thanks for trying to help.

    A new version is uploaded that fixes the crashes when using coroner (and most likely tow) from Police Radio.

    Cool! Thanks for the quick fix.

    Link to comment
    Share on other sites

    The performance hit

    Is it only when there are lots of entities around or is it constant throughout the game if you have this installed? When you clear a scene and leave a certain distance does the performance get better or is that stuff still in the memory?

    I'm wondering because my PCs not amazing but it runs GTA 5 smoothly now, don't want to ruin that though

    Edited by shadow3467
    Link to comment
    Share on other sites

    Getting this, not working for me...help?

     

    [11/07/2015 17:34:20.003] Console variable 'WarnOnPluginLoad' is false, will allow plugin to load.
    [11/07/2015 17:34:20.003] Loading plugin from path: D:\GTA V\Plugins\EntityPersistence.dll
    [11/07/2015 17:34:20.549] <UNLOADED PLUGIN>: Initializing input system
    [11/07/2015 17:34:20.553] <UNLOADED PLUGIN>: Initializing game console
    [11/07/2015 17:34:20.555] <UNLOADED PLUGIN>: Initializing forms manager
    [11/07/2015 17:34:20.576] Plugin "Entity Persistence" was loaded from "EntityPersistence.dll".
    [11/07/2015 17:34:21.484] 
    [11/07/2015 17:34:21.484] ==============================
    [11/07/2015 17:34:21.484] UNHANDLED EXCEPTION DURING PLUGIN TICK
    [11/07/2015 17:34:21.484] ------------------------------
    [11/07/2015 17:34:21.484] Origin: Plugin "Entity Persistence" (EntityPersistence.dll).
    [11/07/2015 17:34:21.484] ------------------------------
    [11/07/2015 17:34:21.484] Exception type: System.TypeInitializationException
    [11/07/2015 17:34:21.485] Exception message: The type initializer for 'OnscreenWarning' threw an exception.
    [11/07/2015 17:34:21.485] ------------------------------
    [11/07/2015 17:34:21.485] Inner exceptions:
    [11/07/2015 17:34:21.485]     Exception type: System.NullReferenceException
    [11/07/2015 17:34:21.485]     Exception message: Object reference not set to an instance of an object.
    [11/07/2015 17:34:21.485] ------------------------------
    [11/07/2015 17:34:21.485] Stack trace:
    [11/07/2015 17:34:21.485] at OnscreenWarning..ctor(Single x, Single y, String text, String title, Boolean isInformative)
    [11/07/2015 17:34:21.485] at Rage.HookManager.AddOnscreenWarning(String text, String title, Boolean isInformative)
    [11/07/2015 17:34:21.485] at Rage.Plugin.Tick()
    [11/07/2015 17:34:21.485] at Rage.HookManager.Tick()
    [11/07/2015 17:34:21.485] ==============================
    [11/07/2015 17:34:21.485] 
    [11/07/2015 17:34:21.485] EXCEPTION DURING LOGGING OF UNHANDLED EXCEPTION! The type initializer for 'OnscreenWarning' threw an exception.at OnscreenWarning..ctor(Single x, Single y, String text, String title, Boolean isInformative)
    [11/07/2015 17:34:21.485] at Rage.HookManager.AddOnscreenWarning(String text, String title, Boolean isInformative)
    [11/07/2015 17:34:21.485] at Rage.HookManager.LogException(Exception exception, String title, Object origin)

    Link to comment
    Share on other sites

    The performance hit

    Is it only when there are lots of entities around or is it constant throughout the game if you have this installed? When you clear a scene and leave a certain distance does the performance get better or is that stuff still in the memory?

    I'm wondering because my PCs not amazing but it runs GTA 5 smoothly now, don't want to ruin that though

    I should actually clear this up in the main post.

    It really depends on the ini settings. The default settings allow for travel a reasonable distance away before cleaning up. Each entity has a radius, which, once you exit it, will clean up and delete the entity. There's a max setting so you can limit how many things can be made persistent at once. If this limit is reached, nothing else will be added to the list, which means it's GTA V's job to clean it up (which it does so almost as soon as you look away).

    The default settings also only allow for dead peds and unoccupied vehicles to be stored in memory, lessening the impact on performance. Anything that is cleared up by something like FinKone's coroner or tow truck will be removed from the list and therefore from memory.

    The default settings should not impact performance (maybe 3-4 frames lost) and still provide functionality.

    Once you unload and remove the plugin, everything will be back to normal, so you can test it out and see if it works fine for you.

    Sorry I didn't get to your comment sooner, the site doesn't seem to be notifying me of these things. Send me a PM or comment if you have any further questions. 

    Thanks!

    Getting this, not working for me...help?

     

    [11/07/2015 17:34:20.003] Console variable 'WarnOnPluginLoad' is false, will allow plugin to load.
    [11/07/2015 17:34:20.003] Loading plugin from path: D:\GTA V\Plugins\EntityPersistence.dll
    [11/07/2015 17:34:20.549] <UNLOADED PLUGIN>: Initializing input system
    [11/07/2015 17:34:20.553] <UNLOADED PLUGIN>: Initializing game console
    [11/07/2015 17:34:20.555] <UNLOADED PLUGIN>: Initializing forms manager
    [11/07/2015 17:34:20.576] Plugin "Entity Persistence" was loaded from "EntityPersistence.dll".
    [11/07/2015 17:34:21.484] 
    [11/07/2015 17:34:21.484] ==============================
    [11/07/2015 17:34:21.484] UNHANDLED EXCEPTION DURING PLUGIN TICK
    [11/07/2015 17:34:21.484] ------------------------------
    [11/07/2015 17:34:21.484] Origin: Plugin "Entity Persistence" (EntityPersistence.dll).
    [11/07/2015 17:34:21.484] ------------------------------
    [11/07/2015 17:34:21.484] Exception type: System.TypeInitializationException
    [11/07/2015 17:34:21.485] Exception message: The type initializer for 'OnscreenWarning' threw an exception.
    [11/07/2015 17:34:21.485] ------------------------------
    [11/07/2015 17:34:21.485] Inner exceptions:
    [11/07/2015 17:34:21.485]     Exception type: System.NullReferenceException
    [11/07/2015 17:34:21.485]     Exception message: Object reference not set to an instance of an object.
    [11/07/2015 17:34:21.485] ------------------------------
    [11/07/2015 17:34:21.485] Stack trace:
    [11/07/2015 17:34:21.485] at OnscreenWarning..ctor(Single x, Single y, String text, String title, Boolean isInformative)
    [11/07/2015 17:34:21.485] at Rage.HookManager.AddOnscreenWarning(String text, String title, Boolean isInformative)
    [11/07/2015 17:34:21.485] at Rage.Plugin.Tick()
    [11/07/2015 17:34:21.485] at Rage.HookManager.Tick()
    [11/07/2015 17:34:21.485] ==============================
    [11/07/2015 17:34:21.485] 
    [11/07/2015 17:34:21.485] EXCEPTION DURING LOGGING OF UNHANDLED EXCEPTION! The type initializer for 'OnscreenWarning' threw an exception.at OnscreenWarning..ctor(Single x, Single y, String text, String title, Boolean isInformative)
    [11/07/2015 17:34:21.485] at Rage.HookManager.AddOnscreenWarning(String text, String title, Boolean isInformative)
    [11/07/2015 17:34:21.485] at Rage.HookManager.LogException(Exception exception, String title, Object origin)

    Huh. That's odd, as I don't ever call an OnscreenWarning. You're using the newest Ragehook v0.16, yes? I'll see what I can do to fix it.

    Edit: I can't seem to replicate this. Have you tried re-downloading Ragehook and the plugin?

    Works great for me - little to no performance drop. Had a scene that took me 40mins to clear ( Shootout in the hood )

    -pic snip-

    That's pretty awesome -- do you mind if I add your screenshots to the file page?

    Edited by FtDLulz
    Link to comment
    Share on other sites

    I should actually clear this up in the main post.

    It really depends on the ini settings. The default settings allow for travel a reasonable distance away before cleaning up. Each entity has a radius, which, once you exit it, will clean up and delete the entity. There's a max setting so you can limit how many things can be made persistent at once. If this limit is reached, nothing else will be added to the list, which means it's GTA V's job to clean it up (which it does so almost as soon as you look away).

    The default settings also only allow for dead peds and unoccupied vehicles to be stored in memory, lessening the impact on performance. Anything that is cleared up by something like FinKone's coroner or tow truck will be removed from the list and therefore from memory.

    The default settings should not impact performance (maybe 3-4 frames lost) and still provide functionality.

    Once you unload and remove the plugin, everything will be back to normal, so you can test it out and see if it works fine for you.

    Sorry I didn't get to your comment sooner, the site doesn't seem to be notifying me of these things. Send me a PM or comment if you have any further questions. 

    Thanks!

    Huh. That's odd, as I don't ever call an OnscreenWarning. You're using the newest Ragehook v0.16, yes? I'll see what I can do to fix it.

    Edit: I can't seem to replicate this. Have you tried re-downloading Ragehook and the plugin?

    That's pretty awesome -- do you mind if I add your screenshots to the file page?

    Thanks! I'll try it out later today with LSPDFR

    Link to comment
    Share on other sites

    I should actually clear this up in the main post.

    It really depends on the ini settings. The default settings allow for travel a reasonable distance away before cleaning up. Each entity has a radius, which, once you exit it, will clean up and delete the entity. There's a max setting so you can limit how many things can be made persistent at once. If this limit is reached, nothing else will be added to the list, which means it's GTA V's job to clean it up (which it does so almost as soon as you look away).

    The default settings also only allow for dead peds and unoccupied vehicles to be stored in memory, lessening the impact on performance. Anything that is cleared up by something like FinKone's coroner or tow truck will be removed from the list and therefore from memory.

    The default settings should not impact performance (maybe 3-4 frames lost) and still provide functionality.

    Once you unload and remove the plugin, everything will be back to normal, so you can test it out and see if it works fine for you.

    Sorry I didn't get to your comment sooner, the site doesn't seem to be notifying me of these things. Send me a PM or comment if you have any further questions. 

    Thanks!

    Huh. That's odd, as I don't ever call an OnscreenWarning. You're using the newest Ragehook v0.16, yes? I'll see what I can do to fix it.

    Edit: I can't seem to replicate this. Have you tried re-downloading Ragehook and the plugin?

    That's pretty awesome -- do you mind if I add your screenshots to the file page?

    Sure, go ahead mate :)

    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
    ×
    ×
    • Create New...