Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"$schema": "https://json.schemastore.org/template",
"author": "qqrz997",
"classifications": [
"Common",
"Library"
],
"identity": "BSIPA.Plugin.Bare",
"name": "BSIPA Plugin (Bare)",
"defaultName": "BeatSaberPlugin",
"description": "A bare-minimum template for a new Beat Saber IPA mod.",
"shortName": "bsbare",
"sourceName": "BarePlugin",
"tags": {
"language": "C#",
"type": "project",
"platform": ".NET"
},
"preferNameDirectory": true,
"symbols": {
"ModVersion": {
"type": "parameter",
"description": "The version of the mod. Must be of format major.minor.patch.",
"datatype": "text",
"replaces": "{ModVersion}",
"defaultValue": "0.0.1",
"displayName": "Mod Version"
},
"ModAuthor": {
"type": "parameter",
"description": "The name of who is developing the mod.",
"datatype": "text",
"replaces": "{ModAuthor}",
"displayName": "Author",
"defaultValue": ""
},
"ModDescription": {
"type": "parameter",
"description": "A short sentence describing the mod's features.",
"datatype": "text",
"replaces": "{ModDescription}",
"displayName": "Description",
"defaultValue": ""
},
"GameVersion": {
"type": "parameter",
"description": "Version of the game you are developing for.",
"datatype": "text",
"replaces": "{GameVersion}",
"displayName": "Game Version",
"defaultValue": "1.40.0"
},
"Nullable": {
"type": "parameter",
"description": "Use nullable reference types. (Recommended)",
"datatype": "bool",
"replaces": "{Nullable}",
"defaultValue": "true"
},
"EnableHints": {
"type": "parameter",
"description": "Includes code comments that provide helpful information.",
"datatype": "bool",
"displayName": "Enable Hints",
"defaultValue": "true"
}
},
"primaryOutputs": [
{"path": "Plugin.cs" }
],
"postActions": [
{
"condition": "(HostIdentifier != \"dotnetcli\")",
"description": "Opens Plugin.cs in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "0"
},
"continueOnError": true
}
]
}
85 changes: 85 additions & 0 deletions projectTemplates/BSIPA Plugin (Bare)/BarePlugin.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="BarePlugin.csproj.user" Condition="Exists('BarePlugin.csproj.user')" />

<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<!--#if (EnableHints) -->
<!-- Some features of the latest version of C# aren't available in Beat Saber. Refer to the unity docs for info -->
<!-- https://docs.unity3d.com/2022.3/Documentation/Manual/CSharpCompiler.html -->
<!--#endif -->
<LangVersion>latest</LangVersion>
<!--#if (Nullable) -->
<Nullable>enable</Nullable>
<!--#else -->
<Nullable>disable</Nullable>
<!--#endif -->
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<EnableFrameworkPathOverride>true</EnableFrameworkPathOverride>
<FrameworkPathOverride>$(BeatSaberDir)\Beat Saber_Data\Managed</FrameworkPathOverride>
<MarkPackageReferencesAsExternallyResolved>false</MarkPackageReferencesAsExternallyResolved>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BeatSaberModdingTools.Tasks" Version="2.0.0-beta7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<None Include="BarePlugin.csproj.user" Condition="Exists('BarePlugin.csproj.user')" />
</ItemGroup>

<ItemGroup>
<Reference Include="BeatSaber.ViewSystem">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\BeatSaber.ViewSystem.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="BSML">
<HintPath>$(BeatSaberDir)\Plugins\BSML.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Hive.Versioning">
<HintPath>$(BeatSaberDir)\Libs\Hive.Versioning.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="IPA.Loader">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\IPA.Loader.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Main">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\Main.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="mscorlib"/>
<Reference Include="netstandard"/>
<Reference Include="System"/>
<Reference Include="System.Core"/>
<Reference Include="Unity.TextMeshPro">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\Unity.TextMeshPro.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.UI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UIElementsModule">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.UIElementsModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UIModule">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.UIModule.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>

</Project>
33 changes: 33 additions & 0 deletions projectTemplates/BSIPA Plugin (Bare)/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This file contains project properties used by the build. -->
<Project>

<!-- Plugin Metadata -->
<PropertyGroup>
<PluginId>BarePlugin</PluginId>
<PluginName>BarePlugin</PluginName>
<Authors>{ModAuthor}</Authors>
<Version>{ModVersion}</Version>
<GameVersion>{GameVersion}</GameVersion>
<Description>{ModDescription}</Description>
<!--<PluginIcon></PluginIcon>-->
<!--<ProjectSource></ProjectSource>-->
<!--<ProjectHome></ProjectHome>-->
<!--<DonateUrl></DonateUrl>-->
</PropertyGroup>

<!-- Plugin Dependencies -->
<ItemGroup>
<DependsOn Include="BSIPA" Version="^4.3.0"/>
</ItemGroup>

