Skip to main content

IPC Reference

This document lists all IPC (Inter-Process Communication) channels available in Ascendara. These channels enable communication between the React renderer process and the Electron main process.

How IPC Works in Ascendara#

The preload.js file exposes a secure window.electron API to the renderer:

// In your React component const settings = await window.electron.getSettings();

Each method maps to an ipcMain.handle() in the main process modules.


Window Management#

MethodParametersReturnsDescription
minimizeWindow()-voidMinimize the app window
maximizeWindow()-voidMaximize/restore the app window
closeWindow()-voidClose the app window
toggleFullscreen()-voidToggle fullscreen mode
getFullscreenState()-booleanCheck if window is fullscreen
clearCache()-booleanClear application cache
reload()-voidReload the application

Events#

  • onWindowStateChange(callback) - Fires when window maximized state changes

Settings & Configuration#

MethodParametersReturnsDescription
getSettings()-objectGet all user settings
saveSettings(options, directory)object, stringbooleanSave settings to file
updateSetting(key, value)string, anybooleanUpdate a single setting
getDownloadDirectory()-stringGet the download directory path
getDefaultLocalIndexPath()-stringGet default local index path

Crack/Emulator Settings#

MethodParametersReturnsDescription
getLocalCrackUsername()-string|nullGet Steam emulator username
setLocalCrackUsername(username)stringbooleanSet Steam emulator username
getLocalCrackDirectory()-string|nullGet crack directory path
setLocalCrackDirectory(directory)stringbooleanSet crack directory path

Events#

  • onSettingsChanged(callback) - Fires when settings are updated

Game Management#

MethodParametersReturnsDescription
getGames()-arrayGet all installed games
getCustomGames()-arrayGet custom/imported games
getInstalledGames()-arrayGet list of installed games
getInstalledGamesSize()-numberGet total size of installed games
addGame(game, online, dlc, version, executable, imgID)string, boolean, boolean, string, string, stringvoidAdd a custom game
removeCustomGame(game)stringvoidRemove a custom game
deleteGame(game)stringvoidDelete a game and its files
deleteGameDirectory(game)stringvoidDelete only the game directory
verifyGame(game)stringobjectVerify game file integrity
importSteamGames(directory)stringbooleanImport games from Steam directory

Game Images#

MethodParametersReturnsDescription
updateGameCover(gameName, imgID, imageData)string, string, stringbooleanUpdate game cover image
getGameImage(game)stringstring|nullGet game image as base64
getLocalImageUrl(imagePath)stringstring|nullGet local image as data URL

Game Backups (Ludusavi)#

MethodParametersReturnsDescription
ludusavi(action, game)string, stringobjectExecute ludusavi backup/restore
enableGameAutoBackups(game, isCustom)string, booleanbooleanEnable auto-backups for game
disableGameAutoBackups(game, isCustom)string, booleanbooleanDisable auto-backups for game
isGameAutoBackupsEnabled(game, isCustom)string, booleanbooleanCheck if auto-backups enabled
gameRated(game, isCustom)string, booleanbooleanMark game as rated

Game Executables#

MethodParametersReturnsDescription
getGameExecutables(game, isCustom)string, booleanarrayGet list of game executables
setGameExecutables(game, executables, isCustom)string, array, booleanbooleanSet game executables
modifyGameExecutable(game, executable)string, stringbooleanChange default executable
createGameShortcut(game)stringbooleanCreate desktop shortcut
getLaunchCommands(game, isCustom)string, booleanobject|nullGet launch commands
saveLaunchCommands(game, launchCommands, isCustom)string, object, booleanbooleanSave launch commands
readGameAchievements(game, isCustom)string, booleanobject|nullRead game achievements

Game Execution#

MethodParametersReturnsDescription
playGame(game, isCustom, backupOnClose, launchWithAdmin, specificExecutable)string, boolean, boolean, boolean, stringbooleanLaunch a game
isGameRunning(game)stringbooleanCheck if game is running
startSteam()-booleanLaunch Steam client
isSteamRunning()-booleanCheck if Steam is running

Downloads#

MethodParametersReturnsDescription
downloadFile(link, game, online, dlc, isVr, updateFlow, version, imgID, size, additionalDirIndex, gameID)multiplevoidStart a game download
stopDownload(game, deleteContents)string, booleanbooleanStop an active download
retryDownload(link, game, online, dlc, version)string, string, boolean, boolean, stringbooleanRetry a failed download
checkRetryExtract(game)stringbooleanCheck if extraction can be retried
retryExtract(game, online, dlc, version)string, boolean, boolean, stringvoidRetry file extraction
downloadItem(url)stringobjectDownload a Steam Workshop item
downloadSoundtrack(track, game)string, stringbooleanDownload game soundtrack
isDownloaderRunning()-booleanCheck if any download is active
getDownloadHistory()-arrayGet download history

Events#

  • onDownloadProgress(callback) - Fires with download progress updates
  • onDownloadComplete(callback) - Fires when download completes

File & Directory Management#

MethodParametersReturnsDescription
openGameDirectory(game, isCustom)string, booleanvoidOpen game folder in explorer
openDirectoryDialog()-string|nullShow folder picker dialog
openFileDialog(exePath)string|nullstring|nullShow file picker dialog
canCreateFiles(directory)stringbooleanCheck write permissions
checkFileExists(filePath)stringbooleanCheck if file exists
getDriveSpace(path)stringobjectGet drive space info
getAssetPath(filename)stringstringGet path to bundled asset

