Skip to content

Config

15 tools. Back to the index.

add_collision_channel

Additive, idempotent.

Register a custom project collision channel (claims the first free ECC_GameTraceChannelN slot). Idempotent on channel_name.

Parameter Type Required Description
channel_name string yes Friendly name for the new channel, e.g. "Harvestable"
default_response string no "Block" | "Ignore" | "Overlap". Defaults to "Block".
trace_type boolean no True for a trace channel, false for an object channel. Defaults to false.
static_object boolean no Whether this channel represents a static object type. Defaults to false.

Returns: { channel_name: string, channel: string, default_response: string, trace_type: bool, static_object: bool, already_existed: bool, note: string }

add_collision_profile

Destructive.

Create a project collision profile, or replace an existing one of that name in full (omitted fields reset, custom responses cleared, can_modify not checked), then write Config/DefaultEngine.ini via TryUpdateDefaultConfigFile, unverified. Returns custom_response_count and already_existed; read it back with get_collision_profile.

Parameter Type Required Description
profile_name string yes Name of the collision profile to create or replace, e.g. "MyPawnProfile"
object_type_name string yes Channel this profile's object type resolves to, e.g. "WorldDynamic" or a custom channel's friendly name
collision_enabled string no "NoCollision" | "QueryOnly" | "PhysicsOnly" | "QueryAndPhysics" | "ProbeOnly" | "QueryAndProbe". Defaults to "QueryAndPhysics".
custom_responses array no [{channel: string, response: "Block"|"Ignore"|"Overlap"}, ...] per-channel overrides
can_modify boolean no Whether this profile is user-editable in the editor UI. Defaults to true.
help_message string no Editor tooltip text.

Returns: { profile_name: string, object_type_name: string, collision_enabled: string, custom_response_count: int, already_existed: bool }

diff_project_config

Read-only.

Diff THIS project's Config/Default*.ini against ANOTHER project's, aligned by section+key (pure file read via FConfigFile::Read; no world, no editor state). Surfaces settings that differ or failed to migrate: custom collision channels (GameTraceChannel/ObjectChannel under [/Script/Engine.CollisionProfile]), input mappings, enabled plugins ([Plugins]/[/Script/...]), and every other key. Perspective is THIS -> OTHER: 'added' = present in OTHER but not THIS; 'removed' = present in THIS but not OTHER; 'changed' = present in both with different value(s). Multi-value keys (array-of-struct like +Channels/+ActionMappings) are compared as sorted value lists so hash-ordering never yields a false diff.

Parameter Type Required Description
other_project_dir string yes Filesystem path to the OTHER project. Either the project ROOT (its 'Config' subfolder is used automatically) or a Config folder directly.
files array no Optional array of ini base filenames to compare (e.g. ["DefaultEngine.ini","DefaultInput.ini"]). Default: the union of Default*.ini present in EITHER project's Config folder.
sections array no Optional array of exact section names to restrict the diff to (e.g. ["/Script/Engine.CollisionProfile","/Script/EngineSettings.GameMapsSettings"]). Default: all sections.

Returns: { this_project_dir: string, other_project_dir: string, this_config_dir: string, other_config_dir: string, files: [ { file: string, this_exists: bool, other_exists: bool, this_section_count: int, other_section_count: int, added: [{ section, key, values:[string] }], removed: [{ section, key, values:[string] }], changed: [{ section, key, this_values:[string], other_values:[string] }], added_count: int, removed_count: int, changed_count: int } ], total_added: int, total_removed: int, total_changed: int, identical: bool }

get_collision_profile

Read-only.

Read one project collision profile by name, read-only: object_type_name, collision_enabled, can_modify, help_message and custom_responses [{channel, response}], which lists only the per-channel overrides. An unknown name is an error; add_collision_profile is the writer.

Parameter Type Required Description
profile_name string yes Name of an existing collision profile, e.g. "BlockAll" or "Pawn"

Returns: { profile_name: string, object_type_name: string, collision_enabled: string, can_modify: bool, help_message: string, custom_responses: [{channel: string, response: string}] }

get_component_properties

Read-only.

Read every editable or Blueprint-visible property of one component, with its current value as text, plus whether it is active and registered, without changing anything: the read-back for set_component_property. Pass actor_name for a placed actor (world picks the editor instance or a live PIE world) or blueprint_name for a Blueprint component template.

Parameter Type Required Description
component_name string yes Name of the component: its object name on a placed actor, or its SCS variable or native subobject name in a Blueprint.
actor_name string no Object name, else editor label, of the placed actor that owns the component; ignored when blueprint_name is given.
world string no Optional world selector: absent/'editor' (default) reads the frozen editor archetype/CDO (pre-BeginPlay defaults); 'server' (the PIE world with authority -- what you want for replicated state in co-op) | 'client' | 'pie:N' | 'pie' (ambiguous) resolve the LIVE running PIE actor+component so runtime-mutated values (e.g. Health after BeginPlay) are returned; 'game' is an alias of 'pie'. Only affects the actor_name path; ignored for blueprint_name.
blueprint_name string no Blueprint whose component template to read, by short name (searched under /Game/Blueprints, then the whole project) or asset path such as "/Game/Characters/BP_Hero"; it wins over actor_name, and world is ignored.

