set_bp_variable_replication
Set a Blueprint variable's replication mode to None, Replicated, or RepNotify, then compile and create the OnRep function graph when missing.
Instructions
Set a Blueprint variable's replication mode -- None / Replicated / RepNotify (RepNotify also creates the OnRep_ function graph if missing) -- then compiles and reads CPF_Net/CPF_RepNotify back. TRAP: the full green report can come back WITHOUT the flag surviving into the generated class (a variable reported is_replicated:true that never replicates; re-running this same call fixes it). The ground truth is audit_replication (its payload's replicated_variables list), then compile and re-audit -- never this return, and never one client alone.
Returns: { blueprint_name, variable_name, mode, is_replicated, is_rep_notify, rep_notify_func, property_flags } -- read back from the variable's flags after compiling, which is necessary but NOT sufficient (see the trap above).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | One of "None", "Replicated", "RepNotify" (case-insensitive). "None" also clears the RepNotify function and resets the lifetime condition. | |
| force | No | Optional. This command is REFUSED while a Play-in-Editor session is running: it either compiles a Blueprint (the reinstancer can retain a world, and CheckForWorldGCLeaks is Fatal -- it KILLS the editor) or writes to disk (Editor.AllowSavingAssetsDuringPIE=0 makes the engine refuse the write, so it would report success without writing a byte). Stop PIE and retry instead; force=true runs it anyway, at your own risk. | |
| variable_name | Yes | Name of a variable DECLARED on this Blueprint (inherited/native variables are refused). | |
| blueprint_name | No | Name (or full object path) of the Blueprint. | |
| blueprint_path | No | Alias of `blueprint_name` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `blueprint_name`. |