Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
| Date uploaded | a year ago |
| Version | 1.2.0 |
| Download link | Brynzananas-Freaky_Eyes-1.2.0.zip |
| Downloads | 592 |
| Dependency string | Brynzananas-Freaky_Eyes-1.2.0 |
This mod requires the following mods to function
Brynzananas-Body_Model_Additions_API
Adds a system for developers to load custom objects onto characters in game and in lobby. Model additions can require selected skins, skills, skins and skills or custom condition.
Preferred version: 1.4.3README
Created using https://thunderstore.io/package/Brynzananas/Body_Model_Additions_API/
All code as an example:
using System.Security.Permissions;
using System.Security;
using static BodyModelAdditionsAPI.Main;
using UnityEngine;
using RoR2;
using UnityEngine.AddressableAssets;
[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")]
[System.Serializable]
public class Main : BaseUnityPlugin
{
public const string ModGuid = "com.brynzananas.freakyeyes";
public const string ModName = "Freaky Eyes";
public const string ModVer = "1.2.0";
public static AssetBundle assetBundle;
public static PluginInfo PInfo { get; private set; }
public void Awake()
{
PInfo = Info;
assetBundle = AssetBundle.LoadFromFile(System.IO.Path.Combine(System.IO.Path.GetDirectoryName(PInfo.Location), "assetbundles", "freakyeye"));
foreach (Material material in assetBundle.LoadAllAssets<Material>())
{
if (!material.shader.name.StartsWith("StubbedRoR2"))
{
continue;
}
string shaderName = material.shader.name.Replace("StubbedRoR2", "RoR2") + ".shader";
Shader replacementShader = Addressables.LoadAssetAsync<Shader>(shaderName).WaitForCompletion();
if (replacementShader)
{
material.shader = replacementShader;
}
}
new ModelPart("FlyingVerminBody", assetBundle.LoadAsset<GameObject>("Assets/CosmeticsMod/googlyeye.prefab"), "Body", inputCodeAfterApplying: PlaceIt);
void PlaceIt(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)
{
modelObject.transform.localPosition = new Vector3(-0.45f, 0.641f, .89f);
modelObject.transform.localScale = new Vector3(0.3f, 0.3f, 0.3f);
}
new ModelPart("FlyingVerminBody", assetBundle.LoadAsset<GameObject>("Assets/CosmeticsMod/googlyeye.prefab"), "Body", inputCodeAfterApplying: PlaceIt2);
void PlaceIt2(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)
{
modelObject.transform.localPosition = new Vector3(0.45f, 0.641f, .89f);
modelObject.transform.localScale = new Vector3(0.3f, 0.3f, 0.3f);
}
new ModelPart("VerminBody", assetBundle.LoadAsset<GameObject>("Assets/CosmeticsMod/googlyeye.prefab"), "Head", inputCodeAfterApplying: PlaceIt3);
void PlaceIt3(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)
{
modelObject.transform.localPosition = new Vector3(-0.312f, 0.999f, -0.308f);
modelObject.transform.localEulerAngles = new Vector3(-127.928f, 0, 0);
modelObject.transform.localScale = new Vector3(0.2f, 0.2f, 0.2f);
}
new ModelPart("VerminBody", assetBundle.LoadAsset<GameObject>("Assets/CosmeticsMod/googlyeye.prefab"), "Head", inputCodeAfterApplying: PlaceIt4);
void PlaceIt4(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)
{
modelObject.transform.localPosition = new Vector3(0.312f, 0.999f, -0.308f);
modelObject.transform.localEulerAngles = new Vector3(-127.928f, 0, 0);
modelObject.transform.localScale = new Vector3(0.2f, 0.2f, 0.2f);
}
new ModelPart("LemurianBody", assetBundle.LoadAsset<GameObject>("Assets/CosmeticsMod/googlyeye.prefab"), "Head", inputCodeAfterApplying: PlaceIt5);
void PlaceIt5(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)
{
modelObject.transform.localPosition = new Vector3(1.47f, 1.86f, -0.33f);
modelObject.transform.localEulerAngles = new Vector3(-70f, 90, 0);
modelObject.transform.localScale = new Vector3(0.6f, 0.6f, 0.6f);
}
new ModelPart("LemurianBody", assetBundle.LoadAsset<GameObject>("Assets/CosmeticsMod/googlyeye.prefab"), "Head", inputCodeAfterApplying: PlaceIt6);
void PlaceIt6(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)
{
modelObject.transform.localPosition = new Vector3(-1.47f, 1.86f, -0.33f);
modelObject.transform.localEulerAngles = new Vector3(250f, 90, 0);
modelObject.transform.localScale = new Vector3(0.6f, 0.6f, 0.6f);
}
new ModelPart("LemurianBruiserBody", assetBundle.LoadAsset<GameObject>("Assets/CosmeticsMod/googlyeye.prefab"), "Head", inputCodeAfterApplying: PlaceIt7);
void PlaceIt7(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)
{
modelObject.transform.localPosition = new Vector3(1.7f, 2f, -0.2f);
modelObject.transform.localEulerAngles = new Vector3(-75f, 90, 0);
modelObject.transform.localScale = new Vector3(0.7f, 0.7f, 0.7f);
}
new ModelPart("LemurianBruiserBody", assetBundle.LoadAsset<GameObject>("Assets/CosmeticsMod/googlyeye.prefab"), "Head", inputCodeAfterApplying: PlaceIt8);
void PlaceIt8(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)
{
modelObject.transform.localPosition = new Vector3(-1.7f, 2f, -0.2f);
modelObject.transform.localEulerAngles = new Vector3(255f, 90, 0);
modelObject.transform.localScale = new Vector3(0.7f, 0.7f, 0.7f);
}
}
}
}
CHANGELOG
1.3.1
-
Added a nullcheck to prevent log spam
-
Added configs for enabling/disabling eyes for individual body
1.3.0
-
Updated to use newer API method
-
Freaky eyes now look at their targets
1.2.0
-
Added API dependency string
-
Added eyes to Lemurian and Elder Lemurian
1.1.0
-
Updated to the new API version
-
Added eyes to Blind Vermin