<PropertyGroup>
<BSMTProjectType>BSIPA</BSMTProjectType>
<GenerateManifest>true</GenerateManifest>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' != 'Release'">
<DisableZipRelease>true</DisableZipRelease>
</PropertyGroup>

</Project>
34 changes: 34 additions & 0 deletions projectTemplates/BSIPA Plugin (Bare)/Plugin.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using IPA;
using IPA.Loader;
using IpaLogger = IPA.Logging.Logger;

namespace BarePlugin;

[Plugin(RuntimeOptions.DynamicInit)]
internal class Plugin
{
internal static IpaLogger Log { get; private set; } = null!;
#if (EnableHints)
// Methods with [Init] are called when the plugin is first loaded by IPA.
// All the parameters are provided by IPA and are optional.
// The constructor is called before any method with [Init]. Only use [Init] with one constructor.
#endif
[Init]
public Plugin(IpaLogger ipaLogger, PluginMetadata pluginMetadata)
{
Log = ipaLogger;
Log.Info($"{pluginMetadata.Name} {pluginMetadata.HVersion} initialized.");
}

[OnStart]
public void OnApplicationStart()
{
Log.Debug("OnApplicationStart");
}

[OnExit]
public void OnApplicationQuit()
{
Log.Debug("OnApplicationQuit");
}
}

This file was deleted.

83 changes: 83 additions & 0 deletions projectTemplates/BSIPA Plugin (UI)/.template.config/template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"$schema": "https://json.schemastore.org/template",
"author": "qqrz997",
"classifications": [
"Common",
"Library"
],
"identity": "BSIPA.Plugin.UI",
"name": "BSIPA Plugin (UI)",
"defaultName": "BeatSaberPlugin",
"description": "A template for a new Beat Saber IPA mod with a basic UI setup using BeatSaberMarkupLanguage.",
"shortName": "bsui",
"sourceName": "MenuPlugin",
"tags": {
"language": "C#",
"type": "project",
"platform": ".NET"
},
"preferNameDirectory": true,
"symbols": {
"ModVersion": {
"type": "parameter",
"description": "The version of the mod. Must be of format major.minor.patch.",
"datatype": "text",
"replaces": "{ModVersion}",
"defaultValue": "0.0.1",
"displayName": "Mod Version"
},
"ModAuthor": {
"type": "parameter",
"description": "The name of who is developing the mod.",
"datatype": "text",
"replaces": "{ModAuthor}",
"displayName": "Author",
"defaultValue": ""
},
"ModDescription": {
"type": "parameter",
"description": "A short sentence describing the mod's features.",
"datatype": "text",
"replaces": "{ModDescription}",
"displayName": "Description",
"defaultValue": ""
},
"GameVersion": {
"type": "parameter",
"description": "Version of the game you are developing for.",
"datatype": "text",
"replaces": "{GameVersion}",
"displayName": "Game Version",
"defaultValue": "1.40.0"
},
"Nullable": {
"type": "parameter",
"description": "Use nullable reference types. (Recommended)",
"datatype": "bool",
"replaces": "{Nullable}",
"defaultValue": "true"
},
"EnableHints": {
"type": "parameter",
"description": "Includes code comments that provide helpful information.",
"datatype": "bool",
"displayName": "Enable Hints",
"defaultValue": "true"
}
},
"primaryOutputs": [
{"path": "Plugin.cs" }
],
"postActions": [
{
"condition": "(HostIdentifier != \"dotnetcli\")",
"description": "Opens Plugin.cs in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "0"
},
"continueOnError": true
}
]
}
34 changes: 34 additions & 0 deletions projectTemplates/BSIPA Plugin (UI)/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This file contains project properties used by the build. -->
<Project>

<!-- Plugin Metadata -->
<PropertyGroup>
<PluginId>MenuPlugin</PluginId>
<PluginName>MenuPlugin</PluginName>
<Authors>{ModAuthor}</Authors>
<Version>{ModVersion}</Version>
<GameVersion>{GameVersion}</GameVersion>
<Description>{ModDescription}</Description>
<!--<PluginIcon></PluginIcon>-->
<!--<ProjectSource></ProjectSource>-->
<!--<ProjectHome></ProjectHome>-->
<!--<DonateUrl></DonateUrl>-->
</PropertyGroup>

<!-- Plugin Dependencies -->
<ItemGroup>
<DependsOn Include="BSIPA" Version="^4.3.0"/>
<DependsOn Include="BeatSaberMarkupLanguage" Version="^1.12.0"/>
</ItemGroup>

<PropertyGroup>
<BSMTProjectType>BSIPA</BSMTProjectType>
<GenerateManifest>true</GenerateManifest>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' != 'Release'">
<DisableZipRelease>true</DisableZipRelease>
</PropertyGroup>

</Project>
Loading
Loading