Solaestas.tModLoader.ModBuilder 1.5.0

dotnet add package Solaestas.tModLoader.ModBuilder --version 1.5.0
NuGet\Install-Package Solaestas.tModLoader.ModBuilder -Version 1.5.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Solaestas.tModLoader.ModBuilder" Version="1.5.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Solaestas.tModLoader.ModBuilder --version 1.5.0
#r "nuget: Solaestas.tModLoader.ModBuilder, 1.5.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Solaestas.tModLoader.ModBuilder as a Cake Addin
#addin nuget:?package=Solaestas.tModLoader.ModBuilder&version=1.5.0

// Install Solaestas.tModLoader.ModBuilder as a Cake Tool
#tool nuget:?package=Solaestas.tModLoader.ModBuilder&version=1.5.0

Solaestas' ModBuilder

这是一个用于 tModLoader 模组制作者的 NuGet 包,用于修改和自动化模组构建过程。

文档尚未完善

功能

  • 自动添加引用 dll
  • 自动编译fx文件
  • 使用BepInEx.AssemblyPublicizer.MSBuild公有化tModLoader和FNA程序集
  • 自动生成资源路径(默认开启)
  • 自动禁用其他模组(默认关闭)

可配置项

所有配置项都是 MSBuild 属性,可以在 csproj 文件或 Directory.Build.props 文件中设置。

下面为一个示例Mod的 csproj 文件:

<Project>
	<Import Project="..\tModLoader.targets" />

	<PropertyGroup>
		<AssemblyName>TestMod</AssemblyName>
		<TargetFramework>net6.0</TargetFramework>
		<PlatformTarget>AnyCPU</PlatformTarget>
		<LangVersion>latest</LangVersion>
	</PropertyGroup>

	<PropertyGroup>
		
		<AutoDisableMod>true</AutoDisableMod>
		
		<PathTypeName>ModPath</PathTypeName>
	</PropertyGroup>

	<ItemGroup>
		
		<AdditionalFiles Include="**/*.bmp"
						 Exclude="bin/**/*;obj/**/*" 
						 Pack="true"
						 ModPath="%(Identity)"/>
	</ItemGroup>

	<ItemGroup>
		<PackageReference Include="tModLoader.CodeAssist" Version="0.1.*" />
	</ItemGroup>
</Project>
Config Name Description Default Value Optional Values
EnablePathGenerator 自动生成对资源路径的引用 true true or false
AutoDisableMod 自动禁用其他Mod false true or false
EnableModBuilder 为这个项目生成Mod文件 true true or false
DebugMod 自动启用指定Mod HEROsMod;CheatSheet;DragonLens [Mod Name]
PathPrefix 自动路径的前缀 string.Empty [string]
PathNamespace 自动路径的命名空间 $(RootNamespace) [string]
PathTypeName 自动路径的类名 ModAsset [string]
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

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.5.0 78 4/19/2024
1.4.1 448 10/24/2023
1.4.0 269 10/23/2023
1.3.0 264 8/1/2023
1.2.0 176 7/26/2023
1.1.2 284 7/14/2023
1.1.1.1 172 7/13/2023
1.1.0 184 7/11/2023

Here we go!