LethalAPI.Templates 1.0.0

dotnet new install LethalAPI.Templates::1.0.0                
This package contains a .NET Template Package you can call from the shell/command line.

LethalAPI.Templates

A Lethal Company plugin template utilizing the LethalAPI framework.

Usage

  1. Select a plugin template.
  2. Create a new plugin using the template.
  3. Replace necessary variables.
    • Visual Studio will prompt you with the necessary variables in the template creation menu and will replace them automatically on creation. Rider does not do this.
  4. Rename Project and Solution files to the new plugin name.

For Rider Users we recommend using Visual Studio to create the initial plugin from the template, then switching back to Rider after creation. Rider does not implement proper template symbol (template variables) functionality.

Plugin Templates

  • Inherited - This template is the best for new modders / developers, and is the largest plugin template.
    • Uses an inherited plugin class and provides optional overrides.
    • Hard-Typed and Compiler-Safe.
    • Implements required currently valid methods and properties. Optional methods and properties are present as overrides.
    • Inherited XML Documentation.
  • Attribute - This template is the best for modders and developers who have made BepInEx plugins or MelonLoader plugins before.
    • Uses attributes to define the plugin class.
    • Uses attributes to define the necessary properties and methods required to make a functional plugin.
    • Implements all currently valid methods and properties.
    • Complete XML Documentation.
  • Minimal - This template is the best for advanced developers who want a minimalistic entry plugin with just barebone features.
    • Uses a single attribute to define the plugin class.
    • Uses naming schemes to define the required properties and methods required to make a functional plugin.
    • Only implements required methods and properties.
    • No XML Documentation.

Available plugin templates include Inherited, Attribute, and Minimal.

Variables

Use a mass replace function to replace all of the following variables. In most IDE's this option can be opened with [Ctrl] + [Shift] + [H] by default.

Visual Studio will prompt you to enter these variables before plugin creation, making this section irrelevant for vs users.

Variable Description
LethalAPI.Plugin The default root namespace and assembly name.
PLUGIN-NAME The default plugin name.
PLUGIN-DESCRIPTION The default description of the plugin.
PLUGIN-AUTHOR The default author(s) of the plugin.
  • Replace all instances of "LethalAPI.Plugin" with the assembly name / root namespace. Note - This is also the root namespace so be careful with the naming scheme. Don't use spaces.
  • Replace all instances of "PLUGIN-NAME" with the name of the plugin.
  • Replace all instances of "PLUGIN-DESCRIPTION" with a description of the plugin.
  • Replace all instances of "PLUGIN-AUTHOR" with the name(s) of the author(s) - or community.
  • .NETFramework 4.8

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 3,305 11/30/2023