Virtual Worlds/Dimensions

http://wiki.sa-mp.com/wiki/SetPlayerVirtualWorld

Virtual Worlds are basically spaces where players can only interact with other players who are in the same world. In SA-MP it worked by setting a vehicle/object/player’s virtual world to a number and you would only be able to interact with them if you were in the same world.

In FiveM I haven’t found anything similiar other than instances, but they aren’t the right solution. Footsteps, Explosions and Peds are still synced.

1 Like

Though this is a nice idea, is it a big issue that explosions, peds ect are synced? Could you not use a god mode of sorts to ensure the separation if required?

“Virtual Worlds” were a feature of the RenderWare game engine. It’s not a part of the RAGE Engine, so you can’t just “add it”.

The problem is explosions also carry shockwaves which could unsettle cars in a race for example and other types of game modes. Peds wouldn’t be a big issue to me personally since I don’t plan on using them in my current project, but it might be for someone else.

I haven’t checked how it works exactly, but I’ve seen this feature in another multiplayer client.

Maybe some of these natives could be made use of?
https://runtime.fivem.net/doc/natives/#n_NETWORK
Possibly we can control the session and maybe find a way to bring a player in and out of them.

1 Like

I could see someone making a resource to simulate player Virtual Worlds but it definately wouldnt be easy and some things would still be synced unfortunately.

Not going to happen for legacy networking, and not a high-priority feature for 1s. Intent is to implement this in a slightly different way from the traditional ‘just set a number hurr durr’, both to discourage people trying to use this for interiors, as well as to allow for added flexibility.

2 Likes

At the moment how would multi-gamemode (not in rotation, but simultaneously) servers be possible or an apartment system like we’ve seen in gtao?

1 Like

This doesn’t use a “dimension” system, but simply uses normal natives to hide other players/their related entities, along with some likely undocumented natives to disable some more stuff.

1 Like

what do you propose such a feature be used for then, aside from interiors and instances where you need multiple players in the same spot to not see each other?

For that you shouldn’t use such a feature even since that means this won’t work (see timestamp, not sure if forums retain it):

I feel like I speak for a majority of developers when I say we’re willing to sacrifice seeing jets and planes in windows for the ease of assigning players to different worlds with “just set a number hurr durr”.

3 Likes

I think the best way is for the elements or anyone for that matter to document more of the

If we can get the natives, then we can duplicate what GTAO has done.

4 Likes

GTAO already got this feature, try to get in the same house with your friends(they need to get in their own house of course) :smiley: you won’t see/attack/hear them in the same interior

yes, that’s the definition of these ‘undocumented natives’, use the decompiled scripts to try to find them, so far nobody has however

I’ll try it later, it could be contained in Ped or Entity section I guess :wink:

Start a loop, for every player in “instance” who’s not yours : SetPedConfigFlag 62 to true to disable collisions (Doors & Footsteps included since your game will make them pass through any object), SetEntityVisible to false to hide them, Rockstar disable weapons & melee when your inside appartments so you can do the same or make other players untargettable with SetPedCanBeTargetted, For voice, change on your system (Depends of the system), and there you go

3 Likes

UnknownModder found how they do that

5 Likes

This is what I’ve been looking for!! sorry for borther u… it’s been a year :sweat_smile:

1 Like
7 Likes