SALESup to -59%Sales are live in the shop: see the deals
← All scripts

NC Attack — Config guide

Every option of config.lua and config/weapons.lua. After a change restart nc_attack (ensure nc_attack); never restart nc_attack_assets with players inside.

Back to the guide: README.md.

General

OptionDefaultWhat it does
Config.Locale'it'fallback language (it, en) when the player's game language is not available
Config.Debugfalsetrue = extra messages in the F8 / server console

Config.Bridge — framework, inventory, notices

KeyDefaultWhat it does
Framework'auto'auto, qbx, qb, esx, standalone
LocaleFromGametrueeach player gets the language of their game
Notify'auto'notices: auto, nui, ox_lib, gta, framework …
NotifyMs3500how long a notice stays (ms)
Inventory'auto'inventory used for the weapon items and ammo
Partytruefalse = ignore nc_party (no protection between mates)

Config.UI — look

KeyDefaultWhat it does
Theme'fantasy'NC Bridge theme of the HUD and menus
follow{ 'nc_rift', 'nc_party' }when one of these runs, its theme is used
scale1.0size of the whole UI

Config.Keys, commands

KeyDefaultWhat it does
attackControl24GTA control of the attack (left mouse), read only with a weapon in hand
aimControl25GTA control of the heavy attack / precision aim (right mouse)
reloadRreload (pistols), ground slam (staff)
aimModeBquick / precision aim
holsterHdraw the last weapon / holster
pickupEpick up an arrow
menuF7holster menu
handEditornoneadmin editor of the weapon in hand (assign it in the FiveM key settings)

Each key is { cmd, key, label }: cmd is the FiveM command, key the default key, label the text in Settings > Key Bindings > FiveM. Players change the keys there.

OptionDefaultWhat it does
Config.MenuCommand'armi'chat command of the holster menu (false = none)
Config.HandEditorCommand'armimano'chat command of the admin hand editor (false = none)

Config.Combat — who can be hit, melee

KeyDefaultWhat it does
pvptruedamage to players
partyProtecttrueno damage between members of the same NC Party
riftMobstruedamage to NC Rift mobs (export DamageMob)
riftPortalstruedamage to NC Rift portals (export DamageRift)
dungeonMobstruedamage to the mobs of the NC Dungeon engine
npcstruedamage to GTA NPCs
comboResetMs1600without hitting for this long the combo starts again
turnToTargettruemelee turns you toward the nearest target
turnRange4.0metres of that search
lock{ enabled = true, range = 8.0, angle = 28.0, gapClose = 2.5 }melee lock-on: circle on the target in the middle of the screen, you turn and close up to gapClose m
rangeTolerance1.5extra metres the server allows for lag
maxTargets6targets of one area hit
queueFrom0.4a click after this part of the swing (0–1) queues the next hit; earlier clicks are ignored
allowInVehiclefalseattacks from vehicles
disableGtaWeaponstruewith a weapon in hand the GTA weapons are put away and the weapon wheel is closed
moveWhileAttacktruewhile you move the attack animations play from the waist up

Config.HitReact — player hit

flag, ms and shake of the reaction when a player is hit, and one animation per side (front, back, left, right, from nc_attack_assets).

Config.Fists

enabled = true: without a weapon in hand the GTA punches are off and the fists use their own combo (left) and kick (right), set in Config.Weapons.pugni.

Config.Hud — numbers and combo

KeyDefaultWhat it does
damageNumberstruedamage numbers over the targets
damageTakenAlltruered number for any damage you take (mobs, NPCs, falls), not only from players
comboCountertruecombo counter on screen
comboTimeoutMs2500the counter resets after this pause
comboMin2shows from this many hits

Config.Stamina

KeyDefaultWhat it does
enabledtruestamina on / off
max100maximum
regenPerSec22points back per second
regenDelayMs900wait after an action before it comes back
exhaustedMs1800at 0, no attacks for this long
low20below this the bar is red
bowHoldPerSec12drain while the bow is drawn
aimPerSec3drain in precision aim with pistols / staff

Each attack spends the stamina of its line in config/weapons.lua.

Config.Dodge — backward dodge

Space with a weapon in hand: a quick step back from where the character faces. With a weapon in hand Space no longer jumps. NC Rift mobs check the distance when their hit lands, so a player who left the range is not hit.

KeyDefaultWhat it does
enabledtruedodge on / off
control22GTA control (22 = Space)
stamina20cost
cooldownMs800wait between two dodges
distance3.0metres back
moveMs350length of the step
recoverMs100no attacks for this long after the step
fiststruewith the fists too, only during a fight (just after a punch)
anims2 clips of nc_attack_assetsthe first one that exists is played

Config.Mana — magic staff

