Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UnrealGameHelper

A simple class to encapsulate some commonly-used parts of a game extension for a UE-based game

remarks

You need to provide a valid gameId at instantiation or it will fail in weird ways.

Hierarchy

  • UnrealGameHelper

Index

Constructors

constructor

  • new UnrealGameHelper(gameId: string, enableFallback?: boolean): UnrealGameHelper
  • Creates a new helper for the given gameId.

    Parameters

    • gameId: string

      The game ID for this helper

    • Optional enableFallback: boolean

      Whether to enable fallback install behaviour. Currently unused.

    Returns UnrealGameHelper

Properties

enableFallback

enableFallback: () => boolean

This callback is used to determine whether the installer will try and install mods that don't look quite right.

remarks
  • Essentially, if this callback returns true (defaults to false), the installer will still attempt to install mod files even if it can't find the .pak file.
  • This shouldn't be possible since the installer checks for a .pak file but weirder things have happened.

Type declaration

    • (): boolean
    • Returns boolean

targetGameId

targetGameId: string

Methods

installContent

  • installContent(files: string[], destinationPath: string, gameId: string, progressDelegate: ProgressDelegate): Promise<IInstallResult>
  • A simple installer for UE games that deploys files rooted to the first .pak file into the default location.

    Parameters

    • files: string[]

      The file list

    • destinationPath: string

      The installation destination path.

    • gameId: string

      The ID of the game to install for

    • progressDelegate: ProgressDelegate

      Callback for reporting installation progress

    Returns Promise<IInstallResult>

prepareforModding

  • prepareforModding(discovery: IDiscoveryResult, relativePath: string): Promise<void>
  • An implementation of the setup pattern for UE-based games

    remarks
    • relativePath will usually be the result of, for example, path.join('Game', 'Content', 'Paks', '~mods')

    Parameters

    • discovery: IDiscoveryResult

      The discovery result

    • relativePath: string

      The relative path to the mods folder.

    Returns Promise<void>

testSupportedContent

  • testSupportedContent(files: string[], gameId: string): Promise<{ requiredFiles: any[]; supported: boolean | (() => boolean) }>
  • An implementation of the installer test function for the UnrealGameHelper.installContent installer.

    Parameters

    • files: string[]

      The files list

    • gameId: string

      The current gameId

    Returns Promise<{ requiredFiles: any[]; supported: boolean | (() => boolean) }>

Generated using TypeDoc