3: Config File
Editing the config file can be done in one of two ways; in a text file or inside the game through the UI. We’ll go over the main way which is inside the game using the UI. Editing the text file is fine too but you just need to be careful to keep the formatting correct. You’ll also need to know what the settings are.
Start by opening the game and make your way to the Custom Content menu in the Armory. Select “Upload Item” at the top.
Next select the type “Magazine” and then click “Create”. This will open a window for you to save the config file to your PC. Choose a location and click “Save”
Iterating On Configs
This is the same as the weapons so check out the documentation there.
You should now see the file path. Next click “Edit” to open the config Editor Window.
We’ll now go through what each of the fields is used for. You can create a config that doesn’t work and we’ve added some validation for most of the big issues. However we didn’t want to add too many restrictions to what you can and cannot do. So if your magazine is not working, mess with the settings, review the guide, and keep trying. You can even edit the config at runtime so iterating is fairly quick. We’ll go over iterating later.
Magazine Config Fields
Title - The name of the magazine
Description - The text in the inventory to describe the magazine to players.
MagazineType - the type of magazines the weapon is compatible with.
Standard - the most common option.
Belt - not yet supported by custom weapons.
Individual - Single use items such as shotgun shells or grenade rounds
Any - allows any weapon to use - could have unintended consequences
MagazineTag - this is a simple tag system to allow you to use the existing magazines and make custom weapons intercompatible with each other.
StartingAmmoCount - how many rounds of ammunition does the magazine hold.
AlwaysTracer - if true every shot will be a tracer.
TracerInterval - number of normal rounds between each tracer round. -1 is for no tracers. 0 is always tracers, 1 would be 1 tracer and then 1 normal round, and so on.
Projectile - the type of bullet held in the magazine.
None_OR_NotSelectable - none = 0
bullet_9mmx18mm = 1
bullet_9mmx19mm = 2
bullet_57mmx28mm = 3
bullet_45cal = 4
bullet_545mmx39mm = 5
bullet_556mmx45mm = 6
bullet_762mmx51mm = 7
bullet_762mmx39mm = 8
bullet_762mmx54mm = 9
bullet_smaw_spotting_round = 10
bullet_338_lapua = 11
bullet_300_win_mag = 12
bullet_300blk = 13
bullet_65_creedmore = 14
bullet_86mm_blk = 15
bullet_50bmg = 16
bullet_68mmx51mm = 17
bullet_22cal = 18
shotgun_buckshot_12g = 200
shotgun_slug_12g = 201
grenade_40mm_he = 300
grenade_40mm_smoke_white = 301
grenade_40mm_smoke_green = 302
grenade_40mm_smoke_red = 303
grenade_smaw_mod3_hedp = 304
rocket_hydra = 400
rocket_at4_80mm = 401
rocket_pg7_vl = 402
EquipTime and UnequipTime are additive. So if you have a magazine that takes 1 second to return and are taking out another magazine that takes 2 seconds to equip, the total time of 3 seconds is what the players will feel.
EquipTime - time in seconds when taking the item out of the inventory.
UnequipTime - time in seconds it takes to return a magazine to the inventory when swapping items.
Mass - The weight for the physics system when the magazine is thrown.
HiddenOnWeapon - True means the magazine mesh will not be visible when attached to a weapon. This is useful for magazines for grenade launchers, shotguns, or some rocket launchers.
FirstPersonMagazineOffset - This lets you tune the position of the model on the player. If your weapon is too close up on the camera, add some to the Z axis. Too low? Add to the Y axis. This is in meters.
ThirdPersonMagazineOffset - Same as the first person but it’s applied to other characters and not the local player.
InventorySize - The number of inventory squares the magazine takes up.
Weight - the weight in kilograms of the magazine in the inventory.
PublishedFileId - default to 0 for new magazines. If you are updating a magazine on the workshop, enter the ID here. This value will be updated for you the first time you upload the magazine.