Exemplo n.º 1
0
        public static void Init()
        {
            GameObject         characterPrefab    = Resources.Load <GameObject>("Prefabs/CharacterBodies/JellyfishBody");
            ItemDisplayRuleSet itemDisplayRuleSet = ScriptableObject.CreateInstance <ItemDisplayRuleSet>();

            List <ItemDisplayRuleSet.NamedRuleGroup> list  = new List <ItemDisplayRuleSet.NamedRuleGroup>();
            List <ItemDisplayRuleSet.NamedRuleGroup> list2 = new List <ItemDisplayRuleSet.NamedRuleGroup>();

            ItemDisplayRuleSet original = characterPrefab.GetComponentInChildren <CharacterModel>().itemDisplayRuleSet;

            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "AffixRed",
                displayRuleGroup = original.FindEquipmentDisplayRuleGroup("AffixRed")
            });
            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "AffixBlue",
                displayRuleGroup = original.FindEquipmentDisplayRuleGroup("AffixBlue")
            });
            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "AffixWhite",
                displayRuleGroup = original.FindEquipmentDisplayRuleGroup("AffixWhite")
            });
            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "AffixPoison",
                displayRuleGroup = original.FindEquipmentDisplayRuleGroup("AffixPoison")
            });
            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "AffixHaunted",
                displayRuleGroup = original.FindEquipmentDisplayRuleGroup("AffixHaunted")
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "CritGlasses",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayGlasses"),
                            childName      = "Hull2",
                            localPos       = new Vector3(0, 1.1f, 0),
                            localAngles    = new Vector3(270, 90, 0),
                            localScale     = new Vector3(2.8f, 3, 3),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Crowbar",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayCrowbar"),
                            childName      = "Hull2",
                            localPos       = new Vector3(1, 0, 0),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(2, 2, 2),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Behemoth",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayBehemoth"),
                            childName      = "Hull2",
                            localPos       = new Vector3(0, 0.6f, 1.5f),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(0.3f, 0.3f, 0.3f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "NearbyDamageBonus",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayDiamond"),
                            childName      = "Hull2",
                            localPos       = new Vector3(0, 0, 0),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(1.5f, 1.5f, 1.5f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "FireRing",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayFireRing"),
                            childName      = "Hull2",
                            localPos       = new Vector3(0, 0, 0),
                            localAngles    = new Vector3(90, 0, 0),
                            localScale     = new Vector3(11, 11, 11),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "IceRing",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayIceRing"),
                            childName      = "Hull2",
                            localPos       = new Vector3(0, 0.5f, 0),
                            localAngles    = new Vector3(90, 0, 0),
                            localScale     = new Vector3(11, 11, 11),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "ArmorPlate",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayRepulsionArmorPlate"),
                            childName      = "Hull2",
                            localPos       = new Vector3(-0.3f, 0, 0.65f),
                            localAngles    = new Vector3(270, 0, 0),
                            localScale     = new Vector3(3, 2, 2),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Bear",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayBear"),
                            childName      = "Hull2",
                            localPos       = new Vector3(0.7f, 0, -0.7f),
                            localAngles    = new Vector3(0, 135, 0),
                            localScale     = new Vector3(2, 2, 2),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Medkit",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayMedkit"),
                            childName      = "Hull2",
                            localPos       = new Vector3(-1.25f, 0, 0),
                            localAngles    = new Vector3(270, 270, 0),
                            localScale     = new Vector3(4, 4, 4),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Dagger",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayDagger"),
                            childName      = "Hull2",
                            localPos       = new Vector3(0, 0.75f, 0.75f),
                            localAngles    = new Vector3(270, 0, 0),
                            localScale     = new Vector3(5, 5, 5),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            /*list.Add(new ItemDisplayRuleSet.NamedRuleGroup
             * {
             *  name = "ChainLightning",
             *  displayRuleGroup = new DisplayRuleGroup
             *  {
             *      rules = new ItemDisplayRule[]
             *      {
             *          new ItemDisplayRule
             *          {
             *              ruleType = ItemDisplayRuleType.ParentedPrefab,
             *              followerPrefab = ItemDisplays.LoadDisplay("DisplayUkulele"),
             *              childName = "Hull2",
             *              localPos = new Vector3(0.4f, 0, -1.75f),
             *              localAngles = new Vector3(0, 85, 90),
             *              localScale = new Vector3(0.8f, 0.8f, 0.8f),
             *              limbMask = LimbFlags.None
             *          }
             *      }
             *  }
             * });*/

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Syringe",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplaySyringeCluster"),
                            childName      = "Hull2",
                            localPos       = new Vector3(0.5f, 0, 0.5f),
                            localAngles    = new Vector3(0, 315, 270),
                            localScale     = new Vector3(1, 1, 1),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "UtilitySkillMagazine",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayAfterburnerShoulderRing"),
                            childName      = "Hull2",
                            localPos       = new Vector3(0, 0.6f, 0),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(4, 4, 4),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Hoof",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayHoof"),
                            childName      = "Hull2",
                            localPos       = new Vector3(0, -1, 0),
                            localAngles    = new Vector3(270, 270, 0),
                            localScale     = new Vector3(0.25f, 0.25f, 0.25f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "SprintOutOfCombat",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayWhip"),
                            childName      = "Hull2  ",
                            localPos       = new Vector3(0, 0, 0),
                            localAngles    = new Vector3(0, 0, 90),
                            localScale     = new Vector3(3, 3, 3),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            //apply displays here

            BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic;

            ItemDisplayRuleSet.NamedRuleGroup[] value  = list.ToArray();
            ItemDisplayRuleSet.NamedRuleGroup[] value2 = list2.ToArray();
            typeof(ItemDisplayRuleSet).GetField("namedItemRuleGroups", bindingAttr).SetValue(itemDisplayRuleSet, value);
            typeof(ItemDisplayRuleSet).GetField("namedEquipmentRuleGroups", bindingAttr).SetValue(itemDisplayRuleSet, value2);

            characterPrefab.GetComponentInChildren <CharacterModel>().itemDisplayRuleSet = itemDisplayRuleSet;
        }
Exemplo n.º 2
0
        public static void RegisterDisplays()
        {
            GameObject bodyPrefab = GrovetenderPlugin.myCharacter;

            GameObject     model          = bodyPrefab.GetComponentInChildren <ModelLocator>().modelTransform.gameObject;
            CharacterModel characterModel = model.GetComponent <CharacterModel>();

            PopulateDisplays();

            //apply displays here

            ItemDisplayRuleSet itemDisplayRuleSet = ScriptableObject.CreateInstance <ItemDisplayRuleSet>();

            List <ItemDisplayRuleSet.NamedRuleGroup> list  = new List <ItemDisplayRuleSet.NamedRuleGroup>();
            List <ItemDisplayRuleSet.NamedRuleGroup> list2 = new List <ItemDisplayRuleSet.NamedRuleGroup>();

            ItemDisplayRuleSet original = Resources.Load <GameObject>("Prefabs/CharacterBodies/GravekeeperBody").GetComponentInChildren <CharacterModel>().itemDisplayRuleSet;
            ItemDisplayRuleSet loader   = Resources.Load <GameObject>("Prefabs/CharacterBodies/LoaderBody").GetComponentInChildren <CharacterModel>().itemDisplayRuleSet;

            //add item displays here

            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Jetpack",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayBugWings"),
                            childName      = "Head",
                            localPos       = new Vector3(0, 1, -2),
                            localAngles    = new Vector3(45, 0, 0),
                            localScale     = new Vector3(1, 1, 1),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "GoldGat",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayGoldGat"),
                            childName      = "MuzzleJar",
                            localPos       = new Vector3(0, -9, 0),
                            localAngles    = new Vector3(180, 270, 180),
                            localScale     = new Vector3(2, 2, 2),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "AffixRed",
                displayRuleGroup = original.FindEquipmentDisplayRuleGroup("AffixRed")
            });
            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "AffixBlue",
                displayRuleGroup = original.FindEquipmentDisplayRuleGroup("AffixBlue")
            });
            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "AffixWhite",
                displayRuleGroup = original.FindEquipmentDisplayRuleGroup("AffixWhite")
            });
            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "AffixPoison",
                displayRuleGroup = original.FindEquipmentDisplayRuleGroup("AffixPoison")
            });
            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "AffixHaunted",
                displayRuleGroup = original.FindEquipmentDisplayRuleGroup("AffixHaunted")
            });
            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "IncreaseHealing",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayAntler"),
                            childName      = "Head",
                            localPos       = new Vector3(1.5f, 2, 0.017f),
                            localAngles    = new Vector3(358.0388f, 93.19246f, 1.436809f),
                            localScale     = new Vector3(3, 3, 3),
                            limbMask       = LimbFlags.None
                        },
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayAntler"),
                            childName      = "Head",
                            localPos       = new Vector3(-1.5f, 2, 0.017f),
                            localAngles    = new Vector3(358.030f, 266.808f, 1.436998f),
                            localScale     = new Vector3(-3, 3, 3),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });
            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "NovaOnHeal",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayDevilHorns"),
                            childName      = "Head",
                            localPos       = new Vector3(1.25f, -1, 0),
                            localAngles    = new Vector3(3.536957f, 0.01489126f, 14.99564f),
                            localScale     = new Vector3(5, 5, 5),
                            limbMask       = LimbFlags.None
                        },
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayDevilHorns"),
                            childName      = "Head",
                            localPos       = new Vector3(-1.25f, -1, 0),
                            localAngles    = new Vector3(3.536963f, 0.0149023f, 344.9955f),
                            localScale     = new Vector3(-5, 5, 5),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });
            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "KillEliteFrenzy",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayBrainstalk"),
                            childName      = "Head",
                            localPos       = new Vector3(0, 1.5f, 0),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(2, 2, 2),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });
            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Clover",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayClover"),
                            childName      = "Head",
                            localPos       = new Vector3(-1.5f, 3, 0),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(4, 4, 4),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "CritGlasses",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayGlasses"),
                            childName      = "Mask",
                            localPos       = new Vector3(0, 0, 0.5f),
                            localAngles    = new Vector3(-90, 180, 0),
                            localScale     = new Vector3(4, 4, 4),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });
            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "GhostOnKill",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayMask"),
                            childName      = "Head",
                            localPos       = new Vector3(0, 1, 2),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(4, 4, 4),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "AttackSpeedOnCrit",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayWolfPelt"),
                            childName      = "Head",
                            localPos       = new Vector3(0, 2, 1),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(4, 4, 4),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "GoldOnHit",
                displayRuleGroup = loader.FindItemDisplayRuleGroup("GoldOnHit")
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "ShieldOnly",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayShieldBug"),
                            childName      = "Head",
                            localPos       = new Vector3(0.75f, -0.2f, 0.5f),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(4, 4, 4),
                            limbMask       = LimbFlags.None
                        },
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayShieldBug"),
                            childName      = "Head",
                            localPos       = new Vector3(-0.75f, -0.2f, 0.5f),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(-4, 4, 4),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });
            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "HeadHunter",
                displayRuleGroup = loader.FindItemDisplayRuleGroup("HeadHunter")
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "JumpBoost",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayWaxBird"),
                            childName      = "Head",
                            localPos       = new Vector3(0, -0.5f, -1),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(5, 5, 5),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Bandolier",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayBandolier"),
                            childName      = "MuzzleJar",
                            localPos       = new Vector3(0, 0, 0),
                            localAngles    = new Vector3(90, 0, 0),
                            localScale     = new Vector3(7, 8, 10),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "DeathMark",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayDeathMark"),
                            childName      = "MuzzleJar",
                            localPos       = new Vector3(0, 0, 0),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(0.75f, 0.75f, 0.75f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "WarCryOnMultiKill",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayPauldron"),
                            childName      = "Head",
                            localPos       = new Vector3(0, 1, 2),
                            localAngles    = new Vector3(-90, 180, 0),
                            localScale     = new Vector3(5, 5, 5),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Mushroom",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayMushroom"),
                            childName      = "Mask",
                            localPos       = new Vector3(0.5f, -0.5f, 2.4f),
                            localAngles    = new Vector3(90, 25, 0),
                            localScale     = new Vector3(0.5f, 0.5f, 0.5f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "BarrierOnOverHeal",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayAegis"),
                            childName      = "MuzzleJar",
                            localPos       = new Vector3(3.5f, -2, 0),
                            localAngles    = new Vector3(90, -90, 0),
                            localScale     = new Vector3(3, 3, 3),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Behemoth",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayBehemoth"),
                            childName      = "MuzzleJar",
                            localPos       = new Vector3(0, -2, -5),
                            localAngles    = new Vector3(180, 0, 0),
                            localScale     = new Vector3(1, 1, 1),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "NearbyDamageBonus",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayDiamond"),
                            childName      = "HandL",
                            localPos       = new Vector3(0, 0, -2.75f),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(0.7f, 0.7f, 0.7f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "FireRing",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayFireRing"),
                            childName      = "HandL",
                            localPos       = new Vector3(0.25f, 0, 0),
                            localAngles    = new Vector3(90, 0, 0),
                            localScale     = new Vector3(4, 4, 4),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "IceRing",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayIceRing"),
                            childName      = "HandR",
                            localPos       = new Vector3(-0.25f, 0, 0),
                            localAngles    = new Vector3(90, 0, 0),
                            localScale     = new Vector3(4, 4, 4),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "ArmorPlate",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayRepulsionArmorPlate"),
                            childName      = "Head",
                            localPos       = new Vector3(0, 1.5f, -2),
                            localAngles    = new Vector3(-25, 0, 180),
                            localScale     = new Vector3(3, 3, 3),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Bear",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayBear"),
                            childName      = "Head",
                            localPos       = new Vector3(-1.9f, 0.5f, -1.5f),
                            localAngles    = new Vector3(0, -90, 0),
                            localScale     = new Vector3(2, 2, 2),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Medkit",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayMedkit"),
                            childName      = "Head",
                            localPos       = new Vector3(2, 0, 0),
                            localAngles    = new Vector3(-90, 90, 0),
                            localScale     = new Vector3(3, 3, 3),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Dagger",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayDagger"),
                            childName      = "Head",
                            localPos       = new Vector3(0, 0, 0),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(6, 6, 6),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "ChainLightning",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayUkulele"),
                            childName      = "MuzzleJar",
                            localPos       = new Vector3(-3.2f, -2.5f, 1),
                            localAngles    = new Vector3(0, -90, 180),
                            localScale     = new Vector3(2, 2, 2),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Syringe",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplaySyringeCluster"),
                            childName      = "Head",
                            localPos       = new Vector3(0, 2, 0),
                            localAngles    = new Vector3(300, 0, 0),
                            localScale     = new Vector3(2, 2, 2),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "ArmorReductionOnHit",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayWarhammer"),
                            childName      = "MuzzleJar",
                            localPos       = new Vector3(0, -4, -3),
                            localAngles    = new Vector3(90, 0, 0),
                            localScale     = new Vector3(2, 2, 2),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "FallBoots",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayGravBoots"),
                            childName      = "FootL",
                            localPos       = new Vector3(0, -0.05f, 0),
                            localAngles    = new Vector3(45, 0, 0),
                            localScale     = new Vector3(0.25f, 0.25f, 0.25f),
                            limbMask       = LimbFlags.None
                        },
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayGravBoots"),
                            childName      = "FootR",
                            localPos       = new Vector3(0, -0.05f, 0),
                            localAngles    = new Vector3(70, 0, 0),
                            localScale     = new Vector3(0.25f, 0.25f, 0.25f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "BounceNearby",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayHook"),
                            childName      = "HandR",
                            localPos       = new Vector3(0, 0, -0.25f),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(1, 1, 1),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "SprintWisp",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayBrokenMask"),
                            childName      = "Mask",
                            localPos       = new Vector3(0, 0.25f, 1.5f),
                            localAngles    = new Vector3(-110, 0, 180),
                            localScale     = new Vector3(2, 2, 2),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Hoof",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayHoof"),
                            childName      = "FootL",
                            localPos       = new Vector3(0, 0.25f, 0.75f),
                            localAngles    = new Vector3(20, 0, 180),
                            localScale     = new Vector3(0.75f, 0.5f, 0.25f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Incubator",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayAncestralIncubator"),
                            childName      = "MuzzleJar",
                            localPos       = new Vector3(0, -4.5f, 0),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(1.25f, 1, 1.25f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "ExplodeOnDeath",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayWilloWisp"),
                            childName      = "Head",
                            localPos       = new Vector3(-8.5f, 2.75f, 0),
                            localAngles    = new Vector3(0, 0, 45),
                            localScale     = new Vector3(1, 1, 1),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "ExecuteLowHealthElite",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayGuillotine"),
                            childName      = "Head",
                            localPos       = new Vector3(8.5f, 2.75f, 0),
                            localAngles    = new Vector3(0, 0, -45),
                            localScale     = new Vector3(1, 1, 1),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });


            //something something

            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Meteor",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayMeteor"),
                            childName      = "Root",
                            localPos       = new Vector3(0, 10.5f, -12),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(2, 2, 2),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Saw",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplaySawmerang"),
                            childName      = "Root",
                            localPos       = new Vector3(0, 10.5f, -12),
                            localAngles    = new Vector3(-90, 0, 0),
                            localScale     = new Vector3(0.4f, 0.4f, 0.4f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Blackhole",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayGravCube"),
                            childName      = "Root",
                            localPos       = new Vector3(0, 16, -6),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(1, 1, 1),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Icicle",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayFrostRelic"),
                            childName      = "Root",
                            localPos       = new Vector3(-2, 13, -4),
                            localAngles    = new Vector3(90, 0, 0),
                            localScale     = new Vector3(2, 2, 2),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Talisman",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayTalisman"),
                            childName      = "Root",
                            localPos       = new Vector3(4, 12, -6),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(1, 1, 1),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            /*list.Add(new ItemDisplayRuleSet.NamedRuleGroup
             * {
             *  name = "LaserTurbine",
             *  displayRuleGroup = new DisplayRuleGroup
             *  {
             *      rules = new ItemDisplayRule[]
             *      {
             *          new ItemDisplayRule
             *          {
             *              ruleType = ItemDisplayRuleType.ParentedPrefab,
             *              followerPrefab = ItemDisplays.LoadDisplay("DisplayLaserTurbine"),
             *              childName = "Root",
             *              localPos = new Vector3(0, 0, 0),
             *              localAngles = new Vector3(0, 0, 0),
             *              localScale = new Vector3(1, 1, 1),
             *              limbMask = LimbFlags.None
             *          }
             *      }
             *  }
             * });*/

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "FocusConvergence",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayFocusedConvergence"),
                            childName      = "Root",
                            localPos       = new Vector3(0, 16, -12),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(0.25f, 0.25f, 0.25f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });


            BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic;

            ItemDisplayRuleSet.NamedRuleGroup[] value  = list.ToArray();
            ItemDisplayRuleSet.NamedRuleGroup[] value2 = list2.ToArray();
            typeof(ItemDisplayRuleSet).GetField("namedItemRuleGroups", bindingAttr).SetValue(itemDisplayRuleSet, value);
            typeof(ItemDisplayRuleSet).GetField("namedEquipmentRuleGroups", bindingAttr).SetValue(itemDisplayRuleSet, value2);

            characterModel.itemDisplayRuleSet = itemDisplayRuleSet;
        }
