truestiven Posted April 8, 2023 Share Posted April 8, 2023 Hello. I had asked about in in Discord, but maybe there someone know about it, too. Im trying to add new General to the game, i found the General blueprint, but how do i duplicate it in a way that if i change thing in the blueprint, they will stay after game restart? Should i create new blueprint file and somehow hook it to the game and register, or its possible to do all that just from C# code? Link to comment Share on other sites More sharing options...
edvin76 Posted September 8, 2023 Share Posted September 8, 2023 You instantiate a new blueprint and you can use an existing blueprint to copy anything you need in terms of properties and at the end you add it to the blueprintcache: BlueprintItemEquipmentHead sourceBp = Utilities.GetBlueprintByGuid<BlueprintItemEquipmentHead>("51500154900d46ac9bd4d7ef758b3808"); BlueprintItemEquipmentHead bp = new BlueprintItemEquipmentHead() { AssetGuid = new BlueprintGuid(new Guid("23d1cef87afd45b795b1a86398eeb10a")) }; // bp.m_DisplayNameText = DescriptionTools.CreateString("ITEMNAME", "Angel's Love"); //bp.m_DescriptionText = Helpers.CreateString("ITEM_DESC", "Grants its wielder a +2 enhancement {g|Encyclopedia:Bonus}bonus{/g} to {g|Encyclopedia:Dexterity}Dexterity{/g}. Bonuses of the same type usually don't stack."); // bp.m_DescriptionText = DescriptionTools.CreateString("ITEM_DESC", "If an angel falls in love, they can bestow the essence of their halo to someone they are in love with. "); bp.m_Icon = sourceBp.m_Icon; bp.m_EquipmentEntity = sourceBp.m_EquipmentEntity; bp.m_IsNotable = true; bp.m_Cost = 100000; bp.m_Weight = 1.0f; bp.m_InventoryPutSound = "CommonPut"; bp.m_InventoryTakeSound = "CommonTake"; bp.m_InventoryEquipSound = "CommonPut"; bp.CR = 13; bp.m_ForcedRampColorPresetIndex = 9; ResourcesLibrary.BlueprintsCache.AddCachedBlueprint(bp.AssetGuid, bp as SimpleBlueprint); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now