
To make a custom magazine, make a child blueprint of the master blueprint as usual (BP_Magazine_Master
). It will look something like this when you open it:
The key thing is to have a MagazineType property that exactly matches the magazine type of the MagWell component of your weapon (GBExternalMagazine class). In this example, the magazine type name is STANAG556:
Properties of the magazine base class that you are most likely to need to deal with include:
Magazine Type
As noted above, this must match the type specified in the GBExternalMagazine class.
Capacity
This is how many bullets the magazine holds when full
Initial Count
How many bullets the magazine starts out with (-1 meaning full magazine)
Bullet Item Class
The class of the bullet loaded in the magazine. Loadouts and default item builds and suchlike may be able to override the bullet type, but for now just put your preferred bullet class here.
Base Bullet Item Class
Just set this to the same as Bullet Item Class
Tracer Item Class
The bullet class to use if/when a tracer is fired
Start Tracer Count
When tracers should start being used (-1 for immediate). For example, a value of 10 would begin creating tracers once the magazine count reached 10 or lower.
Tracer Frequency
How often tracers should be used (0 to disable). For example, a value of 3 would create a tracer on every third round.
Default Pouch Type
A name identifying the pouch type for the magazine, for the automatically created pouches in the inventory system. See ammo pouch types.
You will ordinarily want to use one of the in-game projectile classes as the basis for your custom magazine.
There is a particular treatment of child blueprint components in magazine blueprints: the magazine master blueprint assumes that all child components are bullet meshes. In particular, the master blueprint assumes that the first child component is the top-most bullet, the second component is the second-most bullet, and so on.
Whenever the magazine count is adjusted, the master blueprint will hide the child components in accordance with the magazine count. For example, if only one bullet is left in the magazine, all but the first child component (the top bullet) will be hidden. This is all handled for you so long as you adhere to this system when creating child components.