/Documentation/Patch Runtime/Scripting Rules (Requisites)

Scripting Rules (Requisites)

You can define logic to run before (Stage 4) or after (Stage 6) the patch. These are defined in pre-Requisites and post-requisites.

Variable Injection

In Stage 6 actions, you can use variables in your strings:

  • %version%: The new game version.

  • %gamedir%: The absolute path to the game directory.

Available Conditions

  • FileExists: Checks if a file exists (relative to game dir).

  • RegistryExists: Checks if a key exists.

  • DotNetInstalled: Checks for .NET Framework 4.5+.

  • RunOnce: (Post-req only) Always runs.

Available Actions

  • DownloadAndRun: Downloads an executable to temp and runs it (useful for installers).

  • WriteLocalFile: Creates a file with specific content.

  • WriteRegistry: Sets a registry key value.

  • WriteIniFile: Updates a specific [Section]Key=Value in an .ini file.

  • OpenUrl: Opens default browser.

  • ShowMessage: Displays a message in a native popup.