Skip to content

Networking

5 tools for dedicated servers and network info.

Back to the index.

get_dedicated_server_status

Read-only

Polls the state of the most recent launch_dedicated_server job: running / finished / canceled, with elapsed time and a tail of captured process output. Honest has_server:false if no server was ever launched this editor session.

No parameters.

Returns: { has_server: bool, running?: bool, finished?: bool, canceled?: bool, exit_code?: int, command_line?: string, elapsed_seconds?: number, output_tail?: string }

get_network_info

Read-only

Read a network snapshot of the editor world, never a PIE world: its net mode (with its code and the server/client flags); whether it has a net driver, and the driver's class, tick rates and client connection count; every replicating actor with its class, local and remote role and dormancy, optionally only those with one local role; when they exist, the GameState (class, player count, each player) and the first PlayerController; and the session keys of the [OnlineSubsystem] engine config. The editor world normally has no net driver, GameState or PlayerController, so net_driver_info comes back empty and those two blocks are left out. Nothing is written; without an editor world it is an error. One actor in detail: get_actor_replication_info; a whole-project Blueprint sweep: audit_replication.

Parameter Type Required Description
role_filter string no Optional local role to keep in replicated_actors: Authority, SimulatedProxy, AutonomousProxy or None (case-insensitive); omitted lists every replicating actor. Any other value is an error.

Returns: { world_name: string, world_valid: bool, net_mode: string, net_mode_code: int, is_server: bool, is_client: bool, has_net_driver: bool, net_driver_info: { class?: string, max_net_tick_rate?: number, net_server_max_tick_rate?: number, connection_count?: number }, replicated_actors: [{ name: string, class: string, local_role: string, remote_role: string, is_replicated: bool, net_dormancy: string }], replicated_actor_count: number, role_filter?: string, has_game_state: bool, game_state_info?: { class: string, player_count: number, is_valid: bool, players: [{ player_name: string, player_id: number, is_valid: bool, player_class: string }] }, player_controller_info?: { class: string, is_valid: bool, is_local_player: bool }, config_settings: { default_platform_service?: string, default_identity_interface?: string, max_players: number, use_dedicated_server: bool } }

launch_dedicated_server

Destructive

Relaunches the CURRENT editor binary with "-server -log": a real, non-rendering, network-listening game instance (GIsServer=true/GIsClient=false/GIsEditor=false -- confirmed via UE 5.8 source: StaticDedicatedServerCheck/SetIsRunningAsDedicatedServer in LaunchEngineLoop.cpp, FApp::CanEverRender()==false whenever IsRunningDedicatedServer()). This is honestly NOT a Server.Target.cs shipping build (still the full editor binary, WITH_EDITOR=1) -- it closes only the TESTABLE half of the dedicated-server gap; real server packaging is out of scope. Async, like start_package_build: returns immediately once the process is launched, poll get_dedicated_server_status for output/exit; the server never exits on its own, so call stop_dedicated_server to terminate it. Refuses to launch a second server while one is already running (honest, not silently queued/clobbered).

Parameter Type Required Description
extra_args string no Optional raw extra command-line arguments appended verbatim after "-server -log" (e.g. "-port=8888").

Returns: { server_started: bool, already_running: bool, command_line: string, note: string }

set_network_authority

Destructive Idempotent

Set the local net role (AActor::SetRole) of an editor-world actor, found by object name rather than label, to Authority, SimulatedProxy, AutonomousProxy or None (case-insensitive; any other value is an error before anything changes). Only that placed instance's in-memory Role changes: RemoteRole and replication settings stay as they are, there is no undo entry and the level is not marked dirty. authority_set compares the role read back with the request. Read roles with get_actor_replication_info (one actor) or get_network_info (every replicated actor, filterable by role); choose what replicates with set_properties.

Parameter Type Required Description
actor_name string yes Object name of the editor-world actor (case-insensitive); labels are not matched
authority string yes The network authority role to set; valid values: Authority, SimulatedProxy, AutonomousProxy, None

Returns: { actor_name: string, authority_set: bool, previous_authority: string, requested_authority: string, actual_authority: string, actor_valid: bool, actor_class: string }

stop_dedicated_server

Destructive

Terminates the in-progress dedicated server, if one is running (honest no-op otherwise). FMonitoredProcess::Cancel(true) kills the whole process tree.

No parameters.

Returns: { stopped: bool, was_running: bool }