ZSystem Components - MarvelProgramming/Valheim-Networking-Wiki GitHub Wiki

ZNet

Handles basic interactions with clients and a server. e.g. player joining server, password change, kicking, banning, playerlist, etc. There's only 1 of these in the game scene.

ZNetPeer

Provides basic information about a connected client. E.g. player name, character id, whether they're the server or not, uid, a ZRpc instance, etc. One is created for each client that connects to the server. It contains a ZRpc instance which is configured (by ZNet) to communicate things like disconnecting, server handshaking, whether they were kicked or not, etc.

ZNetScene

There's only 1 of these in the game scene

ZNetStats

Need more info...

ZNetView

Need more info...

ZNtp

Need more info...

ZDO

A container for networking information about an individual gameobject. E.g. position, velocity, rotation, scale, etc. Has "IsOwner" method which compares its "m_owner" instance field against the ID of the ZDOMan its assigned to.

ZDOID

A data container for an individual client's UID

ZDOMan

Seems to manage one or more ZDO objects by organizing them into "sectors" based on position. There's only one of these, which is created by the ZNet instance on Awake. A static instance is available at all times. Its ID is generated by hashing the local client's ip and is used to determine if a ZDO instance "IsOwner" (See ZDO for more info). Is able to add peers to a list, and registers a "ZDOData" method to their ZRpc instance.

ZDOPool

Need more info...

ZDOPeer

Need more info...

ZRoutedRpc

Only one of these are in the game scene at a time and it's created by ZNet on Awake. It's uid is assigned the same value as ZDOMan's. A static instance is available at all times.

ZRpc

Essentially a client that responds to messages/pings/etc and sends messages via a socket

ZPackage

Is a wrapper for storing/retrieving binary data. Mostly used for sending messages across the network

ZSyncAnimation

Need more info...

ZSyncTransform

Syncs a transform object with other clients on the server. Performs an "owner sync" and "client sync". Both reference "zdo.IsOwner" one or more times.