Baldi's Basics Plus Glue API
Modding API for Baldi's Basics Plus
Loading...
Searching...
No Matches
BBPGlue.API.BBPGame Class Referencesealed

Provides access to overall game state and control functions. More...

Public Member Functions

void AddLives (int amount)
 Adds lives to the player.
void AddNotebookTotal (int count)
 Increases the notebook total by the given count.
void AddPoints (int points, int player, bool playAnimation, bool includeInLevelTotal, bool multiply)
 Adds points with full parameterization.
void AddPoints (int points, int player=0, bool playAnimation=true)
 Adds points for a player with optional animation.
void AddYtpMultiplier (float value)
 Adds a YTP multiplier value.
void AngerBaldi (float amount)
 Adds anger to Baldi.
void BeginPlay ()
 Begins normal gameplay from the base manager.
void BeginSpoopMode ()
 Starts the spook mode gameplay.
void CloseMap ()
 Closes the map UI.
void CollectNotebooks (int count)
 Programmatically collects notebooks.
void FinishLevel ()
 Finishes the current level.
object? GetCamera (int index)
 Retrieves a camera object by index.
object? GetHud (int index)
 Retrieves a HUD object by index.
object? GetPlayer (int index)
 Retrieves a player object by index from the core manager.
int GetPoints (int player=0)
 Gets the player's points total.
int GetPointsThisLevel (int player=0)
 Gets points earned this level for the player.
void GivePoints (int amount)
 Convenience overload to give points to player 0.
void GivePoints (int amount, int player)
 Convenience overload to give points to a specific player.
void GivePoints (int amount, int player, bool playAnimation, bool includeInLevelTotal, bool multiply)
 Full-parameter give points call.
void LoadNextLevel ()
 Loads the next level via the base manager.
void OpenMap (bool toMap=true)
 Opens the map UI.
void Pause (bool paused, bool openScreen=true)
 Pauses or unpauses the game.
void PleaseBaldi (float time, bool rewardSticker)
 Temporarily pleads with Baldi for the given time and optional sticker reward.
void Quit ()
 Quits the game immediately.
void Refresh ()
 Refreshes the game context.
void RemoveYtpMultiplier (float value)
 Removes a YTP multiplier value.
void ResetCameras ()
 Resets all cameras to default states.
void ResetShaders ()
 Resets shader-related state.
void RestartLevel ()
 Restarts the current level.
void ReturnToMenu ()
 Returns to the main menu.
void Save ()
 Saves the current game state.
void SaveAndQuit ()
 Saves the game and quits to desktop/menu.
void SetAttempts (int attempts)
 Sets the number of attempts.
void SetLives (int lives, bool overrideLifeMode=true)
 Sets the player's lives and optionally overrides life mode.
void SetRandomSeed ()
 Sets a random seed.
void SetSeed (int seed)
 Sets the deterministic seed used by the game.
void ToggleMap (bool openMap=true)
 Toggles the map UI.
void TogglePauseScreen ()
 Toggles the pause screen on.

Properties

bool AllNotebooksFound [get]
 Whether all notebooks have been found.
int Attempts [get]
 Current attempt count.
object? BaseManager [get]
 Base manager that exposes higher-level game facilities.
object? CoreManager [get]
 Core game manager object providing core gameplay operations.
int CurrentLevel [get, set]
 Currently loaded level index.
object? CurrentSceneObject [get]
 Raw scene object currently loaded.
bool DisablePause [get, set]
 Gets or sets whether pausing is disabled.
object? EnvironmentController [get]
 Environment controller from the base manager.
int FoundNotebooks [get]
 Number of notebooks found this run.
string Grade [get]
 Current grade string.
int GradeValue [get, set]
 Current grade numeric value.
bool IsInGame [get]
 Whether the application is currently in a playable game session.
int Lives [get]
 Lives remaining.
bool MapAvailable [get]
 Whether a map is available in the current context.
bool MapOpen [get]
 Whether the map UI is currently open.
float NotebookAngerValue [get]
 Current anger value added by notebook collection.
int NotebookTotal [get]
 Total notebooks required for the level.
bool Paused [get, set]
 Gets or sets whether the game is paused.
bool ReadyToStart [get, set]
 Whether the game is ready to start (level initialization complete).
BBPScene Scene [get]
 Strongly-typed scene wrapper for the current scene.
int Seed [get]
 Current game seed value.
int TotalPlayers [get]
 Number of player slots supported by the game.
string Version [get]
 Application/game version string.

Detailed Description

Provides access to overall game state and control functions.

Member Function Documentation

◆ AddLives()

