GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - DemonZ-Development/DeadshotModAPI: A modding API for Deadshot that is currently in development.

BranchesTags
Open more actions menu

Latest commit

 

History

27 Commits
27 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
DeadshotModAPI.Tests
DeadshotModAPI.Tests
 
 
Events
Events
 
 
GameManager
GameManager
 
 
Input
Input
 
 
Logging
Logging
 
 
Mods
Mods
 
 
Runtime
Runtime
 
 
SceneManager
SceneManager
 
 
examples/ExampleMod
examples/ExampleMod
 
 
lib
lib
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
DeadshotModAPI.csproj
DeadshotModAPI.csproj
 
 
LICENSE
LICENSE
 
 
Plugin.cs
Plugin.cs
 
 
README.md
README.md
 
 

Repository files navigation

Deadshot Mod API

Build Framework Platform License: MIT

A modding library for Deadshot built on BepInEx 6 IL2CPP and .NET 6.

DeadshotModAPI handles mod discovery, assembly loading, key bindings, and scene loading so you can write mods without setting up BepInEx plugins or IL2CPP interop manually.


Requirements

Players

  • Deadshot
  • BepInEx 6 (Bleeding Edge IL2CPP)
  • DeadshotModAPI.dll in <GameDir>/BepInEx/plugins/

Mod Developers

  • .NET 6 SDK
  • A C# editor (Visual Studio, Rider, or VS Code)
  • A reference to DeadshotModAPI.dll in your project

Directory Layout

Deadshot/
├── BepInEx/
│   ├── plugins/
│   │   └── DeadshotModAPI.dll       <-- API plugin
│   └── mods/
│       ├── SpeedrunMod.dll          <-- Your mod DLLs
│       └── CustomMod/
│           └── CustomMod.dll        <-- Subdirectories are scanned too

At startup, the API scans BepInEx/mods/ recursively for DLLs, finds classes implementing IDeadshotMod, and calls their Load() method.


Quickstart: Creating a Mod

  1. Create a class library targeting .NET 6:
    dotnet new classlib -n SpeedrunMod -f net6.0
  2. Reference DeadshotModAPI.dll in your .csproj:
    <ItemGroup>
      <Reference Include="DeadshotModAPI">
        <HintPath>path\to\DeadshotModAPI.dll</HintPath>
      </Reference>
    </ItemGroup>
  3. Implement IDeadshotMod:
    using DeadshotModAPI;
    
    public class SpeedrunMod : IDeadshotMod
    {
        public string Name => "Deadshot Speedrunning";
        public string Description => "A Mod made for speedrunning Deadshot.";
        public string Creator => "Subaka";
        public string Version => "0.2.0";
    
        public void Load()
        {
            Logger.Debug("Deadshot Speedrun loaded through Mod API.");
    
            Input.OnKeyPressed(Key.F1, () => RestartLevelMethod(false));
            Input.OnKeyPressed(Key.F2, () => RestartLevelMethod(true));
        }
    
        private void RestartLevelMethod(bool playCutscene)
        {
            GameManager.RestartLevel(playCutscene);
        }
    }
  4. Build your mod:
    dotnet build -c Release
  5. Copy the output DLL to <Deadshot>/BepInEx/mods/.

See examples/ExampleMod/ for a working project template.


API Reference

IDeadshotMod

Interface implemented by mods:

  • Name - Mod display name.
  • Description - Summary of mod behavior.
  • Creator - Author name.
  • Version - Version string (e.g. "0.2.0").
  • Load() - Runs once at game startup.

Input

Keyboard listener:

  • Input.OnKeyPressed(Key key, Action callback) - Registers a callback triggered when key is pressed.
  • Input.RemoveKeyPressed(Key key, Action callback) - Unregisters a callback.

SceneManager

Scene utilities:

  • SceneManager.Load(string sceneName) - Loads a scene by name.
  • SceneManager.Load(int sceneIndex) - Loads a scene by build index.

GameManager

Level lifecycle utilities:

  • GameManager.RestartLevel(bool playCutscene = true) - Restarts the active level. Set playCutscene: false to skip the intro cutscene.

Logger

Unity and BepInEx console logger:

  • Logger.Info(string message) / Logger.Log(string message)
  • Logger.Warning(string message)
  • Logger.Error(string message)
  • Logger.Debug(string message)

Building from Source

git clone https://github.com/DemonZ-Development/DeadshotModAPI.git
cd DeadshotModAPI
dotnet build DeadshotModAPI.csproj -c Release
dotnet test DeadshotModAPI.Tests/DeadshotModAPI.Tests.csproj

References point to lib/ with relative paths, so the solution builds on any machine with the .NET 6 SDK.


License

MIT. See LICENSE.

About

A modding API for Deadshot that is currently in development.

Topics

deadshotgame-developmentmod-apimod-managermoddingmodding-apimodding-frameworkmodding-librarymodding-toolmodding-toolsmodssteamsteam-games

Resources

Readme
MIT license

Contributing

Contributing
Activity
Custom properties

Stars

2 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.