Pular para o conteúdo principal

Kit save

19 ferramentas. Gerado a partir do código-fonte do plugin; não edite manualmente.

As descrições das ferramentas e dos argumentos são exibidas em inglês porque espelham o schema das ferramentas (o mesmo texto que o agente recebe em tools/list).

Guia​

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.

Ferramentas​

Legenda. risco 0 = somente leitura, 1 = operação inofensiva do editor, 2 = altera asset, 3 = apaga/substitui asset, 4 = projeto/config/build, 5 = potencialmente destrutivo (chamadas acima de MaxAutoRisk exigem "_confirm": true). altera = roda numa transação (edit.undo reverte). requer PIE / requer mundo = recusado sem sessão PIE / sem nível aberto. requer plugin = indisponível quando o plugin está desativado. dryRun = aceita o argumento dryRun. smoke = coberto por edit.self_test.

save.compare (risco 1, smoke)​

Sem descrição.

ArgumentoTipoDescrição
firstSlotstringobrigatório. First plain slot name.
secondSlotstringobrigatório. Second plain slot name.
userIndexintegerPlatform user index used for both slots. Padrão 0.

Retorna: equal, different, firstOnly, secondOnly.

save.copy_slot (risco 3, altera, smoke)​

Sem descrição.

ArgumentoTipoDescrição
destinationSlotstringobrigatório. Destination plain slot name.
destinationUserIndexintegerDestination platform user index; -1 keeps userIndex. Padrão -1.

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

save.create_save_game_class (risco 2, altera, smoke)​

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

ArgumentoTipoDescrição
folderstringobrigatório. Content folder of the new SaveGame Blueprint, e.g. /Game/Save.
namestringobrigatório. 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.

Retorna: class, properties, saveGamePropertyCount.

save.delete (risco 3, altera, destrutivo, smoke)​

Sem descrição.

ArgumentoTipoDescrição
slotstringobrigatório. Plain slot name; separators are rejected.
userIndexintegerPlatform user index. Padrão 0.

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

save.delete_many (risco 3, altera, destrutivo, smoke)​

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

ArgumentoTipoDescrição
slotsarray of stringobrigatório. Plain slot names to validate.
userIndexintegerPlatform user index. Padrão 0.

Retorna: results, validCount, invalidCount.

save.get_property (risco 1, smoke)​

Sem descrição.

ArgumentoTipoDescrição
propertystringobrigatório. Authored SaveGame property name.

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

save.inspect_class (risco 0, smoke)​

Sem descrição.

ArgumentoTipoDescrição
classstringobrigatório. SaveGame class name or path.

Retorna: class, properties, saveGamePropertyCount.

save.list_properties (risco 0, smoke)​

Sem descrição.

ArgumentoTipoDescrição
classstringobrigatório. SaveGame class name or path.

Retorna: class, properties, saveGamePropertyCount.

save.migrate (risco 3, altera, smoke)​

Sem descrição.

ArgumentoTipoDescrição
destinationSlotstringobrigatório. Destination slot.
destinationClassstringobrigatório. Destination class. Matching SaveGame properties are copied by name and compatible type.
destinationUserIndexintegerDestination platform user index; -1 keeps userIndex. Padrão -1.
failIfDestinationExistsbooleanRefuse to replace the destination slot. Padrão false.

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

save.read (risco 1, smoke)​

Sem descrição.

ArgumentoTipoDescrição
propertyContainsstringReturn only properties whose names contain this text.

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

save.read_bytes (risco 2, smoke)​

Sem descrição.

ArgumentoTipoDescrição
slotstringobrigatório. Plain slot name; separators are rejected.
userIndexintegerPlatform user index. Padrão 0.

Retorna: slot, userIndex, byteCount, base64.

save.reset_property (risco 3, altera, smoke)​

Sem descrição.

ArgumentoTipoDescrição
propertystringobrigatório. Authored SaveGame property name.

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

save.reset_slot (risco 3, altera, smoke)​

Sem descrição.

ArgumentoTipoDescrição
classstringobrigatório. Concrete SaveGame class whose defaults replace this slot.
failIfExistsbooleanRefuse to replace an existing slot. Padrão false.

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

save.set_property (risco 3, altera, smoke)​

Sem descrição.

ArgumentoTipoDescrição
valuestringobrigatório. New value in the same Unreal text form used by the details panel.

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

save.slot_exists (risco 0, smoke)​

Sem descrição.

ArgumentoTipoDescrição
slotstringobrigatório. Plain slot name; separators are rejected.
userIndexintegerPlatform user index. Padrão 0.

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

save.validate (risco 1, smoke)​

Sem descrição.

ArgumentoTipoDescrição
slotstringobrigatório. Plain slot name; separators are rejected.
userIndexintegerPlatform user index. Padrão 0.

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

save.validate_many (risco 1, smoke)​

Sem descrição.

ArgumentoTipoDescrição
slotsarray of stringobrigatório. Plain slot names to validate.
userIndexintegerPlatform user index. Padrão 0.

Retorna: results, validCount, invalidCount.

save.write (risco 3, altera, smoke)​

Sem descrição.

ArgumentoTipoDescrição
classstringobrigatório. SaveGame class name or path.
valuesarray of UeaKeyValueSaveGame property -> Unreal text value.
failIfExistsbooleanReject a slot that already exists. Padrão false.

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

save.write_bytes (risco 4, altera, smoke)​

Sem descrição.

ArgumentoTipoDescrição
base64stringobrigatório. Base64 raw save-system bytes. This bypasses SaveGame deserialization.

Retorna: slot, userIndex, byteCount, base64.