LiamGaming-OpenShot icon

OpenShot

A core library and API for Lucky Shot modding. Provides a Mod Menu, Developer Console, unified GameEvents, AudioAPI, InputAPI, and Asset Registries.

Last updated 5 hours ago
Total downloads 1
Total rating 0 
Categories Libraries
Dependency string LiamGaming-OpenShot-1.2.0
Dependants 1 other package depends on this package

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2305 icon
BepInEx-BepInExPack

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

Preferred version: 5.4.2305

README

OpenShot Library

OpenShot is a powerful core library and API for modding Lucky Shot. It provides essential tools and global events to make modding easier, cleaner, and conflict-free.

Features for Players

  • In-Game Mod Menu (F1): A unified menu to configure installed mods. Pauses the game automatically.
  • Developer Console (~): A built-in command console to debug and run mod commands (e.g., help).

Features for Developers

  • GameEvents: Subscribe to OnTargetSpawned, OnShotFired, OnShopTryBuy, OnAmmoDisplayUpdated, and more without needing to write your own Harmony patches.
  • AudioAPI: Play custom .wav or .ogg files dynamically from the disk with a single method call AudioAPI.PlaySound().
  • InputAPI: A simple way to register keybinds and callbacks without cluttering your Update() loop.
  • Bullet & Asset Registry: Safely register custom bullets and prefabs with unique string IDs to avoid conflicts with other mods.
  • SaveAPI: Save and load custom JSON data persistently across game sessions.

Installation

  1. Install BepInEx.
  2. Extract the OpenShot.dll into your BepInEx/plugins folder.
  3. Start the game!

Developer Setup

To use OpenShot in your mod, simply add OpenShot.dll as a reference in your C# project.

using OpenShot.Events;
using OpenShot.UI;

// Example: Add a button to the Mod Menu
ModMenu.RegisterTab(() => {
    if (UIHelper.DrawButton("Click Me!")) {
        // Do something
    }
});