Rolly Docs

Check your save setup

Find what would make a save lose data before you play: duplicate Custom Save IDs, struct members without SaveGame, rules that disagree, and setups that do nothing.

Sheet
06 of 64
Rev
1.0.0
Updated
On this sheet

Every check reports to Window > Message Log > Rolly Save Checks, one page per run. A message names the actor or asset first (click it to select an actor, also one whose World Partition cell is not loaded, or to find an asset), then the problem and how to fix it, then its buttons.

Find problems when you save a map

When you save a map, actors of a World Partition map or a Save Rule, Rolly Save checks what you saved on the next editor tick, so the save never waits:

  • a map: every actor in it, the classes they use and the Save Rules that match them;
  • World Partition actors: those actors, and their Custom Save IDs against every other actor of the map, loaded or known from its World Partition data;
  • a Save Rule: its paths and its ties with other rules, against the actors of the open map.

Warnings and errors go to a page named Saved with the map and time; notes are left out, and a check that finds nothing writes no page. Set how it reports in Project Settings > Plugins > Rolly Save > Editor Checks > Check After Saving:

Value After a save
Report and Notify (default) The page, and a notification such as “Rolly Save found 1 error and 2 warnings in Tavern.” with Open Message Log
Report The page only
Off Nothing

Autosaves, cooks, other procedural saves, commandlets and saves during Play In Editor are never checked.

Check the open map

Choose Tools > Rolly Save > Check Open Map, or run rolly.save.check in the console. It checks every actor of the open map, unloaded World Partition actors included through their World Partition data, the classes in memory and every Save Rule, and opens the Message Log at a page that ends with a summary, such as “Checked Tavern: 412 actors (130 unloaded), 38 classes and 5 Save Rules: 0 errors, 2 warnings, 1 note.”

Class checks need the class in memory. When unloaded actors use classes nothing has loaded, a note names them with Load {N} Classes and Check, which loads them in the background and checks the map again.

Figure 1. A Check Open Map page of Message Log > Rolly Save Checks: the two chests that share a Custom Save ID with Clear ID and Ignore, the lamp class whose struct members do not save with Flag Every Member, the tied Save Rules with Raise Priority for each, and the summary last.

Show Check Results in the same menu opens the Message Log at Rolly Save Checks.

Check the whole project

Choose Tools > Rolly Save > Check Project, or run rolly.save.check -project. It checks Project Settings, every Save Rule, the open map and every World Partition map under /Game from the World Partition data the asset registry holds, without loading their actors. Maps without World Partition exist only while loaded, so a note lists them: open each and use Check Open Map, or run the commandlet (see Command line), which loads them one at a time.

Fix a problem from the Message Log

Buttons under a message change one thing in one step of Edit > Undo, and each works once:

Button Changes
Clear ID on {Actor} Clears the Custom Save ID of the actor’s Rolly Save component (actors that are loaded)
Flag Every Member of {Struct} Ticks SaveGame on every member of the Blueprint struct and of the Blueprint structs inside it, compiling each once
Raise Priority of {Rule} to {Priority} Gives one of two tied Save Rules a higher Priority; once you press one, the other does nothing
Set Should Cook Property Guids? to Yes Sets the Blueprint’s Class Settings > Should Cook Property Guids?
Clear Save Transform in {Source} Clears the Save Transform override of the Save Rule or Rolly Save component
Untick Is Spatially Loaded on {Actor} Unticks Is Spatially Loaded on an actor that holds a Reset Area

Open {Asset} opens the struct, rule or Blueprint, and Pick Properties for {Class} opens Pick Properties for the rule or component. After a fix, the check that found the message runs again over the open map.

Ignore a check for one actor, folder or asset

To ignore Do
One check for one actor Press Ignore on {Actor}. It adds the actor tag RollySaveIgnore.<check>, such as RollySaveIgnore.DuplicateCustomId, in one undo step
Every check for one actor Add the actor tag RollySaveIgnoreChecks
A map, Blueprint, struct or Save Rule Press Ignore {Asset}, or add it to Editor Checks > Ignored Assets
A content folder, such as /Game/Developers Add it to Editor Checks > Ignored Folders

Ignore {Asset} writes Ignored Assets to Config/DefaultGame.ini at once, checking the file out of revision control or making it writable first; when neither works it changes nothing and says why. Edit > Undo takes the asset out again and writes the file again. Tags count for unloaded actors too, since World Partition data holds them.

Choose how strict each check is

Project Settings > Plugins > Rolly Save > Check Severities has a row per check. Default keeps the check’s own severity; Off stops the check; Info, Warning and Error report its messages as notes, warnings or errors. Only Error fails Data Validation, so it also fails a revision control submit and the commandlet.

