Freaky Eyes

版本 v1.3.1·更新於 2025-06-03

Adds freaky eyes to Blind Pest, Blind Vermin and Lemurians.

模組介紹 作者原文

Created using

All source code here because I am lazy to create another repo:

BepInEx;

using System.Security.Permissions;

using System.Security;

using static BodyModelAdditionsAPI.Main;

using UnityEngine;

using RoR2;

using UnityEngine.AddressableAssets;

using System.Collections.Generic;

using Newtonsoft.Json.Utilities;

using System.Linq;

using UnityEngine.PlayerLoop;

using RoR2.CharacterAI;

using BepInEx.Configuration;

using RiskOfOptions.Options;

using RiskOfOptions;

using System;

[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]

[assembly: HG.Reflection.SearchableAttribute.OptIn]

[assembly: HG.Reflection.SearchableAttribute.OptInAttribute]

[module: UnverifiableCode]

pragma warning disable CS0618

pragma warning restore CS0618

namespace FreakyEyes

{

[BepInPlugin(ModGuid, ModName, ModVer)]

[BepInDependency("com.brynzananas.bodymodeladditionsapi")]

[BepInDependency(RiskOfOptionsCompatimility.riskOfOptionsGUID, BepInDependency.DependencyFlags.SoftDependency)]

[System.Serializable]

public class Main: BaseUnityPlugin

{

public const string ModGuid = "com.brynzananas.freakyeyes";

public const string ModName = "Freaky Eyes";

public const string ModVer = "1.3.1";

private static bool riskOfOptionsEnabled;

public static AssetBundle assetBundle;

public static BepInEx.PluginInfo PInfo { get; private set; }

public static GameObject freakyEye;

public void Awake()

{

PInfo = Info;

assetBundle = AssetBundle.LoadFromFile(System.IO.Path.Combine(System.IO.Path.GetDirectoryName(PInfo.Location), "assetbundles", "freakyeye"));

riskOfOptionsEnabled = BepInEx.Bootstrap.Chainloader.PluginInfos.ContainsKey(RiskOfOptionsCompatimility.riskOfOptionsGUID);

List materials = new List();

materials.AddRange(assetBundle.LoadAllAssets());

foreach (Material material in materials)

{

if (!material.shader.name.StartsWith("StubbedRoR2"))

{

continue;

}

string shaderName = material.shader.name.Replace("StubbedRoR2", "RoR2") + ".shader";

Shader replacementShader = Addressables.LoadAssetAsync(shaderName).WaitForCompletion();

if (replacementShader)

{

material.shader = replacementShader;

}

}

freakyEye = assetBundle.LoadAsset("Assets/CosmeticsMod/googlyeye.prefab");

freakyEye.AddComponent();

ConfigEntry config1 = CreateConfig("Blind Pest");

ModelPartInfo modelPartInfo = new ModelPartInfo

{

bodyName = "FlyingVerminBody",

gameObject = freakyEye,

inputString = "Body",

codeAfterApplying = PlaceIt,

customCondition = Config1,

};

bool Config1(CharacterModel characterModel)

{

return config1.Value;

}

new ModelPart(modelPartInfo);

void PlaceIt(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)

{

ApplyFreakyTracking(modelObject, characterModel);

modelObject.transform.localPosition = new Vector3(-0.45f, 0.641f,.89f);

modelObject.transform.localScale = new Vector3(0.3f, 0.3f, 0.3f);

}

modelPartInfo = new ModelPartInfo

{

bodyName = "FlyingVerminBody",

gameObject = freakyEye,

inputString = "Body",

codeAfterApplying = PlaceIt2,

customCondition = Config1,

};

new ModelPart(modelPartInfo);

ConfigEntry config2 = CreateConfig("Blind Vermin");

void PlaceIt2(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)

{

ApplyFreakyTracking(modelObject, characterModel);

modelObject.transform.localPosition = new Vector3(0.45f, 0.641f,.89f);

modelObject.transform.localScale = new Vector3(0.3f, 0.3f, 0.3f);

}

modelPartInfo = new ModelPartInfo

{

bodyName = "VerminBody",

gameObject = freakyEye,

inputString = "Head",

codeAfterApplying = PlaceIt3,

customCondition = Config2,

};

bool Config2(CharacterModel characterModel)

{

return config2.Value;

}

new ModelPart(modelPartInfo);

void PlaceIt3(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePar

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

Brynzananas-Body_Model_Additions_API

檔案與校驗

檔案名稱
Freaky_Eyes-1.3.1.zip
檔案大小
121.2 KiB