Nucleus handler tools β€Ί Docs β€Ί Context β€Ί RunAdditionalFiles

Context.RunAdditionalFiles

Open in the workbench (search, and try it in a handler)

Context.RunAdditionalFiles(
  filePaths: string[],
  changeWorkingDir: boolean,
  secondsToPauseInbetween: number
): void
Context.RunAdditionalFiles(
  filePaths: string[],
  changeWorkingDir: boolean,
  secondsToPauseInbetween: number,
  runAsAdmin: boolean,
  promptBetween: boolean
): void
Context.RunAdditionalFiles(
  filePaths: string[],
  changeWorkingDir: boolean,
  customText: string,
  secondsToPauseInbetween: number,
  showFilePath: boolean,
  runAsAdmin: boolean,
  promptBetween: boolean,
  confirm: boolean
): void

Specify additional files to run before launching game. By default will run each additional file once but can specify to run during specific player's instances by prefixing the filepath with #|. Replace # with player number. Can also specify to run files for each player by prefixing filepath with "all|". "bool confirm" will only run the file after clicking "Ok" in the prompt.

AI-writtenAI-written. Based on: Nucleus GenericContext.cs (opens in a new tab) (RunAdditionalFiles (all three overloads)); GameManager.cs (opens in a new tab) (GetAppContentPath).
  • filePaths: Array of full file paths. Plain paths run for the first player only; prefix "N|" (player number from 1) or "all|" for every player.
  • changeWorkingDir: true starts each file in the AdditionalFiles folder of Nucleus' content folder; false in the file's own folder.
  • secondsToPauseInbetween: Seconds to wait between files (not after the last); in the overloads with promptBetween, only when promptBetween is true.
  • runAsAdmin: true starts each file as administrator (Windows asks for elevation).
  • promptBetween: true shows a prompt after each file that waits for OK before going on.
  • customText: Text shown in the prompts.
  • showFilePath: true adds the file's path to the prompt text.
  • confirm: true starts each file only after its prompt is confirmed; files then only run when promptBetween is also true.

Category: Files

Is the doc right? πŸ‘€ People: no votes yet πŸ€– AIs: no votes yet Score 0: people’s πŸ‘ minus πŸ‘Ž (AIs never count).

Handler API docs

Stuck, or not sure? Ask other handler authors: Discordr/nucleuscoop