Before following this guide make sure you follow this guide first.
Go to the Blueprints/Other/Structs folder and create a new Struct called S_StartingAmmo then add variables shown in the image below.
Go to the BP_EquipmentInventory then go to the StartItemEquipment function, create a new local variable called IndexL and set it to an Integer.
Create another local variable called StartingWeaponL and set its type to S_StartingWeapon. Then copy the image below.
Then create another local variable called ItemL and set its type to S_InvItem. Then copy the image below.
Next create a new variable (Not local variable) and call it StartingWeaponAmmo and set it type to S_StartingAmmo and tick Instance Editable.
Next go to the BP_WeaponInventory and create a new function called AddWeaponAmmo, then add a new input called Items, set its type to S_InvItem and change it to an array.
Then copy the 2 images below.
Then go back to the BP_EquipmentInventory in the StartItemEquipment and create a new function called FindStartingAmmo and add a new input called WeaponSlot and set its type to E_WeaponSlot. Then add an output called Found and set its type to Boolean and add another output called Item and set its type to S_CraftingCost.
Then copy the image below.
Then in the StartItemEquipment function copy the 2 images below.
In the BP_PlayerInventory you can now find the StartingWeaponAmmo setting in the Class Defaults.
You can add entries to add starting ammo to weapons set in the StartingWeapons array. Like shown in the image below.
This will give the M4A4 in the primary slot 30 ammo to start with. To effect a different weapon slots starting ammo just change the Slot in the Starting Weapon Ammo setting. You can also set ammo for both the primary and secondary starting weapons like shown in the image below.
Note – the weapons are still capped by the max ammo and the ammo item restrictions of the gun and magazine. To change these check the weapons guides in the documentation.
The Weapons Allowed Ammo setting is in the weapon’s holdable blueprint in its class defaults.