Редактор weapons.meta
Начни с настоящего стандартного weapons.meta любого оружия из базовой игры или DLC, меняй урон, дальность, скорострельность, перезарядку, размер магазина, точность и отдачу с пояснениями, сравнивай со стандартом и экспортируй чистый weapons.meta и fxmanifest для своего сервера.
Этот инструмент и его описание пока на английском.
How to use it
- Pick a weapon on the left. Hand weapons are grouped by weapon group, vehicle weapons by the DLC they came with.
- Change values with the slider or type a number. Changed fields turn amber and show the game default next to a reset link.
- Magazine size is under Ammo & reload. It lives on the clip component, so it exports as a separate
weaponcomponents.meta. - Edit as many weapons as you like. The weapons.meta tab only contains the weapons you changed. The Changes tab lists every field next to its default.
- Download the files, copy the fxmanifest and ensure the resource. Your edits are saved in this browser.
Already have a weapons.meta? Use Import and paste it or open the file. Base game weapons are compared against their defaults, so you see exactly what the file changes. Weapons that are not in the base game (add-on guns) are added as custom weapons and exported as they are.
Defaults
Defaults are the game's own values (game build 3889), DLC weapons and Rockstar's later patches included. A weapon you do not edit exports the same block the game has.
Loading it in a resource
fx_version 'cerulean'
game 'gta5'
files {
'weapons.meta',
'weaponcomponents.meta',
}
data_file 'WEAPONINFO_FILE_PATCH' 'weapons.meta'
data_file 'WEAPONCOMPONENTSINFO_FILE' 'weaponcomponents.meta'WEAPONINFO_FILE_PATCHis the type people use to override base game weapons. FiveM mounts it with the same loader asWEAPONINFO_FILE(both are listed in the data file table and handled together in FiveM's source), and plenty of servers report that either works. We default to the patch type because that is what Rockstar uses for files that change existing weapons.- Items replace the game's weapon by
<Name>. Ship the whole<Item type="CWeaponInfo">block, not only the lines you changed. The export does that for you. ClipSizeinside weapons.meta is ignored for weapons that have a default clip component (most guns). Change the clip component in weaponcomponents.meta instead.- Players have to reconnect to pick up changes. If one of your weapons is also edited by another resource, the one loaded last wins, so keep all weapon edits in one resource.
Meta file or runtime natives
Some values can be changed from a client script without shipping a meta file. The Runtime tab writes that script for your changes.
SetWeaponDamageModifier(weaponHash, multiplier)(game native0x4757F00BC6323CFE, older nameN_0x4757f00bc6323cfe/_SET_WEAPON_DAMAGE_MODIFIER) multiplies the weapon's base damage for that weapon type on the client that runs it. It does not need to be called every frame, and it is not reset when the resource stops.SetWeaponRecoilShakeAmplitude(weaponHash, amplitude)is a FiveM native that sets RecoilShakeAmplitude directly. FiveM also hasGetWeaponDamageModifierandGetWeaponRecoilShakeAmplitudeto read them back.SetPlayerWeaponDamageModifier(player, modifier)andSetPlayerWeaponDefenseModifier(player, modifier)scale damage per player, for every weapon. Useful for buffs, safe zones or jobs.
Use natives when you want to tune damage live, change it per situation, or avoid a client restart. Use weapons.meta for everything else (fire rate, range, falloff, reload, accuracy, flags) and for values that should be the same for everyone from the moment they join. Damage is worked out on the shooter's client, so a runtime modifier has to run on every client.
What the derived stats mean
- Fire rate is 60 / TimeBetweenShots. For semi auto guns it is the cap, you cannot click faster than that but you can click slower.
- Burst DPS is damage per shot times shots per second, every bullet hitting, no falloff, no armour.
- Empty a clip is (rounds - 1) x TimeBetweenShots using the default clip component's size.
- Shots to down a player uses 100 points (a FiveM player has 200 health and goes down at 100) times NetworkPlayerDamageModifier, body shots with no armour. Headshots add NetworkHeadShotPlayerDamageModifier.
- Falloff: full damage up to DamageFallOffRangeMin, then a straight line down to Damage x DamageFallOffModifier at DamageFallOffRangeMax, and nothing past WeaponRange. The chart draws exactly that.
These are estimates from the meta values. Scripts that change damage modifiers, armour, limb hits and animation timing all change the real result. Nobody outside Rockstar has an official description of every CWeaponInfo field, so the one line explanations are the community's best understanding plus what the values in the game files show.
Sources
- Default values: the game's own weapons.meta and weaponcomponents.meta (build 3889).
- FiveM docs, data files (WEAPONINFO_FILE, WEAPONINFO_FILE_PATCH, WEAPONCOMPONENTSINFO_FILE mounters).
- FiveM source, LoadStreamingFile.cpp (both weapon info types handled together).
- SET_WEAPON_DAMAGE_MODIFIER and SET_WEAPON_RECOIL_SHAKE_AMPLITUDE native docs.
- FiveM WeaponExtraNatives.cpp (runtime weapon natives and what they reset on resource stop).
- Cfx.re forum: weapons.meta on b2189 and weapon balancing (patch type, clip size in components, load order).
- DurtyFree/gta-v-data-dumps (weapon names, labels and flags; it has no damage or timing values).
- alt:V WeaponData docs and GTAMods wiki for field names and meanings.
Ещё в категории «конфиги и код»
Генератор server.cfg
Собери полный рабочий server.cfg с hostname, слотами, OneSync, endpoints, тегами, ресурсами и ACE правами.
Генератор fxmanifest.lua
Создай валидный манифест ресурса: fx_version, скрипты, NUI страница, files, lua54 и зависимости.
Редактор handling
Настрой массу, тягу, сцепление и подвеску через интерфейс, затем экспортируй handling.meta или Lua для runtime.
