Saltar al contenido principal

Kit save

19 herramientas. Generado a partir del código fuente del plugin; no lo edites a mano.

Las descripciones de las herramientas y de los argumentos se muestran en inglés porque reflejan el schema de las herramientas (el mismo texto que el agente recibe en tools/list).

Guía​

Start by inspecting the concrete SaveGame class: save.inspect_class {class} lists default values and whether every reflected property actually has the SaveGame flag. save.write creates a slot from that class and only accepts values for writable SaveGame properties. save.read, save.get_property, and save.validate always load through the platform save system and return a clear missing/corrupt result instead of treating a file as valid.

Use save.set_property for a focused existing-slot change; save.reset_property restores the class default. save.reset_slot writes a complete class-default slot. save.copy_slot preserves the serialized object class, while save.migrate copies only same-name, same-type SaveGame fields into a chosen new class and returns skipped-field reasons. Compare before deleting or replacing a slot with save.compare and use save.validate_many for a bounded batch audit.

Raw save.read_bytes / save.write_bytes are recovery tools, not a format editor. The write is Risk 4 because invalid bytes can make a slot unloadable. Unreal exposes no cross-platform public slot listing or header reader, so this kit does not invent either.

Creating a schema: save.create_save_game_class {folder, name, variables:[{key:"Score",value:"int"}]} creates and compiles a SaveGame Blueprint whose variables all carry the SaveGame flag (types: bool, int, int64, float, string, name, text, vector, rotator, transform). Pass its path as class to save.write. Values use Unreal text syntax (42, Smoke, (X=1,Y=2,Z=3)).

In the editor, slots are files under <Project>/Saved/SaveGames/<slot>.sav. save.delete removes one; save.delete_many {slots:[...]} removes several and reports missing ones instead of failing.

Herramientas​

Leyenda. riesgo 0 = solo lectura, 1 = operación inofensiva del editor, 2 = modifica un asset, 3 = elimina/reemplaza un asset, 4 = proyecto/configuración/build, 5 = potencialmente destructivo (las llamadas por encima de MaxAutoRisk requieren "_confirm": true). modifica = se ejecuta en una transacción (edit.undo la revierte). requiere PIE / requiere mundo = se rechaza sin una sesión PIE / sin un nivel abierto. requiere el plugin = no disponible cuando el plugin está desactivado. dryRun = acepta el argumento dryRun. smoke = cubierto por edit.self_test.

save.compare (riesgo 1, smoke)​

Sin descripción.

ArgumentoTipoDescripción
firstSlotstringobligatorio. First plain slot name.
secondSlotstringobligatorio. Second plain slot name.
userIndexintegerPlatform user index used for both slots. Valor predeterminado 0.

Devuelve: equal, different, firstOnly, secondOnly.

save.copy_slot (riesgo 3, modifica, smoke)​

Sin descripción.

ArgumentoTipoDescripción
destinationSlotstringobligatorio. Destination plain slot name.
destinationUserIndexintegerDestination platform user index; -1 keeps userIndex. Valor predeterminado -1.

Devuelve: slot, userIndex, exists, valid, class, byteCount, properties, problems.

save.create_save_game_class (riesgo 2, modifica, smoke)​

Creates a SaveGame Blueprint asset with typed variables, all flagged SaveGame, and compiles it; returns its schema.

ArgumentoTipoDescripción
folderstringobligatorio. Content folder of the new SaveGame Blueprint, e.g. /Game/Save.
namestringobligatorio. Asset name, e.g. BP_PlayerSave.
variablesarray of UeaKeyValueVariables to add: key = variable name, value = type (bool, int, int64, float, string, name, text, vector, rotator, transform). Every variable is flagged SaveGame.

Devuelve: class, properties, saveGamePropertyCount.

save.delete (riesgo 3, modifica, destructivo, smoke)​

Sin descripción.

ArgumentoTipoDescripción
slotstringobligatorio. Plain slot name; separators are rejected.
userIndexintegerPlatform user index. Valor predeterminado 0.

Devuelve: slot, userIndex, exists, valid, class, byteCount, properties, problems.

save.delete_many (riesgo 3, modifica, destructivo, smoke)​

Deletes several save slots (files under Saved/SaveGames in editor builds); missing slots are reported, not failed.

ArgumentoTipoDescripción
slotsarray of stringobligatorio. Plain slot names to validate.
userIndexintegerPlatform user index. Valor predeterminado 0.

Devuelve: results, validCount, invalidCount.

save.get_property (riesgo 1, smoke)​

Sin descripción.

ArgumentoTipoDescripción
propertystringobligatorio. Authored SaveGame property name.

Devuelve: slot, userIndex, exists, valid, class, byteCount, properties, problems.

save.inspect_class (riesgo 0, smoke)​

Sin descripción.

ArgumentoTipoDescripción
classstringobligatorio. SaveGame class name or path.

Devuelve: class, properties, saveGamePropertyCount.

save.list_properties (riesgo 0, smoke)​

Sin descripción.

ArgumentoTipoDescripción
classstringobligatorio. SaveGame class name or path.

Devuelve: class, properties, saveGamePropertyCount.

save.migrate (riesgo 3, modifica, smoke)​

Sin descripción.

ArgumentoTipoDescripción
destinationSlotstringobligatorio. Destination slot.
destinationClassstringobligatorio. Destination class. Matching SaveGame properties are copied by name and compatible type.
destinationUserIndexintegerDestination platform user index; -1 keeps userIndex. Valor predeterminado -1.
failIfDestinationExistsbooleanRefuse to replace the destination slot. Valor predeterminado false.

Devuelve: slot, userIndex, exists, valid, class, byteCount, properties, problems.

save.read (riesgo 1, smoke)​

Sin descripción.

ArgumentoTipoDescripción
propertyContainsstringReturn only properties whose names contain this text.

Devuelve: slot, userIndex, exists, valid, class, byteCount, properties, problems.

save.read_bytes (riesgo 2, smoke)​

Sin descripción.

ArgumentoTipoDescripción
slotstringobligatorio. Plain slot name; separators are rejected.
userIndexintegerPlatform user index. Valor predeterminado 0.

Devuelve: slot, userIndex, byteCount, base64.

save.reset_property (riesgo 3, modifica, smoke)​

Sin descripción.

ArgumentoTipoDescripción
propertystringobligatorio. Authored SaveGame property name.

Devuelve: slot, userIndex, exists, valid, class, byteCount, properties, problems.

save.reset_slot (riesgo 3, modifica, smoke)​

Sin descripción.

ArgumentoTipoDescripción
classstringobligatorio. Concrete SaveGame class whose defaults replace this slot.
failIfExistsbooleanRefuse to replace an existing slot. Valor predeterminado false.

Devuelve: slot, userIndex, exists, valid, class, byteCount, properties, problems.

save.set_property (riesgo 3, modifica, smoke)​

Sin descripción.

ArgumentoTipoDescripción
valuestringobligatorio. New value in the same Unreal text form used by the details panel.

Devuelve: slot, userIndex, exists, valid, class, byteCount, properties, problems.

save.slot_exists (riesgo 0, smoke)​

Sin descripción.

ArgumentoTipoDescripción
slotstringobligatorio. Plain slot name; separators are rejected.
userIndexintegerPlatform user index. Valor predeterminado 0.

Devuelve: slot, userIndex, exists, valid, class, byteCount, properties, problems.

save.validate (riesgo 1, smoke)​

Sin descripción.

ArgumentoTipoDescripción
slotstringobligatorio. Plain slot name; separators are rejected.
userIndexintegerPlatform user index. Valor predeterminado 0.

Devuelve: slot, userIndex, exists, valid, class, byteCount, properties, problems.

save.validate_many (riesgo 1, smoke)​

Sin descripción.

ArgumentoTipoDescripción
slotsarray of stringobligatorio. Plain slot names to validate.
userIndexintegerPlatform user index. Valor predeterminado 0.

Devuelve: results, validCount, invalidCount.

save.write (riesgo 3, modifica, smoke)​

Sin descripción.

ArgumentoTipoDescripción
classstringobligatorio. SaveGame class name or path.
valuesarray of UeaKeyValueSaveGame property -> Unreal text value.
failIfExistsbooleanReject a slot that already exists. Valor predeterminado false.

Devuelve: slot, userIndex, exists, valid, class, byteCount, properties, problems.

save.write_bytes (riesgo 4, modifica, smoke)​

Sin descripción.

ArgumentoTipoDescripción
base64stringobligatorio. Base64 raw save-system bytes. This bypasses SaveGame deserialization.

Devuelve: slot, userIndex, byteCount, base64.