A while ago, the FiveM client/server got support for ‘Infinity’ mode for OneSync, which combines player entity culling, player culling and (hopefully temporary) removal of automatically-generated population.
This post seeks to quickly detail some commonly-asked questions.
What is OneSync: Infinity?
- A mode allowing (up to) 1024 players at this time. We have only tested 600-ish in load tests since we couldn’t get any more players, but it held up quite well in the end (on a server with minimal resources)
- To accomplish this, it uses the following technological changes:
- Removal of population to save object ID pool space. You can still create (some) synced/networked peds using script, however.
- Player ped/vehicle culling. No entities will be created on clients outside a ‘focus zone’, which currently is hardcoded to 300 units around a player. We’re still looking for a better algorithm.
- Player culling. No players will be created/deleted locally outside of the focus zone too. This means that all player iteration will have to happen server-side.
- It also has a bit better performance than ‘plain’ OneSync at this time due to player ped culling, and works around the so-called ‘head blend bug’.
What are the gotchas?
- A new common crash:
kilo-xray-tango. It’s quite rare depending on how densely packed players are, figuring out a consistent repro would be very welcomed!
- Automatic population is disabled as otherwise you’d run out of object IDs around 200-300 players. (a global maximum of 8192 spawned entities exists at this time)
- You need a Platinum subscription, or a ‘manually granted Infinity’ group membership at this time. Once it’s developed further, we may consider allowing tiered player caps for lower Patreon subscriber tiers.
- A number of scripts will need changing. Admin menus, ‘teleport to player’ UI and scoreboards definitely won’t work directly. Loops are still up to 256 max (or using GET_ACTIVE_PLAYERS), but will only find nearby players.
How do I use it?
- Make sure your key has a
premium: ptsubscription identity. You can generally see this on keymaster.
+set onesync_enableInfinity 1to your server startup command line - it won’t work if you add it in the .cfg.
- Make sure
sv_maxclientsare set appropriately.
- Fix scripts that end up showing incomplete lists.
Everyone’s instanced, I only see myself?
That’s supposed to happen. Get closer to other players, and fix your player listing scripts.
How do I get all players on the client?
Not at this time, we’re still investigating efficient ways to send this data along. Currently, you should use server/latent server events for this.
We expect people to release a few helpful helpers in the #development:releases section for this.
Why is X built-in feature showing an incomplete list?
Report it! #general-discussion:1s-reports
Why is this paid?
It just is. This might change after the Commerce release.