Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
Replication

Classes

class  Replication
 Main replication API. More...
class  RplConnectionStats
class  RplId
 Replication item identifier. More...
class  RplIdentity
 Replication connection identity. More...
class  RplNode
class  ScriptCtx
class  RplProp
class  OnRpl
class  ScriptBitReader
class  SSnapSerializerBase
class  SSnapSerializer
 Snapshot serializer utility. More...
class  RplSessionCallbacks

Typedefs

typedef int RplIdentity
typedef int RplId

Enumerations

enum  RplChannel { Reliable , Unreliable , Reliable , Unreliable }
 Communication channel. Reliable is guaranteed to be delivered. Unreliable not. More...
enum  RplChannel { Reliable , Unreliable , Reliable , Unreliable }
enum  RplCondition {
  None , OwnerOnly , NoOwner , Custom ,
  None , OwnerOnly , NoOwner , Custom
}
 Conditional replication rule. Fine grained selection of receivers. More...
enum  RplCondition {
  None , OwnerOnly , NoOwner , Custom ,
  None , OwnerOnly , NoOwner , Custom
}
enum  RplError {
  SYSTEM_FAILURE , DISCONNECTION , CONNECTION_FAILURE , TIMEOUT ,
  FLOODED , STALLED , SERVICE_FAILURE , JIP_ERROR ,
  SHUTDOWN , CREATION_FAILURE , SERVER_UNREACHABLE , SERVER_FULL ,
  PROTOCOL_MISMATCH , SYSTEM_FAILURE , DISCONNECTION , CONNECTION_FAILURE ,
  TIMEOUT , FLOODED , STALLED , SERVICE_FAILURE ,
  JIP_ERROR , SHUTDOWN , CREATION_FAILURE , SERVER_UNREACHABLE ,
  SERVER_FULL , PROTOCOL_MISMATCH
}
enum  RplError {
  SYSTEM_FAILURE , DISCONNECTION , CONNECTION_FAILURE , TIMEOUT ,
  FLOODED , STALLED , SERVICE_FAILURE , JIP_ERROR ,
  SHUTDOWN , CREATION_FAILURE , SERVER_UNREACHABLE , SERVER_FULL ,
  PROTOCOL_MISMATCH , SYSTEM_FAILURE , DISCONNECTION , CONNECTION_FAILURE ,
  TIMEOUT , FLOODED , STALLED , SERVICE_FAILURE ,
  JIP_ERROR , SHUTDOWN , CREATION_FAILURE , SERVER_UNREACHABLE ,
  SERVER_FULL , PROTOCOL_MISMATCH
}
enum  RplGameState { Loadtime , Runtime , Loadtime , Runtime }
 State of Replication related to gameplay life cycle. More...
enum  RplGameState { Loadtime , Runtime , Loadtime , Runtime }
enum  RplItemType {
  Local , Loadtime , Runtime , Local ,
  Loadtime , Runtime
}
enum  RplItemType {
  Local , Loadtime , Runtime , Local ,
  Loadtime , Runtime
}
enum  RplRcver {
  Server , Owner , Broadcast , Server ,
  Owner , Broadcast
}
enum  RplRcver {
  Server , Owner , Broadcast , Server ,
  Owner , Broadcast
}
enum  RplRole { Authority , Proxy , Authority , Proxy }
 Role of replicated node (and all items in it) within the replication system. More...
enum  RplRole { Authority , Proxy , Authority , Proxy }
enum  RplStateOverride { None , Runtime , None , Runtime }
 Used to override the current RplGameState during node hierarchy insertion. More...
enum  RplStateOverride { None , Runtime , None , Runtime }

Functions

ScriptCtx Managed Obsolete ()] enum RplGroup
void RplRpc (RplChannel channel, RplRcver rcver, RplCondition condition=RplCondition.None, string customConditionName="")
class OnRpl Write (void src, int sizeInBits)
 Writes sizeInBits bits of data to internal storage.
proto void WriteRplId (RplId val)
proto void WriteEntityId (EntityID val)
proto void WriteInt (int val)
proto void WriteIntRange (int val, int min, int max)
proto void WriteHalf (float val)
proto void WriteFloat01 (float val)
proto void WriteRadian (float val)
proto void WriteQuaternion (float val[4])
proto void WriteResourceName (ResourceName val)
proto void WriteString (string val)
 Writes a string to internal storage.
proto native int Tell ()
 Returns the current position in internal storage in bits.
void WriteBool (bool val)
void WriteFloat (float val)
void WriteVector (vector val)
ScriptBitReader Managed Serialize (inout void data, int sizeInBits)
 Serializes the data pointer. The size is the amount of bits serialized.
