container
Edit individual elements of array, map, and set properties.
What it’s for
Unreal objects hold a lot of their state in collection properties: an array of waypoints, a
map of tags to values, a set of allowed classes. This area gives your assistant per-element edits
on those TArray, TMap, and TSet properties of any object,
grouped under container.array, container.map, and
container.set.
Use it when you want to change one entry, not the whole collection: append a value, set the item at an index, put or remove a key in a map, add or drop a set member. It also covers the read and existence checks you need before editing, such as fetching a map's keys or asking whether a key or set element is already present.
Reach for it instead of property.set whenever re-sending the entire collection would
be wasteful. property.set replaces a property wholesale with a full new value; the
container.* operations are the incremental alternative, editing a single element in
place while leaving the rest of the collection untouched.
Examples
Append an item to an array property
Add one entry to the end of an array without rewriting the whole list.
You: Add "/Game/Tracks/Canyon" to the AllowedTracks list on the game mode.
call("container.array.append", {objectPath:"/Game/BP_RaceMode.Default__BP_RaceMode_C",
propertyName:"AllowedTracks", value:"/Game/Tracks/Canyon"})
→ {ok:true}
Done. Appended one entry to AllowedTracks.
Set a value in a map property
Put a single key into a map, only touching that one entry.
You: On the config object, set the "maxPlayers" score limit to 8.
call("container.map.has_key", {objectPath:"/Game/DA_MatchConfig",
propertyName:"ScoreLimits", key:"maxPlayers"})
→ {contains:false}
call("container.map.set", {objectPath:"/Game/DA_MatchConfig",
propertyName:"ScoreLimits", key:"maxPlayers", value:8})
→ {ok:true}
Done. ScoreLimits["maxPlayers"] set to 8.
Add a member to a set property
Insert one element into a set; existing members stay as they are.
You: Add the "Fog" tag to the enabled weather effects set.
call("container.set.add", {objectPath:"/Game/BP_Weather.Default__BP_Weather_C",
propertyName:"EnabledEffects", value:"Fog"})
→ {ok:true}
Done. Added "Fog" to EnabledEffects.