Skip to main content

Overview

The FrostyModExecutor class is responsible for applying Frosty mods to game data and launching the game with modifications. It processes mod resources, applies handlers, generates modified game files, and manages the game launch process. This API is primarily used by the Frosty Mod Manager, but plugins can extend execution functionality through ExecutionAction classes.

ExecutionAction

Plugins can register execution actions to perform custom operations before or after game launch.

Base Class

Properties

PreLaunchAction

Action to execute before launching the game. Useful for preparing files, checking prerequisites, or validating mod configurations.
  • ILogger: Logger instance for output
  • PluginManagerType: The manager type (ModManager)
  • CancellationToken: Token to check for cancellation

PostLaunchAction

Action to execute after the game has been launched. Useful for cleanup, monitoring, or post-launch configuration.
  • ILogger: Logger instance for output
  • PluginManagerType: The manager type (ModManager)
  • CancellationToken: Token to check for cancellation

Registration

Register execution actions using the RegisterExecutionAction attribute:

Example: Anti-Cheat Workaround

Example: Custom Launcher Arguments

Example: File Backup

Example: Discord Rich Presence

FrostyModExecutor Properties

Logger

The logger instance used by the executor.

Important Notes

ExecutionActions run in the context of the Mod Manager and have access to the file system. Be careful with file operations and always handle exceptions properly.
The PreLaunchAction executes after mods are applied but before the game is launched. The PostLaunchAction executes after the game launch command is issued (not after the game closes).

Common Use Cases

Pre-Launch Actions

  • Disable anti-cheat systems
  • Create file backups
  • Validate mod compatibility
  • Configure launch arguments
  • Initialize external tools
  • Check for updates

Post-Launch Actions

  • Re-enable anti-cheat
  • Clean up temporary files
  • Update Discord presence
  • Start monitoring tools
  • Initialize overlay applications

Error Handling

See Also