The RefID type is a wrapper around a ulong value which represents a pointer to a world element. Every Type:IWorldElement stores a unique RefID as its ReferenceID
field. It is primarily an internal engine type and is not meant to be used directly.
Internal mechanism
RefIDs use their least significant byte to represent the allocation id of a user who allocated the world element, and the remaining bytes are used to represent which world element it's pointing to.
term
A RefID is considered as "null" if and only if it's representation is equal to 0.
RefIDs are considered as "equal" if and only if their representation is equal.
A RefID is considered as "local" if and only if "user allocation id" is 255.
Stringify format
A RefID is converted to string which value is hexadecimal representation value followed by a fixed string ID
.
Example: IDA1B2C3D4
.
See also
- Ref Hacking - unsupported way to achieve flexible operation on components