コード例 #1
0
        static void AddOptions(CustomizationOptions options, string oldAssetID)
        {
            var hair = bundle.LoadAsset <EquipmentEntity>("Assets/Race/EE_Hair_HairLongBangs_M_AS.asset");
            var head = bundle.LoadAsset <EquipmentEntity>("Assets/Race/EE_Head_Face01_M_HM.asset");

            options.Hair  = new EquipmentEntityLink[] { BlueprintUtil.MakeEquipmentEntityLink(hair, new Guid(oldAssetID + "Hair").ToString()) };
            options.Heads = new EquipmentEntityLink[] { BlueprintUtil.MakeEquipmentEntityLink(head, new Guid(oldAssetID + "Head").ToString()) };
            Main.DebugLog("Added Hair");
        }
コード例 #2
0
        static EquipmentEntityLink[] CopyLinks(EquipmentEntityLink[] links, string oldGUID)
        {
            var eels = new EquipmentEntityLink[links.Length];

            for (int i = 0; i < links.Length; i++)
            {
                var oldEE   = links[i].Load();
                var newEE   = CopyEquipmentEntity(oldEE);
                var assetID = GetDeterministicAssetID(oldGUID);
                eels[i] = BlueprintUtil.MakeEquipmentEntityLink(newEE, assetID);
                oldGUID = assetID;
            }
            return(eels);
        }
コード例 #3
0
        static void SetupClassApperance(BlueprintCharacterClass newClass, BlueprintCharacterClass rogue, BlueprintCharacterClass ranger)
        {
            newClass.PrimaryColor   = 31;
            newClass.SecondaryColor = 7;

            /*
             * Shoulder stuff, Belts and straps, keytools
             * "b1c62eff2287d9a4fbbf76c345d58840" EE_RogueAccesories_M
             * "345af8eabd450524ab364e7a7c6f1044" EE_RogueAccesories_F
             *
             * Base Outfit
             * "d019e95d4a8a8474aa4e03489449d6ee" EE_Rogue_M_Any_Colorize
             * "c6757746d62b78f46a92020110dfe088" EE_Rogue_F_Any_Colorize
             *
             * Nice Cape
             * "bba6c03b44e5a1c4dbfacf7eec6123dd" EE_Rogue_M_Cape
             * "b7613075291c79947a0cde8c7aec5926" EE_Rogue_F_Cape
             *
             * Backpack
             * "e249678d823d00f4cb30d4d5c8ca1219" Ranger_M_Accessories
             * "e09cf61a567f2a84ea9a3b505f390a32" Ranger_F_Accessories
             *
             * Belts and Straps
             * "0809ab3735b54874b965a09311f0c898" EE_RangerAccesories_M_Any_Colorize
             * "b6bca728c4ced324da7e8d0d01ad34bb" EE_RangerAccesories_F_Any_Colorize
             *
             * Base Outfit
             * "ca71ad9178ecf6a4d942ce55d0c7857b" EE_Ranger_M_Any_Colorize
             * "bc6fb7e5c91de08418b81a397b20bb18" EE_Ranger_F_Any_Colorize
             *
             * Ratty Cape
             * "fb0037ec1d96c8d418bc08d3e0bbf063" EE_Ranger_M_Cape
             * "52a0a0c7183957a4ea02301ce40b3e83" EE_Ranger_F_Cape
             */

            /*
             * Ranger contains: Boots, Forearms, Faulds, Hands, Torso, Upperarms, Upperlegs
             * Roue Contains: Boots, forearms, Faulds, Torso, Upperarms, Upperlegs
             */
            var rogueMaleOutfit  = ResourcesLibrary.TryGetResource <EquipmentEntity>("d019e95d4a8a8474aa4e03489449d6ee");
            var rangerMaleOutfit = ResourcesLibrary.TryGetResource <EquipmentEntity>("ca71ad9178ecf6a4d942ce55d0c7857b");
            var maleOutfit       = BlueprintUtil.CopyEquipmentEntity(rogueMaleOutfit);

            maleOutfit.BodyParts.Clear();
            var rangerBodyPartTypes = BodyPartType.Boots | BodyPartType.Hands | BodyPartType.Upperarms | BodyPartType.Forearms;
            var rogueBodyPartTypes  = BodyPartType.Faulds | BodyPartType.Upperlegs | BodyPartType.Torso;

            maleOutfit.BodyParts.AddRange(rogueMaleOutfit.BodyParts.Where(
                                              (bp) => (bp.Type & rogueBodyPartTypes) != 0));
            maleOutfit.BodyParts.AddRange(rangerMaleOutfit.BodyParts.Where(
                                              (bp) => (bp.Type & rangerBodyPartTypes) != 0));
            var maleOutfitLink     = BlueprintUtil.MakeEquipmentEntityLink(maleOutfit, "7b8429914e404455b270835c20486322");
            var rogueFemaleOutfit  = ResourcesLibrary.TryGetResource <EquipmentEntity>("c6757746d62b78f46a92020110dfe088");
            var rangerFemaleOutfit = ResourcesLibrary.TryGetResource <EquipmentEntity>("bc6fb7e5c91de08418b81a397b20bb18");
            var femaleOutfit       = BlueprintUtil.CopyEquipmentEntity(rogueFemaleOutfit);

            femaleOutfit.BodyParts.Clear();
            femaleOutfit.BodyParts.AddRange(rogueFemaleOutfit.BodyParts.Where(
                                                (bp) => bp.Type == BodyPartType.Faulds || bp.Type == BodyPartType.Torso || bp.Type == BodyPartType.Upperarms || bp.Type == BodyPartType.Upperlegs));
            femaleOutfit.BodyParts.AddRange(rangerFemaleOutfit.BodyParts.Where(
                                                (bp) => bp.Type == BodyPartType.Boots || bp.Type == BodyPartType.Hands || bp.Type == BodyPartType.Forearms));

            var femaleOutfitLink = BlueprintUtil.MakeEquipmentEntityLink(femaleOutfit, "b23db2bf48b340b79e25039deb0c86dd");

            //EquipmentEntities contains race dependent equipment entities, specificly hoods because races have different heads
            newClass.EquipmentEntities     = rogue.EquipmentEntities;
            newClass.MaleEquipmentEntities = new EquipmentEntityLink[] {
                new EquipmentEntityLink()
                {
                    AssetId = "0809ab3735b54874b965a09311f0c898"
                },              //EE_RangerAccesories_M_Any_Colorize
                maleOutfitLink, //CustomOutfit
                new EquipmentEntityLink()
                {
                    AssetId = "fb0037ec1d96c8d418bc08d3e0bbf063"
                },                                                                         //EE_Ranger_M_Cape
            };
            newClass.FemaleEquipmentEntities = new EquipmentEntityLink[] {
                new EquipmentEntityLink()
                {
                    AssetId = "b6bca728c4ced324da7e8d0d01ad34bb"
                },                //EE_RangerAccesories_F_Any_Colorize
                femaleOutfitLink, //CustomOutfit
                new EquipmentEntityLink()
                {
                    AssetId = "52a0a0c7183957a4ea02301ce40b3e83"
                },                                                                         //EE_Ranger_F_Cape
            };
        }