Returns: { actor_name: string, component_name: string, component_class: string, properties: [{...}], properties_count: int, editable_properties_count: int, blueprint_visible_properties_count: int, public_properties_count: int, component_owner: string, component_is_active: bool, component_is_registered: bool, component_creation_method: string, world: string, world_name: string|null, world_package: string|null, world_type: string|null, net_mode: string|null, pie_instance: number }

get_default_game_map

Read-only.

Read UGameMapsSettings EditorStartupMap and GameDefaultMap from the in-memory CDO, and (by default) ALSO from Config/DefaultEngine.ini on disk so a memory-only write cannot masquerade as a persisted one.

Parameter Type Required Description
include_disk_value boolean no Optional bool, default true. Also read the same two keys straight out of Config/DefaultEngine.ini with FConfigFile::Read (never GConfig) and report disk_value + memory_matches_disk.

Returns: { editor_startup_map: string, game_default_map: string, ini_path: string, disk_value: { editor_startup_map: string, game_default_map: string }, memory_matches_disk: bool, disk_checks: [object] }

get_project_info

Read-only.

Read the project metadata from the in-memory UGeneralProjectSettings defaults (Project Settings, Description), read-only. Returns project_name, project_version, company_name, company_distinguished_name, copyright_notice, description, homepage, licensing_terms, privacy_policy and support_contact, as strings that may be empty.

No parameters.

Returns: { project_name: string, project_version: string, company_name: string, company_distinguished_name: string, copyright_notice: string, description: string, homepage: string, licensing_terms: string, privacy_policy: string, support_contact: string }

get_project_settings_value

Read-only.

Read one property of a settings class default object (CDO) as its ExportText string; this is the in-memory value, not re-read from the .ini on disk. Returns class_name, property_name and value; an unknown class or property is an error. set_project_settings_value is the writer.

Parameter Type Required Description
class_name string yes Short name of a loaded UDeveloperSettings subclass without the U prefix (e.g. "PhysicsSettings"), or a /Script/Module.Class path
property_name string yes Name of the property on the settings class, e.g. "DefaultGravityZ"

Returns: { class_name: string, property_name: string, value: string }

list_collision_channels

Read-only.

List every collision channel (built-in + custom) with its default response.

No parameters.

Returns: { channels: [{channel: string, friendly_name: string, value: int, default_response: string, is_custom_game_slot: bool, in_use: bool}], count: int }

list_project_setting_sections

Read-only.

List every loaded, concrete UDeveloperSettings subclass (the Project/Editor Settings sections) without loading new modules, read-only. Returns count and sections [{class_name, class_path, container_name, category_name, section_name, section_text}]; pass class_name to get_project_settings_value or set_project_settings_value.

No parameters.

Returns: { count: int, sections: [object] }

rerun_construction_scripts

Destructive.

Run AActor::RerunConstructionScripts() on a level actor: destroys every construction-script-generated component and rebuilds it, exactly as dragging the actor in the editor would. This is the ONLY way to reach that function from MCP -- it is ENGINE_API and public but NOT a UFUNCTION, so reflection, call_function and execute_python cannot see it. Use it to find out what a property edit really survives, or to re-apply a Blueprint's construction logic after editing the instance. Reports the before/after component sets instead of a bare success.

Parameter Type Required Description
actor_name string yes Object name (or editor label) of the actor to reconstruct
world string no Optional world selector: absent/'editor' (default) reconstructs the actor in the editor world; 'server' | 'client' | 'pie:N' | 'pie' (ambiguous) target the LIVE Play-In-Editor actor instead; 'game' is an alias of 'pie'. There is no other side effect.

Returns: { actor_name: string, resolved_actor_name: string, actor_label: string, actor_class: string, world: string, has_non_trivial_user_construction_script: bool, actor_survived: bool, components_before: int, components_after: int, component_names_before: [string], component_names_after: [string], destroyed_component_names: [string], created_component_names: [string], verification: object, verification_checks: [object], world_name: string|null, world_package: string|null, world_type: string|null, net_mode: string|null, pie_instance: number }

set_component_property

Destructive, idempotent.