Row Key Default
Duplicate Custom Save ID DuplicateCustomId Error
Custom Save ID in a Level Instance CustomIdInLevelInstance Warning
Struct Members without SaveGame StructMembersNotSaved Warning
C++ Struct Saved in Part CppStructPartlySaved Warning
Property Paths PathNotApplicable Each message’s own
Save Rule Ties RuleTie Warning
Property GUIDs Not Cooked CookGuidsOff Warning
Save Transform on a Static Root StaticRoot Warning
Level Tool Setup LevelToolSetup Each message’s own
Actor Setup ActorSetup Each message’s own
Unloaded Actors without Saved IDs OldDescriptors Info
Play in an Unsaved Map TemporaryMap Warning
Reset Area in a Streamed Level ResetAreaStreamed Warning
Replicated Collections That Abandon Pieces AbandonAfterLevel Warning
Debug Commands on Quick Keys QuickKeyDebugCommands Warning

Property Paths, Level Tool Setup and Actor Setup also set the severity of those messages in the Data Validation of Save Rules, Rolly Save components and level tools. The rows govern editor checks only; messages during play keep theirs.

Fail a submit or a CI build on errors

Revision control

Rolly Save adds its map checks to Data Validation: Tools > Validate Data, the DataValidation commandlet, the check before a revision control submit and scripts run them, and a message at Error fails the map. Saving does not, since Check After Saving covers it. To turn them off, add to Config/DefaultEditor.ini:

[/Script/RollySaveEditor.RollySaveMapValidator]
bIsConfigDisabled=True
INI

Command line

UnrealEditor-Cmd.exe MyGame.uproject -run=RollySaveCheckProject [-Map=/Game/Maps/Tavern]... [-Path=/Game/Maps]... [-WarningsAsErrors]
Text

Without -Map or -Path it checks every map and Save Rule under /Game; both repeat. World Partition maps are read from their World Partition data, other maps are loaded and let go one at a time. It prints:

Rolly Save check: 3 maps, 5 rules
ERROR   /Game/Maps/Tavern: DuplicateCustomId: Rolly Save: Door_2 and Door_1 in Tavern share ...
WARNING /Game/Data/DA_Lamps: PathNotApplicable: Rolly Save: ...
Rolly Save check: 1 errors, 1 warnings, 0 notes
Text
Exit code When
0 No error, and no warning with -WarningsAsErrors
1 An error, or a warning with -WarningsAsErrors
2 Nothing to check: no map or rule under -Path, a -Map that names no map, or a switch without a value

Severity rows, Ignored Folders, Ignored Assets and actor tags apply as in the editor.

Check World Partition maps without loading them

A Rolly Save component writes its Custom Save ID into its actor’s World Partition data as RollySaveId each time the actor is saved, so the checks find duplicates among actors that are not loaded. Actors last saved before this version have no RollySaveId; a note, Unloaded Actors without Saved IDs, counts them per map. Load and save them once, or resave every such actor of a map with the engine’s Resave Actors builder:

UnrealEditor-Cmd.exe MyGame.uproject /Game/Maps/World -run=WorldPartitionBuilderCommandlet -Builder=WorldPartitionResaveActorsBuilder -ResaveDirtyActorDescsOnly -SCCProvider=None
Text

-ResaveDirtyActorDescsOnly saves only the actors whose World Partition data changed. With revision control, give your provider instead of None, such as -SCCProvider=Perforce, so the files are checked out.

No check sees an actor moved to another sublevel or replaced with Replace Selected Actors: it gets a new name and loses its saved state (see Give an actor an ID of its own).

Keep Custom Save IDs unique in level instances

An actor with a Custom Save ID inside a level that a map embeds twice or more, as Embedded level instances whose actors join the map’s World Partition, has that ID in every copy, so each copy saves under its name instead (Custom Save ID in a Level Instance). Clear the Custom Save ID on the actor inside that level, or set Level Behavior to Standalone on those level instances: each Standalone copy keeps the ID as its own, and Duplicate Custom Save ID compares IDs within each Standalone level instance only. Ignore {Asset} on the message adds the level to Ignored Assets.

Keep Reset Areas where they can reach their actors

A Reset Area in a streaming sublevel or a Standalone level instance exists only while its level is loaded, so it cannot reset the actors of other levels inside its shapes while that level is unloaded. Reset Area in a Streamed Level warns when its shapes reach saving actors of other levels, loaded or known from their files, naming up to 10 of them. Move the area to the persistent level, place it in the map instead of inside the level instance’s level (the message’s Open button opens that level), or fit its shapes to its own level’s actors. Areas of the persistent level and of Embedded level instances, whose actors join the map, never warn. The check after a save reports an area when the save holds the area or an actor it reaches, as the two are in different levels.

