Ammo types

Ammo types #

Featureful SDK provides a set of predefined ammo types. Internally the ammo type is presented by a name and the max amount player can carry.

The list of ammo types #

Ammo nameDefault max ammoAmmo entitiyWeapons using this ammo by default
buckshot125ammo_buckshotweapon_shotgun
9mm250ammo_9mmclip, ammo_9mmAR, ammo_9mmboxweapon_9mmhandgun, weapon_9mmAR
ARgrenades10ammo_ARgrenadesweapon_9mmAR (secondary attack)
35736ammo_357weapon_357, weapon_eagle
uranium100ammo_gaussclipweapon_gauss, weapon_egon, weapon_displacer
rockets5ammo_rpgclipweapon_rpg
bolts50ammo_crossbowweapon_crossbow
Trip Mine5noneweapon_tripmine
Satchel Charge5noneweapon_satchel
Hand Grenade10noneweapon_handgrenade
Snarks15noneweapon_snark
Hornets8noneweapon_hornetgun
Medicine100noneweapon_medkit
Penguins9noneweapon_penguin
556200ammo_556weapon_249, weapon_minigun
76215ammo_762weapon_sniperrifle
Shocks10noneweapon_shockrifle
spores20ammo_sporeweapon_sporelauncher
45acp200ammo_45acpnone
57mm200ammo_57mmnone
nails200ammo_nailsweapon_nailgun
grenades50ammo_grenadeclipweapon_grenadelauncher
fuel100ammo_fuelnone
cells100ammo_cellsnone
charges10ammo_chargesnone
rounds200ammo_roundsnone
slugs100ammo_slugsnone

Some ammo types are not used by any weapons by default. These are defined for developer’s convenience if they want to configure some weapon to use a different ammo type via the weapon templates.

While technically it’s perfectly possible to allow registering custom new ammo types by a mod developer, the GoldSource has some technical limitations that prevent dynamic creation of new classnames for ammo entities, and registering a new ammo type without registering a new entity wouldn’t be so useful.

Managing player’s ammo #

Besides giving the ammo by ammo pickup entities, Featureful SDK provides other means to control player’s ammo:

Configuring max ammo #

The max ammo carried by the player can be configured via features/maxammo.cfg.

Example:

9mm 200
buckshot 60
bolts 20