Exemplo n.º 3
0
        public static void Init()
        {
            GameObject         characterPrefab    = Resources.Load <GameObject>("Prefabs/CharacterBodies/ClayBruiserBody");
            ItemDisplayRuleSet itemDisplayRuleSet = ScriptableObject.CreateInstance <ItemDisplayRuleSet>();

            List <ItemDisplayRuleSet.NamedRuleGroup> list  = new List <ItemDisplayRuleSet.NamedRuleGroup>();
            List <ItemDisplayRuleSet.NamedRuleGroup> list2 = new List <ItemDisplayRuleSet.NamedRuleGroup>();

            ItemDisplayRuleSet original = characterPrefab.GetComponentInChildren <CharacterModel>().itemDisplayRuleSet;
            ItemDisplayRuleSet loader   = Resources.Load <GameObject>("Prefabs/CharacterBodies/LoaderBody").GetComponentInChildren <CharacterModel>().itemDisplayRuleSet;

            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "AffixRed",
                displayRuleGroup = original.FindEquipmentDisplayRuleGroup("AffixRed")
            });
            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "AffixBlue",
                displayRuleGroup = original.FindEquipmentDisplayRuleGroup("AffixBlue")
            });
            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "AffixWhite",
                displayRuleGroup = original.FindEquipmentDisplayRuleGroup("AffixWhite")
            });
            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "AffixPoison",
                displayRuleGroup = original.FindEquipmentDisplayRuleGroup("AffixPoison")
            });
            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "AffixHaunted",
                displayRuleGroup = original.FindEquipmentDisplayRuleGroup("AffixHaunted")
            });
            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "IncreaseHealing",
                displayRuleGroup = loader.FindItemDisplayRuleGroup("IncreaseHealing")
            });
            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "NovaOnHeal",
                displayRuleGroup = loader.FindItemDisplayRuleGroup("NovaOnHeal")
            });
            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "KillEliteFrenzy",
                displayRuleGroup = loader.FindItemDisplayRuleGroup("KillEliteFrenzy")
            });
            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Clover",
                displayRuleGroup = loader.FindItemDisplayRuleGroup("Clover")
            });

            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Jetpack",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayBugWings"),
                            childName      = "Head",
                            localPos       = new Vector3(-0.15f, -0.25f, 0),
                            localAngles    = new Vector3(0, 45, 0),
                            localScale     = new Vector3(0.25f, 0.25f, 0.25f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "GoldGat",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayGoldGat"),
                            childName      = "Muzzle",
                            localPos       = new Vector3(1, 0.8f, -1),
                            localAngles    = new Vector3(45, 90, 0),
                            localScale     = new Vector3(0.5f, 0.5f, 0.5f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "CritGlasses",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayGlasses"),
                            childName      = "Head",
                            localPos       = new Vector3(0, 0.4f, 0.25f),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(0.5f, 0.5f, 0.5f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });
            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "GhostOnKill",
                displayRuleGroup = loader.FindItemDisplayRuleGroup("GhostOnKill")
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "AttackSpeedOnCrit",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayWolfPelt"),
                            childName      = "Head",
                            localPos       = new Vector3(0, 0.5f, 0.067f),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(1, 1, 1),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "GoldOnHit",
                displayRuleGroup = loader.FindItemDisplayRuleGroup("GoldOnHit")
            });
            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "ShieldOnly",
                displayRuleGroup = loader.FindItemDisplayRuleGroup("ShieldOnly")
            });
            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "HeadHunter",
                displayRuleGroup = loader.FindItemDisplayRuleGroup("HeadHunter")
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "JumpBoost",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayWaxBird"),
                            childName      = "Head",
                            localPos       = new Vector3(0, -0.7f, -0.05f),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(2, 2, 2),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Bandolier",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayBandolier"),
                            childName      = "Muzzle",
                            localPos       = new Vector3(0.05f, -0.05f, -1.75f),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(0.75f, 1, 1),
                            limbMask       = LimbFlags.None
                        },
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayBandolier"),
                            childName      = "Head",
                            localPos       = new Vector3(-0.2f, -0.5f, 0.25f),
                            localAngles    = new Vector3(-45, 180, 0),
                            localScale     = new Vector3(1, 2, 1),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "DeathMark",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayDeathMark"),
                            childName      = "Muzzle",
                            localPos       = new Vector3(0, 0, -0.25f),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(0.1f, 0.1f, 0.1f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "WarCryOnMultiKill",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayPauldron"),
                            childName      = "Head",
                            localPos       = new Vector3(0, 0.1f, -0.25f),
                            localAngles    = new Vector3(-90, 0, 0),
                            localScale     = new Vector3(1.5f, 1.5f, 1.5f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Mushroom",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayMushroom"),
                            childName      = "Head",
                            localPos       = new Vector3(-0.25f, 0, 0),
                            localAngles    = new Vector3(0, 0, 45),
                            localScale     = new Vector3(0.25f, 0.25f, 0.25f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "BarrierOnOverHeal",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayAegis"),
                            childName      = "Muzzle",
                            localPos       = new Vector3(0, 0.25f, -1),
                            localAngles    = new Vector3(180, 180, 180),
                            localScale     = new Vector3(0.75f, 0.75f, 0.75f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Behemoth",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayBehemoth"),
                            childName      = "Muzzle",
                            localPos       = new Vector3(0, 0, -0.9f),
                            localAngles    = new Vector3(90, 0, 0),
                            localScale     = new Vector3(0.5f, 0.5f, 0.5f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "NearbyDamageBonus",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayDiamond"),
                            childName      = "Muzzle",
                            localPos       = new Vector3(0, 0, -2.75f),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(0.7f, 0.7f, 0.7f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "FireRing",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayFireRing"),
                            childName      = "Muzzle",
                            localPos       = new Vector3(0, 0, -1),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(3.5f, 3.5f, 3.5f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "IceRing",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayIceRing"),
                            childName      = "Muzzle",
                            localPos       = new Vector3(0, 0, -1.2f),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(3.5f, 3.5f, 3.5f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "ArmorPlate",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayRepulsionArmorPlate"),
                            childName      = "Head",
                            localPos       = new Vector3(-0.4f, -0.5f, 0.15f),
                            localAngles    = new Vector3(-90, 260, 45),
                            localScale     = new Vector3(0.8f, 0.6f, 0.6f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Bear",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayBear"),
                            childName      = "Head",
                            localPos       = new Vector3(0, 0, -0.4f),
                            localAngles    = new Vector3(0, 180, 0),
                            localScale     = new Vector3(0.6f, 0.6f, 0.6f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Medkit",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayMedkit"),
                            childName      = "Head",
                            localPos       = new Vector3(-0.4f, -0.5f, 0.15f),
                            localAngles    = new Vector3(-90, -90, 0),
                            localScale     = new Vector3(1.5f, 1.5f, 1.5f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Dagger",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayDagger"),
                            childName      = "Head",
                            localPos       = new Vector3(0, 0, 0),
                            localAngles    = new Vector3(-90, -90, 0),
                            localScale     = new Vector3(2, 2, 2),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "ChainLightning",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayUkulele"),
                            childName      = "Muzzle",
                            localPos       = new Vector3(0.4f, 0, -1.75f),
                            localAngles    = new Vector3(0, 85, 90),
                            localScale     = new Vector3(0.8f, 0.8f, 0.8f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Syringe",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplaySyringeCluster"),
                            childName      = "Head",
                            localPos       = new Vector3(0, 0, -0.15f),
                            localAngles    = new Vector3(-60, 0, 0),
                            localScale     = new Vector3(0.5f, 0.5f, 0.5f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "ArmorReductionOnHit",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayWarhammer"),
                            childName      = "Muzzle",
                            localPos       = new Vector3(0, 0.25f, 0),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(1, 1, 1),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "FallBoots",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayGravBoots"),
                            childName      = "FootL",
                            localPos       = new Vector3(0, -0.05f, 0),
                            localAngles    = new Vector3(45, 0, 0),
                            localScale     = new Vector3(0.25f, 0.25f, 0.25f),
                            limbMask       = LimbFlags.None
                        },
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayGravBoots"),
                            childName      = "FootR",
                            localPos       = new Vector3(0, -0.05f, 0),
                            localAngles    = new Vector3(70, 0, 0),
                            localScale     = new Vector3(0.25f, 0.25f, 0.25f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "BounceNearby",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayHook"),
                            childName      = "Muzzle",
                            localPos       = new Vector3(0, 0, -0.25f),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(1, 1, 1),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "UtilitySkillMagazine",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayAfterburnerShoulderRing"),
                            childName      = "Muzzle",
                            localPos       = new Vector3(0, 0, -0.75f),
                            localAngles    = new Vector3(0, -90, 90),
                            localScale     = new Vector3(2, 2, 2),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Hoof",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayHoof"),
                            childName      = "FootL",
                            localPos       = new Vector3(0, 0.05f, -0.15f),
                            localAngles    = new Vector3(50, 180, 180),
                            localScale     = new Vector3(0.15f, 0.15f, 0.075f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "HealWhileSafe",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplaySnail"),
                            childName      = "FootR",
                            localPos       = new Vector3(0, -0.05f, 0),
                            localAngles    = new Vector3(0, 0, 180),
                            localScale     = new Vector3(0.1f, 0.1f, 0.1f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "LunarPrimaryReplacement",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayBirdEye"),
                            childName      = "Muzzle",
                            localPos       = new Vector3(0, -0.1f, -0.25f),
                            localAngles    = new Vector3(-90, 0, 0),
                            localScale     = new Vector3(1, 1, 1),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "SecondarySkillMagazine",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayDoubleMag"),
                            childName      = "Muzzle",
                            localPos       = new Vector3(0, -0.8f, -2),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(-0.2f, -0.2f, -0.2f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Pearl",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayPearl"),
                            childName      = "Head",
                            localPos       = new Vector3(-1, 0, 0),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(0.2f, 0.2f, 0.2f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "ShinyPearl",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayShinyPearl"),
                            childName      = "Head",
                            localPos       = new Vector3(1, 0, 0),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(0.2f, 0.2f, 0.2f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "SprintOutOfCombat",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayWhip"),
                            childName      = "Head",
                            localPos       = new Vector3(-0.5f, -1.2f, 0.25f),
                            localAngles    = new Vector3(0, 0, -20),
                            localScale     = new Vector3(1, 1, 1),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Fruit",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayFruit"),
                            childName      = "Head",
                            localPos       = new Vector3(0.6f, -1.2f, 0),
                            localAngles    = new Vector3(0, -45, 45),
                            localScale     = new Vector3(0.75f, 0.75f, 0.75f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "BFG",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayBFG"),
                            childName      = "Muzzle",
                            localPos       = new Vector3(0, 0.2f, -0.25f),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(0.75f, 0.75f, 0.75f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            //follower prefabs

            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Meteor",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayMeteor"),
                            childName      = "Root",
                            localPos       = new Vector3(0, 2, -0.75f),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(2, 2, 2),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            /*list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
             * {
             *  name = "Saw",
             *  displayRuleGroup = new DisplayRuleGroup
             *  {
             *      rules = new ItemDisplayRule[]
             *      {
             *          new ItemDisplayRule
             *          {
             *              ruleType = ItemDisplayRuleType.ParentedPrefab,
             *              followerPrefab = ItemDisplays.LoadDisplay("DisplaySawmerang"),
             *              childName = "Root",
             *              localPos = new Vector3(0, 2, -0.75f),
             *              localAngles = new Vector3(-90, 0, 0),
             *              localScale = new Vector3(0.4f, 0.4f, 0.4f),
             *              limbMask = LimbFlags.None
             *          }
             *      }
             *  }
             * });*/

            list2.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Blackhole",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayGravCube"),
                            childName      = "Root",
                            localPos       = new Vector3(0, 2, -0.75f),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(1, 1, 1),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Icicle",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayFrostRelic"),
                            childName      = "Root",
                            localPos       = new Vector3(-1, 2, -1),
                            localAngles    = new Vector3(90, 0, 0),
                            localScale     = new Vector3(2, 2, 2),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "Talisman",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayTalisman"),
                            childName      = "Root",
                            localPos       = new Vector3(1, 2, -1),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(1, 1, 1),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            list.Add(new ItemDisplayRuleSet.NamedRuleGroup
            {
                name             = "FocusConvergence",
                displayRuleGroup = new DisplayRuleGroup
                {
                    rules = new ItemDisplayRule[]
                    {
                        new ItemDisplayRule
                        {
                            ruleType       = ItemDisplayRuleType.ParentedPrefab,
                            followerPrefab = ItemDisplays.LoadDisplay("DisplayFocusedConvergence"),
                            childName      = "Root",
                            localPos       = new Vector3(0.5f, 2.5f, -3),
                            localAngles    = new Vector3(0, 0, 0),
                            localScale     = new Vector3(0.2f, 0.2f, 0.2f),
                            limbMask       = LimbFlags.None
                        }
                    }
                }
            });

            //apply displays here

            BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic;

            ItemDisplayRuleSet.NamedRuleGroup[] value  = list.ToArray();
            ItemDisplayRuleSet.NamedRuleGroup[] value2 = list2.ToArray();
            typeof(ItemDisplayRuleSet).GetField("namedItemRuleGroups", bindingAttr).SetValue(itemDisplayRuleSet, value);
            typeof(ItemDisplayRuleSet).GetField("namedEquipmentRuleGroups", bindingAttr).SetValue(itemDisplayRuleSet, value2);

            characterPrefab.GetComponentInChildren <CharacterModel>().itemDisplayRuleSet = itemDisplayRuleSet;
        }
Exemplo n.º 4
0
        internal static void RegisterVariants()
        {
            // gather materials and meshes to use for variants
            ItemDisplayRuleSet itemDisplayRuleSet = Resources.Load <GameObject>("Prefabs/CharacterBodies/CommandoBody").GetComponent <ModelLocator>().modelTransform.GetComponent <CharacterModel>().itemDisplayRuleSet;
            Material           lunarGolemMat      = UnityEngine.Object.Instantiate(Resources.Load <GameObject>("Prefabs/CharacterBodies/LunarGolemBody").GetComponentInChildren <CharacterModel>().baseRendererInfos[0].defaultMaterial);
            Material           perforatorMat      = UnityEngine.Object.Instantiate(itemDisplayRuleSet.FindItemDisplayRuleGroup("FireballsOnHit").rules[0].followerPrefab.GetComponentInChildren <MeshRenderer>().material);
            //Material glandMat = UnityEngine.Object.Instantiate(itemDisplayRuleSet.FindItemDisplayRuleGroup("BeetleGland").rules[0].followerPrefab.GetComponentInChildren<MeshRenderer>().material);
            Material visionsMat       = UnityEngine.Object.Instantiate(itemDisplayRuleSet.FindItemDisplayRuleGroup("LunarPrimaryReplacement").rules[0].followerPrefab.GetComponentInChildren <MeshRenderer>().material);
            Material ghostMat         = Resources.Load <Material>("Materials/matGhostEffect");
            Material shatterspleenMat = UnityEngine.Object.Instantiate(itemDisplayRuleSet.FindItemDisplayRuleGroup("BleedOnHitAndExplode").rules[0].followerPrefab.GetComponentInChildren <MeshRenderer>().material);
            Material solusMat         = UnityEngine.Object.Instantiate(Resources.Load <GameObject>("Prefabs/CharacterBodies/RoboBallBossBody").GetComponentInChildren <CharacterModel>().baseRendererInfos[0].defaultMaterial);

            missileLauncherDisplayPrefab = itemDisplayRuleSet.FindEquipmentDisplayRuleGroup("CommandMissile").rules[0].followerPrefab;

            //Mesh beedlMesh = Modules.Assets.armoredMesh;
            //Mesh beedlSpeedMesh = Modules.Assets.speedyBeetleMesh;

            // add simple variants
            AddSimpleVariant("Beetle", Modules.Config.armoredBeetleSpawnRate.Value, MonsterVariantTier.Common, GroundSizeModifier(1.5f), 3f, 1f, 1f, 1f, 1f, 0f, 20);                // Armored
            AddSimpleVariant("Golem", Modules.Config.fullAutoGolemSpawnRate.Value, MonsterVariantTier.Rare, null, 1f, 1f, 8f, 0.8f, 1f, -20f, 20, lunarGolemMat);                    // Full-Auto
            AddSimpleVariant("Golem", Modules.Config.titanletSpawnRate.Value, MonsterVariantTier.Uncommon, GroundSizeModifier(2.5f), 4f, 0.5f, 1f, 3f, 1f, 0f);                      // Titanlet
            AddSimpleVariant("BeetleGuard", Modules.Config.beetleGuardBruteSpawnRate.Value, MonsterVariantTier.Uncommon, GroundSizeModifier(1.1f), 2f, 0.5f, 0.9f, 1.4f, 1f, 10f);   // Brute
            AddSimpleVariant("Bison", Modules.Config.speedyBisonSpawnRate.Value, MonsterVariantTier.Common, null, 1f, 4f, 1f, 1f, 1f, 0f);                                           // Speedy
            AddSimpleVariant("Bison", Modules.Config.speedyBisonSpawnRate.Value, MonsterVariantTier.Uncommon, GroundSizeModifier(1.25f), 3f, 1f, 1f, 1f, 1f, 20f, 0, lunarGolemMat); // Albino

            AddSimpleVariant("Titan", Modules.Config.golemletSpawnRate.Value, MonsterVariantTier.Common, GroundSizeModifier(0.3f), 1f, 5f, 1f, 1f, 1f, 0f, 0);                       // Golemlet
            AddSimpleVariant("Titan", Modules.Config.colossalTitanSpawnRate.Value, MonsterVariantTier.Rare, GroundSizeModifier(3f), 3f, 0.5f, 1f, 2f, 1f, 50f, 3);                   // Colossus

            // flushed
            AddSimpleVariant("BeetleQueen2", 2, MonsterVariantTier.Common, GroundSizeModifier(0.25f), 0.8f, 5f, 1f, 1f, 1f, 0f); // Stupid


            // Generic CDR inventory
            ItemInfo[] rapidFireInventory = SimpleInventory("AlienHead", 20);

            // Full Shield inventory
            ItemInfo[] fullShieldInventory = SimpleInventory("ShieldOnly");

            // SPEED inventory
            ItemInfo[] speedInventory = SimpleInventory("Hoof", 5);

            // Cursed Jellyfish inventory
            //  i sincerely apologize
            ItemInfo[] hellInventory = new ItemInfo[]
            {
                SimpleItem("IceRing", 2),
                SimpleItem("SprintOutOfCombat", 3),
                SimpleItem("Crowbar", 1)
            };

            // Infernal Wisp inventory
            ItemInfo[] wispInventory = new ItemInfo[]
            {
                SimpleItem("CritGlasses", 10),
                SimpleItem("Behemoth", 3)
            };

            // Clotted Imp inventory
            ItemInfo[] clottedInventory = new ItemInfo[]
            {
                SimpleItem("UtilitySkillMagazine", 2),
                SimpleItem("CritGlasses", 4),
                SimpleItem("BleedOnHitAndExplode", 1)
            };

            // Artillery Vulture inventory
            ItemInfo[] artilleryInventory = new ItemInfo[]
            {
                SimpleItem("Clover", 3),
                SimpleItem("Missile", 1),
                SimpleItem("Behemoth", 3)
            };

            // Speedy Beetle
            AddVariant(new MonsterVariantInfo
            {
                bodyName              = "Beetle",
                spawnRate             = Modules.Config.speedyBeetleSpawnRate.Value,
                variantTier           = MonsterVariantTier.Common,
                sizeModifier          = null,
                healthMultiplier      = 1f,
                moveSpeedMultiplier   = 1f,
                attackSpeedMultiplier = 3f,
                damageMultiplier      = 1f,
                armorMultiplier       = 1f,
                armorBonus            = 0f,
                customInventory       = speedInventory,
                meshReplacement       = null,
                materialReplacement   = null,
                skillReplacement      = null
            });

            // Flamethrower Lemurian
            AddVariant(new MonsterVariantInfo
            {
                bodyName              = "Lemurian",
                spawnRate             = Modules.Config.flamethrowerLemurianSpawnRate.Value,
                variantTier           = MonsterVariantTier.Rare,
                sizeModifier          = GroundSizeModifier(1.1f),
                healthMultiplier      = 1f,
                moveSpeedMultiplier   = 1f,
                attackSpeedMultiplier = 30f,
                damageMultiplier      = 0.4f,
                armorMultiplier       = 1f,
                armorBonus            = 0f,
                customInventory       = rapidFireInventory,
                meshReplacement       = null,
                materialReplacement   = SimpleMaterialReplacement(perforatorMat),
                skillReplacement      = null
            });

            // Badass Lemurian
            AddVariant(new MonsterVariantInfo
            {
                bodyName              = "Lemurian",
                spawnRate             = Modules.Config.badassLemurianSpawnRate.Value,
                variantTier           = MonsterVariantTier.Common,
                sizeModifier          = null,
                healthMultiplier      = 1f,
                moveSpeedMultiplier   = 1f,
                attackSpeedMultiplier = 1f,
                damageMultiplier      = 1f,
                armorMultiplier       = 1f,
                armorBonus            = 0f,
                customInventory       = null,
                meshReplacement       = null,
                materialReplacement   = null,
                skillReplacement      = PrimaryReplacement(Modules.Skills.missileLaunchDef)
            });

            // Nuclear Jellyfish
            AddVariant(new MonsterVariantInfo
            {
                bodyName              = "Jellyfish",
                spawnRate             = Modules.Config.nuclearJellyfishSpawnRate.Value,
                variantTier           = MonsterVariantTier.Common,
                sizeModifier          = FlyingSizeModifier(2f),
                healthMultiplier      = 15f,
                moveSpeedMultiplier   = 0.75f,
                attackSpeedMultiplier = 1f,
                damageMultiplier      = 6f,
                armorMultiplier       = 1f,
                armorBonus            = 20f,
                customInventory       = null,
                meshReplacement       = null,
                materialReplacement   = SimpleMaterialReplacement(visionsMat),
                skillReplacement      = SecondaryReplacement(Modules.Skills.nuclearNovaDef)
            });

            // M.O.A.J
            AddVariant(new MonsterVariantInfo
            {
                bodyName              = "Jellyfish",
                spawnRate             = Modules.Config.MOAJSpawnRate.Value,
                variantTier           = MonsterVariantTier.Rare,
                sizeModifier          = FlyingSizeModifier(4f),
                healthMultiplier      = 40f,
                moveSpeedMultiplier   = 0.4f,
                attackSpeedMultiplier = 1f,
                damageMultiplier      = 1f,
                armorMultiplier       = 1f,
                armorBonus            = 80f,
                customInventory       = null,
                meshReplacement       = null,
                materialReplacement   = SimpleMaterialReplacement(solusMat),
                skillReplacement      = SecondaryReplacement(Modules.Skills.spawnNovaDef)
            });

            // Overcharged Golem
            AddVariant(new MonsterVariantInfo
            {
                bodyName              = "Golem",
                spawnRate             = Modules.Config.overchargedGolemSpawnRate.Value,
                variantTier           = MonsterVariantTier.Common,
                sizeModifier          = null,
                healthMultiplier      = 1f,
                moveSpeedMultiplier   = 1f,
                attackSpeedMultiplier = 1f,
                damageMultiplier      = 1f,
                armorMultiplier       = 1f,
                armorBonus            = 0f,
                customInventory       = fullShieldInventory,
                meshReplacement       = null,
                materialReplacement   = null,
                skillReplacement      = null
            });

            // Cursed Jellyfish
            AddVariant(new MonsterVariantInfo
            {
                bodyName              = "Jellyfish",
                spawnRate             = Modules.Config.cursedJellyfishSpawnRate.Value,
                variantTier           = MonsterVariantTier.Rare,
                sizeModifier          = null,
                healthMultiplier      = 0.8f,
                moveSpeedMultiplier   = 1f,
                attackSpeedMultiplier = 1.5f,
                damageMultiplier      = 1f,
                armorMultiplier       = 1f,
                armorBonus            = 0f,
                customInventory       = hellInventory,
                meshReplacement       = null,
                materialReplacement   = SimpleMaterialReplacement(perforatorMat),
                skillReplacement      = null
            });

            // Spectral Jellyfish
            AddVariant(new MonsterVariantInfo
            {
                bodyName              = "Jellyfish",
                spawnRate             = Modules.Config.spectralJellyfishSpawnRate.Value,
                variantTier           = MonsterVariantTier.Rare,
                sizeModifier          = FlyingSizeModifier(0.8f),
                healthMultiplier      = 0.5f,
                moveSpeedMultiplier   = 1.5f,
                attackSpeedMultiplier = 1f,
                damageMultiplier      = 0.5f,
                armorMultiplier       = 1f,
                armorBonus            = 0f,
                customInventory       = SimpleInventory("ExtraLife"),
                meshReplacement       = null,
                materialReplacement   = SimpleMaterialReplacement(ghostMat),
                skillReplacement      = null
            });

            // Infernal Wisp
            AddVariant(new MonsterVariantInfo
            {
                bodyName              = "Wisp",
                spawnRate             = Modules.Config.infernalWispSpawnRate.Value,
                variantTier           = MonsterVariantTier.Rare,
                sizeModifier          = FlyingSizeModifier(1.2f),
                healthMultiplier      = 1f,
                moveSpeedMultiplier   = 0.8f,
                attackSpeedMultiplier = 0.6f,
                damageMultiplier      = 2f,
                armorMultiplier       = 1f,
                armorBonus            = 0f,
                customInventory       = wispInventory,
                meshReplacement       = null,
                materialReplacement   = null,
                skillReplacement      = null
            });

            // Clotted Imp
            AddVariant(new MonsterVariantInfo
            {
                bodyName              = "Imp",
                spawnRate             = Modules.Config.clottedImpSpawnRate.Value,
                variantTier           = MonsterVariantTier.Uncommon,
                sizeModifier          = GroundSizeModifier(0.8f),
                healthMultiplier      = 0.8f,
                moveSpeedMultiplier   = 1f,
                attackSpeedMultiplier = 1f,
                damageMultiplier      = 1f,
                armorMultiplier       = 1f,
                armorBonus            = 0f,
                customInventory       = clottedInventory,
                meshReplacement       = null,
                materialReplacement   = SimpleMaterialReplacement(shatterspleenMat),
                skillReplacement      = null
            });

            // Artillery Vulture
            AddVariant(new MonsterVariantInfo
            {
                bodyName              = "Vulture",
                spawnRate             = Modules.Config.artilleryVultureSpawnRate.Value,
                variantTier           = MonsterVariantTier.Uncommon,
                sizeModifier          = GroundSizeModifier(1.25f),
                healthMultiplier      = 1f,
                moveSpeedMultiplier   = 1f,
                attackSpeedMultiplier = 4f,
                damageMultiplier      = 0.5f,
                armorMultiplier       = 1f,
                armorBonus            = 100f,
                customInventory       = artilleryInventory,
                meshReplacement       = null,
                materialReplacement   = MultiMaterialReplacement(new Dictionary <int, Material> {
                    { 0, perforatorMat }, { 2, solusMat }
                }),
                skillReplacement = null
            });
        }