Giter Club home page Giter Club logo

beat-saber-utils's Introduction

A basic library for mods to use, does nothing on its own

Feel free to look at the source or contribute if you want to add something to the library

Changelog 1.2.1

  • Added BS_Utils.Gameplay.LevelData Class and Plugin.LevelData field to contain the information StandardLevelSceneSetupDataSO used to contain since that is no longer easily accessible by plugins, can use the IsSet bool of BS_Utils.Plugin.LevelData to check if it is safe to access
  • Updated For Beat Saber 0.13.0, Everything should be functional

Capabilities

Currently provides easy ways for mods to

  • Easily create their own config files
  • Disable Score submission when changing game play that warrant it
  • Fetch User ID and name, regardless of platform
  • Check whether party mode is active
  • Check whether Standard, No Arrows, or One Saber is selected
  • Declare when they are starting a level through their mod when they want it isolated from other mods' functionality
  • Check if another mod wants the level isolated so they know when to disable functionality

Example Usage

using BS_Utils;
using BS_Utils.Gameplay;
// For a config can simply do this on Application start
// to create a config for your mod in the UserData Folder
Utilities.Config ConfigVariable = new Utilities.Config("ModName");
//Or if you want it to be in a separate folder,
// create the folder path from UserData using your plugin if it doesn't exist, and then
Utilities.Config ConfigVariable = new Utilities.Config("FolderName/ModName");
// Then you can simply Get/Set values in the config such as
ConfigVariable.GetBool("SectionName", "SectionVariableName");
ConfigVariable.SetBool("SectionName", "SectionVariableName", value);

// When in GameCore Scene, can use the following to disable submission for the song
// All of the mods that disabled submission will be shown on the results screen
ScoreSubmission.DisableSubmission("Mod Name");

// Can also use the following to disable submission until you have your mod re-enable it
ScoreSubmission.ProlongedDisableSubmission("Mod Name");

// And to re-enable
ScoreSubmission.RemoveProlongedDisable("Mod Name");

// To fetch user information can simply use the following

// For user name
UserInfo.GetUserName();
// For User ID
UserInfo.GetUserID();

// For checking Party or Gamemode, first call this when in the Menu Scene
Gamemode.Init();
//To check If Party is active(bool) or the gamemode (string)
// you can just access these properties
Gamemode.IsPartyActive
Gamemode.GameMode

// To declare the mod is about to start a level they want isolated, call this in menu before starting the level
Gamemode.NextLevelIsIsolated("Mod Name");

// To check if the level is isolated, and which mod isolated it
Gamemode.IsIsolatedLevel // Bool value
Gamemode.IsolatingMod // String value

beat-saber-utils's People

Contributors

andruzzzhka avatar caeden117 avatar kylemc1413 avatar luludotdev avatar monkeymanboy avatar nike4613 avatar shoko84 avatar thynix avatar tiruialon avatar zingabopp avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.