LunarAnomalies
Adds event that triggers when the game reaches 7 pm
模組介紹 作者原文
Moon Anomalies
Introduces moon rotation events for lethal company. This mod focuses on 4 main moon rotations for now, which is: {none; blood moon; diamond moon; harvest moon}.
Blood Moon
Increases danger on moons by increasing the spawn rate of mobs by 2x.
Harvest Moon
Increases the value of scrap inside the facility by 1.5x-2.5x at random.
Diamond Moon
Adds an extra day for the deadline before you have to sell.
Note that the most common one is a normal moon, but any of these other 3 might occur between the time of 7pm and midnight. The mod might get updates to add more moons variation and can work as an API to add new ones:
Developers:
Adding a new moon:
[BepInDependency(StaticNetcodeLib.MyPluginInfo.PLUGIN_GUID, BepInDependency.DependencyFlags.HardDependency)]
Just above your plugin Awake statement.
Then:
var goldMoon = ModAssets.LoadAsset("GoldMoon");
LunarAnomaliesManager.SetMoon(moon => moon.Init(goldMoon));
The gold moon must be the prefab you want to be instantiated when the moon is yours. You must also create a moon script that inherits from Moon which will contain the moons property!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using UnityEngine;
using Random = UnityEngine.Random;
namespace LunarAnomalies.MoonsScript;
public class BloodMoon: Moon
{
public string name { get; set; } = "Blood Moon";
public Color color { get; set; } = new Color(224,29,20,255);
public GameObject moonObject { get; set; }
//TODO put it back at 10f
public float precentageChanceSpawn { get; set; } = 10f;
public int timeBetweenEachCall { get; set; } = 4;
public string messageMoon { get; set; } = "ESCAPE NOW!!!";
public void Init(GameObject gameObject)
{
moonObject = gameObject;
}
public void ApplyImmediateEffect()
{
//Should be called by you in the script you will create in your moon prefab
}
public void ApplyConstantEffect()
{
//Must be invoked every "TimeBetweenEachCall" amount of time!
}
}
You then call this when you want the moon effect to start. I usually do it in the script attached to the prefab
LunarAnomaliesManager.currentMoon.ApplyImmediateEffect();
LunarAnomaliesManager.TellPeopleMoonIsStartingClientRpc();
InvokeRepeating("MiddleManFunction", 0f, LunarAnomaliesManager.currentMoon.timeBetweenEachCall);
and you are done! The moon manager will use this to have the properties of the moon!
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: