OpenShot

版本 v2.0.4·更新於 2026-08-24

Core API for Lucky Shot modding: diegetic MODS menu, fluent ModMenu API, MainMenu cards, GameEvents, Audio/Input/Save APIs.

模組介紹 作者原文

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.ogg from disk via AudioAPI.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.dll into BepInEx/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.

安裝與使用 安裝:按包內說明操作

  1. 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
  2. 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
  3. 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
  4. 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。

不同模組的安裝位置差異較大,包內說明是最可靠的依據。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

BepInEx-BepInExPack

檔案與校驗

檔案名稱
OpenShot-2.0.4.zip
檔案大小
208.3 KiB