Runtime Metadata Twiddling


If you want to change the realtime_interval of your game during runtime, you can add runtime_metadata_twiddling to your prelude. To see log output of metadata changes, add runtime_metadata_twiddling_debug.

After this prelude flag has been set, you can change the parameters of some prelude flags based on rule patterns like this:
[> Player | SlowBtn] -> realtime_interval 0.5
[> Player | FlickBtn] -> [> Player | ] smoothscreen flick 5x5 3x3
Any changes you make with this will be included in the undo history of the level. Currently the prelude flags that support this are: You can also combine these directives with rule patterns and other flags like nosave and again. Just like with message, the prelude flag needs to be the rightmost argument in the rule:
[ Player ConveyorRight] -> [right Player ConveyorRight] again again_interval 0.5
Two special parameters allow you to access a previous value or completely wipe the prelude flag: You use these special keywords like this:
[> Player | WipeButton] -> realtime_interval wipe

Special cases

noundo

Once a turn ends with noundo being set, that turn becomes irreversible, meaning you can't undo back past it. This is different from using the nosave command, which will only avoid saving the current turn to the undo stack. So if you have:
[> Player | no SkipUndo] -> noundo wipe
[> Player | SkipUndo] -> noundo yes

[> Player | SkipSave] -> nosave
It will skip each turn after you walked off an SkipSave object when undoing, and you will be unable to rewind to any turns you did before stepping on the SkipUndo button. Example available here.

Documentation page adapted from a draft by minotalen