Ammo
Add consumable ammunition to your guns
Last updated
Add consumable ammunition to your guns
Last updated
If you want to prevent players from shooting guns forever, you should use Ammo
. Ammo is split into 2 sections, the Weapon Config and the Ammo Config.
The mechanics triggered when the player tries to shoot but the weapon is empty. Use the wiki.
@Source{}
-> The player who tried to shoot.
The Trigger that is used to switch between ammo types. Typically, you use SWAP_HANDS
. For example:
The mechanics triggered when you swap ammo types (So, right after the Ammo_Switch_Trigger is used).
A list of all ammunition that this weapon can use. A typical server will only have 1 ammunition per gun. However, if you purchase WeaponMechanicsPlus, then you can make explosive ammo, fire ammo, and much more!
For example:
So where does the ammo config go? Not in the weapon files! Instead, go to yourserver -> plugins -> WeaponMechanics -> ammos and create a new .yml
file (Or use the default one).
Make sure you replace <ammo_title>
with a unique name for your ammo, and do not use any special characters. For example, .50
will not work but 50_Caliber
is good.
Consumes experience points (not levels) to load your gun. Most mobs drop 5 experience points.
If you have Vault installed, you can consume currency to load your gun.
Consumes items to be used as ammo. You can use one of Bullet_Item
or Magazine_Item
, or you can use both.
Bullet_Item
The item for individual bullets.
Magazine_Item
The item for full magazines to load into the gun.
Ammo_Converter_Check
(Optional)
Converts vanilla items into ammo usable by WeaponMechanics automatically.
For example, Type: true
will convert all items of the same material to usable ammo.
This is what is displayed by the <ammo_type>
placeholder in your . If you do not use any Symbol, it defaults to the ammo title.
Uses the .
Uses the .
This is the same as .