proto bool SerializeRplId (inout RplId val)
proto bool SerializeEntityId (inout EntityID val)
proto bool SerializeInt (inout int val)
proto bool SerializeIntRange (inout int val, int min, int max)
proto bool SerializeHalf (inout float val)
proto bool SerializeFloat01 (inout float val)
proto bool SerializeRadian (inout float val)
proto bool SerializeQuaternion (inout float val[4])
proto bool SerializeResourceName (inout ResourceName val)
proto bool SerializeString (inout string val)
bool SerializeBool (inout bool val)
bool SerializeFloat (inout float val)
bool SerializeVector (inout vector val)
SSnapSerializerBase Managed SSnapshot (int sizeInBytes)
 Binary data container used in conjuction with a serializer.

Variables

RplProp m_Channel
RplRcver m_Rcver
RplCondition m_Condition
string m_CustomCondName
class RplSessionCallbacks None = RplStateOverride.None
class RplSessionCallbacks Static = RplStateOverride.None
class RplSessionCallbacks Dynamic = RplStateOverride.Runtime

Detailed Description

Typedef Documentation

◆ RplId

typedef int RplId

Definition at line 33 of file EnNetwork.c.

◆ RplIdentity

typedef int RplIdentity

Definition at line 32 of file EnNetwork.c.

Enumeration Type Documentation

◆ RplChannel [1/2]

enum RplChannel

Communication channel. Reliable is guaranteed to be delivered. Unreliable not.

Enumerator
Reliable 
Unreliable 
Reliable 
Unreliable 

Definition at line 13 of file RplChannel.c.

◆ RplChannel [2/2]

enum RplChannel
Enumerator
Reliable 
Unreliable 
Reliable 
Unreliable 

Definition at line 13 of file RplChannel.c.

◆ RplCondition [1/2]

Conditional replication rule. Fine grained selection of receivers.

Enumerator
None 

Sent to all relevant by role only.

No lens flare set (lens flares are disabled).

OwnerOnly 

Sent to owner only.

NoOwner 

Sent to everybody but owner.

Custom 

Sent to everybody who fulfills the custom condition.

None 

Sent to all relevant by role only.

No lens flare set (lens flares are disabled).

OwnerOnly 

Sent to owner only.

NoOwner 

Sent to everybody but owner.

Custom 

Sent to everybody who fulfills the custom condition.

Definition at line 13 of file RplCondition.c.

◆ RplCondition [2/2]

Enumerator
None 

Sent to all relevant by role only.

No lens flare set (lens flares are disabled).

OwnerOnly 

Sent to owner only.

NoOwner 

Sent to everybody but owner.

Custom 

Sent to everybody who fulfills the custom condition.

None 

Sent to all relevant by role only.

No lens flare set (lens flares are disabled).

OwnerOnly 

Sent to owner only.

NoOwner 

Sent to everybody but owner.

Custom 

Sent to everybody who fulfills the custom condition.

Definition at line 13 of file RplCondition.c.

◆ RplError [1/2]

enum RplError
Enumerator
SYSTEM_FAILURE 
DISCONNECTION 
CONNECTION_FAILURE 
TIMEOUT 
FLOODED 
STALLED 
SERVICE_FAILURE 
JIP_ERROR 
SHUTDOWN 

Return to main menu / graceful application exit.

CREATION_FAILURE 
SERVER_UNREACHABLE 
SERVER_FULL 
PROTOCOL_MISMATCH 
SYSTEM_FAILURE 
DISCONNECTION 
CONNECTION_FAILURE 
TIMEOUT 
FLOODED 
STALLED 
SERVICE_FAILURE 
JIP_ERROR 
SHUTDOWN 

Return to main menu / graceful application exit.

CREATION_FAILURE 
SERVER_UNREACHABLE 
SERVER_FULL 
PROTOCOL_MISMATCH 

Definition at line 12 of file RplError.c.

◆ RplError [2/2]

enum RplError
Enumerator
SYSTEM_FAILURE 
DISCONNECTION 
CONNECTION_FAILURE 
TIMEOUT 
FLOODED 
STALLED 
SERVICE_FAILURE 
JIP_ERROR 
SHUTDOWN 

Return to main menu / graceful application exit.

CREATION_FAILURE 
SERVER_UNREACHABLE 
SERVER_FULL 
PROTOCOL_MISMATCH 
SYSTEM_FAILURE 
DISCONNECTION 
CONNECTION_FAILURE 
TIMEOUT 
FLOODED 
STALLED 
SERVICE_FAILURE 
JIP_ERROR 
SHUTDOWN 

