Menyoo and Persistance
So, I use Menyoo to add cars to single player. I add them around the map on the streets, houses, dealers and so on. The problem is, that the game always render the cars no matter where you are on the map. So if I am in the city, it still renders cars on the other side of the maps.
Is there any way for the cars to only appear when you are near them? That way you can add way more cars around the map. I know some persistance mods did this, but none of them are updated and work anymore. Does menyoo have this feature build in somehow?
Or someone know a clever way to do this
Is there any way for the cars to only appear when you are near them?
The game engine only spawns vehicles when they are within visible distance. If you're at the Pier nothing is being spawned at Paleto Bay until you go there. It might work if you had 256GB of RAM and RAGE and Windows could support it.
In reality the exact opposite of what you wrote is true. Spawn a car at the Pier, leave it there, teleport out of sight, return back to Pier and your car has disappeared, because it isn't persistent.
Persistence can be achieved through mods or by using simple scripts you can write yourself.
Don't understand your original question because I can't even imagine how a trainer can spawn vehicles far away from you.
Hi again 😊
When I spawn a car through menyoo spooner, it is indeed persistent. I have added 72 cars and saved them. And If I go into spooner mode, and fly Way up and have texture loss, I Can still see all the cars way out in the distance, all of them. How is that possible If the engine does not generate them? It seems thet addon cars added through the spooner is always there.. that also explains the texture loss?
Just tried the teleport thing - the car was still there when I teleported back.
@jhp Unless you have a persistence mod installed, I'm pretty sure Menyoo does NOT spawn with persistence. TBH i only spawn cars with my own LemonUI menus but I've seen numerous complaints on these forums about disappearing cars with Menyoo.
And ofc you can see cars from above. You can see the whole map because of LODs, but not with the proper detail.
As for teleporting back and forth and expecting your cars to be there? Once more I"ve never seen or heard of that with Menyoo unless it's a few seconds apart.
You very likely have Simple Trainer, or Addon Vehicle Spawner, or some persistence mod installed.
Or Menyoo was updated but I doubt it.
When I spawn a car through menyoo spooner,
let me know if you want to read a few hundred more. lol.
Any entity that is marked/set as a mission entity will be persistent, no matter where in the map (or out) you are; any entity that is not marked/set as a mission entity (or is marked as no longer needed) will despawn after some distance (and/or looking) away, depending upon the overall population of the game world or entity pools.
The exception to this however is that in online or FiveM, entities may be culled after some distance (unless you change or prevent this by calling certain natives), but will reappear/respawn once you get back within "range" of the entity.
Now, you can create a persistence script that is (somewhat) based upon that same distance logic, whereas if you get far enough away and you have no line of sight, you mark the entity as being no longer needed, or you just straight up delete it. Then, whenever you get back to the area again, you can recreate it. Just try to be smart with your implementation, as having tons of "persistent" vehicles with bad logic/implementation defeats the purpose (focus on optimizing distance checks, maybe having and using caches, etc.).
Obviously this would need to be your own custom script of course, working independently of menyoo or anything else; you'd also need to know/have complete lists of all the vehicle details to preserve and restore, I already started on something similar awhile ago but I stalled it as I don't like releasing unfinished or unpolished things.
I do not have that problem 😅
I spawn the car with spooner, and save database to xml file. When the game loads, i load the saved database and the 72 addon cars Gets loaded into the game on all the locations I saved them at. Which is what I want. But the texture loss is only occuring when I add one to many cars.. and it doesnt matter where on the map I am when I do it. I get texture loss. If the game despawns the cars, I should in theory be able to add many more as Long as they are scattered around the map?😊
@jhp ok. Didn't realize you were saving your cars with spooner as xml files. Not a fan of xml maps and i can tell you from experience Menyoo maps spawn with inconsistencies.
i load the saved database and the 72 addon cars
With 72 addon cars spawned at the same time, you're lucky you have any textures rendering.
Hehe yeah - but its the only way I can populate the map with real cars. Are there any better ways?
@jhp yes, replaces rather than addons.
In that case just make a script that will (somewhat dynamically) spawn random vehicles out of sight, either parked or in traffic with a driver, optionally with arrays of vehicles per area.