OpenShot
Core API for Lucky Shot modding: diegetic MODS menu, fluent ModMenu API, MainMenu cards, GameEvents, Audio/Input/Save APIs.
| Date uploaded | 22 minutes ago |
| Version | 2.0.1 |
| Download link | LiamGaming-OpenShot-2.0.1.zip |
| Downloads | 0 |
| Dependency string | LiamGaming-OpenShot-2.0.1 |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2305README
OpenShot Library
OpenShot is a core library and API for modding Lucky Shot. It provides shared tools and events so mods stay cleaner and conflict-free.
Features for Players
- MODS main-menu card: Shoot the in-world MODS card on the main menu to configure installed mods (same diegetic style as COLLECTIONS / TRIALS).
- Developer Console (~): Built-in command console (e.g.
help).
Features for Developers
- MainMenu API: Add or adapt shootable main-menu cards (
MainMenu.AddButton,SetLabel,Hide,OnShot,WhenReady). - ModMenu hub: Fluent tabs with toggles, bools, sliders, ints, enums, buttons, and info lines (auto-grows / scrolls).
- GameEvents: Subscribe to
OnTargetSpawned,OnShotFired,OnShopTryBuy,OnAmmoDisplayUpdated, and more without writing your own Harmony patches. - AudioAPI: Play
.wav/.oggfrom disk viaAudioAPI.PlaySound(). - InputAPI: Register keybinds without cluttering
Update(). - Bullet & Asset Registry: Register custom bullets/prefabs with unique string IDs.
- SaveAPI: Persist custom JSON across sessions.
Installation
- Install BepInEx.
- Extract
OpenShot.dllintoBepInEx/plugins. - Start the game.
Developer Setup
Add OpenShot.dll as a project reference and declare the dependency:
using BepInEx;
using OpenShot; // OpenShotApi.Guid
[BepInDependency(OpenShotApi.Guid, BepInDependency.DependencyFlags.HardDependency)]
[BepInPlugin("com.you.mymod", "My Mod", "1.0.0")]
public class MyModPlugin : BaseUnityPlugin { }
Soft dependency: use SoftDependency and wrap UI registration in OpenShotApi.Try(...) or check OpenShotApi.IsLoaded.
Main-menu buttons (diegetic)
using OpenShot.UI;
MainMenu.AddButton("MY MOD", () => { /* shot */ });
MainMenu.SetLabel("COLLECTIONS", "SAMMLUNG");
MainMenu.Hide("TRIALS");
MainMenu.OnShot("STATS", hit => false); // false = also run original
MainMenu.WhenReady(() => {
// menu cards are in the world now
});
Mod settings (MODS hub)
Fluent API. The panel grows with options and scrolls when a tab is tall.
Float / Int without min/max read AcceptableValueRange from the config bind.
using BepInEx.Configuration;
using OpenShot.UI;
ModMenu.Tab("MyMod")
.Toggle(enabledConfig) // master Enabled row
.Info("— Shop —")
.Bool("Weaker Shop", weakerShop) // labeled ON/OFF
.Slider("Cost Mult", shopMult, 0.05f) // range from ConfigDescription
.Int("Extra Targets", extraTargets) // range from ConfigDescription
.Enum("Mode", modeConfig)
.Button("Reset", () => ResetDefaults());
Legacy RegisterTab / RegisterToggle / RegisterFloatSetting still work.
[OpenShotMenuTab("MyMod")] on a static method still registers a hub tab name.
CHANGELOG
Changelog
2.0.1
- Game update fix: Harmony hooks moved to
GameEvents.PublishShotFiredandShopManager.TryPurchase(removedHandleShotFired/TryBuy).
2.0.0
- Diegetic MODS hub rewrite: World-space settings panel (grows with options, scroll ▲▼, shootable controls).
- Fluent ModMenu API:
ModMenu.Tab("Name").Toggle/Bool/Slider/Float/Int/Enum/Info/Button— AcceptableValueRange auto min/max, upsert-by-label. - OpenShotApi: stable
Guid/Version/IsLoaded/Try/OnMainMenuReady/OnSettingsChanged. - Settings events: mods subscribe to
OpenShotApi.OnSettingsChangedinstead of polling config every frame. - MainMenu API:
AddButton,SetLabel,Hide,OnShot,WhenReady; full-width injected cards (no thin MODS squash). - Performance: menu discovery backoff, collider fit only on scroll/change, removed unused per-frame camera Harmony patch.
- Breaking for UI: old F1 / IMGUI-only tabs are obsolete — register settings via fluent API (legacy
Register*still works).
1.3.0
- Main Menu UI rewrite: Replaced the fragile
MainMenuInjectorwith a modular diegetic menu system (CardFactory,MenuLayout,ButtonRegistry,ModHubPanel). MainMenuAPI:AddButton,SetLabel,Hide, andOnShotfor easy custom cards and adapting existing game buttons.- Layout fix: Narrow columns are redistributed across the canvas so added buttons no longer clip off-screen.
- Mod hub: Curve-safe narrow cards, dynamic setting slots (up to 12), still shootable toggles/sliders.
- Docs updated (removed outdated F1 /
Register3DButton/ IMGUI menu examples).
1.2.0
- 3D Main Menu Injection: Added an in-world 3D "MODS" button to the game's physical main menu. Modders can use
ModMenu.Register3DButton()to add their own physical buttons. - UI Theming: Entirely overhauled the IMGUI theming to a modern, flat Cyberpunk/Dark Mode aesthetic with proper hover states.
- Object Pool API: Added
ObjectPoolAPIto allow mods to recycle GameObjects (like bullets) and save massive CPU overhead. - Update Checker: Automatically checks Thunderstore for updates asynchronously in the background.
1.1.0
- Custom Attributes Registration: Modders can now use
[ConsoleCommand]and[OpenShotMenuTab]attributes to automatically register UI tabs and commands via reflection. - AssetBundle Loader: Added
AssetLoader.GetPrefab()to automatically load and cache prefabs from.bundlefiles in the plugins folder. - Localization API: Mods can now easily support multiple languages using
LocalizationAPI.GetString()and corresponding JSON files. - GameEvents 2.0: Key events (
OnShotFired,OnShopTryBuy,OnWeaponReloaded) are now cancelable using aref bool cancelparameter, allowing mods to intercept and block game actions!
1.0.0
- Initial release.