KeyDefaultWhat it does
enabledtruemana on / off
source'internal'internal (nc_attack's own mana), nc_hud (mana of nc_hud and its classes), auto (nc_hud when it runs)
max100maximum of the internal mana
regenPerSec6points back per second
regenDelayMs2500wait after spending before it comes back
stateKey'mana'player state bag with the internal mana (nc_party can show it in its boxes)

Config.Aim — bow, pistols, staff

KeyDefaultWhat it does
defaultMode'quick'aim mode at the start (quick, precision)
crosshairtruecrosshair on screen
precision.fov45.0zoom of the first-person camera
precision.camOffsetvec3(0.0, 0.10, 0.07)camera position from the head
precision.spreadDeg0.0spread
precision.headshotMult1.8headshot damage multiplier
precision.damageMult1.0damage multiplier
precision.moveRate0.55move speed while aiming
quick.assistAngle16.0degrees of the auto-aim cone
quick.assistRange35.0metres of the auto-aim
quick.spreadDeg1.6spread
quick.headshotMult1.0headshot multiplier
quick.damageMult0.85damage multiplier

Config.Arrows — arrows on the ground

KeyDefaultWhat it does
recovertruearrows can be picked up again
model'w_lr_bow_arrow'arrow model (nc_attack_assets)
stuckSeconds240how long an arrow stays
pickupRange1.8metres to pick it up
chanceOnMiss0.85chance an arrow stays when it hits a wall or the ground
chanceOnHit0.45chance it drops near the target it hit
maxPerPlayer40arrows on the ground per player (the oldest disappear)
showDistance40.0metres from which arrows are drawn

Config.Holster — weapons on the body

KeyDefaultWhat it does
enabledtrueweapons visible on the body
showAlltruetrue = every weapon in the inventory, false = only the last one used
maxVisible4weapons on the body at the same time
maxOffset0.35metres of the players' fine-tuning
places8 placesback, back_cross, back_low, hip_left, hip_right, thigh_left, thigh_right, chest: { label, bone, pos, rot }

The player picks the place of each weapon in the /armi menu (saved on their PC). The default place of each weapon is holster in config/weapons.lua; positions saved by the admins (data/positions.json) win over the config.

Config.Audio

KeyDefaultWhat it does
resource'nc_attack_assets'resource with the sound files (web/sounds)
volume0.75volume
maxDistance35.0metres from which others hear it
falloff1.6how fast it fades with distance

A sound of another resource is written 'resource:path/file.ogg'. You can replace the files with your .ogg / .mp3 / .wav.

Config.Fx

Generic effects reused by the weapons: carrier (invisible object carrying the trails), blood, sparks, dust ({ asset, name, scale } of a GTA particle effect).

Config.Weapons — config/weapons.lua

One entry per weapon (spadone, spada, katana, daga, ascia_piccola, ascia_grande, bastone, arco, pistole, pugni). Common fields:

FieldWhat it does
labelname shown in menus
iteminventory item that draws / holsters it
typemelee, bow, gun, staff
kinddamage kind for the NC Rift resistances: melee, bullet, magic
modelmodel or list of models: the first that exists is used (ours, then the GTA one)
hand{ bone, pos, rot } in the right hand; left = second weapon in the left hand (pistols)
holsterdefault place on the body (Config.Holster.places) or 'hidden'
holsterFix{ pos, rot } correction for every place, or { [place] = { pos, rot } }
perModel{ [model] = { hand, left, holsterFix, handAuto } }: settings of one model of the list
jobsnil = everyone, or { mage = 0, hunter = 2 } = job = minimum grade
moveRatemove speed with the weapon in hand (1 = normal)
sounds, hitFxswing / hit sounds and hit effect

Melee: combo = list of hits in order (left click), heavy = heavy attack (right click). Each hit: { dict, clip, ms, hitMs, speed, damage, range, angle, aoe, stamina, ragdollMs, lunge, phase, fx, sound } — range in metres, angle = degrees of the cone in front, aoe = true = everyone around within range, ragdollMs = knocks the target down, lunge = metres forward. ms / hitMs empty = read from the animation. phase = start the animation from this point (0–1), to skip a slow wind-up.

Ranged: ammo = { item, magazine, reloadMs, anim }, shot = { damage, speed, range, radius, cooldownMs, stamina, mana, gravity, anims, fx, sounds }. Bow: maxDamage, chargeMs, quickPower, maxSpeed for the draw. Staff: special = ground slam on R (damage, range, aoe, mana, cooldownMs, ragdollMs, fx).

Hand positions saved in game with /armimano (data/positions.json) win over hand / left / holsterFix.

The full guide in 9 languages is also in the resource's docs/ folder.