
Lethal Company
You are viewing a potentially older version of this package. View Latest Version

Lethal Company mod allowing to pick enemies as loots, and some enemies to loot some stuff.
[WIP] - Masked mimics drop their mask when they die.[WIP] - See and hear what's happening inside the facility from the door's windowsI must still think about more features in fact.
Here's a quick tutorial on how to use EnhancedMonsters without making it mandatory for users of your mods!
.csproj.// Plugin.cs
[BepInDependency("com.velddev.enhancedmonsters", BepInDependency.DependencyFlags.SoftDependency)]
public class MyPlugin : BaseUnityPlugin
{
private void Start()
{
if(EnhancedMonstersCompatibilityLayer.Enabled)
{
EnhancedMonstersCompatibilityLayer.RegisterCustomMonsterEnemyData();
}
}
}
// You can do the following part inside your main Plugin class, it just needs a container class.
public static class EnhancedMonstersCompatibilityLayer
{
private static bool? _enabled;
public static bool Enabled
{
get
{
if (_enabled == null)
_enabled = BepInex.Bootstrap.Chainloader.PluginInfos.ContainsKey("com.velddev.enhancedmonsters");
return (bool)_enabled;
}
}
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
public static void RegisterCustomMonsterEnemyData()
{
// The EnemyName must ABSOLUTELY be the same than inside your EnemyType scriptable object!
EnhancedMonster.Utils.EnemiesDataManager.RegisterEnemy(EnemyType.enemyName, /*is enemy sellable ?*/ true, /*min value:*/ 150, /*max value:*/ 200, /*mass:*/ 14, /*rank:*/ "S+");
// ...
}
}