Return to main menu / graceful application exit.

CREATION_FAILURE 
SERVER_UNREACHABLE 
SERVER_FULL 
PROTOCOL_MISMATCH 

Definition at line 12 of file RplError.c.

◆ RplGameState [1/2]

State of Replication related to gameplay life cycle.

Enumerator
Loadtime 

Game is loading main world and initializing entities.

Runtime 

Game is running.

Loadtime 

Game is loading main world and initializing entities.

Runtime 

Game is running.

Definition at line 13 of file RplGameState.c.

◆ RplGameState [2/2]

Enumerator
Loadtime 

Game is loading main world and initializing entities.

Runtime 

Game is running.

Loadtime 

Game is loading main world and initializing entities.

Runtime 

Game is running.

Definition at line 13 of file RplGameState.c.

◆ RplItemType [1/2]

Enumerator
Local 
Loadtime 
Runtime 
Local 
Loadtime 
Runtime 

Definition at line 12 of file RplItemType.c.

◆ RplItemType [2/2]

Enumerator
Local 
Loadtime 
Runtime 
Local 
Loadtime 
Runtime 

Definition at line 12 of file RplItemType.c.

◆ RplRcver [1/2]

enum RplRcver

Target of the RPC call. RPC delivery depends on multiple factors: replication mode of caller, ownership and RPC receiver value. An RPC may be dropped, executed directly on the caller, or routed to remote instances. Which remote instances will RPC be routed to depends on RplRcver value and evaluation of RplCondition.

Full routing table for RPCs:

caller mode caller is owner receiver action
Server yes Server direct call
Owner direct call
Broadcast routed call (to relevant clients)
no Server direct call
Owner routed call (to owner client)
Broadcast routed call (to relevant clients)
Client yes Server routed call (to server)
Owner direct call
Broadcast direct call
no Server dropped
Owner dropped
Broadcast direct call

Note that evaluating RplCondition can drop an RPC, even if according to routing table the call would be executed directly or routed.

Simplified version of the above table that may be easier to think about:

Mode = SERVER

Server Owner Broadcast
Owner self self all clients
Not Owner self client all clients

Mode = CLIENT

Server Owner Broadcast
Owner server self self
Not Owner drop drop self

When using broadcast, relevant clients are those who have the item through which broadcast is sent streamed in. A broadcast sent before an item is streamed to a client will not arrive on given client. When using broadcasts, you should always consider what will happen in a situation when item is streamed to the client after the broadcast has been sent.

Enumerator
Server 

Server side.

Owner 

Instance owner.

Broadcast 

Instances with proxy role.

Server 

Server side.

Owner 

Instance owner.

Broadcast 

Instances with proxy role.

Definition at line 58 of file RplRcver.c.

◆ RplRcver [2/2]

enum RplRcver
Enumerator
Server 

Server side.

Owner 

Instance owner.

Broadcast 

Instances with proxy role.

Server 

Server side.

Owner 

Instance owner.

Broadcast 

Instances with proxy role.

Definition at line 58 of file RplRcver.c.

◆ RplRole [1/2]

enum RplRole

Role of replicated node (and all items in it) within the replication system.

Enumerator
Authority 

The state will be replicated to proxies.

Proxy 

Can't replicate state to others, only receives state from authority.

Authority 

The state will be replicated to proxies.

Proxy 

Can't replicate state to others, only receives state from authority.

Definition at line 13 of file RplRole.c.

◆ RplRole [2/2]

enum RplRole
Enumerator
Authority 

The state will be replicated to proxies.

Proxy 

Can't replicate state to others, only receives state from authority.

Authority 

The state will be replicated to proxies.

Proxy 

Can't replicate state to others, only receives state from authority.

Definition at line 13 of file RplRole.c.

◆ RplStateOverride [1/2]

Used to override the current RplGameState during node hierarchy insertion.

Enumerator
None 
Runtime 
None 
Runtime 

Definition at line 13 of file RplStateOverride.c.

◆ RplStateOverride [2/2]

Enumerator
None 
Runtime 
None 
Runtime 

Definition at line 13 of file RplStateOverride.c.

Function Documentation

◆ Obsolete()

ScriptCtx Managed Obsolete ( )

Property groups that allow for replication of only part of the object.

Deprecated
Will be removed in the future (as-if all uses were RplGroup.Mandatory).

Definition at line 33 of file EnNetwork.c.

◆ RplRpc()

void RplRpc ( RplChannel channel,
RplRcver rcver,
RplCondition condition = RplCondition.None,
string customConditionName = "" )

Definition at line 95 of file EnNetwork.c.

