Download before game instead of in-game

hey guys ,
i am using vice city map ( vice cry remastered ) for my server and it’s working perfectly fine .
the only problem is that it takes a looot of time to load when you go to it and even very good internet connections will take a while so it’s basically unplayable .
is there any way to make players download the whole map or loading it before accessing the server ( in the loading screen for example like other maps ) or like a dlc that they have the choice to download it or not .
please help

1 Like

Not really sure how your map mod works, but all resources get downloaded before entering the session (if the resources are started). Basically, when you stream a map to the game, it’s there all the time, nothing gets downloaded once you’re in session assets (models, textures) get downloaded the first time they are loaded. Correct me if I am wrong, but this is the map’s problem rather than people’s connection. The game tends to get unstable (and run out of memory) the larger assets you stream and thus may not run well on low-end PCs.

Steamed files are streamed… They aren’t downloaded when you join.

Make sure your server has good up/down speeds. 1gbps connections work well.

Try this too Optimizing resource downloads using a caching proxy

All resources get downloaded once before joining the session (assets get downloaded when loaded for the first time) and then stored into cache. Until the resource gets changed, the game will load it from the cache (local storage). CPU, RAM, type and speed of the drive FiveM/GTA is installed on can affect asset loading significantly.

EDIT: Forgot to mention - as of now, there is no way of pre-loading any assets, afaik, if that’s what you needed.

1 Like

Resources yes. Assets no.

I can assure you players aren’t downloading gigabytes of assets when they join. Textures, vehicles, clothes, etc are all streamed whilst in-game and only when needed. They aren’t pre-downloaded. You can even enable the asset download bar to show you when they are being downloaded in game.

2 Likes

Even some parts of streamed content gets downloaded beforehand. And I haven’t said anything about pre-downloading assets, although yes, I wasn’t clear (and actually the first reply was rather wrong) with the streaming part - will update my reply.

Some files can be downloaded before joining, try adding in your fxmanifest/_resource something like

files {
   'yourfile.meta',
   'yourfile.png',
   'whatever.ytd',
}

Im pretty sure this will not work for everything, but i have read somewhere that i would work for vehicle models (I did not check if it was true)

1 Like

i’ll try it ! that’s exactly what i was looking for

it’s a custom map and it’s streamed ingame and when you put dev mode you can see that it’s downloading the stuff ingame …

It’s not. It’ll download, sure, but it won’t be used and will download again in-game.

1 Like

i don’t have such internet speed that’s why i want to download instead of stream

1 Like

any way i can make them download and use ? i’m using vice city addon addon and it’s 2gb so it will take a lot of time to stream ingame ? any other ways please

  1. try getting a better server with better speeds (https://shopstormproductions.com/ offers 10 gbps for very cheap)
  2. try optimizing the map (making it lower in size) you might need the unlocked version of the map or something like that to lower the polygons and autodesk or whatever people use
  3. just remove the map
3 Likes

solution one is not related because it uses the player download speed not the server
solution two i don’t how to , can you share a link or something
solution three is not a solution

Maybe this could turn into a feature? This is actually the main reason why I don’t use the stream system at all.

Not likely, especially not without a convincing use case.

Why would you prefer downloading beforehand to downloading in-game?

It’s going to take the exact same amount of time except players will have to wait even longer to be able to play.

Also, don’t corrupt people’s game installs by ‘not using the stream system’, please. Seriously. People might want to play on more servers than yours, or end up complaining to us that you’ve placed bullshit in their game install.

If there’s any issue or concern that you feel would be fixed by pre-downloading, report that instead. ‘Download time’ or ‘slower connections’ should be of no concern especially as, you know, pre-downloading will take just as much time and in-game downloads should have no ill effect since collision assets are already pre-downloaded with high priority and all.

Again, if you ‘need’ pre-downloading of ‘everything’, that’s rather a bug than something that needs pre-downloading.

PS: If you really want to pre-download stuff, you can already do so, and have been able to since around 2015-2016. Look at RPF_FILE, resources:/ RAGE device and the use of both in level metas. However, seriously, don’t.
PPS: The same way, you can also load >16 MiB files that wouldn’t fit in pgRawStreamer and load clothes without the subdir_file_mapping policy entry. However, again, one shouldn’t.

The main reason I don’t like it is because it is downloading the asset only when you are using it, for example, if I stream a vehicle, it won’t download it to them until someone with this vehicle will drive in their scope, and when it does happen, they won’t see it until it is fully downloaded, which can lead to some desync until it is fully downloaded.

Actually what I wanted is not downloading on the loading screen, but it’s to download at your request and not only if it’s close to the player, and maybe info whether it is already downloaded.

Let’s take the thread creator problem, for example, he wants to stream a whole map, which people won’t see until it’s downloaded, if we could request the players’ game to download it (without them going around and wait until it’s downloaded), and get info if it’s finished, we could give them something to pass the time while they are waiting for the map to download, like some minigames.

Didn’t quite understand what you wrote here, I meant I don’t download anything at all; right now I’m only using the game original assets. I don’t use a custom launcher that downloads assets or anything like that.

Lmao, didn’t even think for a millisecond that it will faster… (Why would someone think that?)

Some clever use of RequestModel already can do some of that, minus of course the dependency-download-status part. That could be doable, of course.

I doubt this user would put in the effort for a dynamic loading system, and just wanted to ‘lazily’ pre-load stuff.

That does entirely change the feature request, as well, of course: explicit pre-caching (at lower priority) of a certain stream asset or its explicit/implicit dependencies (e.g. a whole .#map cluster) would make more sense than a feature to ‘pre-load everything!’.

(similar to R*'s SRL system, perhaps, but dynamically computed, and download-aware?)

Right. The latter is somehow a common solution taken instead, as well.

OP did, for example. :stuck_out_tongue:

1 Like

that’s exactly what i meant thanks for explaining