Keep replicated collections from abandoning pieces

A geometry collection component with Enable Replication and Enable Abandon After Level both on under Network, as the engine sets the latter, makes the server turn off each piece of a level past Replication Abandon After Level once it breaks: saves keep no break past that level, and clients show none of a load’s restore. Replicated Collections That Abandon Pieces names each such collection of a loaded actor whose Destruction is not Off, with the fix: untick Enable Abandon After Level. A listen or dedicated server says the same in the Message Log once per collection while playing. An actor that is not loaded is checked once it loads.

Keep the engine’s debug commands off the quick keys

When Play In Editor starts with Enable Quick Keys on, Debug Commands on Quick Keys names each of the engine’s debug commands bound to a quick key without a modifier key, such as viewmode shadercomplexity on F5 and shot showui on F9 from Engine/Config/BaseInput.ini: outside Shipping they run on the key beside the quick save or load. Remove Them adds a -DebugExecBindings line for each to [/Script/Engine.PlayerInput] in Config/DefaultInput.ini, checking the file out of revision control or making it writable first, as one step of Edit > Undo; when neither works it changes nothing and says why. The setup panel’s Quick save keys row has the same button, for the keys it shows.

Catch struct members that do not save

A SaveGame variable that holds a struct saves only the members that have SaveGame ticked too. Rolly Save warns:

  • Struct Members without SaveGame, for a Blueprint struct, naming up to three members, nested ones as Inner.Count. Press Flag Every Member of {Struct}, or tick SaveGame on the members you want in the struct editor.
  • C++ Struct Saved in Part, for a C++ struct. Save the members you need by path in Pick Properties, mark them SaveGame in C++, or save them in a Save Handler.
  • Property GUIDs Not Cooked, for a Blueprint with SaveGame variables whose Should Cook Property Guids? gives No: renaming one of those variables later loses its saved value in packaged games. Not checked when Project Settings > Cooker cooks property GUIDs for every Blueprint.

Structs that save whole, such as vectors, transforms and C++ structs with a serializer of their own, are never reported.

With Editor Checks > Check Blueprints on Compile on (the default), compiling a Blueprint that Rolly Save saves through SaveGame (actors, components, the game instance and its subsystems, Save Handlers and profiles) adds these warnings to its Compiler Results. Blueprints of the engine’s Save Game class save their structs whole and get none.

Find handlers that save nothing

Data Validation of a Save Rule or Rolly Save component warns (NoTargets) when an engine state handler it attaches finds nothing to save. A component’s check looks at its actor. A rule’s check runs when Match Mode is All Lists, Match lists Classes and every listed class is loaded; it counts each class’s components, its Blueprint components and timelines and, for the AI handlers, those of its AI Controller Class. Child classes of the listed classes may add components, so the rule’s message ends “their child classes were not checked”, except when the classes are controllers, whose child classes are controllers too.

Handler Finds nothing when the actor or each class Fix
Material Parameters has no primitive or decal component Match actors with meshes or decals, or remove the handler
Timelines has no timeline Match the Blueprints whose timelines should save, or remove the handler
Level Sequence is no Level Sequence Actor Match Level Sequence Actor or its children, or remove the handler
Montages has no skeletal mesh component Match actors with skeletal meshes, or remove the handler
Audio has no audio component that stays (Auto Destroy ones never save) Match actors with audio components, or remove the handler
Blackboard, StateTree, Gameplay Abilities is a controller, which never saves Match the pawns those controllers possess: AI state saves under the pawn
Blackboard is no pawn Match your AI pawns, or remove the handler
StateTree has no StateTree component, on itself or on its AI Controller Class; with Include AI Controller off, none of its own Match actors with StateTree components, tick Include AI Controller, or remove the handler
Gameplay Abilities has no Ability System component, on itself or on its AI Controller Class; with Include AI Controller off, none of its own. A pawn whose AI Controller Class wants a Player State is not judged: the game mode picks that Player State’s class Attach the handler in a rule that matches your Player State class when your character’s Ability System Interface returns its Player State’s component; otherwise match actors with Ability System components, tick Include AI Controller, or remove the handler
Any with Components has none of its kind that Components takes Change Components in the handler
Figure 2. Data Validation of DA_GuardControllers, whose Blackboard handler matches controllers, and of DA_Doors, whose Timelines handler has Apply Timing Before Begin Play, which it does not offer.

The component’s Effective Settings shows the same: such a handler’s line reads “finds nothing” with the reason beside a warning icon (see Save materials, timelines, sequences, montages and sounds).