
You are viewing a potentially older version of this package. View Latest Version
OpenShot
A core library and API for Lucky Shot modding. Provides a Mod Menu, Developer Console, unified GameEvents, AudioAPI, InputAPI, and Asset Registries.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
.wavor.oggfiles dynamically from the disk with a single method callAudioAPI.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
- Install BepInEx.
- Extract the
OpenShot.dllinto yourBepInEx/pluginsfolder. - 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
}
});