Events#

  • onDirectorySizeStatus(callback) - Fires with directory size calculation progress

Tools & Dependencies#

MethodParametersReturnsDescription
getInstalledTools()-objectGet status of installed tools
installTool(tool)stringbooleanInstall a specific tool
installDependencies()-booleanInstall game dependencies
installPython()-objectInstall Python (macOS/Linux)
installWine()-objectInstall Wine (macOS/Linux)
isSteamCMDInstalled()-booleanCheck if SteamCMD installed
installSteamCMD()-booleanInstall SteamCMD
checkGameDependencies()-objectCheck for missing dependencies
openReqPath(game)stringvoidOpen required libraries folder
folderExclusion(boolean)booleanobjectManage Windows Defender exclusions
isWatchdogRunning()-booleanCheck if achievement watcher running

Updates#

MethodParametersReturnsDescription
checkForUpdates()-object|nullCheck for app updates
updateAscendara()-voidInstall pending update
isUpdateDownloaded()-booleanCheck if update is ready
isBrokenVersion()-booleanCheck if version is broken
deleteInstaller()-voidDelete downloaded installer
uninstallAscendara()-voidUninstall the application

Events#

  • onUpdateAvailable(callback) - Fires when update is available
  • onUpdateReady(callback) - Fires when update is downloaded

Themes & UI#

MethodParametersReturnsDescription
getBackgrounds()-arrayGet available backgrounds
setBackground(color, gradient)string, stringvoidSet background color/gradient
saveCustomThemeColors(customTheme)objectbooleanSave custom theme
exportCustomTheme(customTheme)objectobjectExport theme to file
importCustomTheme()-objectImport theme from file

Discord RPC#

MethodParametersReturnsDescription
toggleDiscordRPC(enabled)booleanobjectEnable/disable Discord RPC
switchRPC(state)stringvoidChange RPC display state

Language & Translations#

MethodParametersReturnsDescription
downloadLanguage(langCode)stringbooleanDownload a language pack
saveLanguageFile(langCode, content)string, objectbooleanSave language file
getLanguageFile(langCode)stringobject|nullGet language file content
startTranslation(langCode)stringbooleanStart AI translation
cancelTranslation()-booleanCancel active translation
getDownloadedLanguages()-arrayGet list of downloaded languages
languageFileExists(filename)stringbooleanCheck if language file exists

Local Index Refresh#

MethodParametersReturnsDescription
startLocalRefresh(data)objectobjectStart local index refresh
stopLocalRefresh(outputPath)stringobjectStop local index refresh
sendLocalRefreshCookie(cookie)stringobjectSend cookie for authentication
getLocalRefreshProgress(outputPath)stringobject|nullGet refresh progress
getLocalRefreshStatus(outputPath)stringobjectGet refresh status

Events#

  • onLocalRefreshProgress(callback) - Progress updates
  • onLocalRefreshComplete(callback) - Refresh completed
  • onLocalRefreshError(callback) - Error occurred
  • onLocalRefreshCookieNeeded(callback) - Cookie required

System & Platform#

MethodParametersReturnsDescription
getPlatform()-stringGet OS platform (win32/darwin/linux)
isOnWindows()-booleanCheck if running on Windows
fetchSystemSpecs()-objectGet system specifications
isDev()-booleanCheck if in development mode
isExperiment()-booleanCheck if experimental build
switchBuild(buildType)stringbooleanSwitch between stable/experimental
showTestNotification()-objectShow a test notification

API & Networking#

MethodParametersReturnsDescription
getAPIKey()-stringGet API key
getAnalyticsKey()-stringGet analytics key
getImageKey()-stringGet image signing key
openURL(url)stringvoidOpen URL in default browser
fetchApiImage(endpoint, imgID, timestamp, signature)string, string, number, stringobjectFetch signed API image
request(url, options)string, objectPromise<object>Make HTTPS request

Support & Profile#

MethodParametersReturnsDescription
uploadSupportLogs(sessionToken, appToken)string, stringobjectUpload logs for support
uploadProfileImage(imageBase64)stringbooleanUpload profile image
getProfileImage()-string|nullGet profile image

Welcome Flow & App State#

MethodParametersReturnsDescription
isNew()-booleanCheck if first launch
isV7()-booleanCheck if v7 welcome shown
setV7()-voidMark v7 welcome as shown
checkV7Welcome()-booleanCheck if should show v7 welcome
hasLaunched()-booleanCheck if app has launched before
hasAdmin()-booleanCheck if has admin privileges
updateLaunchCount()-voidIncrement launch counter
getLaunchCount()-numberGet total launch count
createTimestamp()-voidCreate timestamp file
setTimestampValue(key, value)string, anyvoidSet timestamp value
getTimestampValue(key)stringanyGet timestamp value
timestampTime()-stringGet formatted timestamp

Events#

  • onWelcomeComplete(callback) - Welcome flow completed
  • triggerWelcomeComplete() - Trigger welcome complete event

Low-Level IPC Access#

For advanced use cases, direct IPC access is available:

// Direct channel access window.electron.ipcRenderer.invoke("channel-name", ...args); window.electron.ipcRenderer.on("event-name", callback); window.electron.ipcRenderer.off("event-name", callback); // File operations window.electron.ipcRenderer.readFile(path); window.electron.ipcRenderer.writeFile(path, content);

Warning: Direct IPC access bypasses the typed API. Use the documented methods when possible.