void BBPGlue.API.BBPGame.AddLives ( int amount)

Adds lives to the player.

Parameters
amountNumber of lives to add.

◆ AddNotebookTotal()

void BBPGlue.API.BBPGame.AddNotebookTotal ( int count)

Increases the notebook total by the given count.

◆ AddPoints() [1/2]

void BBPGlue.API.BBPGame.AddPoints ( int points,
int player,
bool playAnimation,
bool includeInLevelTotal,
bool multiply )

Adds points with full parameterization.

Parameters
pointsPoints to add.
playerPlayer index.
playAnimationWhether to play points animation.
includeInLevelTotalWhether to count toward level total.
multiplyWhether to multiply the amount by a multiplier.

◆ AddPoints() [2/2]

void BBPGlue.API.BBPGame.AddPoints ( int points,
int player = 0,
bool playAnimation = true )

Adds points for a player with optional animation.

Parameters
pointsPoints to add.
playerPlayer index.
playAnimationWhether to play points animation.

◆ AddYtpMultiplier()

void BBPGlue.API.BBPGame.AddYtpMultiplier ( float value)

Adds a YTP multiplier value.

◆ AngerBaldi()

void BBPGlue.API.BBPGame.AngerBaldi ( float amount)

Adds anger to Baldi.

◆ BeginPlay()

void BBPGlue.API.BBPGame.BeginPlay ( )

Begins normal gameplay from the base manager.

◆ BeginSpoopMode()

void BBPGlue.API.BBPGame.BeginSpoopMode ( )

Starts the spook mode gameplay.

◆ CloseMap()

void BBPGlue.API.BBPGame.CloseMap ( )

Closes the map UI.

◆ CollectNotebooks()

void BBPGlue.API.BBPGame.CollectNotebooks ( int count)

Programmatically collects notebooks.

◆ FinishLevel()

void BBPGlue.API.BBPGame.FinishLevel ( )

Finishes the current level.

◆ GetCamera()

object? BBPGlue.API.BBPGame.GetCamera ( int index)

Retrieves a camera object by index.

Parameters
indexCamera index.
Returns
The camera object or null.

◆ GetHud()

object? BBPGlue.API.BBPGame.GetHud ( int index)

Retrieves a HUD object by index.

Parameters
indexHUD index.
Returns
The HUD object or null.

◆ GetPlayer()

object? BBPGlue.API.BBPGame.GetPlayer ( int index)

Retrieves a player object by index from the core manager.

Parameters
indexPlayer index.
Returns
The player object or null.

◆ GetPoints()

int BBPGlue.API.BBPGame.GetPoints ( int player = 0)

Gets the player's points total.

Parameters
playerPlayer index.
Returns
Points total.

◆ GetPointsThisLevel()

int BBPGlue.API.BBPGame.GetPointsThisLevel ( int player = 0)

Gets points earned this level for the player.

Parameters
playerPlayer index.
Returns
Points this level.

◆ GivePoints() [1/3]

void BBPGlue.API.BBPGame.GivePoints ( int amount)

Convenience overload to give points to player 0.

Parameters
amountAmount of points.

◆ GivePoints() [2/3]

void BBPGlue.API.BBPGame.GivePoints ( int amount,
int player )

Convenience overload to give points to a specific player.

Parameters
amountAmount of points.
playerPlayer index.

◆ GivePoints() [3/3]

void BBPGlue.API.BBPGame.GivePoints ( int amount,
int player,
bool playAnimation,
bool includeInLevelTotal,
bool multiply )

Full-parameter give points call.

◆ LoadNextLevel()

void BBPGlue.API.BBPGame.LoadNextLevel ( )

Loads the next level via the base manager.

◆ OpenMap()

void BBPGlue.API.BBPGame.OpenMap ( bool toMap = true)

Opens the map UI.

◆ Pause()

void BBPGlue.API.BBPGame.Pause ( bool paused,
bool openScreen = true )

Pauses or unpauses the game.

Parameters
pausedTrue to pause; false to unpause.
openScreenTrue to open the pause screen when pausing.

◆ PleaseBaldi()

void BBPGlue.API.BBPGame.PleaseBaldi ( float time,
bool rewardSticker )

Temporarily pleads with Baldi for the given time and optional sticker reward.

◆ Quit()

void BBPGlue.API.BBPGame.Quit ( )

Quits the game immediately.

◆ Refresh()

void BBPGlue.API.BBPGame.Refresh ( )

Refreshes the game context.

◆ RemoveYtpMultiplier()

void BBPGlue.API.BBPGame.RemoveYtpMultiplier ( float value)

