> For the complete documentation index, see [llms.txt](https://venty.gitbook.io/cmc-plus/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://venty.gitbook.io/cmc-plus/usage/capturenetworkstate.md).

# CaptureNetworkState

**CaptureNetworkState** is the core structure used by CMC PLUS to manage custom Network Prediction data.

This system represents your custom movement prediction packet and is responsible for continuously reading and writing data that needs to participate in the prediction process.

The main purpose of **CaptureNetworkState** is to extend Unreal Engine's default Character Movement Component network packet by allowing custom prediction data to be included alongside the existing movement data.

By adding your own data into this prediction state, CMC PLUS can synchronize custom movement variables while keeping them aligned with Unreal Engine's native movement prediction timing.

***

### <mark style="color:$primary;">How It Works</mark>

CaptureNetworkState works by taking supported Blueprint properties as references and managing their conversion between normal values and network-ready byte data.

Currently supported property types include:

* Boolean
* Byte
* Float
* Double
* Integer (Int32)
* Integer (Int64)
* Vector
* Rotator
* Vector2D

These values are handled by the system and converted into a format that can be written into and read from the movement prediction packet.

This allows custom movement states and gameplay variables to become part of the prediction pipeline without manually creating the entire serialization process.

***

### <mark style="color:$primary;">Purpose and Usage</mark>

The main purpose of **CaptureNetworkState** is to provide a controlled way to include the data your custom movement system actually needs.

Examples of possible usage:

* Custom movement states
* Sprint states
* Dash information
* Movement modes
* Ability-related movement values
* Gameplay-specific prediction variables

However, adding unnecessary data should be avoided.

Although CMC PLUS provides optimization techniques for managing prediction data, the developer is still responsible for deciding which values should participate in the network prediction process.

Sending excessive data can result in larger movement packets and unnecessary network traffic.

***

### <mark style="color:$primary;">Simplifying Custom Prediction</mark>

Normally, adding custom values to Unreal Engine's movement prediction packet requires multiple steps and modifications across different parts of the Character Movement system.

CMC PLUS simplifies this workflow by allowing developers to register and manage custom prediction data through a single structured system.

Instead of repeatedly creating custom packet handling logic, CaptureNetworkState provides a reusable management layer for extending movement prediction.

***

### <mark style="color:$success;">Summary</mark>

**CaptureNetworkState is a fundamental building block of CMC PLUS.**

It is designed to manage custom movement prediction data, extend the default Character Movement packet structure, and provide a cleaner workflow for creating advanced multiplayer movement systems.

By using CaptureNetworkState, developers can create and organize additional movement behaviors while keeping prediction logic structured, maintainable, and easier to manage.
