Szabo Posted April 28, 2015 Share Posted April 28, 2015 (edited) IMPORTANT NOTE: Since many people are having problems with the configuration, here is a clarification: YOU NEED TO CONFIGURE THE MOD! Open the szabopersist.lua file with a plain text editor (e.g.: Notepad) and change the lines of the configurations. The 'savepath' must contain slashes (these: / ) and NOT backslashes (NOT these: \ ). Both the 'savepath' AND the 'platetext' values must be between quotation marks, like as follows: local savepath = "C:/Users/John Doe/Documents/Rockstar Games/" local platetext = "JOHNNY" AND NOT LIKE THIS: local savepath = C:/Users/John Doe/Documents/Rockstar Games/ local platetext = JOHNNY THE SAVEPATH MUST HAVE A TRAILING (AT THE END) SLASH, HERE ARE EXAMPLES OF WRONG VALUES: local savepath = "C:\Users\John Doe\Documents\Rockstar Games\" - BACKSLASHES local savepath = "C:/Users/John Doe/Documents/Rockstar Games" - NO TRAILING SLASH In the future I'm going to try to find a way to default the path to the "Documents" folder or some other safe place, until then, it's mandatory the configurations must be correct. If it doesn't work, paste your configurations here. (Also, read the FAQ below). This mod allows you to save cars wherever you want, and also keeps the last 3 cars you entered from magically disappearing. It creates markers on the map that shows where your cars are; the markers are small and colour-coded. No more vanishing custom cars! No more lack of garage storage! With this mod, the world is your garage! The 'last entered cars' feature can be optionally disabled (either by configuration file or in-game hotkey). Sounds Interesting? Read on! ---- To install, make sure you have installed Script Hook and the LUA Plugin for Script Hook, and place the .lua file in the scripts/addins folder, delete the other scripts in that folder if you're not using them. Dev Link for version 0.0.1.06b: https://drive.google.com/open?id=0B-imfIHFgQA5OUg5a09zLXZxRVU&authuser=0 Link for mod on ModMyV (stable): http://www.modmy5.com/en/mods/e55e346c Link for mod on GTA5-Mods (stable): https://www.gta5-mods.com/scripts/szabo-s-persistance-mod Script Hook: http://gtaforums.com/topic/788343-vrel-script-hook-v/ LUA Plugin for Script Hook: http://gtaforums.com/topic/789139-vrelhook-lua-plugin-for-script-hook-v/ GitHub (development only, for cutting-edge release, use the dev link above): https://github.com/Alan-FGR/Persistance-Mod IMPORTANT!! YOU NEED TO CHANGE THE CONFIGURATIONS IN THE FILE: -- CONFIGURE THE KEYS BELOW. Further down you find a list of the codes local savekey = 96 local reloadkey = 110 local disablemodkey = 109 local modenabled = true -- SET TO false if you don't want the persistence to be enabled by default - does not affect saved --vehicles, this only applies to the 'persistent' ones you drove, which can cause problems in missions -- CONFIGURE THE PATH WHERE THE FILE WILL BE SAVED. NOTE: Make sure Windows allows writing there. -- 99.9% of the problems will be due bad data on the line below OR Windows permissions nonsense. -- IMPORTANT!: Double-check the slashes (/) (they're NOT backslashes (\) ) and the LAST SLASH too! -- IMPORTANT!: The path must be between quotation marks ("). Use the default value for reference. local savepath = "C:/Users/Alan/Documents/Rockstar Games/" -- CHOOSE A COOL TEXT TO APPEAR IN THE LICENSE PLATES OF YOUR SAVED VEHICLES! (Max. 8 dig.) -- IMPORTANT!: The text must be between quotation marks ("). Use the default value for reference. local platetext = "MYPLATE" local useplates = true --change to false if you don't want the plates to change KEY CODES:Space = 32 D4 = 52 O = 79 NumPad4 = 100 F9 = 120PageUp = 33 D5 = 53 P = 80 NumPad5 = 101 F10 = 121Next = 34 D6 = 54 Q = 81 NumPad6 = 102 F11 = 122End = 35 D7 = 55 R = 82 NumPad7 = 103 F12 = 123Home = 36 D8 = 56 S = 83 NumPad8 = 104 F13 = 124Left = 37 D9 = 57 T = 84 NumPad9 = 105 F14 = 125Up = 38 A = 65 U = 85 Multiply = 106 F15 = 126Right = 39 B = 66 V = 86 Add = 107 F16 = 127Down = 40 C = 67 W = 87 Separator = 108 F17 = 128Select = 41 D = 68 X = 88 Subtract = 109 F18 = 129Print = 42 E = 69 Y = 89 Decimal = 110 F19 = 130Execute = 43 F = 70 Z = 90 Divide = 111 F20 = 131PrintScreen = 44 G = 71 LWin = 91 F1 = 112 F21 = 132Insert = 45 H = 72 RWin = 92 F2 = 113 F22 = 133Delete = 46 I = 73 Apps = 93 F3 = 114 F23 = 134Help = 47 J = 74 Sleep = 95 F4 = 115 F24 = 135D0 = 48 K = 75 NumPad0 = 96 F5 = 116 D1 = 49 L = 76 NumPad1 = 97 F6 = 117 D2 = 50 M = 77 NumPad2 = 98 F7 = 118 D3 = 51 N = 78 NumPad3 = 99 F8 = 119 How it works:It manages the vehicles in three ways: The saved vehicles that are spawned on the map (at the positions they were saved) will be marked in green on the radar and will despawn when you get far. This only affect the vehicles that you didn't drive (see below). The saved vehicles that you drive will blink their marks and won't despawn, but after you have 3 of them, the former ones will revert back to their saved positions (and despawn if you're far from their saved positions). This is necessary to avoid over-usage of VRAM. The random vehicles you entered will be marked in orange and won't despawn, but just as the above, after there are 3 of them on the map, the former ones will be allowed to 'despawn' (but won't necessarily despawn immediately). The saved vehicles are saved to a file in the disk and will be there after you exit and relaunch the game. ---- This is my first script and so far it's working fine considering its limitations. Please forgive any bad practices in the script because as a Python hobbyist programmer (pro wannabe), I hate lua and never used it before, but I hate C++ even more so lua was the way to go . Regards. FAQ: Q:Some colours/modifications/customizations aren't being saved! A:At the moment not all data from the vehicles are saved, but most of them are. I'm working on it though. Q:Will the vehicles be persistent between saves? A:Yes, the vehicles you save on the map (green marker) will be saved to disk Q:Why some vehicles markers blink? A:The blinking markers mark the vehicles that are saved and are being (/were) driven. These won't despawn when you get far. Q:How many vehicles can I save? A:That's a question I can't answer, what I can say is that, as long as you have distant garages with few vehicles (10-20), you're most likely good to go, because you will never have all of them loaded at once, so, if you follow that rule, you can have as many vehicles saved on the map as you want, but if you want to have a huge parking lot with hundreds of vehicles saved in it, then you're limited by your vram (mostly). Q:Where should the savepath variable point to? A:That's for YOU to decide, if in doubt just use your documents (C:/Users/YOUR_WINDOWS_USERNAME/Documents/ - NOTE: "C" may not be your main disk, and I'm not sure if that path is the same for other Windows versions (tested on Win 7)). Q:HELP! It's not working! A:Check your configuration. If in doubt, post it here (you can censor your name), and try disabling other mods. My mod is not sophisticated, it has really simple and clean logic and do only simple things, if you're experiencing problems, perhaps it's a bug, in this case, if you want to help me fix it, you should describe what you were doing when the problem occurred. It's essential to post your game version, scripthook version, lua plugin version, and the version of the mod (and the configs in the mod file). The optimal scenario is if you identify in which situation the problem happens, then run the Lua Plugin SDK version, and paste the console output here. It's possible however that other mods will interfere with this mod. Unfortunately I don't have the time nor resources to adapt my mod to work with all the other mods, and my mod is not doing anything that should conflict with them. Other mods can still manage the vehicles of this mod, and everything should work just fine since this mod is as 'passive' as it gets, for example, when checking if the vehicle you're driving is one that was saved and is requesting to spawn, the mod simply checks the vehicle in a list of 'driven_saved_vehicles', if it's there, then it won't spawn, so, even if other mods mess with the vehicle object, the worst that can happen is the vehicle spawning even though, or not spawning at all (which can be fixed by simply hitting the reload key). In other words, if this mod conflicts with other, I don't think it's my fault. Q:Is this open-source? A:Well... you can just browse the source directly from the file. If you're talking about the license, then no, not atm. Perhaps in the future I'm going to add it to github and release it under an open license, but that's after a code revamp (possibly 0.0.1 or something). Q:Why so many zeroes? A:It's just the versioning convention I'm used to (it sucks): 0.0.0.xxa - dev version 0.0.x - internal release feature testing 0.x.x - selected testing and last fixes r.s.d.hotid - release and final convention Edited June 19, 2015 by TJGM BS_BlackScout, Gollywock, ikt and 25 others 28 Link to comment Share on other sites More sharing options...
SilverRST Posted April 28, 2015 Share Posted April 28, 2015 i always wanna save cars around the map and they spawn there forever, even when they are lost or destroyed. it' exciting to park cars around the map and hide them from people and when need, you just have to go there and 'find' them. sorry for bein a toug gangsta grammarwarruor i typ liek sh*t on a dumbphone Link to comment Share on other sites More sharing options...
hristi Posted April 28, 2015 Share Posted April 28, 2015 Nice. I just want my modded cars to not disappear. Link to comment Share on other sites More sharing options...
Szabo Posted April 28, 2015 Author Share Posted April 28, 2015 (edited) Thanks guys! @SilverRST: That's totally possible, only problem are the modifications, ATM I don't know how to 'save' them to disk in order to make them persistent. #hristi: Yeah, that's exactly the intention of this mod. Just bear in mind guys that it's technically impossible to have an unlimited number of persistent cars on the map, although I plan to despawn and spawn them on-the-fly as development goes (so, when the player gets near to a point where a car should be, the car is spawned, and when it goes far it's despawned), so it's gonna be very efficient, but even though there's gonna be a limit, and the other cars will be on a list just like the impound where you can choose them. Don't be sad though, the limit is gonna be configurable, and if you're running on the recommended requirements, you can expect dozens if not hundreds of cars persistent on the map . Edited April 28, 2015 by Szabo SilverRST 1 Link to comment Share on other sites More sharing options...
bugbutts Posted April 28, 2015 Share Posted April 28, 2015 It's such a huge immersion killer in GTAV to turn around and have a car you just parked vanish. We definitely need a good solid script that does this. Link to comment Share on other sites More sharing options...
Red Dead Rebel Posted April 28, 2015 Share Posted April 28, 2015 YES! We need this kind of scripts! Link to comment Share on other sites More sharing options...
rabzoue59 Posted April 28, 2015 Share Posted April 28, 2015 awesome, that's exactly what i want dude, good job ! Link to comment Share on other sites More sharing options...
alteredbeast Posted April 28, 2015 Share Posted April 28, 2015 Thanks, great script ! Link to comment Share on other sites More sharing options...
bio88 Posted April 28, 2015 Share Posted April 28, 2015 (edited) Awesome, thanks! I would love to have an option to save specific cars to their location, like Simple Trainer for GTA IV could do. Edited April 28, 2015 by bio88 Link to comment Share on other sites More sharing options...
Szabo Posted April 28, 2015 Author Share Posted April 28, 2015 Thank you guys. Awesome, thanks! I would love to have an option to save specific cars to their location, like Simple Trainer for GTA IV could do. That's what I'm doing at the moment. You just hit a key and then your car is 'saved' at that position. I'm even going to make the dirt persistent (optional) so you have an incentive to actually use the car washer now and then . The only problem I'm having is saving the modifications of the cars (custom parts). And I'm also trying to optimize the thing before going fully 'on-the-fly' (because that's gonna take time). Gollywock 1 Link to comment Share on other sites More sharing options...
NyanNeko Posted April 28, 2015 Share Posted April 28, 2015 I think it'd be cool to have a custom area that saves cars, Like the tenant only spaces in GTA:IV, Perhaps like, Anywhere on micheal's driveway. Link to comment Share on other sites More sharing options...
Gollywock Posted April 28, 2015 Share Posted April 28, 2015 This is exacly what I wanted. Thanks, and good luck with the development! Link to comment Share on other sites More sharing options...
ShidaPenns Posted April 28, 2015 Share Posted April 28, 2015 (edited) I just wanted to post here for the first time ever to say thanks for working on this, it is exactly what I've been hoping for from mods. I plan to start the singleplayer again, with a few convenience mods like this, for a more enjoyable experience. Only question I have is, would it be possible to change the personal vehicles of the three characters? Or if that's not in the scope of what your planning, that's okay, just wondering. Edited April 28, 2015 by ShidaPenns Link to comment Share on other sites More sharing options...
bio88 Posted April 28, 2015 Share Posted April 28, 2015 Thank you guys. Awesome, thanks! I would love to have an option to save specific cars to their location, like Simple Trainer for GTA IV could do. That's what I'm doing at the moment. You just hit a key and then your car is 'saved' at that position. I'm even going to make the dirt persistent (optional) so you have an incentive to actually use the car washer now and then . The only problem I'm having is saving the modifications of the cars (custom parts). And I'm also trying to optimize the thing before going fully 'on-the-fly' (because that's gonna take time). Great! I cant wait. Link to comment Share on other sites More sharing options...
r34ld34l Posted April 28, 2015 Share Posted April 28, 2015 Upload it to gta5-mods.com , It would be best way to update it. Link to comment Share on other sites More sharing options...
kopalov Posted April 28, 2015 Share Posted April 28, 2015 Great job! Only one thing comes to my mind which could make this skript better. Is there any way to display a vehicle icon on the map? Does anyone know if there is a function for that, so that it can be added to the script? dontfandango 1 Link to comment Share on other sites More sharing options...
Camo69 Posted April 28, 2015 Share Posted April 28, 2015 Amazing. Works great. Link to comment Share on other sites More sharing options...
alteredbeast Posted April 28, 2015 Share Posted April 28, 2015 It doesn't work when you switch between the 3 main characters in story mode. The cars just disappear. Link to comment Share on other sites More sharing options...
dontfandango Posted April 28, 2015 Share Posted April 28, 2015 Great mod! This was really needed. All I need now is to walk in first person, and a mod to reduce all vehicles top speed and I'm a happy camper Link to comment Share on other sites More sharing options...
iloominaty Posted April 28, 2015 Share Posted April 28, 2015 Great mod and all, but you must make it so it disables it self when you use the rockstar editor, or this will happenhttp://images.akamai.steamusercontent.com/ugc/36370312381638294/4A3E0FE5BCF5921399E032A438C70AFB268D3D5B/ Link to comment Share on other sites More sharing options...
nathanmaxtro Posted April 29, 2015 Share Posted April 29, 2015 Is there any way to set it so that you can set a different car to be a main characters personal car? That's all I really want. To be able to enter a car, open up a menu and choose, "Set as personal vehicle." hristi 1 Link to comment Share on other sites More sharing options...
hristi Posted April 29, 2015 Share Posted April 29, 2015 Is there any way to set it so that you can set a different car to be a main characters personal car? That's all I really want. To be able to enter a car, open up a menu and choose, "Set as personal vehicle." This is the mod that I'm still waiting to be made.. rabzoue59 1 Link to comment Share on other sites More sharing options...
rabzoue59 Posted April 29, 2015 Share Posted April 29, 2015 +1 cheers Link to comment Share on other sites More sharing options...
Szabo Posted April 29, 2015 Author Share Posted April 29, 2015 Thank you guys I just released the beta version. (gimme a few mins to update the #1 post AND to upload it to my friend's website (ModMyPi). It doesn't work when you switch between the 3 main characters in story mode. The cars just disappear. For the 'temporary' vehicles, I don't know if it's worth the effort of saving and re-spawning them, but for the saved vehicles it definitely should work as they are independent from the 'character' being used. Perhaps it's going to be necessary to press the 'reload' key so the mod will respawn all the vehicles at their saved positions. I'm definitely going to investigate to make it seamless. Great mod and all, but you must make it so it disables it self when you use the rockstar editor, or this will happenhttp://images.akamai.steamusercontent.com/ugc/36370312381638294/4A3E0FE5BCF5921399E032A438C70AFB268D3D5B/ Hmm... I'm going to add this to the TODO list. Thanks for reporting. Is there any way to set it so that you can set a different car to be a main characters personal car? That's all I really want. To be able to enter a car, open up a menu and choose, "Set as personal vehicle." I'd like that too... to tell the truth, that should be by default. I don't know of an easy way to do that with mods though, the 2 ways i can think of atm is either replacing the vehicles in the game files, what's a pain, OR making a mod that replaces the vehicles on-the-fly. It would be easy if there was a way to 'get' the vehicles, because looping all of them is definitely intensive. Link to comment Share on other sites More sharing options...
Szabo Posted April 29, 2015 Author Share Posted April 29, 2015 Hey guys, just bumping this to let you know that I just updated to 0.0.0.2b with a fix when unsaved vehicles were not despawning, it's highly recommended to update. Link to comment Share on other sites More sharing options...
nathanmaxtro Posted April 29, 2015 Share Posted April 29, 2015 Is there any way to set it so that you can set a different car to be a main characters personal car? That's all I really want. To be able to enter a car, open up a menu and choose, "Set as personal vehicle." I'd like that too... to tell the truth, that should be by default. I don't know of an easy way to do that with mods though, the 2 ways i can think of atm is either replacing the vehicles in the game files, what's a pain, OR making a mod that replaces the vehicles on-the-fly. It would be easy if there was a way to 'get' the vehicles, because looping all of them is definitely intensive. Thanks for replying to my post. I know that this feature is built into the game because it's used for Online. I'm not even going to pretend to understand coding but I'm sure there is a way to mod the game to use Online's method of car management for single player. I agree with you that is should have been that way by default. Link to comment Share on other sites More sharing options...
Szabo Posted April 29, 2015 Author Share Posted April 29, 2015 Is there any way to set it so that you can set a different car to be a main characters personal car? That's all I really want. To be able to enter a car, open up a menu and choose, "Set as personal vehicle." I'd like that too... to tell the truth, that should be by default. I don't know of an easy way to do that with mods though, the 2 ways i can think of atm is either replacing the vehicles in the game files, what's a pain, OR making a mod that replaces the vehicles on-the-fly. It would be easy if there was a way to 'get' the vehicles, because looping all of them is definitely intensive. Thanks for replying to my post. I know that this feature is built into the game because it's used for Online. I'm not even going to pretend to understand coding but I'm sure there is a way to mod the game to use Online's method of car management for single player. I agree with you that is should have been that way by default. You're welcome. The problem with Online features is that some of them doesn't 'run' on the player computer, the computer acts just as a 'client' that communicates to the R*'s servers, so not all 'logic' that is seen on Online is 'acessible' locally. I think that's the case for custom vehicles and insurance. What modders can do is simply replicate that behaviour. The basic logic is easy enough, what is hard is dealing with the stuff you don't know how it works, that's why my mod doesn't save wheel colours for example. Eventually the community will document the whole api though. It's frustrating how much stuff was left out of single player though. I mean, Online is great and stuff, but that's no excuse... some bugs on SP were not fixed since the first version on last-gen. An example is the broken impound. Link to comment Share on other sites More sharing options...
janimal Posted April 29, 2015 Share Posted April 29, 2015 (edited) cheers Szabo, I will be trying this update in the morning. Could I suggest, if it is possible, to include an activate / de-activate key for your mod? I know that it is inevitable that some mods will interfere with some SP missions and yours (v 0.1) introduces the occasional weird consequences - you can't save the getaway car for the blitz play mission. It's not a big deal really, I just quit the game & moved the script out of the addins folder to complete it, but being able to disable it from within the game would be more convenient. The other car persistence mods also have this issue, so it may well be more effort than it is worth. I would rather you & all other modders prioritise working on being able to set any vehicle as the default player vehicle . R* - so brilliant, but so exasperating at times! Thanks for your efforts, it is much appreciated. Edited April 29, 2015 by janimal Link to comment Share on other sites More sharing options...
Szabo Posted April 29, 2015 Author Share Posted April 29, 2015 cheers Szabo, I will be trying this update in the morning. Could I suggest, if it is possible, to include an activate / de-activate key for your mod? I know that it is inevitable that some mods will interfere with some SP missions and yours (v 0.1) introduces the occasional weird consequences - you can't save the getaway car for the blitz play mission. It's not a big deal really, I just quit the game & moved the script out of the addins folder to complete it, but being able to disable it from within the game would be more convenient. The other car persistence mods also have this issue, so it may well be more effort than it is worth. I would rather you & all other modders prioritise working on being able to set any vehicle as the default player vehicle . R* - so brilliant, but so exasperating at times! Thanks for your efforts, it is much appreciated. Thank you. Yes, it's possible to include a key to activate and de-activate the mod. I'm going to add that to the to-do list along with an option to disable the mod automatic load on startup. The mod however is /more/ intended for using after the missions are complete (at least the main and weirdos), because it's inevitable that some problems will occur. Of course this is not mandatory because not even *I* finished the mains missions yet . What are the "other car persistence mods"? I couldn't find any. Link to comment Share on other sites More sharing options...
Celthium Posted April 30, 2015 Share Posted April 30, 2015 cheers Szabo, I will be trying this update in the morning. Could I suggest, if it is possible, to include an activate / de-activate key for your mod? I know that it is inevitable that some mods will interfere with some SP missions and yours (v 0.1) introduces the occasional weird consequences - you can't save the getaway car for the blitz play mission. It's not a big deal really, I just quit the game & moved the script out of the addins folder to complete it, but being able to disable it from within the game would be more convenient. The other car persistence mods also have this issue, so it may well be more effort than it is worth. I would rather you & all other modders prioritise working on being able to set any vehicle as the default player vehicle . R* - so brilliant, but so exasperating at times! Thanks for your efforts, it is much appreciated. Thank you. Yes, it's possible to include a key to activate and de-activate the mod. I'm going to add that to the to-do list along with an option to disable the mod automatic load on startup. The mod however is /more/ intended for using after the missions are complete (at least the main and weirdos), because it's inevitable that some problems will occur. Of course this is not mandatory because not even *I* finished the mains missions yet . What are the "other car persistence mods"? I couldn't find any. He's probably talking about http://gtaforums.com/topic/790398-vrel-no-remove-last-32-vehicles-of-player/ If possible, can you add a support for controllers ? Great mod anyway! 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