Set the value of any property on a level actor's component via the canonical JSON->property importer (mcp_common::SetObjectProperty). Handles every FProperty kind: object/soft-object/class/soft-class refs (by "/Game/..." path string), enums (by name), FGameplayTag/FGameplayTagContainer (registry-validated), nested structs, arrays, sets and maps -- not just scalars, FVector, FRotator and FLinearColor. WARNING: it writes the EDITOR world BY DEFAULT even while PIE is running, and that is deliberate, not a bug: it is the only MCP route to a property Python's set_editor_property refuses (CPF_DisableEditOnInstance), and because the edit lands in the editor instance the NEXT PIE session already starts with it. The flip side is that a value written mid-PIE does NOT reach the running actor -- so to hit the live one you must ask for it: world='server' | 'client' | 'pie:N'. The reply stamps world_name/world_package/world_type/net_mode/pie_instance, so success:true says WHICH world was written (world_package is the field carrying the UEDPIE_N prefix -- in a World Partition map the UWorld keeps the map's own name).

Parameter Type Required Description
actor_name string yes Name of the actor containing the component. Matched against the actor's OBJECT name (GetName) only -- not its editor label.
component_name string yes Name of the component
property_name string yes Name of the property to set
property_value any no New value. Any JSON type: a bare string (e.g. "/Game/Foo.Foo" object path, "Movable" enum name, "A.B.C" gameplay tag, "(X=1,Y=2,Z=3)" struct text), a number/bool, or nested JSON (a struct object, an array for array/set/tag-container props, an object for map props). Strings still import via ImportText_Direct so prior callers keep working.
world string no Optional world selector: absent/'editor' is the DEFAULT -- it writes the editor world even with PIE running, which is what persists into the next PIE and what makes CPF_DisableEditOnInstance reachable; 'server' (the live PIE world with authority) | 'client' | 'pie:N' write the RUNNING actor instead; 'pie' is the ambiguous resolution and 'game' its alias. An unrecognised value FAILS with a message naming what was asked for and listing the worlds that exist -- it never falls back to another world in silence.
verify_persistence boolean no Optional bool, default false. When true, run AActor::RerunConstructionScripts() and re-read the property to find out whether the value SURVIVES the User Construction Script. Without this, value_changed:true is measured BEFORE the UCS runs, so a property the UCS recomputes (the classic case: RelativeScale3D on a spline/box the UCS rescales) reports as changed and is silently reverted a moment later. Costs a full component rebuild of that actor, and it re-runs in whichever world you selected.

Returns: { actor_name: string, component_name: string, property_name: string, property_type: string (FProperty class name), old_value: string, new_value: string (== final applied value), final_value: string (real value read back off the component), success: bool, value_changed: bool, component_class: string, component_is_active: bool, component_is_registered: bool, world: string (the selector actually used), world_name: string|null, world_package: string|null, world_type: string|null, net_mode: string|null, pie_instance: number }. With verify_persistence=true it also returns { construction_scripts_rerun: bool, has_non_trivial_user_construction_script: bool, post_construction_value: string, survives_construction_script: bool, persistence_note: string, verification: object, verification_checks: [object] }. On failure returns { success:false, error: <precise reason from the importer, or from the world resolver> }.

set_default_game_map

Destructive, idempotent.

Set UGameMapsSettings EditorStartupMap / GameDefaultMap, persist them to the VERSIONED Config/DefaultEngine.ini (TryUpdateDefaultConfigFile) and re-read that .ini FROM DISK to prove it landed.

Parameter Type Required Description
editor_startup_map string no Optional long package path of the editor startup map
game_default_map string no Optional long package path of the default game map
verify_disk boolean no Optional bool, default true. Re-read Config/DefaultEngine.ini with FConfigFile::Read (never GConfig, which is the in-memory cache) and report disk_value per map.

Returns: { editor_startup_map: string, game_default_map: string, ini_path: string, is_default_config_class: bool, versioned_ini: bool, write_reported: bool, persist_method: string, disk_value: { editor_startup_map: string, game_default_map: string }, disk_checks: [object], verification: object, verification_checks: [object] }

set_physics_gravity

Destructive, idempotent.

Set UPhysicsSettings DefaultGravityZ, persist it to the VERSIONED Config/DefaultEngine.ini (TryUpdateDefaultConfigFile) and re-read that .ini FROM DISK to prove it landed.

Parameter Type Required Description
gravity_z number yes World Z component of gravity
verify_disk boolean no Optional bool, default true. Re-read Config/DefaultEngine.ini with FConfigFile::Read (never GConfig) and report disk_value / disk_matches_memory.

Returns: { gravity_z: number, ini_path: string, is_default_config_class: bool, versioned_ini: bool, write_reported: bool, persist_method: string, ini_section: string, ini_key: string, disk_present: bool, disk_value: string, disk_matches_memory: bool, verification: object, verification_checks: [object] }

set_project_settings_value

Destructive, idempotent.

Write a UDeveloperSettings property, persist it to the VERSIONED Config/Default*.ini (TryUpdateDefaultConfigFile for defaultconfig classes, SaveConfig otherwise) and re-read that .ini FROM DISK to prove it landed.

Parameter Type Required Description
class_name string yes Class short name or /Script/Module.Class path
property_name string yes Name of the property on the settings class
value string yes New value as a string (ImportText format)
verify_disk boolean no Optional bool, default true. Re-read the target .ini with FConfigFile::Read (never GConfig, which is the in-memory cache and would just echo the write back) and report disk_value / disk_matches_memory.

Returns: { class_name: string, property_name: string, round_tripped_value: string, ini_path: string, is_default_config_class: bool, versioned_ini: bool, write_reported: bool, persist_method: string, ini_section: string, ini_key: string, property_is_config: bool, disk_present: bool, disk_value: string, disk_values: [string], disk_matches_memory: bool, verification: object, verification_checks: [object] }