Removes a YTP multiplier value.

◆ ResetCameras()

void BBPGlue.API.BBPGame.ResetCameras ( )

Resets all cameras to default states.

◆ ResetShaders()

void BBPGlue.API.BBPGame.ResetShaders ( )

Resets shader-related state.

◆ RestartLevel()

void BBPGlue.API.BBPGame.RestartLevel ( )

Restarts the current level.

◆ ReturnToMenu()

void BBPGlue.API.BBPGame.ReturnToMenu ( )

Returns to the main menu.

◆ Save()

void BBPGlue.API.BBPGame.Save ( )

Saves the current game state.

◆ SaveAndQuit()

void BBPGlue.API.BBPGame.SaveAndQuit ( )

Saves the game and quits to desktop/menu.

◆ SetAttempts()

void BBPGlue.API.BBPGame.SetAttempts ( int attempts)

Sets the number of attempts.

◆ SetLives()

void BBPGlue.API.BBPGame.SetLives ( int lives,
bool overrideLifeMode = true )

Sets the player's lives and optionally overrides life mode.

Parameters
livesLives to set.
overrideLifeModeWhether to override life mode.

◆ SetRandomSeed()

void BBPGlue.API.BBPGame.SetRandomSeed ( )

Sets a random seed.

◆ SetSeed()

void BBPGlue.API.BBPGame.SetSeed ( int seed)

Sets the deterministic seed used by the game.

◆ ToggleMap()

void BBPGlue.API.BBPGame.ToggleMap ( bool openMap = true)

Toggles the map UI.

◆ TogglePauseScreen()

void BBPGlue.API.BBPGame.TogglePauseScreen ( )

Toggles the pause screen on.

Property Documentation

◆ AllNotebooksFound

bool BBPGlue.API.BBPGame.AllNotebooksFound
get

Whether all notebooks have been found.

◆ Attempts

int BBPGlue.API.BBPGame.Attempts
get

Current attempt count.

◆ BaseManager

object? BBPGlue.API.BBPGame.BaseManager
get

Base manager that exposes higher-level game facilities.

◆ CoreManager

object? BBPGlue.API.BBPGame.CoreManager
get

Core game manager object providing core gameplay operations.

◆ CurrentLevel

int BBPGlue.API.BBPGame.CurrentLevel
getset

Currently loaded level index.

◆ CurrentSceneObject

object? BBPGlue.API.BBPGame.CurrentSceneObject
get

Raw scene object currently loaded.

◆ DisablePause

bool BBPGlue.API.BBPGame.DisablePause
getset

Gets or sets whether pausing is disabled.

◆ EnvironmentController

object? BBPGlue.API.BBPGame.EnvironmentController
get

Environment controller from the base manager.

◆ FoundNotebooks

int BBPGlue.API.BBPGame.FoundNotebooks
get

Number of notebooks found this run.

◆ Grade

string BBPGlue.API.BBPGame.Grade
get

Current grade string.

◆ GradeValue

int BBPGlue.API.BBPGame.GradeValue
getset

Current grade numeric value.

◆ IsInGame

bool BBPGlue.API.BBPGame.IsInGame
get

Whether the application is currently in a playable game session.

◆ Lives

int BBPGlue.API.BBPGame.Lives
get

Lives remaining.

◆ MapAvailable

bool BBPGlue.API.BBPGame.MapAvailable
get

Whether a map is available in the current context.

◆ MapOpen

bool BBPGlue.API.BBPGame.MapOpen
get

Whether the map UI is currently open.

◆ NotebookAngerValue

float BBPGlue.API.BBPGame.NotebookAngerValue
get

Current anger value added by notebook collection.

◆ NotebookTotal

int BBPGlue.API.BBPGame.NotebookTotal
get

Total notebooks required for the level.

◆ Paused

bool BBPGlue.API.BBPGame.Paused
getset

Gets or sets whether the game is paused.

Setting will open/close the pause screen.

◆ ReadyToStart

bool BBPGlue.API.BBPGame.ReadyToStart
getset

Whether the game is ready to start (level initialization complete).

◆ Scene

BBPScene BBPGlue.API.BBPGame.Scene
get

Strongly-typed scene wrapper for the current scene.

◆ Seed

int BBPGlue.API.BBPGame.Seed
get

Current game seed value.

◆ TotalPlayers

int BBPGlue.API.BBPGame.TotalPlayers
get

Number of player slots supported by the game.

◆ Version

string BBPGlue.API.BBPGame.Version
get

Application/game version string.


The documentation for this class was generated from the following file: