Creating custom Blueprints
A tutorial on creating a custom blueprint to add additional attachmentSlots to an item
Summary
Created: Aug 01 2024 by Berdagon Last documented edit: Aug 01 2024 by Berdagon
This guide will teach you how to create your own blueprint by extending a base game record. At the end, you will have an assault rifle with muzzle, scope, and four mod slots.
Requirements:
A text editor like Notepad++
What is a Blueprint?
A Blueprint is a record of type gamedataItemBlueprint_Record with the following flat:
Items.GenericShardableCyberwareBlueprint:
$type: gamedataItemBlueprint_Record
rootElement: Items.GenericShardableCyberwareBlueprint_inline0rootElement is a record of type gamedataItemBlueprintElement_Record.
It has the following flats (properties):
Items.GenericShardableCyberwareBlueprint_inline0:
$type: gamedataItemBlueprintElement_Record
slot: AttachmentSlots.GenericItemRoot
childElements:
- Items.GenericShardableCyberwareBlueprint_inline1slot is a record of type gamedataAttachmentSlot_Record.
They have the following properties:
childElements is an array of records of type gamedataItemBlueprintElement_Record
prereqID is a record of type gamedataStatPrereq_Record
A blueprint can have 1 rootElement and each of the gamedataItemBlueprintElement_Record can have multiple other gamedataItemBlueprintElement_Record as children
How to make a custom Blueprint?
We are going to make a custom blueprint that has 4 weapon mod slots for the Power Assault Rifles
At first make a new .yaml file and name it Items.Base_Power_AR_SMG_LMG_4Mod_Blueprint (the naming is not important and you can name it whatever you want).
Inside the yaml file, put the following content:
Now we need to define Items.Base_Power_AR_SMG_LMG_4Mod_Blueprint_rootElement we are going to use Items.Base_Power_AR_SMG_LMG_Blueprint_inline0 as a base for our rootElement and append two records for our 2 new Mod slots
The 2 new Weapon Mod Element records should be of type gamedataItemBlueprintElement_Record
Here we have to create 2 new prereqIDs
Adding attachment slots
And we will need to create our custom AttachmentSlots
We are going to create 2 attachmentSlots named
AttachmentSlots.Power_AR_SMG_LMG_WeaponMod3
AttachmentSlots.Power_AR_SMG_LMG_WeaponMod4
Now that all the necessary records are defined, we are going to add this Blueprint to the Weapon record
Items.Base_Power_Assault_Rifle as its name suggest is the base for power assault rifles so by doing this all the power assault rifles should now have this blueprint
The tweak part of making the blueprint is now over and we can jump in the game and check the records
We are going to use Preset_Ajax_Pimp as you can see the modSlots are not being shown in the game

For this, we are going to need to do some scripting lets create a new .reds file in the script folder and name it AR_SMG_LMG_4Slot.reds
We need to wrap multiple functions to make this work, so at first we are going to add a function that has our AttachmentSlots in it
And another function that checks for these slots
Now we wrap these 3 functions and add our slots to their return value
If we check the game now we can see that our slots are added but they are not shown correctly

We need to fix the slot Icons the tooltip names and the slot name
For the icons we wrap these 2 methods you can also use custom icon paths
For the tooltip names we are going to wrap this method
And for slot name
Now the UI is almost complete now we have to register these 2 slots to all the mods that can be equipped on the other 2
And now its done all of our power assault rifles now have 4 mod slots

Last updated