◆ Serialize()

ScriptBitReader Managed Serialize ( inout void data,
int sizeInBits )

Serializes the data pointer. The size is the amount of bits serialized.

◆ SerializeBool()

void SerializeBool ( inout bool val)

Definition at line 259 of file EnNetwork.c.

◆ SerializeEntityId()

proto bool SerializeEntityId ( inout EntityID val)

◆ SerializeFloat()

void SerializeFloat ( inout float val)

Definition at line 260 of file EnNetwork.c.

◆ SerializeFloat01()

proto bool SerializeFloat01 ( inout float val)

◆ SerializeHalf()

proto bool SerializeHalf ( inout float val)

◆ SerializeInt()

void SerializeInt ( inout int val)

Definition at line 4 of file EnNetwork.c.

◆ SerializeIntRange()

proto bool SerializeIntRange ( inout int val,
int min,
int max )

◆ SerializeQuaternion()

proto bool SerializeQuaternion ( inout float val[4])

◆ SerializeRadian()

proto bool SerializeRadian ( inout float val)

◆ SerializeResourceName()

proto bool SerializeResourceName ( inout ResourceName val)

◆ SerializeRplId()

proto bool SerializeRplId ( inout RplId val)

◆ SerializeString()

proto void SerializeString ( inout string val)

◆ SerializeVector()

void SerializeVector ( inout vector val)

Definition at line 261 of file EnNetwork.c.

◆ SSnapshot()

SSnapSerializerBase Managed SSnapshot ( int sizeInBytes)

Binary data container used in conjuction with a serializer.

◆ Tell()

proto native int Tell ( )

Returns the current position in internal storage in bits.

Returns the current position within the buffer with byte precision.

Returns the current position in the buffer with bit precision.

◆ Write()

class OnRpl Write ( void src,
int sizeInBits )

Writes sizeInBits bits of data to internal storage.

◆ WriteBool()

void WriteBool ( bool val)

Definition at line 189 of file EnNetwork.c.

◆ WriteEntityId()

proto void WriteEntityId ( EntityID val)

Compresses a EntityID and writes it to internal storage. The resulting data is about 1 to 8 bytes in size.

◆ WriteFloat()

void WriteFloat ( float val)

Definition at line 190 of file EnNetwork.c.

◆ WriteFloat01()

proto void WriteFloat01 ( float val)

Compresses a float into <0;1> range and writes it to internal storage. The resulting data is 1 byte in size.

◆ WriteHalf()

proto void WriteHalf ( float val)

Compresses a float into a half and writes it to internal storage. The resulting data is 2 bytes in size.

Warning
Half only gives you about 64k +/- of range for the decimal part.

◆ WriteInt()

proto void WriteInt ( int val)

Compresses an integer and writes it to internal storage. Compression goes down to the byte level. Therefore, the resulting data is about 1 to 4 bytes in size.

Warning
If you know the range is constant use WriteIntRange() instead.

◆ WriteIntRange()

proto void WriteIntRange ( int val,
int min,
int max )

Compresses an integer and writes it to internal storage. Compression uses only as many bits as necessary taking the range defined by {min..max} into account.

Warning
Use this only when you know the range is constant!

◆ WriteQuaternion()

proto void WriteQuaternion ( float val[4])

Compresses a quaternion and writes it to internal storage. The resulting data is 4 byte in size.

◆ WriteRadian()

proto void WriteRadian ( float val)

Compresses an angle in radians and writes it to internal storage. The resulting data is 1 byte in size.

◆ WriteResourceName()

proto void WriteResourceName ( ResourceName val)

Writes a ResourceName to internal storage. The resulting data is 8 byte in size.

◆ WriteRplId()

proto void WriteRplId ( RplId val)

Compresses a RplId and writes it to internal storage. The resulting data is about 1 to 4 bytes in size.

◆ WriteString()

proto void WriteString ( string val)

Writes a string to internal storage.

◆ WriteVector()

void WriteVector ( vector val)

Definition at line 191 of file EnNetwork.c.

Variable Documentation

◆ Dynamic

◆ m_Channel

RplProp m_Channel

RPC annotation attribute. Use to mark method as RPC method. Remote call is executed via Rpc(Method, Arg1, Arg2, ...).

◆ m_Condition

RplCondition m_Condition

Definition at line 92 of file EnNetwork.c.

◆ m_CustomCondName

string m_CustomCondName

Definition at line 93 of file EnNetwork.c.

◆ m_Rcver

RplRcver m_Rcver

Definition at line 91 of file EnNetwork.c.

◆ None

class RplSessionCallbacks None = RplStateOverride.None

◆ Static