LunarAnomalies
Adds event that triggers when the game reaches 7 pm
About this mod Author’s original text
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!
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.
Install these first, or the mod will not work: