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
| Option | Default | What it does |
|---|---|---|
Config.Locale | 'it' | fallback language (it, en) when the player's game language is not available |
Config.Debug | false | true = extra messages in the F8 / server console |
Config.Bridge — framework, inventory, notices
| Key | Default | What it does |
|---|---|---|
Framework | 'auto' | auto, qbx, qb, esx, standalone |
LocaleFromGame | true | each player gets the language of their game |
Notify | 'auto' | notices: auto, nui, ox_lib, gta, framework … |
NotifyMs | 3500 | how long a notice stays (ms) |
Inventory | 'auto' | inventory used for the weapon items and ammo |
Party | true | false = ignore nc_party (no protection between mates) |
Config.UI — look
| Key | Default | What 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 |
scale | 1.0 | size of the whole UI |
Config.Keys, commands
| Key | Default | What it does |
|---|---|---|
attackControl | 24 | GTA control of the attack (left mouse), read only with a weapon in hand |
aimControl | 25 | GTA control of the heavy attack / precision aim (right mouse) |
reload | R | reload (pistols), ground slam (staff) |
aimMode | B | quick / precision aim |
holster | H | draw the last weapon / holster |
pickup | E | pick up an arrow |
menu | F7 | holster menu |
handEditor | none | admin 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.
| Option | Default | What 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
| Key | Default | What it does |
|---|---|---|
pvp | true | damage to players |
partyProtect | true | no damage between members of the same NC Party |
riftMobs | true | damage to NC Rift mobs (export DamageMob) |
riftPortals | true | damage to NC Rift portals (export DamageRift) |
dungeonMobs | true | damage to the mobs of the NC Dungeon engine |
npcs | true | damage to GTA NPCs |
comboResetMs | 1600 | without hitting for this long the combo starts again |
turnToTarget | true | melee turns you toward the nearest target |
turnRange | 4.0 | metres 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 |
rangeTolerance | 1.5 | extra metres the server allows for lag |
maxTargets | 6 | targets of one area hit |
queueFrom | 0.4 | a click after this part of the swing (0–1) queues the next hit; earlier clicks are ignored |
allowInVehicle | false | attacks from vehicles |
disableGtaWeapons | true | with a weapon in hand the GTA weapons are put away and the weapon wheel is closed |
moveWhileAttack | true | while 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
| Key | Default | What it does |
|---|---|---|
damageNumbers | true | damage numbers over the targets |
damageTakenAll | true | red number for any damage you take (mobs, NPCs, falls), not only from players |
comboCounter | true | combo counter on screen |
comboTimeoutMs | 2500 | the counter resets after this pause |
comboMin | 2 | shows from this many hits |
Config.Stamina
| Key | Default | What it does |
|---|---|---|
enabled | true | stamina on / off |
max | 100 | maximum |
regenPerSec | 22 | points back per second |
regenDelayMs | 900 | wait after an action before it comes back |
exhaustedMs | 1800 | at 0, no attacks for this long |
low | 20 | below this the bar is red |
bowHoldPerSec | 12 | drain while the bow is drawn |
aimPerSec | 3 | drain 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.
| Key | Default | What it does |
|---|---|---|
enabled | true | dodge on / off |
control | 22 | GTA control (22 = Space) |
stamina | 20 | cost |
cooldownMs | 800 | wait between two dodges |
distance | 3.0 | metres back |
moveMs | 350 | length of the step |
recoverMs | 100 | no attacks for this long after the step |
fists | true | with the fists too, only during a fight (just after a punch) |
anims | 2 clips of nc_attack_assets | the first one that exists is played |
Config.Mana — magic staff
| Key | Default | What it does |
|---|---|---|
enabled | true | mana 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) |
max | 100 | maximum of the internal mana |
regenPerSec | 6 | points back per second |
regenDelayMs | 2500 | wait 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
| Key | Default | What it does |
|---|---|---|
defaultMode | 'quick' | aim mode at the start (quick, precision) |
crosshair | true | crosshair on screen |
precision.fov | 45.0 | zoom of the first-person camera |
precision.camOffset | vec3(0.0, 0.10, 0.07) | camera position from the head |
precision.spreadDeg | 0.0 | spread |
precision.headshotMult | 1.8 | headshot damage multiplier |
precision.damageMult | 1.0 | damage multiplier |
precision.moveRate | 0.55 | move speed while aiming |
quick.assistAngle | 16.0 | degrees of the auto-aim cone |
quick.assistRange | 35.0 | metres of the auto-aim |
quick.spreadDeg | 1.6 | spread |
quick.headshotMult | 1.0 | headshot multiplier |
quick.damageMult | 0.85 | damage multiplier |
Config.Arrows — arrows on the ground
| Key | Default | What it does |
|---|---|---|
recover | true | arrows can be picked up again |
model | 'w_lr_bow_arrow' | arrow model (nc_attack_assets) |
stuckSeconds | 240 | how long an arrow stays |
pickupRange | 1.8 | metres to pick it up |
chanceOnMiss | 0.85 | chance an arrow stays when it hits a wall or the ground |
chanceOnHit | 0.45 | chance it drops near the target it hit |
maxPerPlayer | 40 | arrows on the ground per player (the oldest disappear) |
showDistance | 40.0 | metres from which arrows are drawn |
Config.Holster — weapons on the body
| Key | Default | What it does |
|---|---|---|
enabled | true | weapons visible on the body |
showAll | true | true = every weapon in the inventory, false = only the last one used |
maxVisible | 4 | weapons on the body at the same time |
maxOffset | 0.35 | metres of the players' fine-tuning |
places | 8 places | back, 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
| Key | Default | What it does |
|---|---|---|
resource | 'nc_attack_assets' | resource with the sound files (web/sounds) |
volume | 0.75 | volume |
maxDistance | 35.0 | metres from which others hear it |
falloff | 1.6 | how 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:
| Field | What it does |
|---|---|
label | name shown in menus |
item | inventory item that draws / holsters it |
type | melee, bow, gun, staff |
kind | damage kind for the NC Rift resistances: melee, bullet, magic |
model | model 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) |
holster | default 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 |
jobs | nil = everyone, or { mage = 0, hunter = 2 } = job = minimum grade |
moveRate | move speed with the weapon in hand (1 = normal) |
sounds, hitFx | swing / 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.