tetriscat66-NicerSceneNames icon

NicerSceneNames

This is a utility mod for mod developers. It does not add any features for players on its own. See the README for more details.

Last updated a month ago
Total downloads 575
Total rating 0 
Categories Tools Libraries
Dependency string tetriscat66-NicerSceneNames-1.0.0
Dependants 1 other package depends on this package

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100

README

Nicer Scene Names

This is a utility mod for mod developers. It does not add any features for players on its own.

I was told that SceneHelper.CurrentScene() no longer has nice to work with names for most scenes. This mod should make that a little easier. In your code, replace SceneHelper.CurrentScene() with SceneNamer.CurrentScene(), and it should work the same as before, for the most part; it should use the same names as before for most scenes. The following scene names are supported:

  • "Intro" (the entire startup animation)
  • "Main Menu"
  • "Bootstrap" (the tutorial level and the boot up sequence from a new save/0-1 full intro)
  • "Level #-#" (replace the #'s with the numbers/letters of the level name)
  • "Intermission1" (Act 1 ending cutscene)
  • "Intermission2" (Act 2 ending cutscene)
  • "Cybergrind" (may be different from with SceneHelper)
  • "Sandbox" (may be different from with SceneHelper)
  • "Museum" (may be different from with SceneHelper)

There are also the following helper methods for determining scenes:

  • IsGameplayScene()
  • IsGameplaySceneIncludingBootstrap()
  • IsPrimeSanctum()
  • IsEncore()
  • IsSecretLevel()
  • IsIntermission()

These methods each have two versions: one with a scene parameter and one with a name string parameter and optional bool parameter for if it's already a nice name (defaults to false). IsGameplayScene returns false for Bootstrap, but IsGameplaySceneIncludingBootstrap() returns true instead.

Other than that, if you want to get the name of a scene that isn't the currently loaded one, you can use GetNiceSceneName(). There is a version with a scene parameter and one with a name string parameter.